From: Alexander Graf Subject: Re: [PATCH 3/3] QEMU kvm/i386 : Adding KICK_VCPU capability support in i386 target. Date: Mon, 19 Dec 2011 15:03:04 +0100 Message-ID: <784A6583-DC7F-4EF7-9F07-AAF11F83AA0C@suse.de> References: <20111204182541.28487.68163.sendpatchset@oc5400248562.ibm.com> <20111204182622.28487.98656.sendpatchset@oc5400248562.ibm.com> <4EEF432A.3030905@redhat.com> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8BIT Cc: Raghavendra K T , kvm@vger.kernel.org, qemu-devel@nongnu.org, Marcelo Tosatti , Jan Kiszka , Srivatsa Vaddagiri , Suzuki Poulose To: Avi Kivity Return-path: Received: from cantor2.suse.de ([195.135.220.15]:46694 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750880Ab1LSODG convert rfc822-to-8bit (ORCPT ); Mon, 19 Dec 2011 09:03:06 -0500 In-Reply-To: <4EEF432A.3030905@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 19.12.2011, at 14:59, Avi Kivity wrote: > On 12/19/2011 03:54 PM, Alexander Graf wrote: >> On 04.12.2011, at 19:26, Raghavendra K T wrote: >> >>> Extend the KVM Hypervisor to enable KICK_VCPU feature that allows >>> a vcpu to kick the halted vcpu to continue with execution in PV ticket >>> spinlock. >>> >>> Signed-off-by: Srivatsa Vaddagiri >>> Signed-off-by: Raghavendra K T >>> --- >>> diff --git a/target-i386/kvm.c b/target-i386/kvm.c >>> index 5bfc21f..69bce21 100644 >>> --- a/target-i386/kvm.c >>> +++ b/target-i386/kvm.c >>> @@ -97,6 +97,7 @@ struct kvm_para_features { >>> { KVM_CAP_NOP_IO_DELAY, KVM_FEATURE_NOP_IO_DELAY }, >>> { KVM_CAP_PV_MMU, KVM_FEATURE_MMU_OP }, >>> { KVM_CAP_ASYNC_PF, KVM_FEATURE_ASYNC_PF }, >>> + { KVM_CAP_KICK_VCPU, KVM_FEATURE_KICK_VCPU }, >> >> So this is handled in the kernel? Who enables the feature? Is it always on? Why bother with it in user space at all then? > > Backwards compatibility If we want backwards compatibility, we need more than just a simple feature check, no? Oh, you feed that into CPUID? That's nifty. Ok, so you behave like VMX/SVM do on real hardware - you always expose the functionality but don't list it in CPUID for older user space. Makes sense. Alex