Re: [PATCH] KVM: introduce kvm_arch_vcpu_async_ioctl

2017-12-13 Thread Paolo Bonzini
On 12/12/2017 19:25, Christoffer Dall wrote: > Reviewed-by: Christoffer Dall > > (although it'd be great if we can introduce the dummy inline to get rid > of the #ifdef'ery as well). Well, it's ARM and x86 that are the culprit so it's up to us. :) I'll add an #ifdef HAVE_KVM_VCPU_ASYNC_IOCTL to

Re: [PATCH] KVM: introduce kvm_arch_vcpu_async_ioctl

2017-12-13 Thread Cornelia Huck
On Tue, 12 Dec 2017 18:31:55 +0100 Paolo Bonzini wrote: > After the vcpu_load/vcpu_put pushdown, the handling of asynchronous VCPU > ioctl is already much clearer in that it is obvious that they bypass > vcpu_load and vcpu_put. > > However, it is still not perfect in that the different state of

Re: [PATCH] KVM: introduce kvm_arch_vcpu_async_ioctl

2017-12-12 Thread Christian Borntraeger
On 12/12/2017 06:31 PM, Paolo Bonzini wrote: > After the vcpu_load/vcpu_put pushdown, the handling of asynchronous VCPU > ioctl is already much clearer in that it is obvious that they bypass > vcpu_load and vcpu_put. > > However, it is still not perfect in that the different state of the VCPU > mu

Re: [PATCH] KVM: introduce kvm_arch_vcpu_async_ioctl

2017-12-12 Thread Christoffer Dall
On Tue, Dec 12, 2017 at 06:31:55PM +0100, Paolo Bonzini wrote: > After the vcpu_load/vcpu_put pushdown, the handling of asynchronous VCPU > ioctl is already much clearer in that it is obvious that they bypass > vcpu_load and vcpu_put. > > However, it is still not perfect in that the different stat

Re: [PATCH] KVM: introduce kvm_arch_vcpu_async_ioctl

2017-12-12 Thread David Hildenbrand
On 12.12.2017 18:48, Paolo Bonzini wrote: > On 12/12/2017 18:47, David Hildenbrand wrote: >>> @@ -2547,13 +2547,13 @@ static long kvm_vcpu_ioctl(struct file *filp, >>> #if defined(CONFIG_S390) || defined(CONFIG_PPC) || defined(CONFIG_MIPS) >> can we now also get rid of this ugly define? > > Not y

Re: [PATCH] KVM: introduce kvm_arch_vcpu_async_ioctl

2017-12-12 Thread Paolo Bonzini
On 12/12/2017 18:47, David Hildenbrand wrote: >> @@ -2547,13 +2547,13 @@ static long kvm_vcpu_ioctl(struct file *filp, >> #if defined(CONFIG_S390) || defined(CONFIG_PPC) || defined(CONFIG_MIPS) > can we now also get rid of this ugly define? Not yet, I'd have to add the function to x86 and ARM, or

Re: [PATCH] KVM: introduce kvm_arch_vcpu_async_ioctl

2017-12-12 Thread David Hildenbrand
> > switch (ioctl) { > diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c > index ba8134a989c1..2e700753e35c 100644 > --- a/arch/powerpc/kvm/powerpc.c > +++ b/arch/powerpc/kvm/powerpc.c > @@ -1607,12 +1607,11 @@ int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu > *vcpu

[PATCH] KVM: introduce kvm_arch_vcpu_async_ioctl

2017-12-12 Thread Paolo Bonzini
After the vcpu_load/vcpu_put pushdown, the handling of asynchronous VCPU ioctl is already much clearer in that it is obvious that they bypass vcpu_load and vcpu_put. However, it is still not perfect in that the different state of the VCPU mutex is still hidden in the caller. Separate those ioctls