[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3] i386/cpu: release GuestPanicInformation mem
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 1/3] i386/cpu: release GuestPanicInformation memory |
Date: |
Mon, 20 Feb 2017 13:42:17 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 02/20/2017 12:21 PM, Denis V. Lunev wrote:
> From: Anton Nefedov <address@hidden>
>
> Do not make some foreign function do it.
>
> Signed-off-by: Anton Nefedov <address@hidden>
> Signed-off-by: Denis V. Lunev <address@hidden>
> CC: Paolo Bonzini <address@hidden>
> CC: Eric Blake <address@hidden>
> ---
> 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