Re: KVM: x86: ignore access permissions for hypercall patching

Gleb Natapov
2010-03-12T06:07:24Z

On Fri, Mar 12, 2010 at 07:56:00AM +0200, Gleb Natapov wrote:
> On Thu, Mar 11, 2010 at 06:16:05PM -0300, Marcelo Tosatti wrote:
> >
> > Ignore access permissions while patching hypercall instructions.
> > Otherwise KVM injects a page fault when trying to patch vmcall
> > on read-only text regions:
> >
> > Freeing initrd memory: 8843k freed
> > Freeing unused kernel memory: 660k freed
> > Write protecting the kernel text: 4780k
> > Write protecting the kernel read-only data: 1912k
> > BUG: unable to handle kernel paging request at c01292e3
> > IP: [<c01292e3>] kvm_leave_lazy_mmu+0x43/0x70
> > *pde = 00910067 *pte = 00129161
> > Oops: 0003 [#1] SMP
> >
> > CC: stable@kernel.org
> > Reported-by: Stefan Bader <stefan.bader@canonical.com>
> > Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> >
> My emulator patch series introduce kvm_write_guest_virt_system(). May be
> used it here (only compile tested).
>
Ignore that, it will not work.

--
Gleb.