Skip to contentSkip to conversation

Problem with (Mini-OS) page-table setup

DISCUSSION Livio Soares 3 participants 3 messages Aug 1, 2007 – Aug 2, 2007

lore
Share & tools
lore
#0 lore raw

Hello,

  I'm  working  on small  kernel  on  top of  Xen,  and  am having  serious
headaches  after upgrading  from  Xen 3.0.3  to  Xen-unstable. The  problem

appears while I'm trying to extend my initial page-table.

In fact, my page-table code was strongly based on Mini-OS' code. I have
tried to boot Mini-OS (as DomU) in my environment with similar amounts of memory (from 1024 to 2048 MiB) and Mini-OS also crashes in an analogous form. When it tries to extend its initial page-table for a "demand-paging" area, it dies with:

"PTE for new page table page could not be updated"

After an unsuccessful mmu_update() call. This is what I get in the xen
console:

(XEN) /home/liviobs/xen-unstable.hg/xen/include/asm/mm.h:186:d43 Error pfn 24000: rd=ffff8300cee12100, od=ffff8300ceef2100, caf=80000002, taf=00000000e8000001 (XEN) mm.c:649:d43 Error getting mfn 24000 (pfn 2031c) from L1 entry 0000000024000125 for dom43

While trying smaller memory sizes (16MiB, for example), everything works.

I am at loss at what could be the problem. I've tried make sure my page
table pages have been marked as read-only before calling mmu_update() to update the higher-level level page-table entry. I've trying pinning the page after making it read-only; I've trying starting a new page-table from scratch and switching to it later.

If anyone can give me some tips as to what could be going wrong, I would
really appreciate it... starting with trying to make Mini-OS work for larger memory sizes (I've actually been able to reproduce this issue with 128MiB).

My environment:

Host: Intel x86_64
Xen: unstable (changeset: 15521:1f348e70a5af)
GCC: 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Dom0: Linux 2.6.18 (changeset: 103:a70de77dd8d3)

Thanks and don't hesitate to bug me,

Livio

#1 lore raw
Quoted 8 lines · Livio Soares

After an unsuccessful mmu_update() call. This is what I get in the xen
console:

(XEN) /home/liviobs/xen-unstable.hg/xen/include/asm/mm.h:186:d43 Error pfn 24000: rd=ffff8300cee12100, od=ffff8300ceef2100, caf=80000002, taf=00000000e8000001
(XEN) mm.c:649:d43 Error getting mfn 24000 (pfn 2031c) from L1 entry 0000000024000125 for dom43

The problem is that the given MFN (the one you are trying to map) does not belong to you. Add some extra tracing around mm.h:186 and find out the domain ids involved. This could be due perhaps to a bogus lookup in the p2m map?

-- Keir

#2 lore raw
Quoted 10 lines · Keir Fraser
Quoted 8 lines · Livio Soares

After an unsuccessful mmu_update() call. This is what I get in the xen
console:

(XEN) /home/liviobs/xen-unstable.hg/xen/include/asm/mm.h:186:d43 Error pfn 24000: rd=ffff8300cee12100, od=ffff8300ceef2100, caf=80000002, taf=00000000e8000001
(XEN) mm.c:649:d43 Error getting mfn 24000 (pfn 2031c) from L1 entry 0000000024000125 for dom43

Quoted 4 lines

The problem is that the given MFN (the one you are trying to map) does not belong to you. Add some extra tracing around mm.h:186 and find out the domain ids involved. This could be due perhaps to a bogus lookup in the p2m map?

Xen-unstable changeset 15675:bf85b467ee89 may affect this, if you're using a 64-bit mini-os.

Cheers,

Tim.

Signature · 2 lines
Tim Deegan <[email protected]>, XenSource UK Limited
Registered office c/o EC2Y 5EB, UK; company number 05334508