On Tue, Aug 21, 2018 at 01:58:51AM -0600, Jan Beulich wrote: > >>> On 17.08.18 at 17:12, <wei.l...@citrix.com> wrote: > > Move it to x86 generic code. While at it, use proper boolean type. > > > > Signed-off-by: Wei Liu <wei.l...@citrix.com> > > Acked-by: Jan Beulich <jbeul...@suse.com> > with a couple of cosmetic adjustments beyond the bool > conversion you've already done: > > > +bool is_var_mtrr_overlapped(const struct mtrr_state *m) > > +{ > > + unsigned int seg, i; > > + unsigned int num_var_ranges = MASK_EXTR(m->mtrr_cap, MTRRcap_VCNT); > > + > > + for ( i = 0; i < num_var_ranges; i++ ) > > + { > > + uint64_t base1 = m->var_ranges[i].base >> PAGE_SHIFT; > > + uint64_t mask1 = m->var_ranges[i].mask >> PAGE_SHIFT; > > Here and below I wonder whether PFN_DOWN() wouldn't be > appropriate to use. I'll leave that up to you though. >
Since base and mask aren't really PFN so I think it would be more appropriate to leave them as-is. I have fixed up the other two issues you mentioned. Wei. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel