qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v4 0/4] hmp: fix "dump-quest-memory" segfault
@ 2017-09-13 14:20 Laurent Vivier
  2017-09-13 14:20 ` [Qemu-devel] [PATCH v4 1/4] hmp: fix "dump-quest-memory" segfault (ppc) Laurent Vivier
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Laurent Vivier @ 2017-09-13 14:20 UTC (permalink / raw)
  To: Dr . David Alan Gilbert, qemu-devel
  Cc: Daniel P . Berrange, Cornelia Huck, David Gibson, Thomas Huth,
	qemu-arm, qemu-ppc, Peter Maydell, Greg Kurz, Laurent Vivier

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

v4:
  - update comment in test-hmp.c
  - add cohuck's patch

v3:
  - remove blank line after a comment
  - forbid memory dump when there is no CPU

v2:
  - add arm fix
  - update test-hmp

Cornelia Huck (1):
  dump: do not dump non-existent guest memory

Laurent Vivier (3):
  hmp: fix "dump-quest-memory" segfault (ppc)
  hmp: fix "dump-quest-memory" segfault (arm)
  tests/hmp: test "none" machine with memory

 dump.c                 |  6 ++++++
 target/arm/arch_dump.c | 11 +++++++++--
 target/ppc/arch_dump.c | 11 +++++++++--
 tests/test-hmp.c       |  4 ++++
 4 files changed, 28 insertions(+), 4 deletions(-)

-- 
2.13.5

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PATCH v4 1/4] hmp: fix "dump-quest-memory" segfault (ppc)
  2017-09-13 14:20 [Qemu-devel] [PATCH v4 0/4] hmp: fix "dump-quest-memory" segfault Laurent Vivier
@ 2017-09-13 14:20 ` Laurent Vivier
  2017-09-14  0:14   ` David Gibson
  2017-09-13 14:20 ` [Qemu-devel] [PATCH v4 2/4] hmp: fix "dump-quest-memory" segfault (arm) Laurent Vivier
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Laurent Vivier @ 2017-09-13 14:20 UTC (permalink / raw)
  To: Dr . David Alan Gilbert, qemu-devel
  Cc: Daniel P . Berrange, Cornelia Huck, David Gibson, Thomas Huth,
	qemu-arm, qemu-ppc, Peter Maydell, Greg Kurz, Laurent Vivier

Running QEMU with
    qemu-system-ppc64 -M none -nographic -m 256
and executing
    dump-guest-memory /dev/null 0 8192
results in segfault

Fix by checking if we have CPU, and exit with
error if there is no CPU:

    (qemu) dump-guest-memory /dev/null
    this feature or command is not currently supported

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
 target/ppc/arch_dump.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/target/ppc/arch_dump.c b/target/ppc/arch_dump.c
index 8e9397aa58..95b9ab6f29 100644
--- a/target/ppc/arch_dump.c
+++ b/target/ppc/arch_dump.c
@@ -224,8 +224,15 @@ typedef struct NoteFuncDescStruct NoteFuncDesc;
 int cpu_get_dump_info(ArchDumpInfo *info,
                       const struct GuestPhysBlockList *guest_phys_blocks)
 {
-    PowerPCCPU *cpu = POWERPC_CPU(first_cpu);
-    PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
+    PowerPCCPU *cpu;
+    PowerPCCPUClass *pcc;
+
+    if (first_cpu == NULL) {
+        return -1;
+    }
+
+    cpu = POWERPC_CPU(first_cpu);
+    pcc = POWERPC_CPU_GET_CLASS(cpu);
 
     info->d_machine = PPC_ELF_MACHINE;
     info->d_class = ELFCLASS;
-- 
2.13.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PATCH v4 2/4] hmp: fix "dump-quest-memory" segfault (arm)
  2017-09-13 14:20 [Qemu-devel] [PATCH v4 0/4] hmp: fix "dump-quest-memory" segfault Laurent Vivier
  2017-09-13 14:20 ` [Qemu-devel] [PATCH v4 1/4] hmp: fix "dump-quest-memory" segfault (ppc) Laurent Vivier
@ 2017-09-13 14:20 ` Laurent Vivier
  2017-09-14  6:41   ` Auger Eric
  2017-09-13 14:20 ` [Qemu-devel] [PATCH v4 3/4] dump: do not dump non-existent guest memory Laurent Vivier
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 11+ messages in thread
From: Laurent Vivier @ 2017-09-13 14:20 UTC (permalink / raw)
  To: Dr . David Alan Gilbert, qemu-devel
  Cc: Daniel P . Berrange, Cornelia Huck, David Gibson, Thomas Huth,
	qemu-arm, qemu-ppc, Peter Maydell, Greg Kurz, Laurent Vivier

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, and exit with
error if there is no CPU:

    (qemu) dump-guest-memory /dev/null
    this feature or command is not currently supported

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
---
 target/arm/arch_dump.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/target/arm/arch_dump.c b/target/arm/arch_dump.c
