Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753223AbbHENaA (ORCPT ); Wed, 5 Aug 2015 09:30:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35504 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752892AbbHEN35 (ORCPT ); Wed, 5 Aug 2015 09:29:57 -0400 Subject: Re: [PATCH 3/5] KVM: add KVM_USER_EXIT vm ioctl for userspace exit To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , linux-kernel@vger.kernel.org References: <1438780877-31838-1-git-send-email-rkrcmar@redhat.com> <1438780877-31838-4-git-send-email-rkrcmar@redhat.com> Cc: kvm@vger.kernel.org From: Paolo Bonzini Message-ID: <55C20FD2.8020607@redhat.com> Date: Wed, 5 Aug 2015 15:29:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1438780877-31838-4-git-send-email-rkrcmar@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 576 Lines: 21 On 05/08/2015 15:21, Radim Krčmář wrote: > + kvm_for_each_vcpu(idx, vcpu, kvm) > + if (vcpu->vcpu_id == vcpu_id) { > + kvm_make_request(KVM_REQ_EXIT, vcpu); > + kvm_vcpu_kick(vcpu); > + > + return 0; > + } > + Why not a vcpu ioctl? kvm_for_each_vcpu can become pretty expensive if you have a few dozen VCPUs. Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/