bug: introduce ASSERT_STRUCT_OFFSET
authorMaxim Levitsky <mlevitsk@redhat.com>
Tue, 25 Oct 2022 12:47:27 +0000 (15:47 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 9 Nov 2022 17:31:16 +0000 (12:31 -0500)
commit07a368b3f55a79d33cad113d506b279e04fd2a00
treea5cc4f6daeedce9bdb81f08525650557fcb30874
parent00009406f0dbc53b95b9062c0cc297d6893ff394
bug: introduce ASSERT_STRUCT_OFFSET

ASSERT_STRUCT_OFFSET allows to assert during the build of
the kernel that a field in a struct have an expected offset.

KVM used to have such macro, but there is almost nothing KVM specific
in it so move it to build_bug.h, so that it can be used in other
places in KVM.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20221025124741.228045-10-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmcs12.h
include/linux/build_bug.h