]> xenbits.xensource.com Git - xen.git/commitdiff
Revert "xen/domctl: Introduce XEN_DOMCTL_CDF_vpci flag"
authorMichal Orzel <michal.orzel@arm.com>
Thu, 14 Oct 2021 08:47:18 +0000 (10:47 +0200)
committerJulien Grall <jgrall@amazon.com>
Thu, 14 Oct 2021 10:08:07 +0000 (10:08 +0000)
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@arm.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com<mailto:christian.lindig@citrix.com>>
Acked-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
tools/ocaml/libs/xc/xenctrl.ml
tools/ocaml/libs/xc/xenctrl.mli
xen/arch/arm/domain.c
xen/arch/x86/domain.c
xen/common/domain.c
xen/include/public/domctl.h

index 86758babb383f6eec0f5c7b99248d0ad0dc2da10..addcf4cc593d63d766f51bdfd0dfb50772901fc8 100644 (file)
@@ -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 =
index 0fdb0cc169f98682439efb3124969d5d4b8adc32..0a5ce529e9514f86ca3b099065fb8c089da0f8c7 100644 (file)
@@ -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 =
index ad21c9b95028b91a056f5ea9cb206fa586904bda..eef0661beb4bd04e066429437041808464008ba3 100644 (file)
@@ -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 )
     {
index 79c2aa4636100fc8b5056bbf4a6e53eee3dcd72f..ef1812dc14022f10b45c6a19b3aa1769ca10c998 100644 (file)
@@ -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;
index 8543fb54fd513471df610c656f04cd412156c3de..8b53c49d1ef21b344ca8ebe99d4d1bb14d41e908 100644 (file)
@@ -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;
index a53cbd16f4756c22aa0b2c35860dbfa718144845..238384b5ae3b7adddf1c61e59b88e61d0fb59fe6 100644 (file)
@@ -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