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 D07ED1381F3 for ; Sat, 3 Aug 2013 14:55:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E473BE0B88; Sat, 3 Aug 2013 14:55:46 +0000 (UTC) Received: from mout-xforward.gmx.net (mout-xforward.gmx.net [82.165.159.41]) by pigeon.gentoo.org (Postfix) with ESMTP id A12B4E0AA2 for ; Sat, 3 Aug 2013 14:55:45 +0000 (UTC) Received: from marcec ([178.25.242.3]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MN0jA-1Uz0TA3ahs-006hZM for ; Sat, 03 Aug 2013 16:55:44 +0200 Date: Sat, 3 Aug 2013 16:55:48 +0200 From: Marc Joliet To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Recommendation for CPU type in QEMU? Message-ID: <20130803165548.5ef5759a@marcec> In-Reply-To: <51F8FF11.1010401@fastmail.co.uk> References: <20130731101124.GB26440@waltdnes.org> <20130731133142.570697ee@marcec.hunte.us> <51F8FF11.1010401@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_/1kPPkKOwKLmDZEstrhAjQNH"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:ejKKCytmU5vSnMNkDpGEhdW0OPIrZw1ZK+nSOTVhAc/5KHeACSa jsDdleUhfn9tdwv1gki4bptP0l6lBxvpWQY1ovW0F4SQUKv0zvL2tfby4ZIqhdiCeNG/Gne jSobjXB85trN8ohU6mBcRlxEIs+lrivYUf9Xb+fYGvMFReiMZbWNjZfOE4ddIJ+yAdsI6DO 8Ts8FX1eShtWRr69GFwzQ== X-Archives-Salt: af7f25f4-0b3d-4a7f-ac58-1c8a97b97d3c X-Archives-Hash: aab86016f864276bfa433e15e3703e7c --Sig_/1kPPkKOwKLmDZEstrhAjQNH Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Wed, 31 Jul 2013 13:12:01 +0100 schrieb Kerin Millar : > On 31/07/2013 12:31, Marc Joliet wrote: >=20 > [snip] >=20 > > > > There's also "-cpu host", which simply passes your CPU through to the g= uest. > > That's what I use for my 32 bit WinXP VM. You can use it if you don't m= ind not > > being able to migrate your guest, but it sounds to me like you're doing= this on > > a desktop machine, so I suspect guest migration doesn't matter to you. > > >=20 > I thought the same until very recently but it's not the case. The -cpu=20 > host feature exposes all feature bits supported by qemu. Those may=20 > include features that aren't supported in hardware by the host CPU, in=20 > which case qemu has to resort to (slow) emulation if they are used. >=20 > --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 unders= tand it: http://www.linux-kvm.org/page/Tuning_KVM =46rom the above I conclude that "-cpu host" should *not* activate CPU featur= es 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 with = KVM (see, e.g., http://wiki.gentoo.org/wiki/QEMU/Options) - in contrast, http://wiki.qemu.org/Features/CPUModels#-cpu_host_vs_-cpu_be= st 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 starter= s, 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 doesn't actually do that... the processor is exposed no matter what, but what is= =20 reported to the OS will be changed by the -cpu flag." If that's correct, "-cpu host" might mean different things when in KVM mode vs. when not. However I'm not going to blindly trust that statement. How/where did you find out that "-cpu host" also exposes non-host CPU featu= res? --=20 Marc Joliet -- "People who think they know everything really annoy those of us who know we don't" - Bjarne Stroustrup --Sig_/1kPPkKOwKLmDZEstrhAjQNH Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iEYEARECAAYFAlH9GfgACgkQBsMBz3L8+WNu1ACeMh5R4p5AxtrLc1DtSLxKbB9U mkIAn0geu+05SITurQ09Lr7yTWxJxPbB =G2X3 -----END PGP SIGNATURE----- --Sig_/1kPPkKOwKLmDZEstrhAjQNH--