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] [day] [month] [year] [list]
Date:	Fri, 11 Mar 2016 09:13:58 +0800
From:	Lan Tianyu <tianyu.lan@...el.com>
To:	Paolo Bonzini <pbonzini@...hat.com>,
	Xiao Guangrong <guangrong.xiao@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>
CC:	gleb@...nel.org, mingo@...hat.com, hpa@...or.com, x86@...nel.org,
	kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: Remove redundant smp_mb() in the kvm_mmu_commit_zap_page()

On 2016年03月10日 23:26, Paolo Bonzini wrote:
> 
> 
> On 10/03/2016 15:40, Xiao Guangrong wrote:
>>      long dirty_count = kvm->tlbs_dirty;
>>
>> +        /*
>> +         * read tlbs_dirty before doing tlb flush to make sure not tlb
>> request is
>> +         * lost.
>> +         */
>>      smp_mb();
>> +
>>      if (kvm_make_all_cpus_request(kvm, KVM_REQ_TLB_FLUSH))
>>          ++kvm->stat.remote_tlb_flush;
>>      cmpxchg(&kvm->tlbs_dirty, dirty_count, 0);
>>
>>
>> Any comment?
> 
> Compared to smp_load_acquire(), smp_mb() adds an ordering between stores
> and loads.  Is the
> 
> The load of kvm->tlbs_dirty should then be
> 
> 	/*
> 	 * Read tlbs_dirty before setting KVM_REQ_TLB_FLUSH in
> 	 * kvm_make_all_cpus_request.  This
> 	 */
> 	long dirty_count = smp_load_acquire(kvm->tlbs_dirty);
> 
> Tianyu, I think Xiao provided the information that I was missing.  Would
> you like to prepare the patch?

Paolo:
	Sure. I will do that.

Guangrong:
	Thanks a lot for your input.

-- 
Best regards
Tianyu Lan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