On Sat, 16 Feb 2008 14:34:09 +0100 Alexander Graf <[EMAIL PROTECTED]> 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/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel