target-ppc: Error out for -cpu host on unknown PVR
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 <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
2985b86b5c
commit
1b7ce68fb4
@ -1232,7 +1232,15 @@ static void alter_insns(uint64_t *word, uint64_t flags, bool on)
|
|||||||
|
|
||||||
static void kvmppc_host_cpu_initfn(Object *obj)
|
static void kvmppc_host_cpu_initfn(Object *obj)
|
||||||
{
|
{
|
||||||
|
PowerPCCPUClass *pcc = POWERPC_CPU_GET_CLASS(obj);
|
||||||
|
|
||||||
assert(kvm_enabled());
|
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)
|
static void kvmppc_host_cpu_class_init(ObjectClass *oc, void *data)
|
||||||
|
Loading…
Reference in New Issue
Block a user