[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 64/70] hw/i386: add eoi_intercept_unsupported member to X86Mac
From: |
Xiaoyao Li |
Subject: |
[PATCH v3 64/70] hw/i386: add eoi_intercept_unsupported member to X86MachineState |
Date: |
Wed, 15 Nov 2023 02:15:13 -0500 |
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>
Acked-by: Gerd Hoffmann <kraxel@redhat.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 0f69b55c5219..58206396c2da 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -1413,6 +1413,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 ab1d38569019..b689feb389b3 100644
--- a/include/hw/i386/x86.h
+++ b/include/hw/i386/x86.h
@@ -59,6 +59,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 208fe3572839..1e8875f4af34 100644
--- a/target/i386/kvm/tdx.c
+++ b/target/i386/kvm/tdx.c
@@ -706,6 +706,8 @@ int tdx_kvm_init(MachineState *ms, Error **errp)
return -EINVAL;
}
+ x86ms->eoi_intercept_unsupported = true;
+
if (!tdx_caps) {
r = get_tdx_capabilities(errp);
if (r) {
--
2.34.1
- [PATCH v3 53/70] i386/tdx: setup a timer for the qio channel, (continued)
- [PATCH v3 53/70] i386/tdx: setup a timer for the qio channel, Xiaoyao Li, 2023/11/15
- [PATCH v3 52/70] i386/tdx: handle TDG.VP.VMCALL<GetQuote>, Xiaoyao Li, 2023/11/15
- [PATCH v3 56/70] i386/tdx: Handle TDG.VP.VMCALL<REPORT_FATAL_ERROR>, Xiaoyao Li, 2023/11/15
- [PATCH v3 57/70] i386/tdx: Wire TDX_REPORT_FATAL_ERROR with GuestPanic facility, Xiaoyao Li, 2023/11/15
- [PATCH v3 58/70] pci-host/q35: Move PAM initialization above SMRAM initialization, Xiaoyao Li, 2023/11/15
- [PATCH v3 60/70] i386/tdx: Disable SMM for TDX VMs, Xiaoyao Li, 2023/11/15
- [PATCH v3 61/70] i386/tdx: Disable PIC for TDX VMs, Xiaoyao Li, 2023/11/15
- [PATCH v3 59/70] q35: Introduce smm_ranges property for q35-pci-host, Xiaoyao Li, 2023/11/15
- [PATCH v3 62/70] i386/tdx: Don't allow system reset for TDX VMs, Xiaoyao Li, 2023/11/15
- [PATCH v3 65/70] hw/i386: add option to forcibly report edge trigger in acpi tables, Xiaoyao Li, 2023/11/15
- [PATCH v3 64/70] hw/i386: add eoi_intercept_unsupported member to X86MachineState,
Xiaoyao Li <=
- [PATCH v3 63/70] i386/tdx: LMCE is not supported for TDX, Xiaoyao Li, 2023/11/15
- [PATCH v3 66/70] i386/tdx: Don't synchronize guest tsc for TDs, Xiaoyao Li, 2023/11/15
- [PATCH v3 67/70] i386/tdx: Only configure MSR_IA32_UCODE_REV in kvm_init_msrs() for TDs, Xiaoyao Li, 2023/11/15
- [PATCH v3 68/70] i386/tdx: Skip kvm_put_apicbase() for TDs, Xiaoyao Li, 2023/11/15
- [PATCH v3 69/70] i386/tdx: Don't get/put guest state for TDX VMs, Xiaoyao Li, 2023/11/15
- [PATCH v3 70/70] docs: Add TDX documentation, Xiaoyao Li, 2023/11/15