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

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



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


 


Rackspace

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