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-users

Re: [Xen-users] "Bad type" when setting PML4 on x86_64

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] "Bad type" when setting PML4 on x86_64
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Wed, 6 Jun 2007 20:27:11 +0100
Cc: Trammell Hudson <hudson@xxxxxxxxxxxxxx>
Delivery-date: Wed, 06 Jun 2007 12:25:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070606114920.GD16548@xxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <20070606114920.GD16548@xxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.6
Hi,

> I'm to porting a lightweight kernel to Xen 3.0.4-x86_64 and have
> run into a problem while setting the PML4.  Xen complains that
> it has a bad type of 'PGT_writable_page' (e8000001), while it expects
> 80000000.

This isn't a region of the code I've been into in-depth very often, so 
apologies if I'm a bit vague!

> However, I'm almost certain that this is not the case.  I added a routine
> to do a depth first search of the four page table levels looking for this
> machine frame and find that there are only two mappings of it, both of
> which are flagged only as Present, non-writable, non-user.  Both
> mappings are from a shared PL1 directory.  According to the interface
> guide "a guest OS may always create readable mappings of its own
> memory regardless of its current type", so it would seem that this
> should be an acceptable situation for Xen.

Make sure that the page is not mapped writable in *any* validated pagetable.  
I.e. on any pagetable you've pinned, even if it's not active, on the 
pagetable you're switching to and possibly on the pagetable you're 
switching /from/ too.

> The abbreviated console output showing the results of the page table
> search and the attempt to set the PML4:
>
> Page table search for mfn 13091:
> PML1 0x6000022000[010] = 13091001 (va=0000010000 000 000 000 010)
> PML1 0x6000022000[010] = 13091001 (va=6000010000 000 180 000 010)
> vm_enter:895: about to instantiate new maps pml4=0x6000010000
> vm_enter:901: Using physical pml4 0x13091000 for Xen
> (XEN) mm.c:1664:d72 Bad type (saw 00000000e8000001 != exp 0000000080000000)
> for mfn 13091 (pfn 10)
> (XEN) mm.c:1724:d72 New baseptr 13091: slow path via idle pagetables
> (XEN) mm.c:1664:d72 Bad type (saw 00000000e8000001 != exp 0000000080000000)
> for mfn 13091 (pfn 10)
> (XEN) mm.c:1737:d72 Fatal error while installing new baseptr 13091
>
> I've tried both with and without the writable page tables turned on
> with vm_assist.  Is there something that I am missing?

This is definitely a question that'd be appropriate for xen-devel - if you 
post there then folks more knowledgeable than I may chime in.

Cheers,
Mark

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

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

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