From: Wei Wang2 <wei.wang2@amd.com>
To: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH 1/4] amd iommu: Large io page support - Interface
Date: Fri, 3 Dec 2010 17:03:30 +0100 [thread overview]
Message-ID: <201012031703.30686.wei.wang2@amd.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 334 bytes --]
This patch extends generic iommu interfaces to support different page size.
Thanks,
Wei
Signed-off-by: Wei Wang <wei.wang2@amd.com>
--
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
[-- Attachment #2: iommu_spage_interface.patch --]
[-- Type: text/x-diff, Size: 2924 bytes --]
diff -r 79b71c77907b xen/drivers/passthrough/amd/pci_amd_iommu.c
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c Wed Nov 24 10:20:03 2010 +0000
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c Wed Nov 24 17:13:43 2010 +0100
@@ -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,
};
diff -r 79b71c77907b xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c Wed Nov 24 10:20:03 2010 +0000
+++ b/xen/drivers/passthrough/vtd/iommu.c Wed Nov 24 17:13:43 2010 +0100
@@ -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,
};
/*
diff -r 79b71c77907b xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
--- a/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h Wed Nov 24 10:20:03 2010 +0000
+++ b/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h Wed Nov 24 17:13:43 2010 +0100
@@ -55,6 +55,11 @@ int amd_iommu_reserve_domain_unity_map(s
int 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);
diff -r 79b71c77907b xen/include/xen/iommu.h
--- a/xen/include/xen/iommu.h Wed Nov 24 10:20:03 2010 +0000
+++ b/xen/include/xen/iommu.h Wed Nov 24 17:13:43 2010 +0100
@@ -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);
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2010-12-03 16:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-03 16:03 Wei Wang2 [this message]
2010-12-03 16:17 ` [PATCH 1/4] amd iommu: Large io page support - Interface Keir Fraser
2010-12-03 16:21 ` Keir Fraser
2010-12-03 16:24 ` Wei Wang2
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201012031703.30686.wei.wang2@amd.com \
--to=wei.wang2@amd.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.