[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v3 6/7] ppc: drop vcpu_idt_id bits from the target cod
From: |
Greg Kurz |
Subject: |
[Qemu-ppc] [PATCH v3 6/7] ppc: drop vcpu_idt_id bits from the target code |
Date: |
Wed, 06 Jul 2016 14:14:47 +0200 |
User-agent: |
StGit/0.17.1-dirty |
Now that all machine types provide vcpu_dt_id, we can safely drop these
bits from the target code.
Signed-off-by: Greg Kurz <address@hidden>
---
target-ppc/translate_init.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 775df72cf6c2..976a38bd30f8 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -9527,9 +9527,6 @@ static void ppc_cpu_realizefn(DeviceState *dev, Error
**errp)
PowerPCCPU *cpu = POWERPC_CPU(dev);
PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(cpu);
Error *local_err = NULL;
-#if !defined(CONFIG_USER_ONLY)
- int max_smt = kvmppc_smt_threads();
-#endif
cpu_exec_init(cs, &local_err);
if (local_err != NULL) {
@@ -9537,19 +9534,6 @@ static void ppc_cpu_realizefn(DeviceState *dev, Error
**errp)
return;
}
-#if !defined(CONFIG_USER_ONLY)
- cpu->cpu_dt_id = (cs->cpu_index / smp_threads) * max_smt
- + (cs->cpu_index % smp_threads);
-
- if (kvm_enabled() && !kvm_vcpu_id_is_valid(cpu->cpu_dt_id)) {
- error_setg(errp, "Can't create CPU with id %d in KVM", cpu->cpu_dt_id);
- error_append_hint(errp, "Adjust the number of cpus to %d "
- "or try to raise the number of threads per core\n",
- cpu->cpu_dt_id * smp_threads / max_smt);
- return;
- }
-#endif
-
if (tcg_enabled()) {
if (ppc_fixup_cpu(cpu) != 0) {
error_setg(errp, "Unable to emulate selected CPU with TCG");
- [Qemu-ppc] [PATCH v3 3/7] ppc: parse cpu features once, (continued)
[Qemu-ppc] [PATCH v3 6/7] ppc: drop vcpu_idt_id bits from the target code,
Greg Kurz <=
[Qemu-ppc] [PATCH v3 7/7] spapr: consolidate the logic of core cpu_dt_id, Greg Kurz, 2016/07/06