Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1589248
| From | Peter Xu <peterx@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier |
| Date | 2017-02-28 08:40 +0100 |
| Message-ID | <tfKy5-1gf-5@gated-at.bofh.it> (permalink) |
| References | <teuc1-4Ze-5@gated-at.bofh.it> <teuc2-4Ze-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 2/5] KVM: add KVM request variants without barrier Radim Krčmář <rkrcmar@redhat.com> - 2017-02-24 21:00 +0100
Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier David Hildenbrand <david@redhat.com> - 2017-02-27 11:10 +0100
Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier David Hildenbrand <david@redhat.com> - 2017-02-27 11:30 +0100
Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier Peter Xu <peterx@redhat.com> - 2017-02-28 08:40 +0100
Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier Peter Xu <peterx@redhat.com> - 2017-02-28 08:50 +0100
csiph-web