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

Re: [PATCH] Revert "xen/domctl: Introduce XEN_DOMCTL_CDF_vpci flag"


  • To: Michal Orzel <Michal.Orzel@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Thu, 14 Oct 2021 08:54:38 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UYJXEF5xZIle0JkB7WDknxafdr4nqw1UdyEtRkQhDzo=; b=gKIjWrCnRGQOl6RePbg2v+LmXWitdnZ60vXJ7GVtPYGqFXrOxKMOcCIqCSt0u/0/0wgGLLXi+SaQrYcEJbZvW8OBGWtXMK9nJVqOJOlm52IYMGWjX8fG+ovFpxFi+a5RjScXHg8DnUB2WFEn6AkwN2jKOwiCfTzXn5vdA9WJYEf3wiFbbzdvIehMiwvBNMRim86eW9Alv3gZ1gPRV1JWgEjd+6WBHd/YukNjdovpx5us2QTI9KsR0kksQdlUseED43+YfjY3frI9Tmc/l0jHs/PcZXM9aXU9ViCKj/f2aIgXlhZKlRES9MejqAfqq7x5rTgqBa0/6W61vE271I88JQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WXSY1ZXC7LLWcdZTBrG1WbRXCUqpgR2+n/stYbZ9hvW22mNLipCcwH4bEHpCTktPu84uLTMeIOkK7glF4UxVvi8OKRb4X7VzANkEkky8PTNhvIpibPNpsWqpie/8VjkXeNWGLawAht7R6oeMt14Cyd0y2wSzkpcE+jxjWc89CrFrTubhxZOklZRs6aQD95xK8CRq08FtMdvvOViggU7qmxMtml0d1q9M4D9nUKHA6e8+sVpmFYhWVrnuuLLYfrxiRL+co1LT3gBaU7TI67WbGtOsiR7iW2qVSMXB8SXkSKnsOarPC+S5qUG2koXtDs3rHXMFVWNBS9kBf7n8E2jrpg==
  • Authentication-results-original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Thu, 14 Oct 2021 08:55:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXwNgx8NpL0VHy4UKLU+O7ZFIg1avSMIwA
  • Thread-topic: [PATCH] Revert "xen/domctl: Introduce XEN_DOMCTL_CDF_vpci flag"

Hi Michal,

> On 14 Oct 2021, at 09:47, Michal Orzel <Michal.Orzel@xxxxxxx> wrote:
> 
> This reverts commit 2075b410ee8087662c880213c3aca196fb7ade22.
> 
> During the discussion [1] that took place after
> the patch was merged it was agreed that it should
> be reverted to avoid introducing a bad interface.
> 
> Furthermore, the patch rejected usage of flag
> XEN_DOMCTL_CDF_vpci for x86 which is not true
> as it should be set for dom0 PVH.
> 
> Due to XEN_DOMCTL_CDF_vpmu being introduced after
> XEN_DOMCTL_CDF_vpci, modify its bit position
> from 8 to 7.
> 
> [1] https://marc.info/?t=163354215300039&r=1&w=2
> 
> Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>

Cheers
Bertrand

