lkml.org 
[lkml]   [2007]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH 1/9] KVM: Improve reporting of vmwrite errors
    From
    Date
    This will allow us to see the root cause when a vmwrite error happens.

    Signed-off-by: Avi Kivity <avi@qumranet.com>

    Index: linux-2.6/drivers/kvm/vmx.c
    ===================================================================
    --- linux-2.6.orig/drivers/kvm/vmx.c
    +++ linux-2.6/drivers/kvm/vmx.c
    @@ -152,15 +152,21 @@ static u64 vmcs_read64(unsigned long fie
    #endif
    }

    +static noinline void vmwrite_error(unsigned long field, unsigned long value)
    +{
    + printk(KERN_ERR "vmwrite error: reg %lx value %lx (err %d)\n",
    + field, value, vmcs_read32(VM_INSTRUCTION_ERROR));
    + dump_stack();
    +}
    +
    static void vmcs_writel(unsigned long field, unsigned long value)
    {
    u8 error;

    asm volatile (ASM_VMX_VMWRITE_RAX_RDX "; setna %0"
    : "=q"(error) : "a"(value), "d"(field) : "cc" );
    - if (error)
    - printk(KERN_ERR "vmwrite error: reg %lx value %lx (err %d)\n",
    - field, value, vmcs_read32(VM_INSTRUCTION_ERROR));
    + if (unlikely(error))
    + vmwrite_error(field, value);
    }

    static void vmcs_write16(unsigned long field, u16 value)
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2007-01-05 08:53    [W:0.019 / U:46.900 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site