index 1a9861f69b..9e5b2fb31c 100644
--- a/target/arm/arch_dump.c
+++ b/target/arm/arch_dump.c
@@ -273,11 +273,18 @@ int arm_cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cs,
 int cpu_get_dump_info(ArchDumpInfo *info,
                       const GuestPhysBlockList *guest_phys_blocks)
 {
-    ARMCPU *cpu = ARM_CPU(first_cpu);
-    CPUARMState *env = &cpu->env;
+    ARMCPU *cpu;
+    CPUARMState *env;
     GuestPhysBlock *block;
     hwaddr lowest_addr = ULLONG_MAX;
 
+    if (first_cpu == NULL) {
+        return -1;
+    }
+
+    cpu = ARM_CPU(first_cpu);
+    env = &cpu->env;
+
     /* Take a best guess at the phys_base. If we get it wrong then crash
      * will need '--machdep phys_offset=<phys-offset>' added to its command
      * line, which isn't any worse than assuming we can use zero, but being
-- 
2.13.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PATCH v4 3/4] dump: do not dump non-existent guest memory
  2017-09-13 14:20 [Qemu-devel] [PATCH v4 0/4] hmp: fix "dump-quest-memory" segfault Laurent Vivier
  2017-09-13 14:20 ` [Qemu-devel] [PATCH v4 1/4] hmp: fix "dump-quest-memory" segfault (ppc) Laurent Vivier
  2017-09-13 14:20 ` [Qemu-devel] [PATCH v4 2/4] hmp: fix "dump-quest-memory" segfault (arm) Laurent Vivier
@ 2017-09-13 14:20 ` Laurent Vivier
  2017-09-13 14:27   ` Cornelia Huck
  2017-09-13 14:20 ` [Qemu-devel] [PATCH v4 4/4] tests/hmp: test "none" machine with memory Laurent Vivier
  2017-09-14  9:50 ` [Qemu-devel] [PATCH v4 0/4] hmp: fix "dump-quest-memory" segfault Dr. David Alan Gilbert
  4 siblings, 1 reply; 11+ messages in thread
From: Laurent Vivier @ 2017-09-13 14:20 UTC (permalink / raw)
  To: Dr . David Alan Gilbert, qemu-devel
  Cc: Daniel P . Berrange, Cornelia Huck, David Gibson, Thomas Huth,
	qemu-arm, qemu-ppc, Peter Maydell, Greg Kurz

From: Cornelia Huck <cohuck@redhat.com>

It does not really make sense to dump memory that is not there.

Moreover, that fixes a segmentation fault when calling dump-guest-memory
with no filter for a machine with no memory defined.

New behaviour is:

(qemu) dump-guest-memory /dev/null
dump: no guest memory to dump
(qemu) dump-guest-memory /dev/null 0 4096
dump: no guest memory to dump

Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Tested-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
---
 dump.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dump.c b/dump.c
index a79773d0f7..d2093e141b 100644
--- a/dump.c
+++ b/dump.c
@@ -1536,6 +1536,12 @@ static void dump_init(DumpState *s, int fd, bool has_format,
     fprintf(stderr, "DUMP: total memory to dump: %lu\n", s->total_size);
 #endif
 
+    /* it does not make sense to dump non-existent memory */
+    if (!s->total_size) {
+        error_setg(errp, "dump: no guest memory to dump");
+        goto cleanup;
+    }
+
     s->start = get_start_block(s);
     if (s->start == -1) {
         error_setg(errp, QERR_INVALID_PARAMETER, "begin");
-- 
2.13.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PATCH v4 4/4] tests/hmp: test "none" machine with memory
  2017-09-13 14:20 [Qemu-devel] [PATCH v4 0/4] hmp: fix "dump-quest-memory" segfault Laurent Vivier
                   ` (2 preceding siblings ...)
  2017-09-13 14:20 ` [Qemu-devel] [PATCH v4 3/4] dump: do not dump non-existent guest memory Laurent Vivier
@ 2017-09-13 14:20 ` Laurent Vivier
  2017-09-14  9:50 ` [Qemu-devel] [PATCH v4 0/4] hmp: fix "dump-quest-memory" segfault Dr. David Alan Gilbert
  4 siblings, 0 replies; 11+ messages in thread
From: Laurent Vivier @ 2017-09-13 14:20 UTC (permalink / raw)
  To: Dr . David Alan Gilbert, qemu-devel
  Cc: Daniel P . Berrange, Cornelia Huck, David Gibson, Thomas Huth,
	qemu-arm, qemu-ppc, Peter Maydell, Greg Kurz, Laurent Vivier

and add a test case of dump-guest-memory without
"[begin length]" parameters.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
---
 tests/test-hmp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/test-hmp.c b/tests/test-hmp.c
index 729c0339f7..d124e81850 100644
--- a/tests/test-hmp.c
+++ b/tests/test-hmp.c
@@ -35,6 +35,7 @@ static const char *hmp_cmds[] = {
     "mouse_button 0",
     "device_del mouse1",
     "dump-guest-memory /dev/null 0 4096",
+    "dump-guest-memory /dev/null",
     "gdbserver",
     "host_net_add user id=net0",
     "hostfwd_add tcp::43210-:43210",
@@ -159,5 +160,8 @@ int main(int argc, char **argv)
 
     qtest_cb_for_every_machine(add_machine_test_case);
 
+    /* as none machine has no memory by default, add a test case with memory */
+    qtest_add_data_func("hmp/none+2MB", g_strdup("none -m 2"), test_machine);
+
     return g_test_run();
 }
-- 
2.13.5

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH v4 3/4] dump: do not dump non-existent guest memory
  2017-09-13 14:20 ` [Qemu-devel] [PATCH v4 3/4] dump: do not dump non-existent guest memory Laurent Vivier
@ 2017-09-13 14:27   ` Cornelia Huck
  2017-09-13 14:30     ` Laurent Vivier
  0 siblings, 1 reply; 11+ messages in thread
From: Cornelia Huck @ 2017-09-13 14:27 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: Dr . David Alan Gilbert, qemu-devel, Daniel P . Berrange,
	David Gibson, Thomas Huth, qemu-arm, qemu-ppc, Peter Maydell,
	Greg Kurz

On Wed, 13 Sep 2017 16:20:35 +0200
Laurent Vivier <lvivier@redhat.com> wrote:

> From: Cornelia Huck <cohuck@redhat.com>
> 
> It does not really make sense to dump memory that is not there.
> 
> Moreover, that fixes a segmentation fault when calling dump-guest-memory
> with no filter for a machine with no memory defined.
> 
> New behaviour is:
> 
> (qemu) dump-guest-memory /dev/null
> dump: no guest memory to dump
> (qemu) dump-guest-memory /dev/null 0 4096
> dump: no guest memory to dump
> 
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> Tested-by: Laurent Vivier <lvivier@redhat.com>
> Reviewed-by: Laurent Vivier <lvivier@redhat.com>
> Reviewed-by: Greg Kurz <groug@kaod.org>
> Reviewed-by: Peter Xu <peterx@redhat.com>
> ---
>  dump.c | 6 ++++++
>  1 file changed, 6 insertions(+)

You need to supply your s-o-b as well, no?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH v4 3/4] dump: do not dump non-existent guest memory
  2017-09-13 14:27   ` Cornelia Huck
