From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9uoL-0006RL-QG for qemu-devel@nongnu.org; Tue, 30 Jun 2015 08:38:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9uoI-0003bq-An for qemu-devel@nongnu.org; Tue, 30 Jun 2015 08:38:49 -0400 Received: from relay.parallels.com ([195.214.232.42]:42497) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9uoI-0003Z9-1V for qemu-devel@nongnu.org; Tue, 30 Jun 2015 08:38:46 -0400 Message-ID: <55928DBC.2080100@openvz.org> Date: Tue, 30 Jun 2015 15:38:20 +0300 From: "Denis V. Lunev" MIME-Version: 1.0 References: <1435664007-4965-1-git-send-email-den@openvz.org> <20150630122619.GF14025@redhat.com> In-Reply-To: <20150630122619.GF14025@redhat.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 0/9] HyperV equivalent of pvpanic driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Gleb Natapov , Paolo Bonzini , qemu-devel@nongnu.org, kvm@vger.kernel.org, Andrey Smetanin 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