Re: [PATCH RFC 1/6] KVM: fix guest_mode optimization in kvm_make_all_cpus_request()

2017-04-11 Thread Paolo Bonzini
, "Christian > Borntraeger" , "Cornelia Huck" > , "Paul Mackerras" > > Sent: Wednesday, April 12, 2017 4:45:36 AM > Subject: Re: [PATCH RFC 1/6] KVM: fix guest_mode optimization in > kvm_make_all_cpus_request() > > > void kvm_reload_remot

Re: [PATCH RFC 1/6] KVM: fix guest_mode optimization in kvm_make_all_cpus_request()

2017-04-11 Thread Radim Krčmář
2017-04-11 13:25+0800, Paolo Bonzini: > On 07/04/2017 05:02, James Hogan wrote: >> - you'll no longer get IPIs if its in EXITING_GUEST_MODE (i.e. if you >> get two of these in quick succession only the first will wait for the >> IPI, which might work as long as they're already serialised but it

Re: [PATCH RFC 1/6] KVM: fix guest_mode optimization in kvm_make_all_cpus_request()

2017-04-11 Thread Paolo Bonzini
, "Christian > Borntraeger" , "Cornelia Huck" > , "Paul Mackerras" > > Sent: Wednesday, April 12, 2017 3:31:24 AM > Subject: Re: [PATCH RFC 1/6] KVM: fix guest_mode optimization in > kvm_make_all_cpus_request() > > 2017-04-11 10:37+0100, James Hoga

Re: [PATCH RFC 1/6] KVM: fix guest_mode optimization in kvm_make_all_cpus_request()

2017-04-11 Thread Radim Krčmář
2017-04-11 10:37+0100, James Hogan: > Hi Paolo, > > On Tue, Apr 11, 2017 at 01:25:04PM +0800, Paolo Bonzini wrote: >> On 07/04/2017 05:02, James Hogan wrote: >> > This presumably changes the behaviour on x86, from != OUTSIDE_GUEST_MODE >> > to == IN_GUEST_MODE. so: >> > - you'll no longer get IPIs

Re: [PATCH RFC 1/6] KVM: fix guest_mode optimization in kvm_make_all_cpus_request()

2017-04-11 Thread James Hogan
Hi Drew, Note, MIPS doesn't directly use kicks as far as I can tell, only the TLB flush request, so what I say below is in the context of requests where the IPI is waited for. On Mon, Apr 10, 2017 at 05:59:42PM +0200, Andrew Jones wrote: > I'm actually thinking we should do away with kvm_arch_vcp

Re: [PATCH RFC 1/6] KVM: fix guest_mode optimization in kvm_make_all_cpus_request()

2017-04-11 Thread James Hogan
Hi Paolo, On Tue, Apr 11, 2017 at 01:25:04PM +0800, Paolo Bonzini wrote: > On 07/04/2017 05:02, James Hogan wrote: > > This presumably changes the behaviour on x86, from != OUTSIDE_GUEST_MODE > > to == IN_GUEST_MODE. so: > > - you'll no longer get IPIs if its in READING_SHADOW_PAGE_TABLES (which >

Re: [PATCH RFC 1/6] KVM: fix guest_mode optimization in kvm_make_all_cpus_request()

2017-04-11 Thread Paolo Bonzini
On 07/04/2017 05:02, James Hogan wrote: > This presumably changes the behaviour on x86, from != OUTSIDE_GUEST_MODE > to == IN_GUEST_MODE. so: > - you'll no longer get IPIs if its in READING_SHADOW_PAGE_TABLES (which > MIPS also now uses when accessing mappings outside of guest mode and > depe

Re: [PATCH RFC 1/6] KVM: fix guest_mode optimization in kvm_make_all_cpus_request()

2017-04-10 Thread Andrew Jones
On Thu, Apr 06, 2017 at 10:02:15PM +0100, James Hogan wrote: > On Thu, Apr 06, 2017 at 10:20:51PM +0200, Radim Krčmář wrote: > > We have kvm_arch_vcpu_should_kick() to decide whether the target cpu > > needs to be kicked. The previous condition was wrong, because > > architectures that don't use v

Re: [PATCH RFC 1/6] KVM: fix guest_mode optimization in kvm_make_all_cpus_request()

2017-04-07 Thread Christian Borntraeger
On 04/06/2017 10:20 PM, Radim Krčmář wrote: > We have kvm_arch_vcpu_should_kick() to decide whether the target cpu > needs to be kicked. The previous condition was wrong, because > architectures that don't use vcpu->mode would not get interrupts and > also suboptimal, because it sent IPI in cases

Re: [PATCH RFC 1/6] KVM: fix guest_mode optimization in kvm_make_all_cpus_request()

2017-04-06 Thread James Hogan
On Thu, Apr 06, 2017 at 10:20:51PM +0200, Radim Krčmář wrote: > We have kvm_arch_vcpu_should_kick() to decide whether the target cpu > needs to be kicked. The previous condition was wrong, because > architectures that don't use vcpu->mode would not get interrupts and > also suboptimal, because it

[PATCH RFC 1/6] KVM: fix guest_mode optimization in kvm_make_all_cpus_request()

2017-04-06 Thread Radim Krčmář
We have kvm_arch_vcpu_should_kick() to decide whether the target cpu needs to be kicked. The previous condition was wrong, because architectures that don't use vcpu->mode would not get interrupts and also suboptimal, because it sent IPI in cases where none was necessary. The situation is even mor