@ 2017-09-13 14:30     ` Laurent Vivier
  2017-09-14  9:48       ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 11+ messages in thread
From: Laurent Vivier @ 2017-09-13 14:30 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: Dr . David Alan Gilbert, qemu-devel, Daniel P . Berrange,
	David Gibson, Thomas Huth, qemu-arm, qemu-ppc, Peter Maydell,
	Greg Kurz

On 13/09/2017 16:27, Cornelia Huck wrote:
> On Wed, 13 Sep 2017 16:20:35 +0200
> Laurent Vivier <lvivier@redhat.com> wrote:
> 
>> From: Cornelia Huck <cohuck@redhat.com>
>>
>> It does not really make sense to dump memory that is not there.
>>
>> Moreover, that fixes a segmentation fault when calling dump-guest-memory
>> with no filter for a machine with no memory defined.
>>
>> New behaviour is:
>>
>> (qemu) dump-guest-memory /dev/null
>> dump: no guest memory to dump
>> (qemu) dump-guest-memory /dev/null 0 4096
>> dump: no guest memory to dump
>>
>> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
>> Tested-by: Laurent Vivier <lvivier@redhat.com>
>> Reviewed-by: Laurent Vivier <lvivier@redhat.com>
>> Reviewed-by: Greg Kurz <groug@kaod.org>
>> Reviewed-by: Peter Xu <peterx@redhat.com>
>> ---
>>  dump.c | 6 ++++++
>>  1 file changed, 6 insertions(+)
> 
> You need to supply your s-o-b as well, no?
> 

I was wondering... theoretically, yes, so:

Signed-off-by: Laurent Vivier <lvivier@redhat.com>

Thanks,
Laurent

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH v4 1/4] hmp: fix "dump-quest-memory" segfault (ppc)
  2017-09-13 14:20 ` [Qemu-devel] [PATCH v4 1/4] hmp: fix "dump-quest-memory" segfault (ppc) Laurent Vivier
@ 2017-09-14  0:14   ` David Gibson
  0 siblings, 0 replies; 11+ messages in thread
From: David Gibson @ 2017-09-14  0:14 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: Dr . David Alan Gilbert, qemu-devel, Daniel P . Berrange,
	Cornelia Huck, Thomas Huth, qemu-arm, qemu-ppc, Peter Maydell,
	Greg Kurz

[-- Attachment #1: Type: text/plain, Size: 1685 bytes --]

On Wed, Sep 13, 2017 at 04:20:33PM +0200, Laurent Vivier wrote:
> Running QEMU with
>     qemu-system-ppc64 -M none -nographic -m 256
> and executing
>     dump-guest-memory /dev/null 0 8192
> results in segfault
> 
> Fix by checking if we have CPU, and exit with
> error if there is no CPU:
> 
>     (qemu) dump-guest-memory /dev/null
>     this feature or command is not currently supported
> 
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> Reviewed-by: Greg Kurz <groug@kaod.org>
> Reviewed-by: Thomas Huth <thuth@redhat.com>

Acked-by: David Gibson <david@gibson.dropbear.id.au>

> ---
>  target/ppc/arch_dump.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/target/ppc/arch_dump.c b/target/ppc/arch_dump.c
> index 8e9397aa58..95b9ab6f29 100644
> --- a/target/ppc/arch_dump.c
> +++ b/target/ppc/arch_dump.c
> @@ -224,8 +224,15 @@ typedef struct NoteFuncDescStruct NoteFuncDesc;
>  int cpu_get_dump_info(ArchDumpInfo *info,
>                        const struct GuestPhysBlockList *guest_phys_blocks)
>  {
> -    PowerPCCPU *cpu = POWERPC_CPU(first_cpu);
> -    PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
> +    PowerPCCPU *cpu;
> +    PowerPCCPUClass *pcc;
> +
> +    if (first_cpu == NULL) {
> +        return -1;
> +    }
> +
> +    cpu = POWERPC_CPU(first_cpu);
> +    pcc = POWERPC_CPU_GET_CLASS(cpu);
>  
>      info->d_machine = PPC_ELF_MACHINE;
>      info->d_class = ELFCLASS;

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH v4 2/4] hmp: fix "dump-quest-memory" segfault (arm)
  2017-09-13 14:20 ` [Qemu-devel] [PATCH v4 2/4] hmp: fix "dump-quest-memory" segfault (arm) Laurent Vivier
