[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v2 3/4] spapr: Improve device tree CPU node for -c
From: |
Andreas Färber |
Subject: |
Re: [Qemu-ppc] [PATCH v2 3/4] spapr: Improve device tree CPU node for -cpu host with unknown OF name |
Date: |
Thu, 29 Aug 2013 07:30:59 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 |
Am 29.08.2013 06:33, schrieb Alexey Kardashevskiy:
> 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 <address@hidden>
>> Signed-off-by: Andreas Färber <address@hidden>
>> ---
>> 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?
Answered on 2/4.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-ppc] [PATCH v2 0/4] target-ppc: Tidy sPAPR device tree CPU nodes, Andreas Färber, 2013/08/15
- [Qemu-ppc] [PATCH v2 1/4] target-ppc: Fill in OpenFirmware names for some PowerPCCPU families, Andreas Färber, 2013/08/15
- [Qemu-ppc] [PATCH v2 3/4] spapr: Improve device tree CPU node for -cpu host with unknown OF name, Andreas Färber, 2013/08/15
- [Qemu-ppc] [PATCH v2 4/4] spapr: Suppress underscores in device tree CPU node, Andreas Färber, 2013/08/15
- [Qemu-ppc] [PATCH v2 2/4] spapr: Use DeviceClass::fw_name for device tree CPU node, Andreas Färber, 2013/08/15
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 2/4] spapr: Use DeviceClass::fw_name for device tree CPU node, Alexey Kardashevskiy, 2013/08/29
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 2/4] spapr: Use DeviceClass::fw_name for device tree CPU node, Andreas Färber, 2013/08/29
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 2/4] spapr: Use DeviceClass::fw_name for device tree CPU node, Alexey Kardashevskiy, 2013/08/30
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 2/4] spapr: Use DeviceClass::fw_name for device tree CPU node, Alexander Graf, 2013/08/30
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 2/4] spapr: Use DeviceClass::fw_name for device tree CPU node, Andreas Färber, 2013/08/30
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 2/4] spapr: Use DeviceClass::fw_name for device tree CPU node, Alexander Graf, 2013/08/30