[{"id":1812521,"web_url":"http://patchwork.ozlabs.org/comment/1812521/","msgid":"<12137903-6f11-6350-6344-30e3bc6542e3@redhat.com>","list_archive_url":null,"date":"2017-11-29T17:30:33","subject":"Re: [PATCH v2 15/16] KVM: arm/arm64: Avoid vcpu_load for other vcpu\n\tioctls than KVM_RUN","submitter":{"id":70402,"url":"http://patchwork.ozlabs.org/api/people/70402/","name":"David Hildenbrand","email":"david@redhat.com"},"content":"> +++ b/virt/kvm/arm/arm.c\n> @@ -381,14 +381,11 @@ static void vcpu_power_off(struct kvm_vcpu *vcpu)\n>  int kvm_arch_vcpu_ioctl_get_mpstate(struct kvm_vcpu *vcpu,\n>  \t\t\t\t    struct kvm_mp_state *mp_state)\n>  {\n> -\tvcpu_load(vcpu);\n> -\n>  \tif (vcpu->arch.power_off)\n>  \t\tmp_state->mp_state = KVM_MP_STATE_STOPPED;\n>  \telse\n>  \t\tmp_state->mp_state = KVM_MP_STATE_RUNNABLE;\n>  \n> -\tvcpu_put(vcpu);\n>  \treturn 0;\n>  }\n\nOkay, this also makes sense on other architectures. The important thing\nis only that we hold the vcpu mutex.","headers":{"Return-Path":"<kvm-ppc-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=kvm-ppc-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yn6xz2r2Vz9t2V\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 30 Nov 2017 04:30:47 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S933754AbdK2Ran (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tWed, 29 Nov 2017 12:30:43 -0500","from mx1.redhat.com ([209.132.183.28]:59762 \"EHLO mx1.redhat.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S932477AbdK2Rak (ORCPT <rfc822;kvm-ppc@vger.kernel.org>);\n\tWed, 29 Nov 2017 12:30:40 -0500","from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 2409F61461;\n\tWed, 29 Nov 2017 17:30:40 +0000 (UTC)","from [10.36.117.80] (ovpn-117-80.ams2.redhat.com [10.36.117.80])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id E4A1F6031B;\n\tWed, 29 Nov 2017 17:30:33 +0000 (UTC)"],"Subject":"Re: [PATCH v2 15/16] KVM: arm/arm64: Avoid vcpu_load for other vcpu\n\tioctls than KVM_RUN","To":"Christoffer Dall <christoffer.dall@linaro.org>, kvm@vger.kernel.org","Cc":"Andrew Jones <drjones@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>,\n\t=?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= <rkrcmar@redhat.com>,\n\tMarc Zyngier <marc.zyngier@arm.com>, kvmarm@lists.cs.columbia.edu,\n\tlinux-arm-kernel@lists.infradead.org, James Hogan <jhogan@kernel.org>,\n\tlinux-mips@linux-mips.org, Alexander Graf <agraf@suse.com>,\n\tkvm-ppc@vger.kernel.org, \n\tChristian Borntraeger <borntraeger@de.ibm.com>, Cornelia Huck\n\t<cohuck@redhat.com>, linux-s390@vger.kernel.org","References":"<20171129164116.16167-1-christoffer.dall@linaro.org>\n\t<20171129164116.16167-16-christoffer.dall@linaro.org>","From":"David Hildenbrand <david@redhat.com>","Organization":"Red Hat GmbH","Message-ID":"<12137903-6f11-6350-6344-30e3bc6542e3@redhat.com>","Date":"Wed, 29 Nov 2017 18:30:33 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.4.0","MIME-Version":"1.0","In-Reply-To":"<20171129164116.16167-16-christoffer.dall@linaro.org>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.11","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.39]);\n\tWed, 29 Nov 2017 17:30:40 +0000 (UTC)","Sender":"kvm-ppc-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<kvm-ppc.vger.kernel.org>","X-Mailing-List":"kvm-ppc@vger.kernel.org"}},{"id":1812523,"web_url":"http://patchwork.ozlabs.org/comment/1812523/","msgid":"<CAMJs5B-JWrHrCyO6zNC8z34uiMrhNk6RaQCTKRB27Mki+XhpFg@mail.gmail.com>","list_archive_url":null,"date":"2017-11-29T17:34:08","subject":"Re: [PATCH v2 15/16] KVM: arm/arm64: Avoid vcpu_load for other vcpu\n\tioctls than KVM_RUN","submitter":{"id":26352,"url":"http://patchwork.ozlabs.org/api/people/26352/","name":"Christoffer Dall","email":"christoffer.dall@linaro.org"},"content":"On Wed, Nov 29, 2017 at 5:30 PM, David Hildenbrand <david@redhat.com> wrote:\n>\n>> +++ b/virt/kvm/arm/arm.c\n>> @@ -381,14 +381,11 @@ static void vcpu_power_off(struct kvm_vcpu *vcpu)\n>>  int kvm_arch_vcpu_ioctl_get_mpstate(struct kvm_vcpu *vcpu,\n>>                                   struct kvm_mp_state *mp_state)\n>>  {\n>> -     vcpu_load(vcpu);\n>> -\n>>       if (vcpu->arch.power_off)\n>>               mp_state->mp_state = KVM_MP_STATE_STOPPED;\n>>       else\n>>               mp_state->mp_state = KVM_MP_STATE_RUNNABLE;\n>>\n>> -     vcpu_put(vcpu);\n>>       return 0;\n>>  }\n>\n> Okay, this also makes sense on other architectures. The important thing\n> is only that we hold the vcpu mutex.\n>\nYes, but as Paolo said, it's better if architecture maintainers do\nthat themselves.  The risk of me messing things up is way too high\notherwise.\n\nThanks,\n-Christoffer\n--\nTo unsubscribe from this list: send the line \"unsubscribe kvm-ppc\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<kvm-ppc-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=kvm-ppc-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"GWqd67FT\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yn72159bwz9sRn\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 30 Nov 2017 04:34:17 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S934332AbdK2ReO (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tWed, 29 Nov 2017 12:34:14 -0500","from mail-pl0-f66.google.com ([209.85.160.66]:36230 \"EHLO\n\tmail-pl0-f66.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S934269AbdK2ReJ (ORCPT\n\t<rfc822;kvm-ppc@vger.kernel.org>); Wed, 29 Nov 2017 12:34:09 -0500","by mail-pl0-f66.google.com with SMTP id b12so2499272plm.3\n\tfor <kvm-ppc@vger.kernel.org>; Wed, 29 Nov 2017 09:34:09 -0800 (PST)","by 10.100.241.6 with HTTP; Wed, 29 Nov 2017 09:34:08 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=HrnmsnTwUM+OnPETEucycdpO75gVjt+URfcFOiA5/Nw=;\n\tb=GWqd67FTZ/4FUSVLzQzbMATQZqXWLE9KkCgk2vUlQNhZnyQEcfRmoWN8M5y+bJ39CH\n\t5iUPJ5yMlzsahIPvEpZyNnUHJ+9AVFj+KXC8EdrEMO1jWcw/g/NiDmpnR96yb5AnIBLj\n\tbNo5eZZc3RxQp3nCf/BhTTKVp8ouuzkYZv9Og=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=HrnmsnTwUM+OnPETEucycdpO75gVjt+URfcFOiA5/Nw=;\n\tb=copQi0rdYgUnKk73dRgnqciQm7aYcuZ6ABgh/hT4cAityt2IZWNSruraB5I+ypSOqU\n\tbjcWIufZ9HIpJDTVPuLLuBIvxzNjVtNTZqaPZLdE1fCNBpQWiNLGagJv6bHUtzbeNhCE\n\tQC1XdQnX6Pd6B3yVBzYnMG0v9tk+3R4FoWchuyrj7Ojznxfq3mCh42VX9zDOAjvY/qlI\n\tFrmjm2OMwvvkQEWTziyiWUiw4ftQIqGPJ7vFCimu7dAYdCsXMqOqaZiL3f9ugHAHjQjf\n\t38QOIi0q9trEKImGarWa+pY4f/c56sFNrRdukSCNSirTCPfFD66raLWZEY+FsTNFTdSJ\n\tj9Bg==","X-Gm-Message-State":"AJaThX6AxOFe/2Gzdl6IKgF6xCuC2qm2nL2FepxuSrrXH/UyWdrTBwWU\n\tUhYUbgRHBTJl7vqNTEC87WqHEICispvMgHj9hb/KRw==","X-Google-Smtp-Source":"AGs4zMY6kwD0+JOINFJPnoQnM3cGFDAvLIWd1clPlb7uuxd51MSzv34qtFqccXB0yJPL2c/aecVwj1NyYCGWssXNycI=","X-Received":"by 10.84.195.228 with SMTP id j91mr3579865pld.120.1511976849369; \n\tWed, 29 Nov 2017 09:34:09 -0800 (PST)","MIME-Version":"1.0","In-Reply-To":"<12137903-6f11-6350-6344-30e3bc6542e3@redhat.com>","References":"<20171129164116.16167-1-christoffer.dall@linaro.org>\n\t<20171129164116.16167-16-christoffer.dall@linaro.org>\n\t<12137903-6f11-6350-6344-30e3bc6542e3@redhat.com>","From":"Christoffer Dall <christoffer.dall@linaro.org>","Date":"Wed, 29 Nov 2017 17:34:08 +0000","Message-ID":"<CAMJs5B-JWrHrCyO6zNC8z34uiMrhNk6RaQCTKRB27Mki+XhpFg@mail.gmail.com>","Subject":"Re: [PATCH v2 15/16] KVM: arm/arm64: Avoid vcpu_load for other vcpu\n\tioctls than KVM_RUN","To":"David Hildenbrand <david@redhat.com>","Cc":"\"kvm@vger.kernel.org\" <kvm@vger.kernel.org>, Andrew Jones\n\t<drjones@redhat.com>,         Paolo Bonzini <pbonzini@redhat.com>,\n\t=?utf-8?q?Radim_Kr=C4=8Dm?= =?utf-8?b?w6HFmQ==?= <rkrcmar@redhat.com>,\n\tMarc Zyngier <marc.zyngier@arm.com>,\n\t\"kvmarm@lists.cs.columbia.edu\" <kvmarm@lists.cs.columbia.edu>,\n\t\"linux-arm-kernel@lists.infradead.org\" \n\t<linux-arm-kernel@lists.infradead.org>, James Hogan <jhogan@kernel.org>,\n\tlinux-mips@linux-mips.org,         Alexander Graf <agraf@suse.com>,\n\tkvm-ppc <kvm-ppc@vger.kernel.org>, Christian Borntraeger\n\t<borntraeger@de.ibm.com>, Cornelia Huck <cohuck@redhat.com>,\n\tlinux-s390@vger.kernel.org","Content-Type":"text/plain; charset=\"UTF-8\"","Sender":"kvm-ppc-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<kvm-ppc.vger.kernel.org>","X-Mailing-List":"kvm-ppc@vger.kernel.org"}}]