From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VA6EB-0007K5-Io for qemu-devel@nongnu.org; Thu, 15 Aug 2013 18:41:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VA6E5-00033z-If for qemu-devel@nongnu.org; Thu, 15 Aug 2013 18:41:11 -0400 Message-ID: <520D58FB.1040005@suse.de> Date: Fri, 16 Aug 2013 00:40:59 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1376606111-3518-1-git-send-email-afaerber@suse.de> <1376606111-3518-4-git-send-email-afaerber@suse.de> In-Reply-To: <1376606111-3518-4-git-send-email-afaerber@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 3/4] spapr: Improve device tree CPU node for -cpu host with unknown OF name List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-ppc , Alexander Graf , Prerna Saxena Am 16.08.2013 00:35, schrieb Andreas F=C3=A4rber: > 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 fil= l > it in for that class in a PAPR-compliant way with "PowerPC," prefix. Ugh, obviously forgot to edit the commit message after splitting this off from the preceding patch... ;) Andreas >=20 > Reported-by: Prerna Saxena > Signed-off-by: Andreas F=C3=A4rber > --- > hw/ppc/spapr.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > 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_b= ase, > const char *typename; > =20 > typename =3D object_class_get_name(oc); > + if (kvm_enabled() && > + strcmp(typename, "host-" TYPE_POWERPC_CPU) =3D=3D 0) { > + typename =3D object_class_get_name(object_class_get_pa= rent(oc)); > + } > nodename =3D g_strndup(typename, > strlen(typename) - strlen("-" TYPE_PO= WERPC_CPU)); > dc->fw_name =3D g_strdup_printf("PowerPC,%s", nodename); >=20 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg