From: Laszlo Ersek <lersek@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>, qemu-devel@nongnu.org
Cc: imammedo@redhat.com, anderson@redhat.com, berrange@redhat.com,
ehabkost@redhat.com, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 3/8] stubs: add vmcoreinfo_get() stub
Date: Fri, 14 Jul 2017 22:09:33 +0200 [thread overview]
Message-ID: <4b5ce302-f34f-ad9a-c73e-5cefc1c8f1ae@redhat.com> (raw)
In-Reply-To: <20170714182012.4595-4-marcandre.lureau@redhat.com>
On 07/14/17 20:20, Marc-André Lureau wrote:
> Common dump code may call vmcoreinfo_get() which is not available on
> all targets.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> stubs/vmcoreinfo.c | 9 +++++++++
> stubs/Makefile.objs | 1 +
> 2 files changed, 10 insertions(+)
> create mode 100644 stubs/vmcoreinfo.c
>
> diff --git a/stubs/vmcoreinfo.c b/stubs/vmcoreinfo.c
> new file mode 100644
> index 0000000000..a994153832
> --- /dev/null
> +++ b/stubs/vmcoreinfo.c
> @@ -0,0 +1,9 @@
> +#include "qemu/osdep.h"
> +
> +#include "hw/acpi/vmcoreinfo.h"
> +
> +bool vmcoreinfo_get(VMCoreInfoState *vis, uint64_t *paddr, uint32_t *size,
> + Error **errp)
> +{
> + return false;
> +}
> diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
> index f5b47bfd74..3bedc73252 100644
> --- a/stubs/Makefile.objs
> +++ b/stubs/Makefile.objs
> @@ -36,6 +36,7 @@ stub-obj-y += qmp_pc_dimm_device_list.o
> stub-obj-y += target-monitor-defs.o
> stub-obj-y += target-get-monitor-def.o
> stub-obj-y += pc_madt_cpu_entry.o
> +stub-obj-y += vmcoreinfo.o
> stub-obj-y += vmgenid.o
> stub-obj-y += xen-common.o
> stub-obj-y += xen-hvm.o
>
Looks like a good idea -- but now that you are adding this patch, I
think we should actually report an error like "unsupported" via errp:
error_setg(errp, QERR_UNSUPPORTED);
In patch #5 you report the error (as a warning) with warn_report_err(),
and I think that's going to crash there -- err is pre-inited to NULL,
the above impl. doesn't change it, and warn_report_err() doesn't expect
NULL.
Thanks
Laszlo
next prev parent reply other threads:[~2017-07-14 20:09 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 18:20 [Qemu-devel] [PATCH v4 0/8] KASLR kernel dump support Marc-André Lureau
2017-07-14 18:20 ` [Qemu-devel] [PATCH v4 1/8] vmgenid: replace x-write-pointer-available hack Marc-André Lureau
2017-07-14 19:19 ` Michael S. Tsirkin
2017-07-14 18:20 ` [Qemu-devel] [PATCH v4 2/8] acpi: add vmcoreinfo device Marc-André Lureau
2017-07-14 19:26 ` Michael S. Tsirkin
2017-07-14 20:04 ` Laszlo Ersek
2017-07-14 20:17 ` Michael S. Tsirkin
2017-07-14 22:12 ` Marc-André Lureau
2017-07-14 23:09 ` Michael S. Tsirkin
2017-07-14 23:30 ` Marc-André Lureau
2017-07-14 23:40 ` Michael S. Tsirkin
2017-07-14 23:47 ` Marc-André Lureau
2017-07-26 17:21 ` Michael S. Tsirkin
2017-07-28 14:52 ` Marc-André Lureau
2017-07-28 15:55 ` Laszlo Ersek
2017-08-07 15:44 ` Dave Anderson
2017-07-14 18:20 ` [Qemu-devel] [PATCH v4 3/8] stubs: add vmcoreinfo_get() stub Marc-André Lureau
2017-07-14 20:09 ` Laszlo Ersek [this message]
2017-07-14 18:20 ` [Qemu-devel] [PATCH v4 4/8] tests: add simple vmcoreinfo test Marc-André Lureau
2017-07-14 20:10 ` Laszlo Ersek
2017-07-14 18:20 ` [Qemu-devel] [PATCH v4 5/8] dump: add vmcoreinfo ELF note Marc-André Lureau
2017-07-14 18:20 ` [Qemu-devel] [PATCH v4 6/8] kdump: " Marc-André Lureau
2017-07-14 18:20 ` [Qemu-devel] [PATCH v4 7/8] scripts/dump-guest-memory.py: add vmcoreinfo Marc-André Lureau
2017-07-14 18:20 ` [Qemu-devel] [PATCH v4 8/8] MAINTAINERS: add Dump maintainers Marc-André Lureau
2017-07-14 19:59 ` [Qemu-devel] [PATCH v4 0/8] KASLR kernel dump support Michael S. Tsirkin
2017-07-14 20:21 ` Laszlo Ersek
2017-07-14 22:23 ` Michael S. Tsirkin
2017-07-14 22:31 ` Marc-André Lureau
2017-07-14 23:29 ` Michael S. Tsirkin
2017-07-18 13:29 ` Marc-André Lureau
2017-07-18 16:05 ` Ladi Prosek
2017-07-18 16:18 ` Marc-André Lureau
2017-07-19 6:06 ` Ladi Prosek
2017-07-14 23:36 ` no-reply
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=4b5ce302-f34f-ad9a-c73e-5cefc1c8f1ae@redhat.com \
--to=lersek@redhat.com \
--cc=anderson@redhat.com \
--cc=berrange@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=marcandre.lureau@redhat.com \
--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).