From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect Date: Tue, 15 Dec 2015 17:26:49 +0800 Message-ID: <566FDCD9.6080303@linux.intel.com> References: <1448907973-36066-1-git-send-email-guangrong.xiao@linux.intel.com> <1448907973-36066-10-git-send-email-guangrong.xiao@linux.intel.com> <566FD2A1.7010601@linux.intel.com> <566FD39B.6080200@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: gleb@kernel.org, mtosatti@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: Kai Huang , pbonzini@redhat.com Return-path: In-Reply-To: <566FD39B.6080200@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 12/15/2015 04:47 PM, Kai Huang wrote: >> A further thinking is can we move it to mmu_need_write_protect? Passing can_unsync as parameter to >> kvm_unsync_pages sounds a little bit odd. >> >>> + >>> if (s->unsync) >>> continue; >>> WARN_ON(s->role.level != PT_PAGE_TABLE_LEVEL); >> How about large page mapping? Such as if guest uses 2M mapping and its shadow is indirect, does >> above WARN_ON still meet? As you removed the PT level check in mmu_need_write_protect. >> >> Thanks, >> -Kai > Btw I also think this patch can be merged with patch 6. We can not as it depends on patch 8. ;)