[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC][PATCH 07/13] xen/passthrough: extend hypercall to support rdm reservation policy
On 2015/5/9 0:07, Julien Grall wrote: Hi, On 10/04/15 10:21, Tiejun Chen wrote:diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h index ca0e51e..e5ba7cb 100644 --- a/xen/include/public/domctl.h +++ b/xen/include/public/domctl.h @@ -493,6 +493,10 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_sendtrigger_t); /* XEN_DOMCTL_deassign_device */ struct xen_domctl_assign_device { uint32_t machine_sbdf; /* machine PCI ID of assigned device */ + /* IN */ +#define XEN_DOMCTL_PCIDEV_RDM_TRY 0 +#define XEN_DOMCTL_PCIDEV_RDM_FORCE 1 + uint32_t sbdf_flag; /* flag of assigned device */ }; typedef struct xen_domctl_assign_device xen_domctl_assign_device_t; DEFINE_XEN_GUEST_HANDLE(xen_domctl_assign_device_t); diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h index 8565b82..0d10b3d 100644 --- a/xen/include/xen/iommu.h +++ b/xen/include/xen/iommu.h @@ -129,7 +129,7 @@ struct iommu_ops { int (*add_device)(u8 devfn, device_t *dev); int (*enable_device)(device_t *dev); int (*remove_device)(u8 devfn, device_t *dev); - int (*assign_device)(struct domain *, u8 devfn, device_t *dev); + int (*assign_device)(struct domain *, u8 devfn, device_t *dev, u32 flag);You need to update the ARM code with this new prototype: Thanks for your review. xen/drivers/passthrough/device_tree.c xen/drivers/passthrough/arm/smmu.c Is this fine to you?diff --git a/xen/drivers/passthrough/arm/smmu.c b/xen/drivers/passthrough/arm/smmu.c index 8a9b58b..a3e6383 100644 --- a/xen/drivers/passthrough/arm/smmu.c +++ b/xen/drivers/passthrough/arm/smmu.c@@ -2599,7 +2599,7 @@ static void arm_smmu_destroy_iommu_domain(struct iommu_domain *domain) } static int arm_smmu_assign_dev(struct domain *d, u8 devfn, - struct device *dev) + struct device *dev, u32 flag) { struct iommu_domain *domain; struct arm_smmu_xen_domain *xen_domain;diff --git a/xen/drivers/passthrough/device_tree.c b/xen/drivers/passthrough/device_tree.c index 377d41d..97e7fc5 100644 --- a/xen/drivers/passthrough/device_tree.c +++ b/xen/drivers/passthrough/device_tree.c@@ -41,7 +41,8 @@ int iommu_assign_dt_device(struct domain *d, struct dt_device_node *dev) if ( !list_empty(&dev->domain_list) ) goto fail; - rc = hd->platform_ops->assign_device(d, 0, dt_to_dev(dev)); + rc = hd->platform_ops->assign_device(d, 0, dt_to_dev(dev), + XEN_DOMCTL_PCIDEV_RDM_TRY); if ( rc ) goto fail; Thanks Tiejun _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |