Re: [Lguest] [PATCH 4/5] lguest: use KVM hypercalls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ons, 08 04 2009 kl. 17:58 -0300, skrev Matias Zabaljauregui:
> Simon, Patrick,
> 
> On Wed, 2009-04-08 at 10:21 +0930, Rusty Russell wrote:
> > On Tuesday 07 April 2009 04:19:58 Matias Zabaljauregui wrote:
> > > But then, when it tries to re-execute the faulting instruction, which is
> > > now patched with "cd 1f 90"  (int 0x1f, nop), it raises an invalid code
> > > fault again, instead of doing the trap. 
> > 
> > COW on the page?  Perhaps try flushing all the shadow pagetables after a
> > rewrite?
> > 
> > Rusty.
> 
> Rusty suggested that perhaps we need to flush all shadow after rewriting. 
> Could you please try this patch?

Yes, it fixes the issue.
> 
> BTW, shouldn't this also affect my test boxes if this were the case?
> 
Could be the timing differences between our boxes I guess?

The compiler used seems to play a role as well, though. I compiled a
kernel on another box and using that there was no problems even without
the patch. If you are interested in testing the faulty kernel I could
make it available to you.


Simon
> 
> diff --git a/drivers/lguest/x86/core.c b/drivers/lguest/x86/core.c
> index a6b7176..b4747f7 100644
> --- a/drivers/lguest/x86/core.c
> +++ b/drivers/lguest/x86/core.c
> @@ -324,6 +324,7 @@ static void rewrite_hypercall(struct lg_cpu *cpu)
>  	u8 insn[3] = {0xcd, 0x1f, 0x90};
>  
>  	__lgwrite(cpu, guest_pa(cpu, cpu->regs->eip), insn, sizeof(insn));
> +	guest_pagetable_clear_all(cpu);
>  }
>  
>  static bool is_hypercall(struct lg_cpu *cpu)


_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization

[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux