lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170228073424.GL10022@pxdev.xzpeter.org>
Date:   Tue, 28 Feb 2017 15:34:24 +0800
From:   Peter Xu <peterx@...hat.com>
To:     Radim Krčmář <rkrcmar@...hat.com>
Cc:     linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
        Paolo Bonzini <pbonzini@...hat.com>,
        Andrew Jones <drjones@...hat.com>,
        Marc Zyngier <marc.zyngier@....com>,
        Christian Borntraeger <borntraeger@...ibm.com>,
        Cornelia Huck <cornelia.huck@...ibm.com>,
        James Hogan <james.hogan@...tec.com>,
        Paul Mackerras <paulus@...abs.org>,
        Christoffer Dall <christoffer.dall@...aro.org>,
        David Hildenbrand <david@...hat.com>
Subject: Re: [PATCH v2 2/5] KVM: add KVM request variants without barrier

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@...hat.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