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/
Home Products Support Community News


[Xen-devel] [PATCH] Fix mem.c so that X Windows can restart

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Fix mem.c so that X Windows can restart
From: "Donald D. Dugger" <donald.d.dugger@xxxxxxxxx>
Date: Thu, 25 May 2006 12:32:54 -0700
Delivery-date: Thu, 25 May 2006 12:35:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.1i
This patch fixes the problem where you cannot start X Windows on Dom0 after
you have created an HVM guest.  The problem is that X uses `mmap' to map
1 page at physical address 0 with read/write permission.  Before an HVM
guest is created this check at around line 1496 of `mm.c':

        if ( unlikely((x & (PGT_type_mask|PGT_va_mask)) != type) )

causes the offending code from this patch to be bypassed and X's `mmap'
call works.  After an HVM guest is created the check at 1496 of `mm.c' is
now true and the code from this patch is executed, causing the `mmap' call to
erroneously fail.

I'd be curious if someone can explain what this code is trying to do and,
if this patch is appropriate, it should be applied.

Signed-off-by: Don Dugger <donald.d.dugger@xxxxxxxxx>

Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
Ph: (303)440-1368

diff -r ad33b3882867 xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c Wed May 24 19:41:47 2006 +0100
+++ b/xen/arch/x86/mm.c Thu May 25 10:47:51 2006 -0600
@@ -1537,9 +1537,7 @@ int get_page_type(struct page_info *page
                         return 0;
                     /* Fixme: add code to propagate va_unknown to subtables. */
-                    if ( ((type & PGT_type_mask) >= PGT_l2_page_table) &&
-                         !shadow_mode_refcounts(page_get_owner(page)) )
-                        return 0;
                     /* This table is possibly mapped at multiple locations. */
                     nx &= ~PGT_va_mask;
                     nx |= PGT_va_unknown;

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>