[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH ppc-next v2 2/2] target-ppc: Error out for -cpu host
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH ppc-next v2 2/2] target-ppc: Error out for -cpu host on unknown PVR |
Date: |
Sun, 6 Jan 2013 19:31:31 +0100 |
Previously we silently exited, with subclasses we got an opcode warning.
Instead, explicitly tell the user what's wrong.
An indication for this is -cpu ? showing "host" with an all-zero PVR.
Signed-off-by: Andreas Färber <address@hidden>
---
target-ppc/kvm.c | 8 ++++++++
1 Datei geändert, 8 Zeilen hinzugefügt(+)
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
index a589575..b6b5a6a 100644
--- a/target-ppc/kvm.c
+++ b/target-ppc/kvm.c
@@ -1212,7 +1212,15 @@ static void alter_insns(uint64_t *word, uint64_t flags,
bool on)
static void kvmppc_host_cpu_initfn(Object *obj)
{
+ PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(obj);
+
assert(kvm_enabled());
+
+ if (pcc->info->pvr != mfpvr()) {
+ fprintf(stderr, "Your host CPU is unsupported.\n"
+ "Please choose a supported model instead, see -cpu ?.\n");
+ exit(1);
+ }
}
static void kvmppc_host_cpu_class_init(ObjectClass *oc, void *data)
--
1.7.10.4