[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



This patch works.  Can you also back port it to xen-4.1-test?  Given this 
feature is pretty mature now, we should turn it on by default to minimize 
future regressions.

---

Attached patch turns on EPT/VT-d page table sharing by default.  Iommu 
parameter "no-sharept" turns off sharing.

Signed-off-by: Allen Kay <allen.m.kay@xxxxxxxxx>

-----Original Message-----
From: Tim Deegan [mailto:tim@xxxxxxx] 
Sent: Tuesday, August 23, 2011 2:59 AM
To: Kay, Allen M
Cc: keir@xxxxxxx; Ren, Yongjie; xen-devel@xxxxxxxxxxxxxxxxxxx; Hao, Xudong; Li, 
Xin; Jan Beulich
Subject: Re: [Xen-devel] [PATCH][VTD] fixing vt-d/ept page table sharing in 
xen-4.1

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;
 

Attachment: share0823.patch
Description: share0823.patch

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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.