[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] WP flag in CR0, setting
Hello! I have a slight problem in my guest port with the WP bit in CR0. The original kernel maps certain kernel pages to user-mode read-only and relies on the kernel being able to modify these despite the read-only bit being set in the pages. This in turn requires that the WP bit is unset in CR0. Unfortunately, Xen doesn't allow the WP bit to be zeroed because Xen wants to share pages read-only with the guest OS. I'm taking this up because a) I would like to know if I've understood the reason for this limitation b) I'd like to discuss if the restriction could be lifted First, from browsing the Xen code, it seems that the only pages being shared read-only with the guest is the phys-to-machine translation table. Is this true, or is it needed for something else as well? To allow WP being unset, maybe something like the following could be done. As long as WP is unchanged everything works as it does now. When the WP bit is set, - A copy is made of the pages mapped read-only and one of the copies is kept in the Xen-protected area - On updates to the phys-to-machine pages, Xen updates both copies but only uses the "private" for it's own use - If the guest overwrites something in the "public" area, it will only suffer by itself. The problem I see with this approach is that the space needed for the phys-to-machine pages doubles if WP is set. Comments? // Simon _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |