[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 2/3] hmp: fix "dump-quest-memory" segfault (a
From: |
Laurent Vivier |
Subject: |
Re: [Qemu-devel] [PATCH v2 2/3] hmp: fix "dump-quest-memory" segfault (arm) |
Date: |
Tue, 12 Sep 2017 10:11:42 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
On 11/09/2017 18:40, Peter Maydell wrote:
> On 11 September 2017 at 15:45, Thomas Huth <address@hidden> wrote:
>> On 11.09.2017 16:39, Peter Maydell wrote:
>>> On 11 September 2017 at 15:20, Laurent Vivier <address@hidden> 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 <address@hidden>
>>>
>>> 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
[Qemu-devel] [PATCH v2 3/3] tests/hmp: test "none" machine with memory, Laurent Vivier, 2017/09/11
Re: [Qemu-devel] [PATCH v2 0/3] hmp: fix "dump-quest-memory" segfault, no-reply, 2017/09/11