From: Wei Wang2 <wei.wang2@amd.com>
To: Keir Fraser <keir@xen.org>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH] amd iommu: Do not adjust paging mode for dom0 devices
Date: Tue, 1 Feb 2011 18:34:01 +0100 [thread overview]
Message-ID: <201102011834.02121.wei.wang2@amd.com> (raw)
[-- 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
next reply other threads:[~2011-02-01 17:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-01 17:34 Wei Wang2 [this message]
2011-02-06 16:58 ` [PATCH] amd iommu: Do not adjust paging mode for dom0 devices 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
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=201102011834.02121.wei.wang2@amd.com \
--to=wei.wang2@amd.com \
--cc=keir@xen.org \
--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.