OSDN Git Service

KVM: nVMX: Ensure that VMCS12 field offsets do not change
authorJim Mattson <jmattson@google.com>
Tue, 1 May 2018 22:40:28 +0000 (15:40 -0700)
committerRadim Krčmář <rkrcmar@redhat.com>
Wed, 23 May 2018 15:48:42 +0000 (17:48 +0200)
commit21ebf53b2cb74ea78299f8238a4c51b97dff421e
tree404f7f013e590c228c81769f5d1f58eea59c48c4
parentb348e7933c41b973dd953c4265ad1a60222c8ccf
KVM: nVMX: Ensure that VMCS12 field offsets do not change

Enforce the invariant that existing VMCS12 field offsets must not
change. Experience has shown that without strict enforcement, this
invariant will not be maintained.

Signed-off-by: Jim Mattson <jmattson@google.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[Changed the code to use BUILD_BUG_ON_MSG instead of better, but GCC 4.6
 requiring _Static_assert. - Radim.]
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
arch/x86/kvm/vmx.c