[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 32/49] target/ppc: Simplify cpu valid check in ppc_cpu_
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 32/49] target/ppc: Simplify cpu valid check in ppc_cpu_realize |
Date: |
Fri, 27 Apr 2018 19:21:09 +1000 |
The #if isn't necessary, because there's a suitable one inside
ppc_cpu_is_valid(). We've already filtered for suitable cpu models in the
functions that search and register them. So by the time we get to realize
having an invalid one indicates a code error, not a user error, so an
assert() is more appropriate than error_setg().
Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
---
target/ppc/translate_init.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/target/ppc/translate_init.c b/target/ppc/translate_init.c
index 56b80a204a..2ae718242a 100644
--- a/target/ppc/translate_init.c
+++ b/target/ppc/translate_init.c
@@ -9749,14 +9749,7 @@ static void ppc_cpu_realize(DeviceState *dev, Error
**errp)
}
}
-#if defined(TARGET_PPCEMB)
- if (!ppc_cpu_is_valid(pcc)) {
- error_setg(errp, "CPU does not possess a BookE or 4xx MMU. "
- "Please use qemu-system-ppc or qemu-system-ppc64 instead "
- "or choose another CPU model.");
- goto unrealize;
- }
-#endif
+ assert(ppc_cpu_is_valid(pcc));
create_ppc_opcodes(cpu, &local_err);
if (local_err != NULL) {
--
2.14.3
- [Qemu-ppc] [PULL 23/49] ppc: Fix size of ppc64 xer register, (continued)
- [Qemu-ppc] [PULL 23/49] ppc: Fix size of ppc64 xer register, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 27/49] Add host_memory_backend_pagesize() helper, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 25/49] spapr: Introduce pseries-2.13 machine type, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 41/49] target/ppc: Remove unnecessary POWERPC_MMU_V3 flag from mmu_model, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 47/49] target/ppc: Don't bother with MSR_EP in cpu_ppc_set_papr(), David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 29/49] Revert "spapr: Don't allow memory hotplug to memory less nodes", David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 26/49] Make qemu_mempath_getpagesize() accept NULL, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 44/49] spapr: Add ibm, max-associativity-domains property, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 43/49] target/ppc: Fold slb_nr into PPCHash64Options, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 45/49] ppc: e500: switch E500 based machines to full machine definition, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 32/49] target/ppc: Simplify cpu valid check in ppc_cpu_realize,
David Gibson <=
- [Qemu-ppc] [PULL 35/49] target/ppc: Remove fallback 64k pagesize information, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 36/49] target/ppc: Move page size setup to helper function, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 49/49] Clear mem_path if we fall back to anonymous RAM allocation, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 46/49] spapr: Support ibm, dynamic-memory-v2 property, David Gibson, 2018/04/27
- [Qemu-ppc] [PULL 48/49] spapr: Set compatibility mode before the rest of spapr_cpu_reset(), David Gibson, 2018/04/27
- Re: [Qemu-ppc] [Qemu-devel] [PULL 00/49] ppc-for-2.13 queue 20180427, no-reply, 2018/04/27
- Re: [Qemu-ppc] [PULL 00/49] ppc-for-2.13 queue 20180427, Peter Maydell, 2018/04/27