> ---
> tools/ocaml/libs/xc/xenctrl.ml  | 1 -
> tools/ocaml/libs/xc/xenctrl.mli | 1 -
> xen/arch/arm/domain.c           | 3 +--
> xen/arch/x86/domain.c           | 6 ------
> xen/common/domain.c             | 3 +--
> xen/include/public/domctl.h     | 3 +--
> 6 files changed, 3 insertions(+), 14 deletions(-)
> 
> diff --git a/tools/ocaml/libs/xc/xenctrl.ml b/tools/ocaml/libs/xc/xenctrl.ml
> index 86758babb3..addcf4cc59 100644
> --- a/tools/ocaml/libs/xc/xenctrl.ml
> +++ b/tools/ocaml/libs/xc/xenctrl.ml
> @@ -69,7 +69,6 @@ type domain_create_flag =
>       | CDF_XS_DOMAIN
>       | CDF_IOMMU
>       | CDF_NESTED_VIRT
> -     | CDF_VPCI
>       | CDF_VPMU
> 
> type domain_create_iommu_opts =
> diff --git a/tools/ocaml/libs/xc/xenctrl.mli b/tools/ocaml/libs/xc/xenctrl.mli
> index 0fdb0cc169..0a5ce529e9 100644
> --- a/tools/ocaml/libs/xc/xenctrl.mli
> +++ b/tools/ocaml/libs/xc/xenctrl.mli
> @@ -62,7 +62,6 @@ type domain_create_flag =
>   | CDF_XS_DOMAIN
>   | CDF_IOMMU
>   | CDF_NESTED_VIRT
> -  | CDF_VPCI
>   | CDF_VPMU
> 
> type domain_create_iommu_opts =
> diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c
> index ad21c9b950..eef0661beb 100644
> --- a/xen/arch/arm/domain.c
> +++ b/xen/arch/arm/domain.c
> @@ -628,8 +628,7 @@ int arch_sanitise_domain_config(struct 
> xen_domctl_createdomain *config)
> {
>     unsigned int max_vcpus;
>     unsigned int flags_required = (XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap);
> -    unsigned int flags_optional = (XEN_DOMCTL_CDF_iommu | 
> XEN_DOMCTL_CDF_vpci |
> -                                   XEN_DOMCTL_CDF_vpmu);
> +    unsigned int flags_optional = (XEN_DOMCTL_CDF_iommu | 
> XEN_DOMCTL_CDF_vpmu);
> 
>     if ( (config->flags & ~flags_optional) != flags_required )
>     {
> diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
> index 79c2aa4636..ef1812dc14 100644
> --- a/xen/arch/x86/domain.c
> +++ b/xen/arch/x86/domain.c
> @@ -662,12 +662,6 @@ int arch_sanitise_domain_config(struct 
> xen_domctl_createdomain *config)
>         return -EINVAL;
>     }
> 
> -    if ( config->flags & XEN_DOMCTL_CDF_vpci )
> -    {
> -        dprintk(XENLOG_INFO, "vPCI cannot be enabled yet\n");
> -        return -EINVAL;
> -    }
> -
>     if ( config->vmtrace_size )
>     {
>         unsigned int size = config->vmtrace_size;
> diff --git a/xen/common/domain.c b/xen/common/domain.c
> index 8543fb54fd..8b53c49d1e 100644
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -486,8 +486,7 @@ static int sanitise_domain_config(struct 
> xen_domctl_createdomain *config)
>          ~(XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap |
>            XEN_DOMCTL_CDF_s3_integrity | XEN_DOMCTL_CDF_oos_off |
>            XEN_DOMCTL_CDF_xs_domain | XEN_DOMCTL_CDF_iommu |
> -           XEN_DOMCTL_CDF_nested_virt | XEN_DOMCTL_CDF_vpci |
> -           XEN_DOMCTL_CDF_vpmu) )
> +           XEN_DOMCTL_CDF_nested_virt | XEN_DOMCTL_CDF_vpmu) )
>     {
>         dprintk(XENLOG_INFO, "Unknown CDF flags %#x\n", config->flags);
>         return -EINVAL;
> diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
> index a53cbd16f4..238384b5ae 100644
> --- a/xen/include/public/domctl.h
> +++ b/xen/include/public/domctl.h
> @@ -70,9 +70,8 @@ struct xen_domctl_createdomain {
> #define XEN_DOMCTL_CDF_iommu          (1U<<_XEN_DOMCTL_CDF_iommu)
> #define _XEN_DOMCTL_CDF_nested_virt   6
> #define XEN_DOMCTL_CDF_nested_virt    (1U << _XEN_DOMCTL_CDF_nested_virt)
> -#define XEN_DOMCTL_CDF_vpci           (1U << 7)
> /* Should we expose the vPMU to the guest? */
> -#define XEN_DOMCTL_CDF_vpmu           (1U << 8)
> +#define XEN_DOMCTL_CDF_vpmu           (1U << 7)
> 
> /* Max XEN_DOMCTL_CDF_* constant.  Used for ABI checking. */
> #define XEN_DOMCTL_CDF_MAX XEN_DOMCTL_CDF_vpmu
> -- 
> 2.29.0
> 
> 




 


Rackspace

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