From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWWpj-0000So-2b for qemu-devel@nongnu.org; Thu, 18 Feb 2016 17:14:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWWpf-0002fH-37 for qemu-devel@nongnu.org; Thu, 18 Feb 2016 17:13:59 -0500 References: <1455829316-15382-1-git-send-email-thuth@redhat.com> From: Eric Blake Message-ID: <56C64220.2020903@redhat.com> Date: Thu, 18 Feb 2016 15:13:52 -0700 MIME-Version: 1.0 In-Reply-To: <1455829316-15382-1-git-send-email-thuth@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PEiuTMjA8e1dDhPnVNhuOuLKF0k1LpbPO" Subject: Re: [Qemu-devel] [PATCH] ppc/kvm: Tell the user what might be wrong when using bad CPU types with kvm-hv List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth , qemu-ppc@nongnu.org, david@gibson.dropbear.id.au Cc: qemu-devel@nongnu.org, agraf@suse.de This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --PEiuTMjA8e1dDhPnVNhuOuLKF0k1LpbPO Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 02/18/2016 02:01 PM, Thomas Huth wrote: > Using a CPU type that does not match the host is not possible when usin= g > 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. >=20 > Signed-off-by: Thomas Huth > --- > target-ppc/kvm.c | 4 ++++ > 1 file changed, 4 insertions(+) >=20 > 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 =3D kvm_arch_sync_sregs(cpu); > if (ret) { > + if (ret =3D=3D -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 ! --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --PEiuTMjA8e1dDhPnVNhuOuLKF0k1LpbPO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWxkIgAAoJEKeha0olJ0Nq2UMH/A6Fdzg5/HoX7eB1xkOCV9jO ZZpoYeULS++Amii3Ysu0mYyOfbPaJ2uiacOxEC2sZSGny6r4xb/eIqLpmUDCZAzm djjEbixU9ebPHsIW0ulmiBbmA8R6Ksck4zBAfo6UEUq13noISRNwLscxY2JVczdp Q8R+wKloQFrN5OLS6xy7V/Zmax2Mv3DkhRtE/APMhS3N+m09qwyfy4MyayIGGbmD qlxOks4OJRzvBWAdcaGMyKUx9DRfHGjiC4tQh/kap2xBrinWvEryQKY+YKTBYxVg QTVs3ecUInpvL79F92bB32UTgl52zBMYpurUMqjppTGurvT5HxU37rDyvL8/dFE= =44Og -----END PGP SIGNATURE----- --PEiuTMjA8e1dDhPnVNhuOuLKF0k1LpbPO--