qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-ppc] [Qemu-devel] [PATCH] ppc/kvm: Tell the user what might be


From: Eric Blake
Subject: Re: [Qemu-ppc] [Qemu-devel] [PATCH] ppc/kvm: Tell the user what might be wrong when using bad CPU types with kvm-hv
Date: Thu, 18 Feb 2016 15:13:52 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

On 02/18/2016 02:01 PM, Thomas Huth wrote:
> 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 <address@hidden>
> ---
>  target-ppc/kvm.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c
> index 762d6cf..6545fbe 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!");

No need to shout at the user; drop the trailing !

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]