From: Paolo Bonzini <pbonzini@redhat.com>
To: Eric Blake <eblake@redhat.com>,
Anton Nefedov <anton.nefedov@virtuozzo.com>,
qemu-devel@nongnu.org
Cc: armbru@redhat.com, den@openvz.org
Subject: Re: [Qemu-devel] [PATCH] qmp-events: fix GUEST_PANICKED description formatting
Date: Mon, 20 Feb 2017 19:10:04 +0100 [thread overview]
Message-ID: <1cc2dad1-8ffd-0b7a-1a2a-881db663488f@redhat.com> (raw)
In-Reply-To: <6882690d-5972-8b42-61ad-302531dc6d7e@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]
On 16/02/2017 20:36, Eric Blake wrote:
> On that grounds, you already need the 'if (info)' for more than just the
> free, so this code motion is no longer quite as important. But now I'm
> noticing that it looks weird because you are freeing an input parameter.
> Generally, transfer semantics like that are screwy - it's probably
> better if the caller of qemu_system_guest_panicked() is the one freeing
> info, rather than requiring that the caller pass in malloc'd memory that
> gets freed as a side effect and must not be referenced afterwards in the
> caller. In other words, I think the code motion is unnecessary, but
> that the qapi_free_GuestPanicInformation() call is probably in the wrong
> function to begin with.
Even better then would be to just pass a CPUState* and let
qemu_system_guest_panicked get the GuestPanicInformation via the QOM
property.
But for 2.9, we only need to change the union. Eric, can you do that
for us since my QAPI-fu is limited?
Paolo
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2017-02-20 18:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-16 17:39 [Qemu-devel] [PATCH 0/1] qmp-events: fix GUEST_PANICKED description formatting Anton Nefedov
2017-02-16 17:39 ` [Qemu-devel] [PATCH] " Anton Nefedov
2017-02-16 19:36 ` Eric Blake
2017-02-20 18:10 ` Paolo Bonzini [this message]
2017-02-20 18:12 ` Denis V. Lunev
2017-02-20 19:49 ` Eric Blake
-- strict thread matches above, loose matches on Subject: below --
2017-02-16 16:08 [Qemu-devel] [PULL 21/23] report guest crash information in GUEST_PANICKED event Denis V. Lunev
2017-02-16 16:30 ` [Qemu-devel] [PATCH] qmp-events: fix GUEST_PANICKED description formatting Anton Nefedov
2017-02-16 16:56 ` Eric Blake
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=1cc2dad1-8ffd-0b7a-1a2a-881db663488f@redhat.com \
--to=pbonzini@redhat.com \
--cc=anton.nefedov@virtuozzo.com \
--cc=armbru@redhat.com \
--cc=den@openvz.org \
--cc=eblake@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).