From: Guillaume Thouvenin Subject: Re: [PATCH] enable gfxboot on VMX Date: Mon, 18 Feb 2008 10:17:02 +0100 Message-ID: <20080218101702.15054d4d@frecb000711> References: <47B53B7D.8050209@csgraf.de> <47B597FF.7030304@qumranet.com> <5869160F-A202-4092-9A44-1D65058E188D@csgraf.de> <47B6A780.4090402@qumranet.com> <38713C47-8F04-404A-A3CF-51BDCE1E9999@csgraf.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel , Avi Kivity To: Alexander Graf Return-path: In-Reply-To: <38713C47-8F04-404A-A3CF-51BDCE1E9999@csgraf.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org On Sat, 16 Feb 2008 14:34:09 +0100 Alexander Graf wrote: > > Whenever the register state becomes consistent with VT again. > > vmx_set_segment() looks like the right point for turning it off. > > Sounds good. As basically the only problem we have are the sanity > checks done on VMENTER, this should work. Hello, I tried to detect VMentry failure in order to do real mode emulation. I tested the patch (pasted at the end of this message) with the installation of OpenSuse 10.3 but it failed to detect the VMentry failure. I suspect that on my computer the failure is not due to a VMentry failure. Can you test the patch and tell me if it detects a VMentry failure? Thanks for your help, Regards, Guillaume --- Index: kvm/arch/x86/kvm/vmx.c =================================================================== --- kvm.orig/arch/x86/kvm/vmx.c 2008-02-18 09:22:53.000000000 +0100 +++ kvm/arch/x86/kvm/vmx.c 2008-02-18 09:43:13.000000000 +0100 @@ -2255,6 +2255,15 @@ static const int kvm_vmx_max_exit_handlers = ARRAY_SIZE(kvm_vmx_exit_handlers); +static int kvm_handle_vmentry_failure(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) +{ + printk(KERN_WARNING "VMENTRY failure detected \n"); + if (vcpu->arch.rmode.active) + printk(KERN_WARNING "Big Real Mode emulation needed \n"); + + return 0; +} + /* * The guest has exited. See if we can fix it or if we need userspace * assistance. @@ -2265,6 +2274,9 @@ struct vcpu_vmx *vmx = to_vmx(vcpu); u32 vectoring_info = vmx->idt_vectoring_info; + if (unlikely(exit_reason & VMX_EXIT_REASONS_FAILED_VMENTRY)) + return kvm_handle_vmentry_failure(kvm_run, vcpu); + if (unlikely(vmx->fail)) { kvm_run->exit_reason = KVM_EXIT_FAIL_ENTRY; kvm_run->fail_entry.hardware_entry_failure_reason ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/