Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964837AbbLOJhg (ORCPT ); Tue, 15 Dec 2015 04:37:36 -0500 Received: from mga14.intel.com ([192.55.52.115]:56400 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933146AbbLOJhf (ORCPT ); Tue, 15 Dec 2015 04:37:35 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,431,1444719600"; d="scan'208";a="861000192" Subject: Re: [PATCH 09/11] KVM: MMU: simplify mmu_need_write_protect To: Kai Huang , pbonzini@redhat.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> Cc: gleb@kernel.org, mtosatti@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org From: Xiao Guangrong Message-ID: <566FDCD9.6080303@linux.intel.com> Date: Tue, 15 Dec 2015 17:26:49 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <566FD39B.6080200@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 874 Lines: 25 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. ;) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/