[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v9 12/25] x86: refactor psr: L3 CAT: set value: implement cos id picking flow.
>>> On 28.03.17 at 12:31, <yi.y.sun@xxxxxxxxxxxxxxx> wrote: > On 17-03-28 02:45:13, Jan Beulich wrote: >> >>> On 28.03.17 at 06:58, <yi.y.sun@xxxxxxxxxxxxxxx> wrote: >> > On 17-03-27 04:37:37, Jan Beulich wrote: >> >> >>> On 16.03.17 at 12:08, <yi.y.sun@xxxxxxxxxxxxxxx> wrote: >> >> > +static bool cat_fits_cos_max(const uint32_t val[], >> >> > + const struct feat_node *feat, >> >> > + unsigned int cos) >> >> > +{ >> >> > + if ( cos > feat->info.cat_info.cos_max && >> >> > + val[0] != feat->cos_reg_val[0] ) >> >> > + /* >> >> > + * Exceed cos_max and value to set is not default, >> >> > + * return error. >> >> > + */ >> >> > + return false; >> >> > + >> >> > + return true; >> >> > +} >> >> >> >> Same here - with cos_max moved out, the hook would seem to >> >> become unnecessary. >> >> >> > As explanation in previous patch, CDP has different behavior. >> > static bool l3_cdp_fits_cos_max(...) >> > { >> > if ( cos > feat->info.cat_info.cos_max && >> > (val[0] != get_cdp_data(feat, 0) || val[1] != get_cdp_code(feat, >> > 0)) ) >> > /* >> > * Exceed cos_max and value to set is not default, >> > * return error. >> > */ >> > return false; >> > >> > return true; >> > >> > } >> >> As said in reply, by making get_val() flexible enough you should >> be able to avoid this. > > Sorry, I am confused here. 'fits_cos_max' is called during set value process. > Why "making get_val() flexible enough" can avoid this? Because that would then replace the get_cdp_data() and get_cdp_code() calls above. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |