Re: [RFC PATCH 1/5] KVM: vmx: speed up emulation of invalid guest state

2014-04-21 Thread Marcelo Tosatti
On Fri, Apr 18, 2014 at 12:19:28AM -0400, Paolo Bonzini wrote: Il 16/04/2014 18:52, Marcelo Tosatti ha scritto: How about handling VM-entry error due to invalid state with vmx-emulation_required = true; continue to main vcpu loop; What would reset it to false though? None of the places

Re: [RFC PATCH 1/5] KVM: vmx: speed up emulation of invalid guest state

2014-04-21 Thread Paolo Bonzini
Il 20/04/2014 22:13, Marcelo Tosatti ha scritto: The same code which resets it to false inside the handle_invalid_guest_state loop (so you would stop emulating at the same point as you do with this patch). So (barring any bugs where we fail to set vmx-emulation_required to true) the

Re: [RFC PATCH 1/5] KVM: vmx: speed up emulation of invalid guest state

2014-04-17 Thread Paolo Bonzini
Il 16/04/2014 18:52, Marcelo Tosatti ha scritto: How about handling VM-entry error due to invalid state with vmx-emulation_required = true; continue to main vcpu loop; What would reset it to false though? None of the places that call emulation_required() is a hot path right now, and this

Re: [RFC PATCH 1/5] KVM: vmx: speed up emulation of invalid guest state

2014-04-16 Thread Marcelo Tosatti
On Thu, Mar 27, 2014 at 12:30:34PM +0100, Paolo Bonzini wrote: About 25% of the time spent in emulation of invalid guest state is wasted in checking whether emulation is required for the next instruction. However, this almost never changes except when a segment register (or TR or LDTR)

[RFC PATCH 1/5] KVM: vmx: speed up emulation of invalid guest state

2014-03-27 Thread Paolo Bonzini
About 25% of the time spent in emulation of invalid guest state is wasted in checking whether emulation is required for the next instruction. However, this almost never changes except when a segment register (or TR or LDTR) changes, or when there is a mode transition (i.e. CR0 changes). In fact,