>>> On 28.03.17 at 07:06, <yi.y....@linux.intel.com> wrote: > On 17-03-27 04:46:01, Jan Beulich wrote: >> >>> On 16.03.17 at 12:08, <yi.y....@linux.intel.com> wrote: >> > @@ -421,6 +425,18 @@ static bool cat_fits_cos_max(const uint32_t val[], >> > } >> > >> > /* L3 CAT ops */ >> > +static void l3_cat_write_msr(unsigned int cos, uint32_t val, >> > + enum cbm_type type, struct feat_node *feat) >> >> "type" is an unused parameter. Please remove it from the hook >> and this function. >> > This is used by CDP callback function. We need it to decide whether CODE > or DATA is written.
Strictly speaking you should then introduce it there - that'll also allow better judgment as whether it's actually needed there, or whether there are alternatives without. >> > + unsigned int cos = info->cos; >> > + struct feat_node *feat = info->feature; >> > + >> > + if ( !feat ) >> > + return; >> >> You shouldn't even call this function when !feat. >> > Ok, may I move the check to the 'write_psr_msr'? Perhaps that's the right place, but it may also be that it would better move even higher up. The question really is where it is useful/needed. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel