|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 21/26] xen/xsm: wrap xsm-iommu-related functions with CONFIG_MGMT_HYPERCALLS
On 10.09.2025 09:38, Penny Zheng wrote:
> The following functions are xsm-related and only invoked under iommu-related
> domctl-op and shall all be wrapped with CONFIG_MGMT_HYPERCALLS:
> - xsm_get_device_group
> - xsm_assign_device
> - xsm_deassign_device
> - xsm_assign_dtdevice
> - xsm_deassign_dtdevice
>
> Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
First - aren't you dealing with unreachable code issues here that the earlier
patch introduced? I.e. would both patches need folding.
Then same question again as to xsm/dummy.h.
> --- a/xen/include/xsm/xsm.h
> +++ b/xen/include/xsm/xsm.h
> @@ -123,13 +123,13 @@ struct xsm_ops {
> int (*pci_config_permission)(struct domain *d, uint32_t machine_bdf,
> uint16_t start, uint16_t end, uint8_t
> access);
>
> -#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_PCI)
> +#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_HAS_PCI) &&
> defined(CONFIG_MGMT_HYPERCALLS)
Here and elsewhere below you're introducing overly long lines. This may be
helped some by having
#if defined(CONFIG_HAS_PASSTHROUGH) && defined(CONFIG_MGMT_HYPERCALLS)
#ifdef CONFIG_HAS_PCI
...
> int (*get_device_group)(uint32_t machine_bdf);
> int (*assign_device)(struct domain *d, uint32_t machine_bdf);
> int (*deassign_device)(struct domain *d, uint32_t machine_bdf);
> #endif
>
> -#if defined(CONFIG_HAS_PASSTHROUGH) &&
> defined(CONFIG_HAS_DEVICE_TREE_DISCOVERY)
> +#if defined(CONFIG_HAS_PASSTHROUGH) &&
> defined(CONFIG_HAS_DEVICE_TREE_DISCOVERY) && defined(CONFIG_MGMT_HYPERCALLS)
#ifdef CONFIG_HAS_DEVICE_TREE_DISCOVERY
> int (*assign_dtdevice)(struct domain *d, const char *dtpath);
> int (*deassign_dtdevice)(struct domain *d, const char *dtpath);
> #endif
And a double #endif here (and then similarly elsewhere).
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |