From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH 3/5] KVM: add KVM_USER_EXIT vm ioctl for userspace exit Date: Wed, 5 Aug 2015 15:48:22 +0200 Message-ID: <20150805134821.GA1481@potion.brq.redhat.com> References: <1438780877-31838-1-git-send-email-rkrcmar@redhat.com> <1438780877-31838-4-git-send-email-rkrcmar@redhat.com> <55C20FD2.8020607@redhat.com> <20150805133442.GA31952@potion.brq.redhat.com> <55C211EB.2030704@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org To: Paolo Bonzini Return-path: Content-Disposition: inline In-Reply-To: <55C211EB.2030704@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 2015-08-05 15:38+0200, Paolo Bonzini: > On 05/08/2015 15:34, Radim Kr=C4=8Dm=C3=A1=C5=99 wrote: >> vcpu ioctl should only be issued by the vcpu thread so it would >> significantly limit use. >=20 > That's a general limitation, but you can lift it for particular ioctl= s. >=20 > See in particular this: >=20 > #if defined(CONFIG_S390) || defined(CONFIG_PPC) || defined(CONFIG_MIP= S) > /* > * Special cases: vcpu ioctls that are asynchronous to vcpu e= xecution, > * so vcpu_load() would break it. > */ > if (ioctl =3D=3D KVM_S390_INTERRUPT || ioctl =3D=3D KVM_S390_= IRQ || ioctl =3D=3D KVM_INTERRUPT) > return kvm_arch_vcpu_ioctl(filp, ioctl, arg); > #endif >=20 > You can add an "if (ioctl =3D=3D KVM_USER_EXIT)" before. Thanks, it looks to be safe, I'll put it in v2.