From: Eric Blake <eblake@redhat.com>
To: Thomas Huth <thuth@redhat.com>,
qemu-ppc@nongnu.org, david@gibson.dropbear.id.au
Cc: qemu-devel@nongnu.org, agraf@suse.de
Subject: Re: [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 [thread overview]
Message-ID: <56C64220.2020903@redhat.com> (raw)
In-Reply-To: <1455829316-15382-1-git-send-email-thuth@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1392 bytes --]
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 <thuth@redhat.com>
> ---
> 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-02-18 22:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-18 21:01 [Qemu-devel] [PATCH] ppc/kvm: Tell the user what might be wrong when using bad CPU types with kvm-hv Thomas Huth
2016-02-18 22:13 ` Eric Blake [this message]
2016-02-19 0:17 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56C64220.2020903@redhat.com \
--to=eblake@redhat.com \
--cc=agraf@suse.de \
--cc=david@gibson.dropbear.id.au \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.