[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 49/58] i386/tdx: Disable PIC for TDX VMs
From: |
Xiaoyao Li |
Subject: |
[PATCH v2 49/58] i386/tdx: Disable PIC for TDX VMs |
Date: |
Fri, 18 Aug 2023 05:50:32 -0400 |
Legacy PIC (8259) cannot be supported for TDX VMs since TDX module
doesn't allow directly interrupt injection. Using posted interrupts
for the PIC is not a viable option as the guest BIOS/kernel will not
do EOI for PIC IRQs, i.e. will leave the vIRR bit set.
Hence disable PIC for TDX VMs and error out if user wants PIC.
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
---
target/i386/kvm/tdx.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/target/i386/kvm/tdx.c b/target/i386/kvm/tdx.c
index f9d03ab0f461..23ecd84a9e21 100644
--- a/target/i386/kvm/tdx.c
+++ b/target/i386/kvm/tdx.c
@@ -689,6 +689,13 @@ int tdx_kvm_init(MachineState *ms, Error **errp)
return -EINVAL;
}
+ if (x86ms->pic == ON_OFF_AUTO_AUTO) {
+ x86ms->pic = ON_OFF_AUTO_OFF;
+ } else if (x86ms->pic == ON_OFF_AUTO_ON) {
+ error_setg(errp, "TDX VM doesn't support PIC");
+ return -EINVAL;
+ }
+
if (!tdx_caps) {
get_tdx_capabilities();
}
--
2.34.1
- Re: [PATCH v2 33/58] headers: Add definitions from UEFI spec for volumes, resources, etc..., (continued)
[PATCH v2 39/58] i386/tdx: Finalize TDX VM, Xiaoyao Li, 2023/08/18
[PATCH v2 46/58] i386/tdx: Handle TDG.VP.VMCALL<REPORT_FATAL_ERROR>, Xiaoyao Li, 2023/08/18
[PATCH v2 49/58] i386/tdx: Disable PIC for TDX VMs,
Xiaoyao Li <=
[PATCH v2 41/58] i386/tdx: handle TDG.VP.VMCALL<GetQuote>, Xiaoyao Li, 2023/08/18
- Re: [PATCH v2 41/58] i386/tdx: handle TDG.VP.VMCALL<GetQuote>, Markus Armbruster, 2023/08/22
- Re: [PATCH v2 41/58] i386/tdx: handle TDG.VP.VMCALL<GetQuote>, Daniel P . Berrangé, 2023/08/22
- Re: [PATCH v2 41/58] i386/tdx: handle TDG.VP.VMCALL<GetQuote>, Chenyi Qiang, 2023/08/29
- Re: [PATCH v2 41/58] i386/tdx: handle TDG.VP.VMCALL<GetQuote>, Daniel P . Berrangé, 2023/08/29
- Re: [PATCH v2 41/58] i386/tdx: handle TDG.VP.VMCALL<GetQuote>, Chenyi Qiang, 2023/08/30
- Re: [PATCH v2 41/58] i386/tdx: handle TDG.VP.VMCALL<GetQuote>, Xiaoyao Li, 2023/08/30
- Re: [PATCH v2 41/58] i386/tdx: handle TDG.VP.VMCALL<GetQuote>, Daniel P . Berrangé, 2023/08/30
- Re: [PATCH v2 41/58] i386/tdx: handle TDG.VP.VMCALL<GetQuote>, Xiaoyao Li, 2023/08/31
[PATCH v2 51/58] i386/tdx: LMCE is not supported for TDX, Xiaoyao Li, 2023/08/18