From nobody Fri Apr 19 18:43:42 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1634201280468845.5816364105907; Thu, 14 Oct 2021 01:48:00 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.209090.365429 (Exim 4.92) (envelope-from ) id 1mawOp-0000fh-TI; Thu, 14 Oct 2021 08:47:39 +0000 Received: by outflank-mailman (output) from mailman id 209090.365429; Thu, 14 Oct 2021 08:47:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mawOp-0000fa-QJ; Thu, 14 Oct 2021 08:47:39 +0000 Received: by outflank-mailman (input) for mailman id 209090; Thu, 14 Oct 2021 08:47:37 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mawOn-0000fU-QA for xen-devel@lists.xenproject.org; Thu, 14 Oct 2021 08:47:37 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 615f2174-2ccb-11ec-81b5-12813bfff9fa; Thu, 14 Oct 2021 08:47:36 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3994611D4; Thu, 14 Oct 2021 01:47:36 -0700 (PDT) Received: from e123311-lin.arm.com (unknown [10.57.24.225]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 34EE33F66F; Thu, 14 Oct 2021 01:47:31 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 615f2174-2ccb-11ec-81b5-12813bfff9fa From: Michal Orzel To: xen-devel@lists.xenproject.org Cc: Christian Lindig , David Scott , Ian Jackson , Wei Liu , Andrew Cooper , George Dunlap , Jan Beulich , Julien Grall , Stefano Stabellini , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , bertrand.marquis@arm.com Subject: [PATCH] Revert "xen/domctl: Introduce XEN_DOMCTL_CDF_vpci flag" Date: Thu, 14 Oct 2021 10:47:18 +0200 Message-Id: <20211014084718.21733-1-michal.orzel@arm.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1634201282085100003 Content-Type: text/plain; charset="utf-8" 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=3D163354215300039&r=3D1&w=3D2 Signed-off-by: Michal Orzel Acked-by: Christian Lindig > Acked-by: Jan Beulich Acked-by: Julien Grall Reviewed-by: Bertrand Marquis --- 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 =3D | CDF_XS_DOMAIN | CDF_IOMMU | CDF_NESTED_VIRT - | CDF_VPCI | CDF_VPMU =20 type domain_create_iommu_opts =3D 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 =3D | CDF_XS_DOMAIN | CDF_IOMMU | CDF_NESTED_VIRT - | CDF_VPCI | CDF_VPMU =20 type domain_create_iommu_opts =3D 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_creat= edomain *config) { unsigned int max_vcpus; unsigned int flags_required =3D (XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_h= ap); - unsigned int flags_optional =3D (XEN_DOMCTL_CDF_iommu | XEN_DOMCTL_CDF= _vpci | - XEN_DOMCTL_CDF_vpmu); + unsigned int flags_optional =3D (XEN_DOMCTL_CDF_iommu | XEN_DOMCTL_CDF= _vpmu); =20 if ( (config->flags & ~flags_optional) !=3D 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_crea= tedomain *config) return -EINVAL; } =20 - 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 =3D 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_cre= atedomain *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) =20 /* Max XEN_DOMCTL_CDF_* constant. Used for ABI checking. */ #define XEN_DOMCTL_CDF_MAX XEN_DOMCTL_CDF_vpmu --=20 2.29.0