mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
i386/tdx: Disable PIC for TDX VMs
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> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20250508150002.689633-38-xiaoyao.li@intel.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
committed by
Paolo Bonzini
parent
810d4e83d0
commit
e7ef60892c
@@ -381,6 +381,13 @@ static int tdx_kvm_init(ConfidentialGuestSupport *cgs, 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) {
|
||||
r = get_tdx_capabilities(errp);
|
||||
if (r) {
|
||||
|
||||
Reference in New Issue
Block a user