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

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

 



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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux