From patchwork Mon Jan 18 23:09:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matteo Signorini X-Patchwork-Id: 73786 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0IN9L30005373 for ; Mon, 18 Jan 2010 23:09:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754389Ab0ARXJS (ORCPT ); Mon, 18 Jan 2010 18:09:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754300Ab0ARXJS (ORCPT ); Mon, 18 Jan 2010 18:09:18 -0500 Received: from mail-ew0-f219.google.com ([209.85.219.219]:36248 "EHLO mail-ew0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753982Ab0ARXJR convert rfc822-to-8bit (ORCPT ); Mon, 18 Jan 2010 18:09:17 -0500 Received: by ewy19 with SMTP id 19so1118470ewy.21 for ; Mon, 18 Jan 2010 15:09:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=ZaKPiKXM/knPbUFC1U3c2R4vdIl9D2jbsntf2jdfCuA=; b=G92UL/k+drxVO941wVZav4YNfOR83CUScGNg9cXQWh306XLLPIeBEjIOM9KUCsyIrP e8nldTeosxgfESuXQBxQ98Xn+bx0cpBXNkThNOwiC5gwlGxNqc8vORWrhdxKxoJjR9AU PYclzZnLAxA+ZXsfEEEpBV+8rE0Jvqem1tUH0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=bVd4NkfUgNjtwR2UNe7H7Gvf3A8EQXClYnWFyndOeCk76lGK37t1bxz/whFqGWg09t EKU29C1sk/TJhNUW+gfZlEWxXmrcD1VHQpdfLcgmSvNTgflfzfP4S1nbYm8ogwgfzUUz i3Pgo/0WE4IzRuIQDoB9hXyA+WArvQjknStOM= MIME-Version: 1.0 Received: by 10.216.86.65 with SMTP id v43mr2252529wee.118.1263856155889; Mon, 18 Jan 2010 15:09:15 -0800 (PST) Date: Tue, 19 Jan 2010 00:09:15 +0100 Message-ID: Subject: problem with vm-exit exit code From: Matteo Signorini To: kvm@vger.kernel.org Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org --- x86/default_vmx.c 2010-01-18 11:24:11.726860478 +0100 +++ x86/vmx.c 2010-01-18 11:31:41.116842970 +0100 @@ -2347,6 +2347,7 @@ exec_control &= ~SECONDARY_EXEC_ENABLE_EPT; if (!enable_unrestricted_guest) exec_control &= ~SECONDARY_EXEC_UNRESTRICTED_ GUEST; + exec_control |= SECONDARY_EXEC_DT_EXITING; vmcs_write32(SECONDARY_VM_EXEC_CONTROL, exec_control); } @@ -3398,6 +3399,10 @@ vmx->invalid_state_emulation_result = err; } +static void handle_gdtr_idtr_access(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run){ + printk(KERN_INFO "line = %d\n",__LINE__); +} + /* * The exit handlers return 1 if the exit was handled fully and guest execution * may resume. Otherwise they set the kvm_run parameter to indicate what needs @@ -3435,6 +3440,7 @@ [EXIT_REASON_MCE_DURING_VMENTRY] = handle_machine_check, [EXIT_REASON_EPT_VIOLATION] = handle_ept_violation, [EXIT_REASON_EPT_MISCONFIG] = handle_ept_misconfig, + [EXIT_REASON_ACCESS_GDTR_IDTR] = handle_gdtr_idtr_access, }; --- include/asm/default_vmx.h 2010-01-18 11:26:51.126860209 +0100 +++ include/asm/vmx.h 2010-01-18 11:33:23.866760764 +0100 @@ -96,6 +96,7 @@ #define SECONDARY_EXEC_ENABLE_VPID 0x00000020 #define SECONDARY_EXEC_WBINVD_EXITING 0x00000040 #define SECONDARY_EXEC_UNRESTRICTED_GUEST 0x00000080 +#define SECONDARY_EXEC_DT_EXITING 0x00000004 @@ -291,6 +292,7 @@