xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] amd iommu: Do not adjust paging mode for dom0 devices
@ 2011-02-01 17:34 Wei Wang2
  2011-02-06 16:58 ` Keir Fraser
  0 siblings, 1 reply; 9+ messages in thread
From: Wei Wang2 @ 2011-02-01 17:34 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel@lists.xensource.com

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

Keir
Here is another small patch to fix consistency issue of paging mode when 
return passthru devices back to dom0. In this case, paging mode should not be 
adjusted, since dom0->max_pages = ~0U.
Thanks,
Wei
Signed-off-by: Wei Wang <wei.wang2@amd.com>
--
Advanced Micro Devices GmbH
Sitz: Dornach, Gemeinde Aschheim, 
Landkreis München Registergericht München, 
HRB Nr. 43632
WEEE-Reg-Nr: DE 12919551
Geschäftsführer:
Alberto Bozzo, Andrew Bowd

[-- Attachment #2: fix_dom0_pgmode.patch --]
[-- Type: text/x-diff, Size: 604 bytes --]

diff -r a9ba2e80765f xen/drivers/passthrough/amd/pci_amd_iommu.c
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c	Tue Feb 01 17:30:54 2011 +0100
+++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c	Tue Feb 01 17:32:07 2011 +0100
@@ -298,7 +298,7 @@ static int reassign_device( struct domai
     list_move(&pdev->domain_list, &target->arch.pdev_list);
     pdev->domain = target;
 
-    if ( target->max_pages > 0 )
+    if ( target != dom0 && target->max_pages > 0 )
         t->paging_mode = get_paging_mode(target->max_pages);
 
     /* IO page tables might be destroyed after pci-detach the last device

[-- 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] 9+ messages in thread

end of thread, other threads:[~2011-02-08 18:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-01 17:34 [PATCH] amd iommu: Do not adjust paging mode for dom0 devices Wei Wang2
2011-02-06 16:58 ` Keir Fraser
2011-02-07  9:58   ` Wei Wang2
2011-02-07 10:10     ` Keir Fraser
2011-02-07 10:33       ` Wei Wang2
2011-02-07 10:47         ` Keir Fraser
2011-02-07 13:30           ` Wei Wang2
2011-02-07 15:00             ` Keir Fraser
2011-02-08 18:02               ` Wei Wang2

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).