Messages in this thread | | | Date | Tue, 16 Feb 2010 17:13:13 -0500 | From | Konrad Rzeszutek Wilk <> | Subject | Re: [LKML] Re: [PATCH] x86_64: allow sections that are recycled to set _PAGE_RW |
| |
On Sat, Feb 13, 2010 at 12:08:17PM -0800, Suresh Siddha wrote: > Konrad, > > I don't think this patch is correct. > > I am not sure if I understand why we see this failure in Xen. In native > case, we have two kernel mappings for 64bit kernel. > > One is kernel text mapping: > > ffffffff80000000 - ffffffffa0000000 (=512 MB) kernel text mapping, from > phys 0 > > And another is: > > ffff880000000000 - ffffc7ffffffffff (=64 TB) direct mapping of all phys. > memory > > Checks in static_protections() ensure that we map the text mapping as > read-only (and don't bother about what permissions it uses for > underlying free pages that get freed in free_init_pages()). But the > kernel direct mappings for free pages will be RW and ensure that the > free pages can be read/written using the direct mapping. > > The checks in static_protections() for kernel text mapping ensure that > we don't break the 2MB kernel text pages unnecessarily on 64bit kernels > (as it has performance implications). We should be fine as long as the > kernel identity mappings reflect the correct RW permissions. > > But somehow this is working fine on native kernels but not on Xen pv > guest. Your patch will cause the performance issues that we are
That would not be good.
> addressing using the static protections checks. I will look at this more > detailed on tuesday.
Great. Thank you for doing that. If you find yourself in a bind, here are some steps on how to build the Xen pv-ops kernel and such: http://wiki.xensource.com/xenwiki/XenParavirtOps
It goes without saying that I would be happy to test your patch when you have one ready.
| |