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

Re: [Xen-devel] [PATCH v2 3/6] hvm/mtrr: use the hardware number of variable ranges for Dom0



On Wed, May 16, 2018 at 07:51:07AM -0600, Jan Beulich wrote:
> >>> On 16.05.18 at 15:41, <roger.pau@xxxxxxxxxx> wrote:
> > On Wed, May 16, 2018 at 06:01:00AM -0600, Jan Beulich wrote:
> >> @@ -729,6 +729,14 @@ static int hvm_load_mtrr_msr(struct doma
> >>      if ( hvm_load_entry(MTRR, h, &hw_mtrr) != 0 )
> >>          return -EINVAL;
> >>  
> >> +    if ( (uint8_t)hw_mtrr.msr_mtrr_cap > MTRR_VCNT )
> > 
> > And here I would compare against the VCNT in mtrr_state->mtrr_cat
> > instead of MTRR_VCNT if you agree.
> 
> No, I don't agree: We're _defining_ the number of MTRRs for this vCPU
> here. There's no difference if such a record is loaded only once, or if all
> such records agree in count. But I don't see why we should refuse
> loading a record with a count higher than that provided by an earlier
> record, but no larger than MTRR_VCNT.

You are right, a previous load could have changed mtrr_state->mtrr_cap
to < MTRR_VCNT, and then subsequent intents to load MTRR_VCNT number
of MTRRs would fail.

Thanks, Roger.

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