>>> On 03.07.17 at 15:10, <andrew.coop...@citrix.com> wrote: > --- a/xen/arch/x86/hvm/svm/vmcb.c > +++ b/xen/arch/x86/hvm/svm/vmcb.c > @@ -310,6 +310,15 @@ void __init setup_vmcb_dump(void) > register_keyhandler('v', vmcb_dump, "dump AMD-V VMCBs", 1); > } > > +static void __init __maybe_unused build_assertions(void) > +{ > + /* Check struct segment_register against the VMCB segment layout. */ > + BUILD_BUG_ON(sizeof(struct segment_register) != 16); > + BUILD_BUG_ON(offsetof(struct segment_register, attr) != 2); > + BUILD_BUG_ON(offsetof(struct segment_register, limit) != 4); > + BUILD_BUG_ON(offsetof(struct segment_register, base) != 8); > +}
As said in reply to patch 1, I think we want to check both position and size here. With respective sizeof() checks added (and both for the so far missing sel field) Reviewed-by: Jan Beulich <jbeul...@suse.com> Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel