From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: Document KVM_NMI Date: Wed, 07 Dec 2011 14:42:54 +0200 Message-ID: <4EDF5F4E.4080309@redhat.com> References: <1323254613-29882-1-git-send-email-avi@redhat.com> <1323255728.4009.7.camel@lappy> <4EDF5843.6020005@redhat.com> <1323260448.4009.8.camel@lappy> <4EDF5CA1.2030102@redhat.com> <1323261434.4009.9.camel@lappy> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Sasha Levin Return-path: Received: from mx1.redhat.com ([209.132.183.28]:1025 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754820Ab1LGMm5 (ORCPT ); Wed, 7 Dec 2011 07:42:57 -0500 In-Reply-To: <1323261434.4009.9.camel@lappy> Sender: kvm-owner@vger.kernel.org List-ID: On 12/07/2011 02:37 PM, Sasha Levin wrote: > > > > It's really implied by the fact that vcpu ioctls must be issued from the > > same thread. > > Oh, I totally forgot about that (here, and in my 'kvm nmi' patch). It keeps biting people. We should make the kernel warn about it. The reason it's important is because we might some day want to move to a syscall based API, rather than ioctl based. In this model a vcpu is bound to the thread that calls kvm_create_vcpu(2), and all vcpu syscalls derive the vcpu from the thread. This model is more natural than the ioctl model, however it is a lot of work and doesn't solve any real life problems; it only creates a larger compatibility burden. But it's still the right thing. -- error compiling committee.c: too many arguments to function