From: Peter Xu <peterx@redhat.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
Paolo Bonzini <pbonzini@redhat.com>,
Andrew Jones <drjones@redhat.com>,
Marc Zyngier <marc.zyngier@arm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
Cornelia Huck <cornelia.huck@de.ibm.com>,
James Hogan <james.hogan@imgtec.com>,
Paul Mackerras <paulus@ozlabs.org>,
Christoffer Dall <christoffer.dall@linaro.org>,
David Hildenbrand <david@redhat.com>
Subject: Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier
Date: Tue, 28 Feb 2017 15:34:24 +0800 [thread overview]
Message-ID: <20170228073424.GL10022@pxdev.xzpeter.org> (raw)
In-Reply-To: <20170224195002.28030-3-rkrcmar@redhat.com>
On Fri, Feb 24, 2017 at 08:49:59PM +0100, Radim Krčmář wrote:
> The leading underscores denote that the call is just a bitop wrapper.
>
> Switch all users of open-coded set/check/test to kvm_request ones.
>
> Automated by coccinelle script:
> @@
> expression VCPU, REQ;
> @@
> -set_bit(REQ, &VCPU->requests)
> +__kvm_request_set(REQ, VCPU)
>
> @@
> expression VCPU, REQ;
> @@
> -clear_bit(REQ, &VCPU->requests)
> +__kvm_request_clear(REQ, VCPU)
>
> @@
> expression VCPU, REQ;
> @@
> -test_bit(REQ, &VCPU->requests)
> +__kvm_request_test(REQ, VCPU)
>
> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
> ---
> v2: clear_bit in __kvm_request_clear [Paolo]
> ---
> arch/mips/kvm/emulate.c | 2 +-
> arch/powerpc/kvm/book3s_pr.c | 2 +-
> arch/powerpc/kvm/book3s_pr_papr.c | 2 +-
> arch/powerpc/kvm/booke.c | 4 ++--
> arch/powerpc/kvm/powerpc.c | 2 +-
> arch/s390/kvm/kvm-s390.c | 2 +-
> arch/x86/kvm/vmx.c | 2 +-
> arch/x86/kvm/x86.c | 14 +++++++-------
> include/linux/kvm_host.h | 23 ++++++++++++++++++++---
> 9 files changed, 35 insertions(+), 18 deletions(-)
>
> diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c
> index ee4af898bcf6..552ae2b5e911 100644
> --- a/arch/mips/kvm/emulate.c
> +++ b/arch/mips/kvm/emulate.c
> @@ -865,7 +865,7 @@ enum emulation_result kvm_mips_emul_wait(struct kvm_vcpu *vcpu)
> * check if any I/O interrupts are pending.
> */
> if (kvm_request_test_and_clear(KVM_REQ_UNHALT, vcpu)) {
> - clear_bit(KVM_REQ_UNHALT, &vcpu->requests);
> + __kvm_request_clear(KVM_REQ_UNHALT, vcpu);
Shall we just remove above line since we cleared it already?
-- peterx
next prev parent reply other threads:[~2017-02-28 7:34 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-24 19:49 [PATCH v2 0/5] KVM: rename and encapsulate vcpu->requests API Radim Krčmář
2017-02-24 19:49 ` [PATCH v2 1/5] KVM: rename API for requests to match bit operations Radim Krčmář
2017-02-27 9:54 ` David Hildenbrand
2017-03-01 16:37 ` Radim Krčmář
2017-02-24 19:49 ` [PATCH v2 2/5] KVM: add KVM request variants without barrier Radim Krčmář
2017-02-27 10:02 ` David Hildenbrand
2017-02-27 10:18 ` David Hildenbrand
2017-03-01 16:58 ` Radim Krčmář
2017-02-28 7:34 ` Peter Xu [this message]
2017-02-28 7:40 ` Peter Xu
2017-03-01 17:02 ` Radim Krčmář
2017-03-02 1:15 ` Peter Xu
2017-03-02 2:26 ` Peter Xu
2017-02-24 19:50 ` [PATCH v2 3/5] KVM: add kvm_request_pending Radim Krčmář
2017-02-27 10:02 ` David Hildenbrand
2017-02-24 19:50 ` [PATCH v2 4/5] KVM: MIPS: remove useless kvm_request_clear Radim Krčmář
2017-02-27 8:45 ` Andrew Jones
2017-02-27 10:03 ` David Hildenbrand
2017-02-28 11:29 ` James Hogan
2017-03-01 17:04 ` Radim Krčmář
2017-02-24 19:50 ` [PATCH v2 5/5] KVM: optimize kvm_make_all_cpus_request Radim Krčmář
2017-02-27 8:47 ` [PATCH v2 0/5] KVM: rename and encapsulate vcpu->requests API Andrew Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170228073424.GL10022@pxdev.xzpeter.org \
--to=peterx@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=christoffer.dall@linaro.org \
--cc=cornelia.huck@de.ibm.com \
--cc=david@redhat.com \
--cc=drjones@redhat.com \
--cc=james.hogan@imgtec.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=paulus@ozlabs.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox