qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 0/3] hmp: fix "dump-quest-memory" segfault


From: Greg Kurz
Subject: Re: [Qemu-devel] [PATCH v3 0/3] hmp: fix "dump-quest-memory" segfault
Date: Tue, 12 Sep 2017 17:26:21 +0200

On Tue, 12 Sep 2017 16:51:46 +0200
Thomas Huth <address@hidden> wrote:

> On 12.09.2017 16:46, Greg Kurz wrote:
> > On Tue, 12 Sep 2017 16:01:46 +0200
> > Laurent Vivier <address@hidden> wrote:
> >   
> >> Fix aarch64 and ppc when dump-guest-memory is
> >> used with none machine type and no CPU.
> >>
> >> The other machine types don't have the problem.
> >>
> >> Update test-hmp, to test none machine type
> >> with (2 MB) and without memory, and add a test
> >> to test dump-quest-memory without filter parameters
> >> (it needs the fix from Cornelia Huck to work)
> >>
> >> v3:
> >>   - remove blank line after a comment
> >>   - forbid memory dump when there is no CPU
> >>  
> > 
> > So in the end, we would forbid dump on aarch64 and
> > ppc, while it is allowed on i386... I don't really
> > care about which behavior is more appropriate but
> > I guess they should be consistent at least.  
> 
> It's kind of consistent: Allow it on architectures with fixed endianess,
> but disallow it on architectures without fixed endianess ;-)
> 

Heh, fun and true: only these ones need first_cpu to guess the endianess,
in case it isn't the default... but the CPU may also be needed to guess
32 or 64 bits.

Let's just hope no one ever tries to add yet another endian-changing
abomination with 32/64-bit support in QEMU :P


> Honestly, it should not matter - we're talking here about the "none"
> machine without a CPU ... as long as it does not crash, there is no need
> for a working "dump-guest-memory" function here.
> 

Erroring out in dump_init() if nr_cpus == 0, before calling the target
specific code would be neater IMHO.

Cheers,

--
Greg

>  Thomas
> 

Attachment: pgpB74MgpyVMt.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]