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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 18 Jul 2019 14:09:13 +0200
From:   Christian Borntraeger <borntraeger@...ibm.com>
To:     Wanpeng Li <kernellwp@...il.com>, linux-kernel@...r.kernel.org,
        kvm@...r.kernel.org
Cc:     Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krčmář <rkrcmar@...hat.com>,
        Janosch Frank <frankja@...ux.ibm.com>,
        linux-s390 <linux-s390@...r.kernel.org>,
        Michael Mueller <mimu@...ux.ibm.com>
Subject: Re: [PATCH v2 2/2] KVM:390: Use kvm_vcpu_wake_up in
 kvm_s390_vcpu_wakeup



On 18.07.19 13:39, Wanpeng Li wrote:
> From: Wanpeng Li <wanpengli@...cent.com>
> 
> Use kvm_vcpu_wake_up() in kvm_s390_vcpu_wakeup().
> 
> Suggested-by: Paolo Bonzini <pbonzini@...hat.com>
> Cc: Paolo Bonzini <pbonzini@...hat.com>
> Cc: Radim Krčmář <rkrcmar@...hat.com>
> Cc: Christian Borntraeger <borntraeger@...ibm.com>
> Signed-off-by: Wanpeng Li <wanpengli@...cent.com>

with patch1 this looks good. 
> ---
>  arch/s390/kvm/interrupt.c | 15 +--------------
>  1 file changed, 1 insertion(+), 14 deletions(-)
> 
> diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
> index 26f8bf4..881cc5a 100644
> --- a/arch/s390/kvm/interrupt.c
> +++ b/arch/s390/kvm/interrupt.c
> @@ -1229,21 +1229,8 @@ void kvm_s390_vcpu_wakeup(struct kvm_vcpu *vcpu)
>  	 * in kvm_vcpu_block without having the waitqueue set (polling)
>  	 */
>  	vcpu->valid_wakeup = true;
> -	/*
> -	 * This is mostly to document, that the read in swait_active could
> -	 * be moved before other stores, leading to subtle races.
> -	 * All current users do not store or use an atomic like update
> -	 */
> -	smp_mb__after_atomic();
> -	if (swait_active(&vcpu->wq)) {
> -		/*
> -		 * The vcpu gave up the cpu voluntarily, mark it as a good
> -		 * yield-candidate.
> -		 */
> +	if (kvm_vcpu_wake_up(vcpu))
>  		vcpu->ready = true;
> -		swake_up_one(&vcpu->wq);
> -		vcpu->stat.halt_wakeup++;
> -	}
>  	/*
>  	 * The VCPU might not be sleeping but is executing the VSIE. Let's
>  	 * kick it, so it leaves the SIE to process the request.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