WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH][VTD] fixing vt-d/ept page table sharing in xen-4

To: "Kay, Allen M" <allen.m.kay@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][VTD] fixing vt-d/ept page table sharing in xen-4.1
From: Tim Deegan <tim@xxxxxxx>
Date: Tue, 23 Aug 2011 10:58:45 +0100
Cc: "Ren, Yongjie" <yongjie.ren@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, keir@xxxxxxx, "Hao, Xudong" <xudong.hao@xxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>, "Li, Xin" <xin.li@xxxxxxxxx>
Delivery-date: Tue, 23 Aug 2011 03:03:15 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <987664A83D2D224EAE907B061CE93D5301EA531481@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20110803171239.GA71832@xxxxxxxxxxxxxxxxxxxxx> <987664A83D2D224EAE907B061CE93D5301EA1F3274@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4E3FAF0F0200007800050178@xxxxxxxxxxxxxxxxxxxx> <20110808151150.GB5845@xxxxxxxxxxxxxxxxxxxxx> <20110810162534.GB11708@xxxxxxxxxxxxxxxxxxxxx> <20110815101159.GG11708@xxxxxxxxxxxxxxxxxxxxx> <20110815104059.GH11708@xxxxxxxxxxxxxxxxxxxxx> <987664A83D2D224EAE907B061CE93D5301EA3F8905@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20110816091320.GL11708@xxxxxxxxxxxxxxxxxxxxx> <987664A83D2D224EAE907B061CE93D5301EA531481@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
At 18:47 -0700 on 19 Aug (1313779670), Kay, Allen M wrote:
> 1) moving "d->arch.paging.mode = mode | PG_HAP_enable" before calling
> p2m_alloc_table().  Otherwise, the call to iommu_use_hap_pt() in
> iommu_set_pgd() will not return TRUE.

Ah.  This problem is there in the xen-unstable patches (which I just
pushed) as well, isn't it?  Oops.  The correct answer is to use
hap_enabled(d) in the test (see 22924:86000076dcee).  Third time lucky? :)

--- 

Passthrough: fix iommu_use_hap_pt() to use hap_enabled()

In line with 22924:86000076dcee, paging_mode_hap(d) shouldn't be 
used in HAP internals that are called during HAP setup. 

Signed-off-by: Tim Deegan <tim@xxxxxxx>

diff -r 9d2a8912597d -r e511a9e3c68d xen/include/xen/iommu.h
--- a/xen/include/xen/iommu.h   Tue Aug 23 10:43:25 2011 +0100
+++ b/xen/include/xen/iommu.h   Tue Aug 23 10:52:37 2011 +0100
@@ -35,7 +35,7 @@ extern bool_t iommu_debug;
 extern bool_t amd_iommu_perdev_intremap;
 
 /* Does this domain have a P2M table we can use as its IOMMU pagetable? */
-#define iommu_use_hap_pt(d) (paging_mode_hap(d) && iommu_hap_pt_share)
+#define iommu_use_hap_pt(d) (hap_enabled(d) && iommu_hap_pt_share)
 
 extern struct rangeset *mmio_ro_ranges;
 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel