From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: [RFC][PATCH 07/13] xen/passthrough: extend hypercall to support rdm reservation policy Date: Thu, 14 May 2015 13:48:18 +0800 Message-ID: <55543722.8030405@intel.com> References: <1428657724-3498-1-git-send-email-tiejun.chen@intel.com> <1428657724-3498-8-git-send-email-tiejun.chen@intel.com> <554CDF5E.8050806@citrix.com> <55506B8C.2070903@intel.com> <55507BA1.7000008@citrix.com> <5550A71F0200007800078E2B@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5550A71F0200007800078E2B@mail.emea.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , Julien Grall Cc: tim@xen.org, kevin.tian@intel.com, wei.liu2@citrix.com, ian.campbell@citrix.com, andrew.cooper3@citrix.com, Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org, stefano.stabellini@citrix.com, yang.z.zhang@intel.com List-Id: xen-devel@lists.xenproject.org On 2015/5/11 18:57, Jan Beulich wrote: >>>> On 11.05.15 at 11:51, wrote: >> Hi, >> >> On 11/05/15 09:42, Chen, Tiejun wrote: >>> 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); >> >> On ARM we can passthrough 2 different types of device: PCI device and >> platform device described in the device tree (it's a tree representation >> of the hardware). >> >> This assign_device callback deals with the latter. So from the name the >> value doesn't look right. > > Yeah, the constant name probably shouldn't refer to PCI, but simply > to pass-through. > What about XEN_DOMCTL_DEV_RDM_XXX? I mean this may be specific to device, right? Thanks Tiejun