From patchwork Fri Jun 11 11:30:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lai Jiangshan X-Patchwork-Id: 105566 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5BBVkbs032330 for ; Fri, 11 Jun 2010 11:31:47 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760139Ab0FKLbU (ORCPT ); Fri, 11 Jun 2010 07:31:20 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:62291 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1760127Ab0FKLbT (ORCPT ); Fri, 11 Jun 2010 07:31:19 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 8472C17012A; Fri, 11 Jun 2010 19:31:16 +0800 (CST) Received: from fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id o5BBSsvk026920; Fri, 11 Jun 2010 19:28:54 +0800 Received: from [10.167.141.204] (unknown [10.167.141.204]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id 4322E10C007; Fri, 11 Jun 2010 19:30:56 +0800 (CST) Message-ID: <4C121E6A.9000009@cn.fujitsu.com> Date: Fri, 11 Jun 2010 19:30:50 +0800 From: Lai Jiangshan User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Avi Kivity , Marcelo Tosatti , kvm@vger.kernel.org, LKML Subject: [PATCH 2/2] kvm, ept: remove the default write bit Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 11 Jun 2010 11:31:47 +0000 (UTC) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index fdb18cf..c7565ea 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -4365,8 +4365,7 @@ static int __init vmx_init(void) if (enable_ept) { bypass_guest_pf = 0; - kvm_mmu_set_base_ptes(VMX_EPT_READABLE_MASK | - VMX_EPT_WRITABLE_MASK); + kvm_mmu_set_base_ptes(VMX_EPT_READABLE_MASK); kvm_mmu_set_mask_ptes(0ull, 0ull, 0ull, 0ull, VMX_EPT_EXECUTABLE_MASK); kvm_enable_tdp();