amd iommu: Large io page support - Interface
PATCH 1/4 amd iommu: Large io page support - Interface
This patch extends generic iommu interfaces to support different page size.
Thanks,
Wei
--
Legal Information:
Advanced Micro Devices GmbH
Sitz: Dornach, Gemeinde Aschheim, Landkreis München Registergericht München, HRB Nr. 43632
Geschäftsführer:
Alberto Bozzo, Andrew Bowd
xen/drivers/passthrough/amd/pci_amd_iommu.c +2 -0
@@ -447,4 +447,6 @@ const struct iommu_ops amd_iommu_ops = { .read_msi_from_ire = amd_iommu_read_msi_from_ire, .suspend = amd_iommu_suspend, .resume = amd_iommu_resume, + .map_pages = amd_iommu_map_pages, + .unmap_pages = amd_iommu_unmap_pages, };
xen/drivers/passthrough/vtd/iommu.c +2 -0
@@ -2222,6 +2222,8 @@ const struct iommu_ops intel_iommu_ops = .read_msi_from_ire = msi_msg_read_remap_rte, .suspend = vtd_suspend, .resume = vtd_resume, + .map_pages = NULL, + .unmap_pages = NULL, };/*
xen/include/asm-x86/hvm/svm/amd-iommu-proto.h +5 -0
@@ -55,6 +55,11 @@ int amd_iommu_reserve_domain_unity_map(sint amd_iommu_reserve_domain_unity_map (struct domain *domain,unsigned long phys_addr,unsigned long size,int iw,int ir);void invalidate_all_iommu_pages (struct domain *d); + +int amd_iommu_map_pages (struct domain *d,unsigned long gfn,unsigned long mfn, +unsigned int order,unsigned int flags); +int amd_iommu_unmap_pages (struct domain *d, +unsigned long gfn,unsigned int order);/* device table functions */ int get_dma_requestor_id (u16 bdf);
xen/include/xen/iommu.h +7 -0
@@ -86,6 +86,10 @@ int iommu_map_page(struct domain *d, uns unsigned int flags);int iommu_unmap_page (struct domain *d,unsigned long gfn); +int iommu_map_pages (struct domain *d,unsigned long gfn,unsigned long mfn, +unsigned int order,unsigned int flags); +int iommu_unmap_pages (struct domain *d,unsigned long gfn,unsigned int order); +void iommu_domain_teardown (struct domain *d);int hvm_do_IRQ_dpci (struct domain *d,unsigned int irq);int dpci_ioport_intercept (ioreq_t *p);
@@ -132,6 +136,9 @@ struct iommu_ops {unsigned int (*read_apic_from_ire)(unsigned int apic,unsigned int reg);void (*suspend)(void );void (*resume)(void ); +int (*map_pages)(struct domain *d,unsigned long gfn,unsigned long mfn, +unsigned int order,unsigned int flags); +int (*unmap_pages)(struct domain *d,unsigned long gfn,unsigned int order); };void iommu_update_ire_from_apic (unsigned int apic,unsigned int reg,unsigned int value);
_______________________________________________
Xen-devel mailing list [email protected]
http://lists.xensource.com/xen-devel
Why add new map/unmap calls. Better just to extend the existing calls to be able to act on a range, eh? That way you won't end up stubbing out and breaking Intel support in patch 3, either...
-- Keir
Quoted 17 lines · On 03/12/2010 08:03, "Wei Wang2" <[email protected]> wrote:
This patch extends generic iommu interfaces to support different page size.
Thanks,
WeiSigned-off-by Wei Wang <[email protected]>--
Legal Information:
Advanced Micro Devices GmbH
Sitz: Dornach, Gemeinde Aschheim,
Landkreis München Registergericht München,
HRB Nr. 43632
Geschäftsführer:
Alberto Bozzo, Andrew Bowd
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Also the patch uses but does not define amd_iommu_map_pages(). Looks like you took one big patch and arbitrarily cut it up into a patch series. That is pointless if the series does not step-wise build and work.
-- Keir
Quoted 27 lines · Keir Fraser
Why add new map/unmap calls. Better just to extend the existing calls to be able to act on a range, eh? That way you won't end up stubbing out and breaking Intel support in patch 3, either...
-- Keir
Quoted 17 lines · On 03/12/2010 08:03, "Wei Wang2" <[email protected]> wrote:
This patch extends generic iommu interfaces to support different page size.
Thanks,
WeiSigned-off-by Wei Wang <[email protected]>--
Legal Information:
Advanced Micro Devices GmbH
Sitz: Dornach, Gemeinde Aschheim,
Landkreis München Registergericht München,
HRB Nr. 43632
Geschäftsführer:
Alberto Bozzo, Andrew Bowd
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Thanks, I will fix that.
Wei
Quoted 32 lines · On Friday 03 December 2010 17:21:03 Keir Fraser wrote:
Also the patch uses but does not define
amd_iommu_map_pages(). Looks like you took one big patch and arbitrarily cut it up into a patch series. That is pointless if the series does not step-wise build and work.-- Keir
Quoted 25 lines · Keir Fraser
Why add new map/unmap calls. Better just to extend the existing calls to be able to act on a range, eh? That way you won't end up stubbing out and breaking Intel support in patch 3, either...
-- Keir
Quoted 18 lines · On 03/12/2010 08:03, "Wei Wang2" <[email protected]> wrote:
This patch extends generic iommu interfaces to support different page size.
Thanks,
WeiSigned-off-by Wei Wang <[email protected]>--
Legal Information:
Advanced Micro Devices GmbH
Sitz: Dornach, Gemeinde Aschheim,
Landkreis München Registergericht München,
HRB Nr. 43632
Geschäftsführer:
Alberto Bozzo, Andrew Bowd
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel