qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 0/9] HyperV equivalent of pvpanic driver


From: Denis V. Lunev
Subject: Re: [Qemu-devel] [PATCH v3 0/9] HyperV equivalent of pvpanic driver
Date: Tue, 30 Jun 2015 15:38:20 +0300
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 30/06/15 15:26, Daniel P. Berrange wrote:
On Tue, Jun 30, 2015 at 02:33:18PM +0300, Denis V. Lunev wrote:
Windows 2012 guests can notify hypervisor about occurred guest crash
(Windows bugcheck(BSOD)) by writing specific Hyper-V msrs. This patch does
handling of this MSR's by KVM and sending notification to user space that
allows to gather Windows guest crash dump by QEMU/LIBVIRT.

The idea is to provide functionality equal to pvpanic device without
QEMU guest agent for Windows.
That's nice - do you know if the Linux kernel (or any other non-Win2k12
kernels) have support for notifying hypevisors via this Hyper-V msr,
when running as a guest ?

Regards,
Daniel
Linux for sure is able to do that if configured to run
on top of Hyper-V

drivers/hv/vmbus_drv.c:
static int hyperv_panic_event(struct notifier_block *nb,
                        unsigned long event, void *ptr)
{
        struct pt_regs *regs;

        regs = current_pt_regs();

        wrmsrl(HV_X64_MSR_CRASH_P0, regs->ip);
        wrmsrl(HV_X64_MSR_CRASH_P1, regs->ax);
        wrmsrl(HV_X64_MSR_CRASH_P2, regs->bx);
        wrmsrl(HV_X64_MSR_CRASH_P3, regs->cx);
        wrmsrl(HV_X64_MSR_CRASH_P4, regs->dx);

        /*
         * Let Hyper-V know there is crash data available
         */
        wrmsrl(HV_X64_MSR_CRASH_CTL, HV_CRASH_CTL_CRASH_NOTIFY);
        return NOTIFY_DONE;
}

Regards,
    Den



reply via email to

[Prev in Thread] Current Thread [Next in Thread]