KVM: nVMX: Restore the VMCS12 offsets for v4.0 fields
authorJim Mattson <jmattson@google.com>
Tue, 1 May 2018 22:40:27 +0000 (15:40 -0700)
committerRadim Krčmář <rkrcmar@redhat.com>
Wed, 23 May 2018 14:33:48 +0000 (16:33 +0200)
commitb348e7933c41b973dd953c4265ad1a60222c8ccf
tree0f6efad96833b445279e494ae2dcd7e84baca283
parent899a31f509ee1c6f7008c3265d1f625bfcb23311
KVM: nVMX: Restore the VMCS12 offsets for v4.0 fields

Changing the VMCS12 layout will break save/restore compatibility with
older kvm releases once the KVM_{GET,SET}_NESTED_STATE ioctls are
accepted upstream. Google has already been using these ioctls for some
time, and we implore the community not to disturb the existing layout.

Move the four most recently added fields to preserve the offsets of
the previously defined fields and reserve locations for the vmread and
vmwrite bitmaps, which will be used in the virtualization of VMCS
shadowing (to improve the performance of double-nesting).

Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[Kept the SDM order in vmcs_field_to_offset_table. - Radim]
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/include/asm/vmx.h
arch/x86/kvm/vmx.c