qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, Thomas Huth <thuth@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	"Daniel P . Berrange" <berrange@redhat.com>,
	Cornelia Huck <cohuck@redhat.com>,
	David Gibson <david@gibson.dropbear.id.au>,
	qemu-arm <qemu-arm@nongnu.org>,
	"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
	Greg Kurz <groug@kaod.org>
Subject: Re: [Qemu-devel] [PATCH v2 2/3] hmp: fix "dump-quest-memory" segfault (arm)
Date: Tue, 12 Sep 2017 10:11:42 +0200	[thread overview]
Message-ID: <315f4cc0-0cd2-4c68-1b0f-26b6979d85e5@redhat.com> (raw)
In-Reply-To: <CAFEAcA9Wmq+G6H78NdsVs5mKDrMcUkB30yY2d=3+KOnbT-pmAQ@mail.gmail.com>

On 11/09/2017 18:40, Peter Maydell wrote:
> On 11 September 2017 at 15:45, Thomas Huth <thuth@redhat.com> wrote:
>> On 11.09.2017 16:39, Peter Maydell wrote:
>>> On 11 September 2017 at 15:20, Laurent Vivier <lvivier@redhat.com> wrote:
>>>> Commit fd5d23babf (hmp: fix "dump-quest-memory" segfault)
>>>> fixes the problem for i386, do the same for arm.
>>>>
>>>> Running QEMU with
>>>>     qemu-system-aarch64 -M none -nographic -m 256
>>>> and executing
>>>>     dump-guest-memory /dev/null 0 8192
>>>> results in segfault
>>>>
>>>> Fix by checking if we have CPU.
>>>>
>>>> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
>>>
>>> It seems a little arbitrary to assume that if there's no
>>> CPU what you wanted was a 32-bit little-endian dump.
>>>
>>> Why do we have a machine without a CPU anyway ?
>>
>> The "none" machine is always started without a default CPU.
> 
> If it has no CPU then how can we create a core dump for it?
> We don't (in theory) even know whether it's x86 or ARM.
> (One day we may support multiple CPU architectures in
> one QEMU binary...)
> 
> If the theory is hotplug-later then we're a bit stuck
> because we need to know information now that we can't
> know until the CPU is actually hotplugged.

As we have memory we should be able to dump memory, even without CPU.

But I can also do as proposed by Thomas and return -1 to cancel the dump
if there is no CPU.

Thanks,
Laurent

  parent reply	other threads:[~2017-09-12  8:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-11 14:20 [Qemu-devel] [PATCH v2 0/3] hmp: fix "dump-quest-memory" segfault Laurent Vivier
2017-09-11 14:20 ` [Qemu-devel] [PATCH v2 1/3] hmp: fix "dump-quest-memory" segfault (ppc) Laurent Vivier
2017-09-11 14:20 ` [Qemu-devel] [PATCH v2 2/3] hmp: fix "dump-quest-memory" segfault (arm) Laurent Vivier
2017-09-11 14:39   ` Peter Maydell
2017-09-11 14:45     ` Thomas Huth
2017-09-11 16:40       ` Peter Maydell
2017-09-11 17:06         ` Thomas Huth
2017-09-12  8:11         ` Laurent Vivier [this message]
2017-09-11 15:35     ` Laurent Vivier
2017-09-11 15:08   ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2017-09-11 15:25     ` Laurent Vivier
2017-09-11 15:38       ` Greg Kurz
2017-09-11 14:20 ` [Qemu-devel] [PATCH v2 3/3] tests/hmp: test "none" machine with memory Laurent Vivier
2017-09-11 14:51   ` Thomas Huth
2017-09-11 15:39     ` Laurent Vivier
2017-09-12 12:15   ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2017-09-11 14:34 ` [Qemu-devel] [PATCH v2 0/3] hmp: fix "dump-quest-memory" segfault 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=315f4cc0-0cd2-4c68-1b0f-26b6979d85e5@redhat.com \
    --to=lvivier@redhat.com \
    --cc=berrange@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=dgilbert@redhat.com \
    --cc=groug@kaod.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=thuth@redhat.com \
    /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).