On 02/20/2017 12:21 PM, Denis V. Lunev wrote: > From: Anton Nefedov <anton.nefe...@virtuozzo.com> > > Do not make some foreign function do it. > > Signed-off-by: Anton Nefedov <anton.nefe...@virtuozzo.com> > Signed-off-by: Denis V. Lunev <d...@openvz.org> > CC: Paolo Bonzini <pbonz...@redhat.com> > CC: Eric Blake <ebl...@redhat.com> > --- > kvm-all.c | 5 ++++- > vl.c | 22 +++++++++------------- > 2 files changed, 13 insertions(+), 14 deletions(-) >
> +++ b/vl.c > @@ -1682,6 +1682,15 @@ void qemu_system_reset(bool report) > void qemu_system_guest_panicked(GuestPanicInformation *info) > { > qemu_log_mask(LOG_GUEST_ERROR, "Guest crashed\n"); > + if (info && info->type == GUEST_PANIC_INFORMATION_KIND_HYPER_V) { > + qemu_log_mask(LOG_GUEST_ERROR, "HV crash parameters: (%#"PRIx64 > + " %#"PRIx64" %#"PRIx64" %#"PRIx64" %#"PRIx64")\n", > + info->u.hyper_v.data->arg1, > + info->u.hyper_v.data->arg2, > + info->u.hyper_v.data->arg3, > + info->u.hyper_v.data->arg4, > + info->u.hyper_v.data->arg5); > + } Why are we hoisting this code earlier in the function (which changes the log order, if I'm reading correctly)... > > if (current_cpu) { > current_cpu->crash_occurred = true; > @@ -1694,19 +1703,6 @@ void qemu_system_guest_panicked(GuestPanicInformation > *info) > !!info, info, &error_abort); > qemu_system_shutdown_request(); > } > - > - if (info) { > - if (info->type == GUEST_PANIC_INFORMATION_KIND_HYPER_V) { > - qemu_log_mask(LOG_GUEST_ERROR, "HV crash parameters: (%#"PRIx64 > - " %#"PRIx64" %#"PRIx64" %#"PRIx64" %#"PRIx64")\n", > - info->u.hyper_v.data->arg1, > - info->u.hyper_v.data->arg2, > - info->u.hyper_v.data->arg3, > - info->u.hyper_v.data->arg4, > - info->u.hyper_v.data->arg5); > - } > - qapi_free_GuestPanicInformation(info); > - } ...instead of just cleaning up this code in place? But the rest of the patch looks fine. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature