On 30.05.2025 15:45, Edgar E. Iglesias wrote:
> --- a/xen/common/domain.c
> +++ b/xen/common/domain.c
> @@ -721,7 +721,8 @@ 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_vpmu) )
> + XEN_DOMCTL_CDF_nested_virt | XEN_DOMCTL_CDF_vpmu |
> + XEN_DOMCTL_CDF_trap_unmapped_accesses) )
> {
> dprintk(XENLOG_INFO, "Unknown CDF flags %#x\n", config->flags);
> return -EINVAL;
> --- a/xen/include/public/domctl.h
> +++ b/xen/include/public/domctl.h
> @@ -66,9 +66,11 @@ struct xen_domctl_createdomain {
> #define XEN_DOMCTL_CDF_nested_virt (1U << _XEN_DOMCTL_CDF_nested_virt)
> /* Should we expose the vPMU to the guest? */
> #define XEN_DOMCTL_CDF_vpmu (1U << 7)
> +/* Should we trap guest accesses to unmapped addresses? */
> +#define XEN_DOMCTL_CDF_trap_unmapped_accesses (1U << 8)
Besides being pretty long an identifier (and that's already with "guest" not
even in the name), if this is to be arch-independent, would this perhaps fit
x86'es recently introduced "advanced" PVH handling of holes? See [1].
Jan
[1] 104591f5dd67 ("x86/dom0: attempt to fixup p2m page-faults for PVH dom0")