xen-devel
Re: [Xen-devel] xen and cr0,cr3,cr4
> > All accesses to control registers, whether read or write, are
> > disallowed outside ring 0. There is no way to allow such accesses so,
> > yes, they would hve to indirect thru Xen.
> >
> > You should know the value in %cr3 anyway. Why do you need to read %cr0
> > and %cr4?
>
> well, it just a module I have which examines the current page tables,
> settings and prints out physical and virutal memory maps.
>
> It currently works under plain linux and from inside of xen. Now that I
> have basic 4kb pages working (on pentium 3, with PSE enabled) it would be
> nice to have it working from inside of xenolinux too, so that I can iron
> out remaining issues with 4kb pages.
>
> you are right that cr0 and cr4 are not strictly necessary but nice to
> have, just to verify that things are what they appear to be.
>
> as for cr3, I suppose I know what it was in xen, but I just hoped not to
> assume anything. Either way can I rely on xen_start_info.pt_base ?
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).
Ian
-------------------------------------------------------
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
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] xen and cr0,cr3,cr4, Adam Sulmicki
- Re: [Xen-devel] xen and cr0,cr3,cr4, Keir Fraser
- Re: [Xen-devel] xen and cr0,cr3,cr4, Adam Sulmicki
- Re: [Xen-devel] xen and cr0,cr3,cr4,
Ian Pratt <=
- Re: [Xen-devel] xen and cr0,cr3,cr4, Adam Sulmicki
- Re: [Xen-devel] xen and cr0,cr3,cr4, Keir Fraser
- Re: [Xen-devel] xen and cr0,cr3,cr4, Adam Sulmicki
- Re: [Xen-devel] xen and cr0,cr3,cr4, Keir Fraser
|
Previous by Date: |
Re: [Xen-devel] xen and cr0,cr3,cr4, Adam Sulmicki |
Next by Date: |
Re: [Xen-devel] xen and cr0,cr3,cr4, Adam Sulmicki |
Previous by Thread: |
Re: [Xen-devel] xen and cr0,cr3,cr4, Adam Sulmicki |
Next by Thread: |
Re: [Xen-devel] xen and cr0,cr3,cr4, Adam Sulmicki |
Indexes: |
[Date]
[Thread]
[Top]
[All Lists] |
|
|