[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 34/40] hw/i386: add eoi_intercept_unsupported member to X86Mac
From: |
Xiaoyao Li |
Subject: |
[PATCH v1 34/40] hw/i386: add eoi_intercept_unsupported member to X86MachineState |
Date: |
Tue, 2 Aug 2022 15:47:44 +0800 |
Add a new bool member, eoi_intercept_unsupported, to X86MachineState
with default value false. Set true for TDX VM.
Inability to intercept eoi causes impossibility to emulate level
triggered interrupt to be re-injected when level is still kept active.
which affects interrupt controller emulation.
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
---
hw/i386/x86.c | 1 +
include/hw/i386/x86.h | 1 +
target/i386/kvm/tdx.c | 2 ++
3 files changed, 4 insertions(+)
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index a389ee26265a..6ab023713bf1 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -1401,6 +1401,7 @@ static void x86_machine_initfn(Object *obj)
x86ms->oem_table_id = g_strndup(ACPI_BUILD_APPNAME8, 8);
x86ms->bus_lock_ratelimit = 0;
x86ms->above_4g_mem_start = 4 * GiB;
+ x86ms->eoi_intercept_unsupported = false;
}
static void x86_machine_class_init(ObjectClass *oc, void *data)
diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h
index 62fa5774f849..0a294f9c3176 100644
--- a/include/hw/i386/x86.h
+++ b/include/hw/i386/x86.h
@@ -61,6 +61,7 @@ struct X86MachineState {
/* CPU and apic information: */
bool apic_xrupt_override;
+ bool eoi_intercept_unsupported;
unsigned pci_irq_mask;
unsigned apic_id_limit;
uint16_t boot_cpus;
diff --git a/target/i386/kvm/tdx.c b/target/i386/kvm/tdx.c
index 2f317a6bb55b..c734772200d0 100644
--- a/target/i386/kvm/tdx.c
+++ b/target/i386/kvm/tdx.c
@@ -675,6 +675,8 @@ int tdx_kvm_init(MachineState *ms, Error **errp)
return -EINVAL;
}
+ x86ms->eoi_intercept_unsupported = true;
+
if (!tdx_caps) {
get_tdx_capabilities();
}
--
2.27.0
- [PATCH v1 31/40] i386/tdx: Disable SMM for TDX VMs, (continued)
- [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, 2022/08/02
- [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 <=
- [PATCH v1 36/40] i386/tdx: Don't synchronize guest tsc for TDs, Xiaoyao Li, 2022/08/02
- [PATCH v1 38/40] i386/tdx: Skip kvm_put_apicbase() for TDs, Xiaoyao Li, 2022/08/02
- [PATCH v1 35/40] hw/i386: add option to forcibly report edge trigger in acpi tables, Xiaoyao Li, 2022/08/02
- [PATCH v1 37/40] i386/tdx: Only configure MSR_IA32_UCODE_REV in kvm_init_msrs() for TDs, Xiaoyao Li, 2022/08/02
- [PATCH v1 39/40] i386/tdx: Don't get/put guest state for TDX VMs, Xiaoyao Li, 2022/08/02