aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorAnton Nefedov <anton.nefedov@virtuozzo.com>2017-02-20 21:21:54 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2017-03-03 16:40:03 +0100
commite8ed97a6478f55dde54f0188a54e094a1caa7965 (patch)
treea9839f239e03da5bade8dc48f84fcc2fc594471b /target
parent025533f6eeb4751ee6d8330a505d47a1128322d1 (diff)
qapi: flatten GuestPanicInformation union
Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com> Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Eric Blake <eblake@redhat.com> Message-Id: <1487614915-18710-3-git-send-email-den@openvz.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target')
-rw-r--r--target/i386/cpu.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 89421c893b..aec5d9daf8 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -3778,19 +3778,16 @@ static GuestPanicInformation *x86_cpu_get_crash_info(CPUState *cs)
GuestPanicInformation *panic_info = NULL;
if (env->features[FEAT_HYPERV_EDX] & HV_X64_GUEST_CRASH_MSR_AVAILABLE) {
- GuestPanicInformationHyperV *panic_info_hv =
- g_malloc0(sizeof(GuestPanicInformationHyperV));
panic_info = g_malloc0(sizeof(GuestPanicInformation));
- panic_info->type = GUEST_PANIC_INFORMATION_KIND_HYPER_V;
- panic_info->u.hyper_v.data = panic_info_hv;
+ panic_info->type = GUEST_PANIC_INFORMATION_TYPE_HYPER_V;
assert(HV_X64_MSR_CRASH_PARAMS >= 5);
- panic_info_hv->arg1 = env->msr_hv_crash_params[0];
- panic_info_hv->arg2 = env->msr_hv_crash_params[1];
- panic_info_hv->arg3 = env->msr_hv_crash_params[2];
- panic_info_hv->arg4 = env->msr_hv_crash_params[3];
- panic_info_hv->arg5 = env->msr_hv_crash_params[4];
+ panic_info->u.hyper_v.arg1 = env->msr_hv_crash_params[0];
+ panic_info->u.hyper_v.arg2 = env->msr_hv_crash_params[1];
+ panic_info->u.hyper_v.arg3 = env->msr_hv_crash_params[2];
+ panic_info->u.hyper_v.arg4 = env->msr_hv_crash_params[3];
+ panic_info->u.hyper_v.arg5 = env->msr_hv_crash_params[4];
}
return panic_info;