qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] s390: Implement dump-guest-memory support fo


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH v2] s390: Implement dump-guest-memory support for target s390x
Date: Thu, 20 Jun 2013 14:21:52 +0200

On 12.06.2013, at 10:09, Jens Freimann wrote:

> From: Ekaterina Tumanova <address@hidden>
> 
> With this patch dump-guest-memory on s390 produces an ELF formatted,
> crash-readable dump. 
> In order to implement this, the arch-specific part of dump-guest-memory
> was added:
> target-s390x/arch_dump.c contains the whole set of function for writing
> Elf note sections of all types for s390x.
> 
> Signed-off-by: Ekaterina Tumanova <address@hidden>
> Signed-off-by: Jens Freimann <address@hidden>

> 
> 

[...]

> diff --git a/target-s390x/cpu-qom.h b/target-s390x/cpu-qom.h
> index 34d45c2..4dfc8f1 100644
> --- a/target-s390x/cpu-qom.h
> +++ b/target-s390x/cpu-qom.h
> @@ -72,5 +72,14 @@ static inline S390CPU *s390_env_get_cpu(CPUS390XState *env)
> #define ENV_OFFSET offsetof(S390CPU, env)
> 
> void s390_cpu_do_interrupt(CPUState *cpu);
> +int s390_cpu_write_elf64_note(WriteCoreDumpFunction f, CPUState *cs,
> +                         int cpuid, void *opaque);
> +
> +static inline int s390_cpu_write_elf64_qemunote(WriteCoreDumpFunction f,
> +        CPUState *env, void *opaque)
> +{
> +    return 0;
> +}

This one looks odd to me. cpu-qom.h shouldn't really have a static inline to 
not write notes :). Either put the function into arch_dump.c as well and only 
export the header here or drop the whole thing and make sure that 
write_elf64_qemunote == NULL still works.

The rest looks good, without any guarantees that the format is actually 
correctly implemented.


Alex

> +
> 
> #endif
> diff --git a/target-s390x/cpu.c b/target-s390x/cpu.c
> index 23fe51f..9376a6c 100644
> --- a/target-s390x/cpu.c
> +++ b/target-s390x/cpu.c
> @@ -171,6 +171,10 @@ static void s390_cpu_class_init(ObjectClass *oc, void 
> *data)
> 
>     cc->do_interrupt = s390_cpu_do_interrupt;
>     dc->vmsd = &vmstate_s390_cpu;
> +#ifndef CONFIG_USER_ONLY
> +    cc->write_elf64_note = s390_cpu_write_elf64_note;
> +    cc->write_elf64_qemunote = s390_cpu_write_elf64_qemunote;
> +#endif
> }
> 
> static const TypeInfo s390_cpu_type_info = {
> -- 
> 1.8.1.6
> 
> 




reply via email to

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