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. 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. 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? Thanks! -- Trammell _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mark Williamson
2007-Jun-06 19:27 UTC
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@lists.xensource.com http://lists.xensource.com/xen-users
Trammell Hudson
2007-Jun-10 19:27 UTC
Re: [Xen-users] "Bad type" when setting PML4 on x86_64
> > [...] 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.Ah, that seems to have been the secret! I made an explicit call to update_va_mapping() for the PML4 virtual address before setting the CR3 and it now complains about the next page. Thanks, Mark! -- Trammell _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Maybe Matching Threads
- Making multiple columns to a single column
- Identifying last record in individual growth data over different time intervalls
- [PATCH][VTD] pci mmcfg patch for x86-64 - version 2
- what''s the purpose of line page table (PML4 entry 258)
- Trying to make code more efficient