]> git.baikalelectronics.ru Git - kernel.git/commit
x86/hyper-v: Mark TLFS structures packed
authorVitaly Kuznetsov <vkuznets@redhat.com>
Wed, 12 Dec 2018 17:57:01 +0000 (18:57 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Dec 2018 16:59:52 +0000 (17:59 +0100)
commitc21fa74fc69c33564dbe50ae6d12864a06959cce
treea54d099707a8eeb8222da0c4674c0a4ec646f3d6
parent0ae3feefb73bf5f72740a6330b23701c5be62da9
x86/hyper-v: Mark TLFS structures packed

The TLFS structures are used for hypervisor-guest communication and must
exactly meet the specification.

Compilers can add alignment padding to structures or reorder struct members
for randomization and optimization, which would break the hypervisor ABI.

Mark the structures as packed to prevent this. 'struct hv_vp_assist_page'
and 'struct hv_enlightened_vmcs' need to be properly padded to support the
change.

Suggested-by: Nadav Amit <nadav.amit@gmail.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Nadav Amit <nadav.amit@gmail.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/hyperv-tlfs.h