diff options
author | Thomas Huth <thuth@redhat.com> | 2016-02-18 22:01:56 +0100 |
---|---|---|
committer | Timothy Pearson <tpearson@raptorengineering.com> | 2019-11-29 19:45:58 -0600 |
commit | cd6834f1f82baa92ce5807263a91b5ab2698a69e (patch) | |
tree | ec2e337902b8729a1e0792c9124d092282f83ff0 | |
parent | 3ad306fa15f5bf5a2498fc17b1e6ef2fe08434f3 (diff) | |
download | hqemu-cd6834f1f82baa92ce5807263a91b5ab2698a69e.zip hqemu-cd6834f1f82baa92ce5807263a91b5ab2698a69e.tar.gz |
ppc/kvm: Tell the user what might be wrong when using bad CPU types with kvm-hv
Using a CPU type that does not match the host is not possible when using
the kvm-hv kernel module - the PVR is checked in the kernel function
kvm_arch_vcpu_ioctl_set_sregs_hv() and rejected with -EINVAL if it
does not match the host.
However, when the user tries to specify a non-matching CPU type, QEMU
currently only reports "kvm_init_vcpu failed: Invalid argument", and
this is of course not very helpful for the user to solve the problem.
So this patch adds a more descriptive error message that tells the
user to specify "-cpu host" instead.
Signed-off-by: Thomas Huth <thuth@redhat.com>
[Removed melodramatic '!' :)]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r-- | target-ppc/kvm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 762d6cf..d67c169 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -513,6 +513,10 @@ int kvm_arch_init_vcpu(CPUState *cs) /* Synchronize sregs with kvm */ ret = kvm_arch_sync_sregs(cpu); if (ret) { + if (ret == -EINVAL) { + error_report("Register sync failed... If you're using kvm-hv.ko," + " only \"-cpu host\" is possible"); + } return ret; } |