|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RESEND v5 21/24] tools: L2 CAT: support get HW info for L2 CAT.
On Thu, Jan 19, 2017 at 02:01:23PM +0800, Yi Sun wrote:
> This patch implements xl/xc changes to support get HW info
> for L2 CAT.
>
> 'xl psr-hwinfo' is updated to show both L3 CAT and L2 CAT
> info.
>
> Example(on machine which only supports L2 CAT):
> Cache Monitoring Technology (CMT):
> Enabled : 0
> Cache Allocation Technology (CAT): L2
> Socket ID : 0
> Maximum COS : 3
> CBM length : 8
> Default CBM : 0xff
>
> Signed-off-by: He Chen <he.chen@xxxxxxxxxxxxxxx>
> Signed-off-by: Yi Sun <yi.y.sun@xxxxxxxxxxxxxxx>
Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
Only one nit below.
[...]
> -int xc_psr_cat_get_l3_info(xc_interface *xch, uint32_t socket,
> - uint32_t *cos_max, uint32_t *cbm_len,
> - bool *cdp_enabled)
> +int xc_psr_cat_get_info(xc_interface *xch, uint32_t socket, unsigned int lvl,
> + uint32_t *cos_max, uint32_t *cbm_len, bool
> *cdp_enabled)
> {
> - int rc;
> + int rc = -1;
> DECLARE_SYSCTL;
>
> sysctl.cmd = XEN_SYSCTL_psr_cat_op;
> - sysctl.u.psr_cat_op.cmd = XEN_SYSCTL_PSR_CAT_get_l3_info;
> sysctl.u.psr_cat_op.target = socket;
>
> - rc = xc_sysctl(xch, &sysctl);
> - if ( !rc )
> - {
> - *cos_max = sysctl.u.psr_cat_op.u.l3_info.cos_max;
> - *cbm_len = sysctl.u.psr_cat_op.u.l3_info.cbm_len;
> - *cdp_enabled = sysctl.u.psr_cat_op.u.l3_info.flags &
> - XEN_SYSCTL_PSR_CAT_L3_CDP;
> + switch ( lvl ) {
Please put '{' on a new line.
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |