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: <4D78A642.8020708@redhat.com>
Date:	Thu, 10 Mar 2011 12:21:54 +0200
From:	Avi Kivity <avi@...hat.com>
To:	Xiao Guangrong <xiaoguangrong@...fujitsu.com>
CC:	Marcelo Tosatti <mtosatti@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>, KVM <kvm@...r.kernel.org>
Subject: Re: [PATCH v2 4/4] KVM: MMU: cleanup pte write path

On 03/09/2011 09:43 AM, Xiao Guangrong wrote:
> This patch does:
> - call vcpu->arch.mmu.update_pte directly
> - use gfn_to_pfn_atomic in update_pte path
>
> The suggestion is from Avi.
>
>
>
> -	mmu_guess_page_from_pte_write(vcpu, gpa, gentry);
> +	mmu_seq = vcpu->kvm->mmu_notifier_seq;
> +	smp_rmb();

smp_rmb() should come before, no? but the problem was present in the 
original code, too.

> +
>   	spin_lock(&vcpu->kvm->mmu_lock);
>   	if (atomic_read(&vcpu->kvm->arch.invlpg_counter) != invlpg_counter)
>   		gentry = 0;
> @@ -3365,7 +3345,8 @@ void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
>   			if (gentry&&
>   			!((sp->role.word ^ vcpu->arch.mmu.base_role.word)
>   			&  mask.word))
> -				mmu_pte_write_new_pte(vcpu, sp, spte,&gentry);
> +				mmu_pte_write_new_pte(vcpu, sp, spte,&gentry,
> +						      mmu_seq);

Okay, we're only iterating over indirect pages, so we won't call 
nonpaging_update_pte().

-- 
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