@ 2017-09-14  6:41   ` Auger Eric
  0 siblings, 0 replies; 11+ messages in thread
From: Auger Eric @ 2017-09-14  6:41 UTC (permalink / raw)
  To: Laurent Vivier, Dr . David Alan Gilbert, qemu-devel
  Cc: Peter Maydell, Thomas Huth, Cornelia Huck, Greg Kurz, qemu-arm,
	qemu-ppc, David Gibson

Hi Laurent,

On 13/09/2017 16:20, Laurent Vivier wrote:
> 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, and exit with
> error if there is no CPU:
> 
>     (qemu) dump-guest-memory /dev/null
>     this feature or command is not currently supported
> 
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>

Thanks

Eric

> ---
>  target/arm/arch_dump.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/target/arm/arch_dump.c b/target/arm/arch_dump.c
> index 1a9861f69b..9e5b2fb31c 100644
> --- a/target/arm/arch_dump.c
> +++ b/target/arm/arch_dump.c
> @@ -273,11 +273,18 @@ int arm_cpu_write_elf32_note(WriteCoreDumpFunction f, CPUState *cs,
>  int cpu_get_dump_info(ArchDumpInfo *info,
>                        const GuestPhysBlockList *guest_phys_blocks)
>  {
> -    ARMCPU *cpu = ARM_CPU(first_cpu);
> -    CPUARMState *env = &cpu->env;
> +    ARMCPU *cpu;
> +    CPUARMState *env;
>      GuestPhysBlock *block;
>      hwaddr lowest_addr = ULLONG_MAX;
>  
> +    if (first_cpu == NULL) {
> +        return -1;
> +    }
> +
> +    cpu = ARM_CPU(first_cpu);
> +    env = &cpu->env;
> +
>      /* Take a best guess at the phys_base. If we get it wrong then crash
>       * will need '--machdep phys_offset=<phys-offset>' added to its command
>       * line, which isn't any worse than assuming we can use zero, but being
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH v4 3/4] dump: do not dump non-existent guest memory
  2017-09-13 14:30     ` Laurent Vivier
