[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] RFC : 4KiB page support - x86_32.S
Hello, now that I got basic patch to work, I was wondering what is the right way to integrate it into xen. I have attached: a) diff of plain x86_32.S and x86_32.S with support for 4kb pages b) modifed x86_32.S with support for 4kb pages. I see few issues. For one thing PAGE_OFFSET points to "4gb - 60mb" and 60mb. This is where the current page table stuff live. This is fine with 4mb pages as in this configuration page table/directory occupy only 4kb. However, once I want to duplicate current setup using 4kb of pages, I need 4MB for page tables (+4kb for page directory). It seems to me that once I have 4mb of page tables + other stuff from x86_32.S I would run over the 4gb mark (although with a bit of empirical testing it did not crash right away.. not sure If I'm missing something.). I have tried to change PAGE_OFFSET to point to "4gb - 56", but then all hell would break lose and it would not even work with 4mb pages on pentium 3. Thus in my code I just put the 4mb wroth of page tables at 56mb-60mb address space, what should fit well with both low and high memory. It seems to work fine other than it just my idea to use this particular space for the page. Another issue is that I don't quie understand where the mmu_cr4_features get setup. I see the __start where xen enters and just few lines further the mmu_cr4_features is being used without any apparent code that set it up before. There's still a need to add "cpuid" instruction and test EAX=1/EDX(bit=6) for PAE support. In that way it could enable 4kb page support only if 4mb is not supported. Finally, with all those additions all this asm code seems to be getting more complex than it needs to be. LinuxBIOS Project uses C code succesfully for lots of the low level programming. Perhaps a lot of this x86_32.S could be changed to C code as well. comments? Attachment:
4kb.diff Attachment:
x86_32.S
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |