From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A0BA11381F3 for ; Tue, 6 Aug 2013 16:01:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 58EFFE0BD4; Tue, 6 Aug 2013 16:00:13 +0000 (UTC) Received: from mout-xforward.gmx.net (mout-xforward.gmx.net [82.165.159.40]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2795CE0BAF for ; Tue, 6 Aug 2013 16:00:12 +0000 (UTC) Received: from marcec ([178.25.242.3]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0Lyi0B-1WCKJ837vb-0164Ih for ; Tue, 06 Aug 2013 18:00:05 +0200 Date: Tue, 6 Aug 2013 17:59:59 +0200 From: Marc Joliet To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Recommendation for CPU type in QEMU? Message-ID: <20130806175959.5ad55579@marcec> In-Reply-To: <5200F6B8.1090809@fastmail.co.uk> References: <20130731101124.GB26440@waltdnes.org> <20130731133142.570697ee@marcec.hunte.us> <51F8FF11.1010401@fastmail.co.uk> <20130803165548.5ef5759a@marcec> <5200F6B8.1090809@fastmail.co.uk> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.17; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/KwS8H.5vnJmk_5Hbds6kr9H"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:DMPCjhNUR49LINWRAbPYnB6QgRzLwaxGQemcIQOkYbO1OQVacGo kBYsRsZpIAMKI+iJSRMCLdYEicVyOaLO8f/Ub2Rw6zycD/r72PGJb8W48cmOuwOhU4wm7Mw n1RkxgQAfLEScck545XfuW1bwOja7+VpnhtEl6jPygFjfn16qBe5+ZyZKBDs1AJQLAQtMdi NL2h4bfehg7tKmw5PlzTA== X-Archives-Salt: 9ba8ce69-224d-4674-b037-ee4e6669912b X-Archives-Hash: 0cb8a81694e969b3edb8676a7d0e56ae --Sig_/KwS8H.5vnJmk_5Hbds6kr9H Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Tue, 06 Aug 2013 14:14:32 +0100 schrieb Kerin Millar : > On 03/08/2013 15:55, Marc Joliet wrote: > > Am Wed, 31 Jul 2013 13:12:01 +0100 > > schrieb Kerin Millar : > > > >> On 31/07/2013 12:31, Marc Joliet wrote: > >> > >> [snip] > >> > >>> > >>> There's also "-cpu host", which simply passes your CPU through to the= guest. > >>> That's what I use for my 32 bit WinXP VM. You can use it if you don't= mind not > >>> being able to migrate your guest, but it sounds to me like you're doi= ng this on > >>> a desktop machine, so I suspect guest migration doesn't matter to you. > >>> > >> > >> I thought the same until very recently but it's not the case. The -cpu > >> host feature exposes all feature bits supported by qemu. Those may > >> include features that aren't supported in hardware by the host CPU, in > >> which case qemu has to resort to (slow) emulation if they are used. > >> > >> --Kerin > > > > Just a follow up: the most authoritative answer I could find is this: > > > > http://thread.gmane.org/gmane.comp.emulators.kvm.devel/84227/focus= =3D90541 > > > > Furthermore, the Linux KVM tuning page also defines "-cpu host" as I un= derstand > > it: > > > > http://www.linux-kvm.org/page/Tuning_KVM > > > > From the above I conclude that "-cpu host" should *not* activate CPU f= eatures > > that the host CPU does not support. > > > > Otherwise I could only find out the following: > > > > - the Gentoo and Arch wikis both recommend "-cpu host" in conjunction w= ith KVM > > (see, e.g., http://wiki.gentoo.org/wiki/QEMU/Options) > > - in contrast, http://wiki.qemu.org/Features/CPUModels#-cpu_host_vs_-cp= u_best > > seems to match your statement > > - some guy on serverfault.com says this > > (http://serverfault.com/questions/404195/kvm-which-cpu-features-make= -vms-run-better): > > > > "Qemu doesn't work in the same way many other hypervisors do. For st= arters, it > > can provide full emulation. That means you can run x86 code on an ARM > > processor, for example. When in KVM mode, as you're using it, it doe= sn't > > actually do that... the processor is exposed no matter what, but wha= t is > > reported to the OS will be changed by the -cpu flag." > > > > If that's correct, "-cpu host" might mean different things when in K= VM > > mode vs. when not. However I'm not going to blindly trust that state= ment. > > > > How/where did you find out that "-cpu host" also exposes non-host CPU f= eatures? > > >=20 > I checked the code and you're right. I had obtained the information from= =20 > the qemu wiki but can now only assume that the content was discussing=20 > the feature before its implementation became concrete. Lesson to self:=20 > don't believe everything one reads in wikis (even official ones). >=20 > --Kerin Great, thanks for checking! Now I can be sure I'm not doing anything wrong = here. --=20 Marc Joliet -- "People who think they know everything really annoy those of us who know we don't" - Bjarne Stroustrup --Sig_/KwS8H.5vnJmk_5Hbds6kr9H Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iEYEARECAAYFAlIBHYQACgkQBsMBz3L8+WNt9wCfWZ8qi1lWoBCYAj1pbNPFChhD L+AAn1qLHoDwIxuYVKskybPPJoHg1XTs =QBqg -----END PGP SIGNATURE----- --Sig_/KwS8H.5vnJmk_5Hbds6kr9H--