[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] xen and cr0,cr3,cr4
On Sun, 28 Nov 2004, Ian Pratt wrote: > Nope, that's the initial page table when the machine boots. > > Even if it were possible from ring 1, reading cr3 directly > wouldn't necessary give you want you want e.g. if you 're in one > of the shadow page table modes. > > The easiest way to get the base within Linux is current->mm->pgd > (modulo lazy switching). I must be missing something obvious. Using 4MB pages, under xenolinux, when I try to print the Page Directory I Get output like this. PD 0x020-0x020[0x04965067]V:0128M-0132M-1>P:++++M-++++M-1 S:0004MB F:PK PD 0x100-0x100[0x04191067]V:1024M-1028M-1>P:++++M-++++M-1 S:0004MB F:PK PD 0x2FF-0x2FF[0x04b54067]V:3068M-3072M-1>P:++++M-++++M-1 S:0004MB F:PK PD 0x300-0x30F[0x02c0f067]V:3072M-3136M-1>P:++++M-++++M-1 S:0064MB F:PK PD 0x312-0x312[0x06b00067]V:3144M-3148M-1>P:++++M-++++M-1 S:0004MB F:PK PD 0x3EF-0x3EF[0x02c10067]V:4028M-4032M-1>P:++++M-++++M-1 S:0004MB F:PK PD 0x3F0-0x3F0[0x00c001e1]V:4032M-4036M-1>P:0012M-0016M-1 S:0004MB F:PM PD 0x3F1-0x3FA[0x024001e3]V:4036M-4076M-1>P:0000M-0040M-1 S:0040MB F:PM PD 0x3FB-0x3FB[0x040cf063]V:4076M-4080M-1>P:++++M-++++M-1 S:0004MB F:PK PD 0x3FD-0x3FD[0x001ef063]V:4084M-4088M-1>P:++++M-++++M-1 S:0004MB F:PK PD 0x3FE-0x3FF[0x0017d063]V:4088M-4096M-1>P:++++M-++++M-1 S:0008MB F:PK This _seems_ mostly correct since those 4032M-4036 and 4036M-4076 (repeated below) seem to match original setup from x86_32.S PD 0x3F0-0x3F0[0x00c001e1]V:4032M-4036M-1>P:0012M-0016M-1 S:0004MB F:PM PD 0x3F1-0x3FA[0x024001e3]V:4036M-4076M-1>P:0000M-0040M-1 S:0040MB F:PM I can also repeat the said output using 4kb pages setup. PD 0x020-0x020[0x03a12067]V:0128M-0132M-1>P:++++M-++++M-1 S:0004MB F:PK PD 0x100-0x100[0x03a13067]V:1024M-1028M-1>P:++++M-++++M-1 S:0004MB F:PK PD 0x2FF-0x2FF[0x03a11067]V:3068M-3072M-1>P:++++M-++++M-1 S:0004MB F:PK PD 0x300-0x30F[0x02c0f067]V:3072M-3136M-1>P:++++M-++++M-1 S:0064MB F:PK PD 0x312-0x312[0x03cfc067]V:3144M-3148M-1>P:++++M-++++M-1 S:0004MB F:PK PD 0x3EF-0x3EF[0x02c10067]V:4028M-4032M-1>P:++++M-++++M-1 S:0004MB F:PK PD 0x3F0-0x3F0[0x004f9021]V:4032M-4036M-1>P:++++M-++++M-1 S:0004MB F:PK PD 0x3F1-0x3FA[0x004ff023]V:4036M-4076M-1>P:++++M-++++M-1 S:0040MB F:PK PD 0x3FB-0x3FB[0x05540063]V:4076M-4080M-1>P:++++M-++++M-1 S:0004MB F:PK PD 0x3FD-0x3FD[0x005ed063]V:4084M-4088M-1>P:++++M-++++M-1 S:0004MB F:PK PD 0x3FE-0x3FF[0x0057f063]V:4088M-4096M-1>P:++++M-++++M-1 S:0008MB F:PK once again I get 4032M-4036 and 4036M-4076, and the "PK" instead of "PM" indicates that it is using 4kb pages instead of 4mb pages. PD 0x3F0-0x3F0[0x004f9021]V:4032M-4036M-1>P:++++M-++++M-1 S:0004MB F:PK PD 0x3F1-0x3FA[0x004ff023]V:4036M-4076M-1>P:++++M-++++M-1 S:0040MB F:PK All dandy and nice. now the weird part is that if I try to list Page Table entries referenced by by Page Directory in either setup I get an ooops saying that the referneced Page Table is not in memory. No such problems in linux classic... weird. ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |