[PATCH] KVM: nVMX: Restore the VMCS12 revision 0x11e57ed0 layout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As the comment says above the vmcs12 structure definition, "if there
are changes in this struct, VMCS12_REVISION must be changed."

Actually, VMCS12_REVISION should never be changed, because such a
change introduces an incompatibility for live migration across kvm
versions.

The various padding fields were reserved to help accommodate future
growth without changing the vmcs12 layout. They aren't really
necessary, because one can always add new fields at the end, but since
they are there, let's use them as they were intended.

Fixes: 27c42a1bb8674 ("KVM: nVMX: Enable VMFUNC for the L1 hypervisor")
Signed-off-by: Jim Mattson <jmattson@xxxxxxxxxx>
---
 arch/x86/kvm/vmx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index aa66ccd6ed6c..dd985130c540 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -265,7 +265,6 @@ struct __packed vmcs12 {
 	u64 virtual_apic_page_addr;
 	u64 apic_access_addr;
 	u64 posted_intr_desc_addr;
-	u64 vm_function_control;
 	u64 ept_pointer;
 	u64 eoi_exit_bitmap0;
 	u64 eoi_exit_bitmap1;
@@ -288,7 +287,8 @@ struct __packed vmcs12 {
 	u64 host_ia32_pat;
 	u64 host_ia32_efer;
 	u64 host_ia32_perf_global_ctrl;
-	u64 padding64[8]; /* room for future expansion */
+	u64 vm_function_control;
+	u64 padding64[7]; /* room for future expansion */
 	/*
 	 * To allow migration of L1 (complete with its L2 guests) between
 	 * machines of different natural widths (32 or 64 bit), we cannot have
-- 
2.17.0.484.g0c8726318c-goog




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux