From: David Gibson <david@gibson.dropbear.id.au>
To: Fabiano Rosas <farosas@linux.ibm.com>
Cc: qemu-ppc@nongnu.org, danielhb413@gmail.com,
richard.henderson@linaro.org, qemu-devel@nongnu.org,
clg@kaod.org
Subject: Re: [PATCH v3 8/8] target/ppc: Set the correct endianness for powernv memory dumps
Date: Mon, 10 Jan 2022 13:24:20 +1100 [thread overview]
Message-ID: <YduY1BGU3Zar2Ft4@yekko> (raw)
In-Reply-To: <20220107222601.4101511-9-farosas@linux.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1682 bytes --]
On Fri, Jan 07, 2022 at 07:26:01PM -0300, Fabiano Rosas wrote:
> We use the endianness of interrupts to determine which endianness to
> use for the guest kernel memory dump. For machines that support HILE
> (powernv8 and up) we have been always generating big endian dump
> files.
>
> This patch uses the HILE support recently added to
> ppc_interrupts_little_endian to fix the endianness of the dumps for
> powernv machines.
>
> Here are two dumps created at different moments:
>
> $ file skiboot.dump
> skiboot.dump: ELF 64-bit MSB core file, 64-bit PowerPC ...
>
> $ file kernel.dump
> kernel.dump: ELF 64-bit LSB core file, 64-bit PowerPC ...
>
> Suggested-by: David Gibson <david@gibson.dropbear.id.au>
> Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> target/ppc/arch_dump.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/ppc/arch_dump.c b/target/ppc/arch_dump.c
> index 12cde198a3..993740897d 100644
> --- a/target/ppc/arch_dump.c
> +++ b/target/ppc/arch_dump.c
> @@ -237,7 +237,7 @@ int cpu_get_dump_info(ArchDumpInfo *info,
> info->d_machine = PPC_ELF_MACHINE;
> info->d_class = ELFCLASS;
>
> - if (ppc_interrupts_little_endian(cpu, false)) {
> + if (ppc_interrupts_little_endian(cpu, cpu->env.has_hv_mode)) {
> info->d_endian = ELFDATA2LSB;
> } else {
> info->d_endian = ELFDATA2MSB;
--
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 --]
next prev parent reply other threads:[~2022-01-10 2:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-07 22:25 [PATCH v3 0/8] target/ppc: powerpc_excp improvements (2/n) Fabiano Rosas
2022-01-07 22:25 ` [PATCH v3 1/8] target/ppc: powerpc_excp: Extract software TLB logging into a function Fabiano Rosas
2022-01-07 22:25 ` [PATCH v3 2/8] target/ppc: powerpc_excp: Keep 60x/7x5 soft MMU logs active Fabiano Rosas
2022-01-07 22:25 ` [PATCH v3 3/8] target/ppc: powerpc_excp: Group unimplemented exceptions Fabiano Rosas
2022-01-07 22:25 ` [PATCH v3 4/8] target/ppc: Add HV support to ppc_interrupts_little_endian Fabiano Rosas
2022-01-07 22:25 ` [PATCH v3 5/8] target/ppc: Add MSR_ILE " Fabiano Rosas
2022-01-07 22:25 ` [PATCH v3 6/8] target/ppc: Use ppc_interrupts_little_endian in powerpc_excp Fabiano Rosas
2022-01-07 22:26 ` [PATCH v3 7/8] target/ppc: Introduce a wrapper for powerpc_excp Fabiano Rosas
2022-01-07 22:26 ` [PATCH v3 8/8] target/ppc: Set the correct endianness for powernv memory dumps Fabiano Rosas
2022-01-10 2:24 ` David Gibson [this message]
2022-01-10 7:38 ` [PATCH v3 0/8] target/ppc: powerpc_excp improvements (2/n) Cédric Le Goater
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=YduY1BGU3Zar2Ft4@yekko \
--to=david@gibson.dropbear.id.au \
--cc=clg@kaod.org \
--cc=danielhb413@gmail.com \
--cc=farosas@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=richard.henderson@linaro.org \
/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).