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

Re: [Xen-devel] [PATCH v15 06/14] x86/hvm: Introduce hvm_save_mtrr_msr_one func



> 
> > 
> > -        hvm_get_guest_pat(v, &hw_mtrr.msr_pat_cr);
> > +    memcpy(hw_mtrr.msr_mtrr_fixed, mtrr_state->fixed_ranges,
> > NUM_FIXED_MSR);
> You want to BUILD_BUG_ON() array sizes differing, and then use
> sizeof() in the call to memcpy().
> 
In this case sizes are different:
msr_mtrr_fixed[NUM_FIXED_MSR];
fixed_ranges[NUM_FIXED_RANGES];
#define NUM_FIXED_RANGES 88
#define NUM_FIXED_MSR 11

so it will most likely assert a message.

Alex




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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