From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: "Andreas Färber" <afaerber@suse.de>
Cc: sPAPR <qemu-ppc@nongnu.org>,
qemu-devel@nongnu.org, Prerna Saxena <prerna@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 3/4] spapr: Improve device tree CPU node for -cpu host with unknown OF name
Date: Thu, 29 Aug 2013 14:33:17 +1000 [thread overview]
Message-ID: <521ECF0D.4040403@ozlabs.ru> (raw)
In-Reply-To: <1376606111-3518-4-git-send-email-afaerber@suse.de>
On 08/16/2013 08:35 AM, Andreas Färber wrote:
> Whenever DeviceClass::fw_name is not available, derive it from the CPU's
> type name, resorting to the parent's type in case of -cpu host, and fill
> it in for that class in a PAPR-compliant way with "PowerPC," prefix.
>
> Reported-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
> hw/ppc/spapr.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 6d984dc..0e9be32 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -344,6 +344,10 @@ static void *spapr_create_fdt_skel(hwaddr initrd_base,
> const char *typename;
>
> typename = object_class_get_name(oc);
> + if (kvm_enabled() &&
> + strcmp(typename, "host-" TYPE_POWERPC_CPU) == 0) {
> + typename = object_class_get_name(object_class_get_parent(oc));
> + }
> nodename = g_strndup(typename,
> strlen(typename) - strlen("-" TYPE_POWERPC_CPU));
> dc->fw_name = g_strdup_printf("PowerPC,%s", nodename);
>
You could use dc->desc of a parent, would be simpler, no?
--
Alexey
next prev parent reply other threads:[~2013-08-29 4:33 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-15 22:35 [Qemu-devel] [PATCH v2 0/4] target-ppc: Tidy sPAPR device tree CPU nodes Andreas Färber
2013-08-15 22:35 ` [Qemu-devel] [PATCH v2 1/4] target-ppc: Fill in OpenFirmware names for some PowerPCCPU families Andreas Färber
2013-09-10 4:15 ` Alexey Kardashevskiy
2013-09-16 14:16 ` Alexey Kardashevskiy
2013-09-25 9:01 ` Alexey Kardashevskiy
2013-09-30 17:55 ` Alexander Graf
2013-10-07 13:59 ` Alexey Kardashevskiy
2013-08-15 22:35 ` [Qemu-devel] [PATCH v2 2/4] spapr: Use DeviceClass::fw_name for device tree CPU node Andreas Färber
2013-08-29 4:29 ` Alexey Kardashevskiy
2013-08-29 5:30 ` Andreas Färber
2013-08-30 6:05 ` Alexey Kardashevskiy
2013-08-30 13:54 ` Alexander Graf
2013-08-30 14:00 ` Andreas Färber
2013-08-30 14:15 ` Alexander Graf
2013-08-30 13:21 ` Alexander Graf
2013-08-30 13:26 ` Andreas Färber
2013-08-30 13:52 ` Alexander Graf
2013-08-30 13:53 ` Alexey Kardashevskiy
2013-08-30 13:58 ` Andreas Färber
2013-08-30 14:03 ` Alexander Graf
2013-08-15 22:35 ` [Qemu-devel] [PATCH v2 3/4] spapr: Improve device tree CPU node for -cpu host with unknown OF name Andreas Färber
2013-08-15 22:40 ` Andreas Färber
2013-08-29 4:33 ` Alexey Kardashevskiy [this message]
2013-08-29 5:30 ` [Qemu-devel] [Qemu-ppc] " Andreas Färber
2013-08-15 22:35 ` [Qemu-devel] [PATCH v2 4/4] spapr: Suppress underscores in device tree CPU node Andreas Färber
2013-08-29 4:39 ` [Qemu-devel] [Qemu-ppc] " Alexey Kardashevskiy
2013-08-29 5:33 ` Andreas Färber
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=521ECF0D.4040403@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=afaerber@suse.de \
--cc=prerna@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.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).