>>> On 03.08.18 at 15:53, <[email protected]> wrote: > + for ( i = 0; i < MASK_EXTR(hw_mtrr.msr_mtrr_cap, MTRRcap_VCNT); i++ ) > + { > + /* save physbase */ > + hw_mtrr.msr_mtrr_var[i * 2] = mtrr_state->var_ranges->base; > + /* save physmask */ > + hw_mtrr.msr_mtrr_var[i * 2 + 1] = mtrr_state->var_ranges->mask; > + }
One of the intended side effects of using structure field on the rhs was to be able to drop the (now redundant) comments. > - 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(). Jan _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
