[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v12 13/23] x86: refactor psr: CDP: implement CPU init flow.
On 17-06-30 01:33:02, Jan Beulich wrote: > >>> Yi Sun <yi.y.sun@xxxxxxxxxxxxxxx> 06/30/17 9:01 AM >>> > >On 17-06-30 00:40:35, Jan Beulich wrote: > >> >>> Yi Sun <yi.y.sun@xxxxxxxxxxxxxxx> 06/14/17 3:26 AM >>> > >> > @@ -253,6 +271,26 @@ static void cat_init_feature(const struct > >> > cpuid_leaf *regs, > >> > > >> > break; > >> > > >> > + case PSR_SOCKET_L3_CDP: > >> > + { > >> > + uint64_t val; > >> > + > >> > + /* Cut half of cos_max when CDP is enabled. */ > >> > + feat->cos_max >>= 1; > >> > >> I'm afraid this is off by one in the unusual but possible case of cos_max > >> being an even number. > >> > >This accords to spec: > >"For CDP operations, COS_MAX_CDP is equal to (CPUID.(EAX=10H, > >ECX=1):EDX.COS_MAX_CAT >>1)." > > > >HW should make sure it is even number. > > And how about someone using the command line option to shrink the to be used > set? > Good question. The command line option saved in 'opt_cos_max', even it is not even number and less than 'EDX.COS_MAX_CAT' so that the 'cos_max' here is same as it, the right shift operation does not cause any issue I think. The description in docs/misc/xen-command-line.markdown is clear that "the cos_max in use will automatically reduce to half when CDP is enabled". E.g. 'opt_cos_max' is 5, then we get 2 for CDP. I think user should be aware of this by reading the markdown file. > Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |