From patchwork Fri Jul 16 02:12:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lai Jiangshan X-Patchwork-Id: 112347 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6G2Ds3U006982 for ; Fri, 16 Jul 2010 02:13:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935281Ab0GPCMa (ORCPT ); Thu, 15 Jul 2010 22:12:30 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:63291 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S935168Ab0GPCM3 (ORCPT ); Thu, 15 Jul 2010 22:12:29 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id DD453170115; Fri, 16 Jul 2010 10:12:27 +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 o6G29eH1032139; Fri, 16 Jul 2010 10:09:41 +0800 Received: from [10.167.141.204] (unknown [10.167.141.204]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id B93191CC1FE; Fri, 16 Jul 2010 10:12:51 +0800 (CST) Message-ID: <4C3FC025.9070707@cn.fujitsu.com> Date: Fri, 16 Jul 2010 10:12:53 +0800 From: Lai Jiangshan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 MIME-Version: 1.0 To: LKML , kvm@vger.kernel.org, Avi Kivity , Marcelo Tosatti Subject: [PATCH 1/6] kvm: pass error code to handler 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, 16 Jul 2010 02:13:55 +0000 (UTC) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 856e427..b40731e 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -3521,7 +3521,8 @@ static int handle_ept_violation(struct kvm_vcpu *vcpu) gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS); trace_kvm_page_fault(gpa, exit_qualification); - return kvm_mmu_page_fault(vcpu, gpa & PAGE_MASK, 0); + return kvm_mmu_page_fault(vcpu, gpa & PAGE_MASK, + exit_qualification & 0x2); } static u64 ept_rsvd_mask(u64 spte, int level)