[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [Qemu-devel] [PATCH RFC 15/16] smbios: don't use smp_core
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-arm] [Qemu-devel] [PATCH RFC 15/16] smbios: don't use smp_cores, smp_threads |
Date: |
Thu, 14 Jul 2016 17:51:19 -0300 |
User-agent: |
Mutt/1.6.1 (2016-04-27) |
On Fri, Jun 10, 2016 at 07:40:26PM +0200, Andrew Jones wrote:
> SMBIOS needs cpu topology for Type4 tables, so we need to pass
> it in. There are several parameters so we use a structure. There
> are two callers (of non-legacy, which generates Type4 tables),
> x86 and arm, so we also update both to pass the topology
> parameters from their MachineState properties (directly in the
> case of x86, indirectly through VirtGuestInfo in the case of arm).
>
> Signed-off-by: Andrew Jones <address@hidden>
[...]
> @@ -701,12 +701,19 @@ static uint32_t x86_cpu_apic_id_from_index(MachineState
> *ms,
> }
> }
>
> -static void pc_build_smbios(FWCfgState *fw_cfg)
> +static void pc_build_smbios(MachineState *ms, FWCfgState *fw_cfg)
> {
> uint8_t *smbios_tables, *smbios_anchor;
> size_t smbios_tables_len, smbios_anchor_len;
> struct smbios_phys_mem_area *mem_array;
> unsigned i, array_count;
> + struct smbios_cpu_topology topo = {
> + .sockets = ms->sockets,
> + .cores = ms->cores,
> + .threads = ms->threads,
> + .maxcpus = ms->maxcpus,
> + .cpus = ms->cpus,
> + };
>
Do we really need to manually copy data around this way when
smbios.c could just use qdev_get_machine() directly?
--
Eduardo
- Re: [Qemu-arm] [Qemu-devel] [PATCH RFC 15/16] smbios: don't use smp_cores, smp_threads,
Eduardo Habkost <=