[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/5] hvm/mtrr: use the hardware number of variable ranges for Dom0
>>> On 10.05.18 at 19:15, <roger.pau@xxxxxxxxxx> wrote: > --- > xen/arch/x86/hvm/mtrr.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) What about hvm_msr_{read,write}_intercept()'s uses of MTRR_VCNT? > @@ -683,6 +686,9 @@ static int hvm_save_mtrr_msr(struct domain *d, > hvm_domain_context_t *h) > | (mtrr_state->enabled << 10); > hw_mtrr.msr_mtrr_cap = mtrr_state->mtrr_cap; > > + if ( (mtrr_state->mtrr_cap & 0xff) != MTRR_VCNT ) > + return -EINVAL; I certainly agree with this one, but ... > @@ -727,6 +733,9 @@ static int hvm_load_mtrr_msr(struct domain *d, > hvm_domain_context_t *h) > > mtrr_state->mtrr_cap = hw_mtrr.msr_mtrr_cap; > > + if ( (mtrr_state->mtrr_cap & 0xff) != MTRR_VCNT ) > + return -EINVAL; ... isn't this more strict than it needs to be? A smaller incoming count ought to be okay I would think. Relaxing things here would then of course also require relaxing things on the save side. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |