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:	Mon, 07 Mar 2011 11:50:37 +0800
From:	Xiao Guangrong <xiaoguangrong@...fujitsu.com>
To:	Avi Kivity <avi@...hat.com>
CC:	Marcelo Tosatti <mtosatti@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>, KVM <kvm@...r.kernel.org>
Subject: Re: [PATCH 7/10] KVM: MMU: introduce a common function to get no-dirty-logged
 slot

On 03/06/2011 08:28 PM, Avi Kivity wrote:

>>   static int mapping_level(struct kvm_vcpu *vcpu, gfn_t large_gfn)
>> @@ -2155,9 +2166,8 @@ pte_prefetch_gfn_to_memslot(struct kvm_vcpu *vcpu, gfn_t gfn, bool no_dirty_log)
>>   {
>>       struct kvm_memory_slot *slot;
>>
>> -    slot = gfn_to_memslot(vcpu->kvm, gfn);
>> -    if (!slot || slot->flags&  KVM_MEMSLOT_INVALID ||
>> -          (no_dirty_log&&  slot->dirty_bitmap))
>> +    slot = gfn_to_memslot_dirty_bitmap(vcpu, gfn, no_dirty_log);
>> +    if (slot&&  slot->flags&  KVM_MEMSLOT_INVALID)
>>           slot = NULL;
>>
>>       return slot;
> 
> For a unification this adds a lot of code... I think the result is more complicated than the starting point.
> 

After more thinking, i think we can move 'slot->flags&  KVM_MEMSLOT_INVALID'
into the common function, since the later gva_to_pfn also can filter this out.
--
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