[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 3/3] xen: Expose the PMU to the guests


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Tue, 12 Oct 2021 15:31:25 +0100
  • Authentication-results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Ian Jackson" <iwj@xxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Nick Rosbrook <rosbrookn@xxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, "David Scott" <dave@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, <bertrand.marquis@xxxxxxx>
  • Delivery-date: Tue, 12 Oct 2021 14:31:51 +0000
  • Ironport-data: A9a23:SjdkuqsJ0EPbKApA0LeDUtnSmefnVF1YMUV32f8akzHdYApBsoF/q tZmKWuOb6yNajD8ctojb4q19ExTuJKExoJmQVRlqSA0Qy4X+JbJXdiXEBz9bniYRiHhoOOLz Cm8hv3odp1coqr0/0/1WlTZQP0VOZigHtIQMsadUsxKbVIiGHpJZS5LwbZj29cw2ILhWmthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ Npl8reXFT8QA4/wquFaTiRVEgxdE5FWweqSSZS/mZT7I0zudnLtx7NlDV0sPJ1e8eFyaY1M3 aVGcnZXNEnF3r/ohu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jQYJH5EEQcLRYOZ/iY0a1GgSHb6Pk4eR2o5CJ+8Ledf19VOh2A1H5UILdvadt3y uY9os8GrQe4j0NyYNqBiylV8UWKL2ABDPp75s1LXtezh1NymF9YYJHaBivn2721ao1BYhswP zuZpKvenLAAlEDMRGU+SCrW1u1HiJVQ5B0TlA0eJ06Ek8buj+Ms2EED6iw+SwlYw0kV0+93P WQ3ZUR5Kb/XomVtjclHGWutBxtAFFuS/UmokwkFk2jQTk+JUG3RLTJiZbbRrR5Bq28MLCJG+ Ly4yXr+VWe4dc786SI+REp5pqGxVtd27ADDxJiqEsnt80PWutY5bntCvVY1liY=
  • Ironport-hdrordr: A9a23:re19RqFUVVlyzVuYpLqE7MeALOsnbusQ8zAXPidKOHtom62j5q STdZEgviMc5wx8ZJhNo7+90cq7IU80l6Qa3WB5B97LNmTbUQCTTb1K3M/PxCDhBj271sM179 YET0GmMqySMbGtt7eZ3DWF
  • Ironport-sdr: +jZ2SpFyoidCyXWXZ+PCGJqEnlGPwRIlziQeAjVkCFWLEstTExLy11T7F882rjq2PeUpd0TJVk AnNGy9YmjB8MOt5JIzAmDJ3CgK8V/ziJZUiEqwr+pQnQiQlVI/9yG5t/9mmz0Wj4SvfiVIMfjs mnqGIvZ9/bv4vqaF+wvbNrO4zh7QqFGLHHMQ/yiCbwZNVBSvbG61zYaYUvHp5EKrdosFQIOX9K 4xNn1IcEkqZakBzUITmGxGuDuw1lnlb+UDk33NCjMDt4VYTMZ7aK/p+FoG0YHBdBmMnkEzJ9/9 xDb4tdXkVfM8rVIMwd+K5Wdz
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Oct 12, 2021 at 10:13:23AM +0200, Michal Orzel wrote:
> diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_create.c
> index e356b2106d..2a0234ec16 100644
> --- a/tools/libs/light/libxl_create.c
> +++ b/tools/libs/light/libxl_create.c
> @@ -622,6 +623,9 @@ int libxl__domain_make(libxl__gc *gc, libxl_domain_config 
> *d_config,
>                  create.flags |= XEN_DOMCTL_CDF_nested_virt;
>          }
>  
> +        if ( libxl_defbool_val(b_info->vpmu) )

We don't usually have space between the parentheses and the condition in
libxl.

> +            create.flags |= XEN_DOMCTL_CDF_vpmu;
> +
>          assert(info->passthrough != LIBXL_PASSTHROUGH_DEFAULT);
>          LOG(DETAIL, "passthrough: %s",
>              libxl_passthrough_to_string(info->passthrough));
> @@ -1199,6 +1203,12 @@ int libxl__domain_config_setdefault(libxl__gc *gc,
>          goto error_out;
>      }
>  
> +    if (libxl_defbool_val(d_config->b_info.vpmu) && !physinfo.cap_vpmu) {
> +        ret = ERROR_INVAL;
> +        LOGD(ERROR, domid, "vpmu not supported on this platform\n");

You don't need a '\n' here. Also, you could write "vPMU" instead of
"vpmu" in the error message.

Otherwise, changes for libxl and xl looks good:
Acked-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

Thanks,

-- 
Anthony PERARD



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.