From: "Denis V. Lunev" <den@openvz.org>
Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Andrey Smetanin" <asmetanin@virtuozzo.com>,
"Denis V. Lunev" <den@openvz.org>,
"Andreas Färber" <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH 11/11] qemu/kvm: mark in cpu state that hyper-v crash occured
Date: Mon, 22 Jun 2015 19:05:08 +0300 [thread overview]
Message-ID: <1434989108-20924-12-git-send-email-den@openvz.org> (raw)
In-Reply-To: <1434989108-20924-1-git-send-email-den@openvz.org>
From: Andrey Smetanin <asmetanin@virtuozzo.com>
It's usually impossible to understand from Hyper-V
crash msr's that crash happened because ctl msr
always contains the same value HV_X64_MSR_CRASH_CTL_NOTIFY.
To solve it add a particalar value hv_crash_occurred
inside CPU state and migrate this value with crash msr's.
Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Andreas Färber <afaerber@suse.de>
---
target-i386/cpu.h | 1 +
target-i386/kvm.c | 1 +
target-i386/machine.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 474a93e..2958cdc 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -907,6 +907,7 @@ typedef struct CPUX86State {
uint64_t msr_hv_tsc;
uint64_t msr_hv_crash_prm[HV_X64_MSR_CRASH_PARAMS];
uint64_t msr_hv_crash_ctl;
+ uint8_t hv_crash_occurred;
/* exception/interrupt handling */
int error_code;
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 690677b..2c8d00f 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -2616,6 +2616,7 @@ int kvm_arch_handle_hv_crash(CPUState *cs)
break;
}
}
+ env->hv_crash_occurred = 1;
return 0;
}
diff --git a/target-i386/machine.c b/target-i386/machine.c
index 15b3f31..4f72ba8 100644
--- a/target-i386/machine.c
+++ b/target-i386/machine.c
@@ -679,6 +679,7 @@ static const VMStateDescription vmstate_msr_hyperv_crash = {
VMSTATE_UINT64(env.msr_hv_crash_ctl, X86CPU),
VMSTATE_UINT64_ARRAY(env.msr_hv_crash_prm,
X86CPU, HV_X64_MSR_CRASH_PARAMS),
+ VMSTATE_UINT8(env.hv_crash_occurred, X86CPU),
VMSTATE_END_OF_LIST()
}
};
--
1.9.1
next prev parent reply other threads:[~2015-06-22 16:05 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 16:04 [Qemu-devel] [PATCH v2 0/11] HyperV equivalent of pvpanic driver Denis V. Lunev
2015-06-22 16:04 ` [Qemu-devel] [PATCH 01/11] kvm/x86: move Hyper-V MSR's/hypercall code into hyperv.c file Denis V. Lunev
2015-06-25 10:25 ` Denis V. Lunev
2015-06-25 10:26 ` Paolo Bonzini
2015-06-22 16:04 ` [Qemu-devel] [PATCH 02/11] kvm: introduce vcpu_debug = kvm_debug + vcpu context Denis V. Lunev
2015-06-22 16:05 ` [Qemu-devel] [PATCH 03/11] kvm: add hyper-v crash msrs constants Denis V. Lunev
2015-06-22 16:05 ` [Qemu-devel] [PATCH 04/11] kvm/x86: added hyper-v crash msrs into kvm hyperv context Denis V. Lunev
2015-06-22 16:05 ` [Qemu-devel] [PATCH 05/11] kvm: added KVM_REQ_HV_CRASH value to notify qemu about Hyper-V crash Denis V. Lunev
2015-06-22 16:05 ` [Qemu-devel] [PATCH 06/11] kvm/x86: mark hyper-v crash msrs as partition wide Denis V. Lunev
2015-06-22 16:05 ` [Qemu-devel] [PATCH 07/11] kvm/x86: added hyper-v crash data and ctl msr's get/set'ers Denis V. Lunev
2015-06-22 23:52 ` Peter Hornyack
2015-06-23 9:47 ` Denis V. Lunev
2015-06-23 9:51 ` Paolo Bonzini
2015-06-23 10:08 ` Denis V. Lunev
2015-06-23 10:30 ` Paolo Bonzini
2015-06-22 16:05 ` [Qemu-devel] [PATCH 08/11] kvm/x86: add sending hyper-v crash notification to user space Denis V. Lunev
2015-06-22 16:05 ` [Qemu-devel] [PATCH 09/11] kvm/x86: distingiush hyper-v guest crash notification Denis V. Lunev
2015-06-22 16:09 ` Paolo Bonzini
2015-06-22 23:55 ` Peter Hornyack
2015-06-23 9:52 ` Paolo Bonzini
2015-06-22 16:05 ` [Qemu-devel] [PATCH 10/11] qemu/kvm: kvm hyper-v based guest crash event handling Denis V. Lunev
2015-06-22 16:15 ` Paolo Bonzini
2015-06-22 16:17 ` Paolo Bonzini
2015-06-22 16:05 ` Denis V. Lunev [this message]
2015-06-22 16:23 ` [Qemu-devel] [PATCH 11/11] qemu/kvm: mark in cpu state that hyper-v crash occured Andreas Färber
2015-06-22 16:27 ` Paolo Bonzini
2015-06-22 16:33 ` Andreas Färber
2015-06-22 16:35 ` Denis V. Lunev
2015-06-22 16:36 ` Paolo Bonzini
2015-06-22 17:46 ` Andreas Färber
2015-06-23 9:53 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1434989108-20924-12-git-send-email-den@openvz.org \
--to=den@openvz.org \
--cc=afaerber@suse.de \
--cc=asmetanin@virtuozzo.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).