@ 2017-09-14  9:48       ` Dr. David Alan Gilbert
  0 siblings, 0 replies; 11+ messages in thread
From: Dr. David Alan Gilbert @ 2017-09-14  9:48 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: Cornelia Huck, qemu-devel, Daniel P . Berrange, David Gibson,
	Thomas Huth, qemu-arm, qemu-ppc, Peter Maydell, Greg Kurz

* Laurent Vivier (lvivier@redhat.com) wrote:
> On 13/09/2017 16:27, Cornelia Huck wrote:
> > On Wed, 13 Sep 2017 16:20:35 +0200
> > Laurent Vivier <lvivier@redhat.com> wrote:
> > 
> >> From: Cornelia Huck <cohuck@redhat.com>
> >>
> >> It does not really make sense to dump memory that is not there.
> >>
> >> Moreover, that fixes a segmentation fault when calling dump-guest-memory
> >> with no filter for a machine with no memory defined.
> >>
> >> New behaviour is:
> >>
> >> (qemu) dump-guest-memory /dev/null
> >> dump: no guest memory to dump
> >> (qemu) dump-guest-memory /dev/null 0 4096
> >> dump: no guest memory to dump
> >>
> >> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> >> Tested-by: Laurent Vivier <lvivier@redhat.com>
> >> Reviewed-by: Laurent Vivier <lvivier@redhat.com>
> >> Reviewed-by: Greg Kurz <groug@kaod.org>
> >> Reviewed-by: Peter Xu <peterx@redhat.com>
> >> ---
> >>  dump.c | 6 ++++++
> >>  1 file changed, 6 insertions(+)
> > 
> > You need to supply your s-o-b as well, no?
> > 
> 
> I was wondering... theoretically, yes, so:
> 
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>

Thanks.

Dave

> Thanks,
> Laurent
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH v4 0/4] hmp: fix "dump-quest-memory" segfault
  2017-09-13 14:20 [Qemu-devel] [PATCH v4 0/4] hmp: fix "dump-quest-memory" segfault Laurent Vivier
                   ` (3 preceding siblings ...)
  2017-09-13 14:20 ` [Qemu-devel] [PATCH v4 4/4] tests/hmp: test "none" machine with memory Laurent Vivier
@ 2017-09-14  9:50 ` Dr. David Alan Gilbert
  4 siblings, 0 replies; 11+ messages in thread
From: Dr. David Alan Gilbert @ 2017-09-14  9:50 UTC (permalink / raw)
  To: Laurent Vivier
  Cc: qemu-devel, Daniel P . Berrange, Cornelia Huck, David Gibson,
	Thomas Huth, qemu-arm, qemu-ppc, Peter Maydell, Greg Kurz, peterx

* Laurent Vivier (lvivier@redhat.com) 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

Queued for HMP

Dave

> 
> v4:
>   - update comment in test-hmp.c
>   - add cohuck's patch
> 
> v3:
>   - remove blank line after a comment
>   - forbid memory dump when there is no CPU
> 
> v2:
>   - add arm fix
>   - update test-hmp
> 
> Cornelia Huck (1):
>   dump: do not dump non-existent guest memory
> 
> Laurent Vivier (3):
>   hmp: fix "dump-quest-memory" segfault (ppc)
>   hmp: fix "dump-quest-memory" segfault (arm)
>   tests/hmp: test "none" machine with memory
> 
>  dump.c                 |  6 ++++++
>  target/arm/arch_dump.c | 11 +++++++++--
>  target/ppc/arch_dump.c | 11 +++++++++--
>  tests/test-hmp.c       |  4 ++++
>  4 files changed, 28 insertions(+), 4 deletions(-)
> 
> -- 
> 2.13.5
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-09-14  9:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-13 14:20 [Qemu-devel] [PATCH v4 0/4] hmp: fix "dump-quest-memory" segfault Laurent Vivier
2017-09-13 14:20 ` [Qemu-devel] [PATCH v4 1/4] hmp: fix "dump-quest-memory" segfault (ppc) Laurent Vivier
2017-09-14  0:14   ` David Gibson
2017-09-13 14:20 ` [Qemu-devel] [PATCH v4 2/4] hmp: fix "dump-quest-memory" segfault (arm) Laurent Vivier
2017-09-14  6:41   ` Auger Eric
2017-09-13 14:20 ` [Qemu-devel] [PATCH v4 3/4] dump: do not dump non-existent guest memory Laurent Vivier
2017-09-13 14:27   ` Cornelia Huck
2017-09-13 14:30     ` Laurent Vivier
2017-09-14  9:48       ` Dr. David Alan Gilbert
2017-09-13 14:20 ` [Qemu-devel] [PATCH v4 4/4] tests/hmp: test "none" machine with memory Laurent Vivier
2017-09-14  9:50 ` [Qemu-devel] [PATCH v4 0/4] hmp: fix "dump-quest-memory" segfault Dr. David Alan Gilbert

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).