* [IOMMU][PATCH 4/4] Add a generic layer on top of intel and amd iommu code
@ 2008-02-13 16:46 Wei Wang2
0 siblings, 0 replies; only message in thread
From: Wei Wang2 @ 2008-02-13 16:46 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Type: text/plain, Size: 475 bytes --]
Signed-off-by: Wei Wang <wei.wang2@amd.com>
--
AMD Saxony, Dresden, Germany
Operating System Research Center
Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
Dr. Hans-R. Deppe, Thomas McCoy
[-- Attachment #2: p2m.patch --]
[-- Type: text/plain, Size: 960 bytes --]
diff -r 5e1df44d406e xen/arch/x86/mm/p2m.c
--- a/xen/arch/x86/mm/p2m.c Wed Feb 13 14:03:58 2008 +0000
+++ b/xen/arch/x86/mm/p2m.c Wed Feb 13 17:08:19 2008 +0100
@@ -255,8 +255,21 @@ set_p2m_entry(struct domain *d, unsigned
/* level 1 entry */
paging_write_p2m_entry(d, gfn, p2m_entry, table_mfn, entry_content, 1);
- if ( vtd_enabled && (p2mt == p2m_mmio_direct) && is_hvm_domain(d) )
- iommu_flush(d, gfn, (u64*)p2m_entry);
+ if ( iommu_enabled && is_hvm_domain(d) )
+ {
+ if ( boot_cpu_data.x86_vendor == X86_VENDOR_INTEL )
+ {
+ if ( (p2mt == p2m_mmio_direct) )
+ iommu_flush(d, gfn, (u64*)p2m_entry);
+ }
+ else if ( boot_cpu_data.x86_vendor == X86_VENDOR_AMD )
+ {
+ if ( p2mt == p2m_ram_rw )
+ iommu_map_page(d, gfn, mfn_x(mfn));
+ else
+ iommu_unmap_page(d, gfn);
+ }
+ }
/* Success */
rv = 1;
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-02-13 16:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-13 16:46 [IOMMU][PATCH 4/4] Add a generic layer on top of intel and amd iommu code Wei Wang2
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.