[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/13] hw/i386: Remove unnecessary initialization in x86_cpu_new
From: |
Eduardo Habkost |
Subject: |
[PULL 11/13] hw/i386: Remove unnecessary initialization in x86_cpu_new |
Date: |
Tue, 17 Mar 2020 21:17:46 -0400 |
From: Babu Moger <address@hidden>
The function pc_cpu_pre_plug takes care of initialization of CPUX86State.
So, remove the initialization here.
Suggested-by: Igor Mammedov <address@hidden>
Signed-off-by: Babu Moger <address@hidden>
Reviewed-by: Igor Mammedov <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
Message-Id: <address@hidden>
---
hw/i386/x86.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index b7d94e8dfe..41b884605f 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -103,13 +103,9 @@ void x86_cpu_new(X86MachineState *x86ms, int64_t apic_id,
Error **errp)
{
Object *cpu = NULL;
Error *local_err = NULL;
- CPUX86State *env = NULL;
cpu = object_new(MACHINE(x86ms)->cpu_type);
- env = &X86_CPU(cpu)->env;
- env->nr_dies = x86ms->smp_dies;
-
object_property_set_uint(cpu, apic_id, "apic-id", &local_err);
object_property_set_bool(cpu, true, "realized", &local_err);
--
2.24.1
- [PULL 00/13] x86 and machine queue for 5.0 soft freeze, Eduardo Habkost, 2020/03/17
- [PULL 01/13] target/i386: Add Denverton-v2 (no MPX) CPU model, Eduardo Habkost, 2020/03/17
- [PULL 02/13] target/i386: Add new property note to versioned CPU models, Eduardo Habkost, 2020/03/17
- [PULL 03/13] i386: Add missing cpu feature bits in EPYC model, Eduardo Habkost, 2020/03/17
- [PULL 06/13] machine/memory encryption: Disable mem merge, Eduardo Habkost, 2020/03/17
- [PULL 05/13] hw/i386: Rename X86CPUTopoInfo structure to X86CPUTopoIDs, Eduardo Habkost, 2020/03/17
- [PULL 08/13] hw/i386: Introduce X86CPUTopoInfo to contain topology info, Eduardo Habkost, 2020/03/17
- [PULL 09/13] hw/i386: Consolidate topology functions, Eduardo Habkost, 2020/03/17
- [PULL 04/13] i386: Add 2nd Generation AMD EPYC processors, Eduardo Habkost, 2020/03/17
- [PULL 11/13] hw/i386: Remove unnecessary initialization in x86_cpu_new,
Eduardo Habkost <=
- [PULL 07/13] cpu: Use DeviceClass reset instead of a special CPUClass reset, Eduardo Habkost, 2020/03/17
- [PULL 12/13] hw/i386: Update structures to save the number of nodes per package, Eduardo Habkost, 2020/03/17
- [PULL 10/13] machine: Add SMP Sockets in CpuTopology, Eduardo Habkost, 2020/03/17
- [PULL 13/13] hw/i386: Rename apicid_from_topo_ids to x86_apicid_from_topo_ids, Eduardo Habkost, 2020/03/17
- Re: [PULL 00/13] x86 and machine queue for 5.0 soft freeze, Peter Maydell, 2020/03/19