8 messages in com.xensource.lists.xen-develRe: [Xen-devel] xen and cr0,cr3,cr4 | From | Sent On | Attachments |
|---|---|---|
| Adam Sulmicki | 28 Nov 2004 08:32 | |
| Keir Fraser | 28 Nov 2004 12:19 | |
| Adam Sulmicki | 28 Nov 2004 14:54 | |
| Ian Pratt | 28 Nov 2004 14:55 | |
| Adam Sulmicki | 28 Nov 2004 20:06 | |
| Keir Fraser | 29 Nov 2004 00:55 | |
| Adam Sulmicki | 29 Nov 2004 14:30 | |
| Keir Fraser | 29 Nov 2004 15:35 |
| Subject: | Re: [Xen-devel] xen and cr0,cr3,cr4 ![]() |
|---|---|
| From: | Ian Pratt (Ian....@cl.cam.ac.uk) |
| Date: | 11/28/2004 02:55:12 PM |
| List: | com.xensource.lists.xen-devel |
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-...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel




