[PATCH v10 23/28] KVM: nVMX: Shadow ORIGINAL_EVENT_DATA and INJECTED_EVENT_DATA fields
From: Sohil Mehta
Date: Fri Sep 11 2026 - 18:02:59 EST
From: "Xin Li (Intel)" <xin@xxxxxxxxx>
Add ORIGINAL_EVENT_DATA and INJECTED_EVENT_DATA to the list of shadowed
VMCS fields.
Shadowing these fields allows the L1 hypervisor to access them without
triggering a VM-exit to L0, optimizing performance for nested
virtualization workloads that frequently query or inject event data.
Signed-off-by: Xin Li (Intel) <xin@xxxxxxxxx>
Signed-off-by: Sohil Mehta <sohil.mehta@xxxxxxxxx>
---
v10:
- Split out of "KVM: nVMX: Guard SHADOW_FIELD_R[OW] macros with VMX
feature checks" (Sean).
---
arch/x86/kvm/vmx/vmcs_shadow_fields.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/x86/kvm/vmx/vmcs_shadow_fields.h b/arch/x86/kvm/vmx/vmcs_shadow_fields.h
index 67e821c2be6d..bdd56f3ca6c3 100644
--- a/arch/x86/kvm/vmx/vmcs_shadow_fields.h
+++ b/arch/x86/kvm/vmx/vmcs_shadow_fields.h
@@ -74,6 +74,10 @@ SHADOW_FIELD_RW(HOST_GS_BASE, host_gs_base)
/* 64-bit */
SHADOW_FIELD_RO(GUEST_PHYSICAL_ADDRESS, guest_physical_address)
SHADOW_FIELD_RO(GUEST_PHYSICAL_ADDRESS_HIGH, guest_physical_address)
+SHADOW_FIELD_RO(ORIGINAL_EVENT_DATA, original_event_data)
+SHADOW_FIELD_RO(ORIGINAL_EVENT_DATA_HIGH, original_event_data)
+SHADOW_FIELD_RW(INJECTED_EVENT_DATA, injected_event_data)
+SHADOW_FIELD_RW(INJECTED_EVENT_DATA_HIGH, injected_event_data)
#endif
#undef SHADOW_FIELD_RO
--
2.43.0