Revert "xen/domctl: Introduce XEN_DOMCTL_CDF_vpci flag"
PATCH 1/1 Revert "xen/domctl: Introduce XEN_DOMCTL_CDF_vpci flag"
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
--- 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(-)
tools/ocaml/libs/xc/xenctrl.ml +0 -1
@@ -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 =
tools/ocaml/libs/xc/xenctrl.mli +0 -1
@@ -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 =
xen/arch/arm/domain.c +1 -2
@@ -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 ) {
xen/arch/x86/domain.c +0 -6
@@ -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;
xen/common/domain.c +1 -2
@@ -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 ;
xen/include/public/domctl.h +1 -2
@@ -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
Signature · 1 line
2.29.0
Quoted 17 lines · Michal Orzel
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_vpcifor x86 which is not true as it should be set for dom0 PVH.Due to
XEN_DOMCTL_CDF_vpmubeing introduced afterXEN_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 <[email protected]>
Quoted 8 lines
--- 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(-)
Applicable parts
Jan
Hi Michal,
Quoted 12 lines · Michal Orzel
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_vpcifor x86 which is not true as it should be set for dom0 PVH.
Quoted 7 lines
Due to
XEN_DOMCTL_CDF_vpmubeing introduced afterXEN_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 <[email protected]>
Cheers
Bertrand
Quoted 97 lines
---
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(-)tools/ocaml/libs/xc/xenctrl.ml +0
-1@@ -69,7 +69,6 @@ type domain_create_flag = | CDF_XS_DOMAIN | CDF_IOMMU | CDF_NESTED_VIRT - | CDF_VPCI | CDF_VPMUtype
domain_create_iommu_opts=tools/ocaml/libs/xc/xenctrl.mli +0
-1@@ -62,7 +62,6 @@ type domain_create_flag = | CDF_XS_DOMAIN | CDF_IOMMU | CDF_NESTED_VIRT - | CDF_VPCI | CDF_VPMUtype
domain_create_iommu_opts=xen/arch/arm/domain.c +1
-2@@ -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 ) {xen/arch/x86/domain.c +0
-6@@ -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;xen/common/domain.c +1
-2@@ -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 ;xen/include/public/domctl.h +1
-2@@ -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_vpmuSignature · 1 line
2.29.0
Hi Michal,
Quoted 10 lines · Michal Orzel
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_vpcifor x86 which is not true as it should be set for dom0 PVH.
Quoted 7 lines
Due to
XEN_DOMCTL_CDF_vpmubeing introduced afterXEN_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 <[email protected]>
Looking at the thread, we are only missing an ack for...
Quoted 2 lines
--- tools/ocaml/libs/xc/xenctrl.ml | 1 - > tools/ocaml/libs/xc/xenctrl.mli | 1 -
the OCAML part. I can commit it once this is done.
Cheers,
Signature · 1 line
Julien Grall
Christian Lindig
Acked-byOn 14 Oct 2021, at 10:33, Julien Grall <[email protected]<mailto:[email protected]>> wrote:
Looking at the thread, we are only missing an ack for...
--- tools/ocaml/libs/xc/xenctrl.ml | 1 - > tools/ocaml/libs/xc/xenctrl.mli | 1 -
Quoted 10 lines · Christian Lindig
Quoted 8 lines · On 14 Oct 2021, at 10:33, Julien Grall <[email protected]…
Looking at the thread, we are only missing an ack for...
Quoted 2 lines
---
tools/ocaml/libs/xc/xenctrl.ml | 1 - > tools/ocaml/libs/xc/xenctrl.mli | 1 -Acked-by Christian Lindig <[email protected] <mailto:[email protected]>>
Committed. Thank you!
Cheers,
Signature · 1 line
Julien Grall
Michal Orzel writes ("[PATCH] Revert "xen/domctl: Introduce XEN_DOMCTL_CDF_vpci flag""):
Quoted 10 lines
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_vpcifor x86 which is not true as it should be set for dom0 PVH.
Quoted 5 lines
Due to
XEN_DOMCTL_CDF_vpmubeing introduced afterXEN_DOMCTL_CDF_vpci, modify its bit position from 8 to 7.
FTAOD, I don't think this will be necessary, but preemptively,