[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 32/40] i386/tdx: Disable PIC for TDX VMs
From: |
Xiaoyao Li |
Subject: |
[PATCH v1 32/40] i386/tdx: Disable PIC for TDX VMs |
Date: |
Tue, 2 Aug 2022 15:47:42 +0800 |
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 70c56b7ba32c..2f317a6bb55b 100644
--- a/target/i386/kvm/tdx.c
+++ b/target/i386/kvm/tdx.c
@@ -668,6 +668,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.27.0
- [PATCH v1 20/40] i386/tdvf: Introduce function to parse TDVF metadata, (continued)
- [PATCH v1 20/40] i386/tdvf: Introduce function to parse TDVF metadata, Xiaoyao Li, 2022/08/02
- [PATCH v1 22/40] i386/tdx: Skip BIOS shadowing setup, Xiaoyao Li, 2022/08/02
- [PATCH v1 21/40] i386/tdx: Parse TDVF metadata for TDX VM, Xiaoyao Li, 2022/08/02
- [PATCH v1 26/40] headers: Add definitions from UEFI spec for volumes, resources, etc..., Xiaoyao Li, 2022/08/02
- [PATCH v1 27/40] i386/tdx: Setup the TD HOB list, Xiaoyao Li, 2022/08/02
- [PATCH v1 31/40] i386/tdx: Disable SMM for TDX VMs, Xiaoyao Li, 2022/08/02
- [PATCH v1 32/40] i386/tdx: Disable PIC for TDX VMs,
Xiaoyao Li <=
- [PATCH v1 28/40] i386/tdx: Add TDVF memory via KVM_TDX_INIT_MEM_REGION, Xiaoyao Li, 2022/08/02
- [PATCH v1 25/40] i386/tdx: Track RAM entries for TDX VM, Xiaoyao Li, 2022/08/02
- [PATCH v1 23/40] i386/tdx: Don't initialize pc.rom for TDX VMs, Xiaoyao Li, 2022/08/02
- [PATCH v1 33/40] i386/tdx: Don't allow system reset for TDX VMs, Xiaoyao Li, 2022/08/02
- [PATCH v1 29/40] i386/tdx: Call KVM_TDX_INIT_VCPU to initialize TDX vcpu, Xiaoyao Li, 2022/08/02
- [PATCH v1 30/40] i386/tdx: Finalize TDX VM, Xiaoyao Li, 2022/08/02
- [PATCH v1 24/40] i386/tdx: Track mem_ptr for each firmware entry of TDVF, Xiaoyao Li, 2022/08/02
- [PATCH v1 34/40] hw/i386: add eoi_intercept_unsupported member to X86MachineState, Xiaoyao Li, 2022/08/02