From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Wang2 Subject: [PATCH] amd iommu: Do not adjust paging mode for dom0 devices Date: Tue, 1 Feb 2011 18:34:01 +0100 Message-ID: <201102011834.02121.wei.wang2@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_KQESN3z1W+bI5sr" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --Boundary-00=_KQESN3z1W+bI5sr Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Keir Here is another small patch to fix consistency issue of paging mode when=20 return passthru devices back to dom0. In this case, paging mode should not = be=20 adjusted, since dom0->max_pages =3D ~0U. Thanks, Wei Signed-off-by: Wei Wang =2D- Advanced Micro Devices GmbH Sitz: Dornach, Gemeinde Aschheim,=20 Landkreis M=FCnchen Registergericht M=FCnchen,=20 HRB Nr. 43632 WEEE-Reg-Nr: DE 12919551 Gesch=E4ftsf=FChrer: Alberto Bozzo, Andrew Bowd --Boundary-00=_KQESN3z1W+bI5sr Content-Type: text/x-diff; charset="us-ascii"; name="fix_dom0_pgmode.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fix_dom0_pgmode.patch" Content-Description: fix_dom0_pgmode.patch 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 --Boundary-00=_KQESN3z1W+bI5sr Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_KQESN3z1W+bI5sr--