lkml.org 
[lkml]   [2012]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 02/10] KVM: MMU: abstract spte write-protect
On 06/20/2012 08:56 PM, Takuya Yoshikawa wrote:

> On Wed, 20 Jun 2012 17:11:06 +0800
> Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com> wrote:
>
>> Strange! Why do you think it is wrong? It is just debug code.
>
> kvm_mmu_slot_remove_write_access() does not use rmap but the debug code says:
> rmap_printk("rmap_write_protect: spte %p %llx\n", sptep, *sptep);


It is not a problem since all sptes which are pointing to gfn is existed in rmap.

>
>>> If you think it is not a problem, please explain why you think so in
>>> the changelog.
>>
>>
>> It is a from the first place and it is used to debug and not compiled at all.
>
> It was not in kvm_mmu_slot_remove_write_access() before, no?
>
> This patch says that the write protection code becomes commonly usable
> function, but it still has rmap_write_protect specific debug code in it;
> using it in kvm_mmu_slot_remove_write_access(), which is not at all related
> to rmap_write_protect, is strange.
>
> As you say, this is just debug code and does not have any practical problem.
> But randomly putting debug code is not a good thing.
>


Again, "rmap" does not break the logic, the spte we handle in this function must
be in rmap.



\
 
 \ /
  Last update: 2012-06-20 16:01    [W:0.587 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site