[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 4/3] x86/svm: Drop svm_segment_register_t



>>> On 03.07.17 at 15:10, <andrew.cooper3@xxxxxxxxxx> 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 <jbeulich@xxxxxxxx>

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.