[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v9 15/25] x86: refactor psr: CDP: implement get hw info flow.
On 17-03-27 08:08:13, Jan Beulich wrote: > >>> On 16.03.17 at 12:08, <yi.y.sun@xxxxxxxxxxxxxxx> wrote: > > --- a/xen/arch/x86/sysctl.c > > +++ b/xen/arch/x86/sysctl.c > > @@ -180,10 +180,36 @@ long arch_do_sysctl( > > > > ret = psr_get_info(sysctl->u.psr_cat_op.target, > > PSR_CBM_TYPE_L3, data, ARRAY_SIZE(data)); > > - > > - sysctl->u.psr_cat_op.u.l3_info.cbm_len = > > data[PSR_INFO_IDX_CBM_LEN]; > > - sysctl->u.psr_cat_op.u.l3_info.cos_max = > > data[PSR_INFO_IDX_COS_MAX]; > > - sysctl->u.psr_cat_op.u.l3_info.flags = > > data[PSR_INFO_IDX_FLAG]; > > + if ( !ret ) > > + { > > + sysctl->u.psr_cat_op.u.l3_info.cbm_len = > > + data[PSR_INFO_IDX_CBM_LEN]; > > + sysctl->u.psr_cat_op.u.l3_info.cos_max = > > + data[PSR_INFO_IDX_COS_MAX]; > > + sysctl->u.psr_cat_op.u.l3_info.flags = > > + data[PSR_INFO_IDX_FLAG]; > > + } > > + else > > + { > > + /* > > + * Check if CDP is enabled. > > + * > > + * Per spec, L3 CAT and CDP cannot co-exist. So, we need > > replace > > + * output values to CDP's if it is enabled. > > + */ > > + ret = psr_get_info(sysctl->u.psr_cat_op.target, > > + PSR_CBM_TYPE_L3_CODE, data, > > + ARRAY_SIZE(data)); > > I think this could/should be done without such a strange retry > mechanism. You can find out which of the features is available, > can't you? > Ok, I can handle it inside psr_get_info. If L3 CAT feature node is NULL, will use CDP feature node. > > + if ( !ret ) > > + { > > + sysctl->u.psr_cat_op.u.l3_info.cbm_len = > > + data[PSR_INFO_IDX_CBM_LEN]; > > + sysctl->u.psr_cat_op.u.l3_info.cos_max = > > + data[PSR_INFO_IDX_COS_MAX]; > > + sysctl->u.psr_cat_op.u.l3_info.flags = > > + data[PSR_INFO_IDX_FLAG]; > > + } > > + } > > > > if ( !ret && __copy_field_to_guest(u_sysctl, sysctl, > > u.psr_cat_op) ) > > ret = -EFAULT; > > So where is PSR_CBM_TYPE_L3_DATA being handled? > This interface is to get L3 CAT/CDP HW info. So, either PSR_CBM_TYPE_L3_DATA or PSR_CBM_TYPE_L3_CODE can be used to get CDP's HW info. Either of them will be converted to feature type 'PSR_SOCKET_L3_CDP'. > Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |