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

Re: [Xen-devel] [PATCH] x86: drop unneeded __packed attributes



>>> On 06.03.17 at 17:42, <roger.pau@xxxxxxxxxx> wrote:
> There where a couple of unneeded packed attributes in several x86-specific
> structures, that are obviously aligned. The only non-trivial one is
> vmcb_struct, which has been checked to have the same layout with and without
> the packed attribute using pahole. In that case add a build-time size check to
> be on the safe side.
> 
> No functional change is expected as a result of this commit.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
albeit ...

> --- a/xen/arch/x86/hvm/svm/vmcb.c
> +++ b/xen/arch/x86/hvm/svm/vmcb.c
> @@ -71,6 +71,9 @@ static int construct_vmcb(struct vcpu *v)
>      struct arch_svm_struct *arch_svm = &v->arch.hvm_svm;
>      struct vmcb_struct *vmcb = arch_svm->vmcb;
>  
> +    /* Build-time check of the size of VMCB AMD structure. */
> +    BUILD_BUG_ON(sizeof(*vmcb) != 4096);

... I wonder whether this wouldn't better be PAGE_SIZE.

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®.