From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54783) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bv8Hr-00053V-SB for qemu-devel@nongnu.org; Fri, 14 Oct 2016 15:37:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bv8Hn-0004Il-P7 for qemu-devel@nongnu.org; Fri, 14 Oct 2016 15:36:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34328) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bv8Hn-0004IJ-Ed for qemu-devel@nongnu.org; Fri, 14 Oct 2016 15:36:55 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 32ED6C057FA6 for ; Fri, 14 Oct 2016 19:36:54 +0000 (UTC) References: <1476473294-11052-1-git-send-email-ehabkost@redhat.com> From: Eric Blake Message-ID: Date: Fri, 14 Oct 2016 14:36:52 -0500 MIME-Version: 1.0 In-Reply-To: <1476473294-11052-1-git-send-email-ehabkost@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qsJeB3xjGC3rq0W21gLOKMo6R9o712MjC" Subject: Re: [Qemu-devel] [PATCH] target-i386: Don't cpu->migratable field when filtering features List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , qemu-devel@nongnu.org Cc: Igor Mammedov , Bandan Das , Marcelo Tosatti , jtomko@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qsJeB3xjGC3rq0W21gLOKMo6R9o712MjC From: Eric Blake To: Eduardo Habkost , qemu-devel@nongnu.org Cc: Igor Mammedov , Bandan Das , Marcelo Tosatti , jtomko@redhat.com Message-ID: Subject: Re: [Qemu-devel] [PATCH] target-i386: Don't cpu->migratable field when filtering features References: <1476473294-11052-1-git-send-email-ehabkost@redhat.com> In-Reply-To: <1476473294-11052-1-git-send-email-ehabkost@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/14/2016 02:28 PM, Eduardo Habkost wrote: Subject line is missing a word; perhaps s/don't/don't read/ > When explicitly enabling unmigratable flags using "-cpu host" > (e.g. "-cpu host,+invtsc"), the requested feature won't be > enabled because cpu->migratable is true by default. >=20 > This is inconsistent with all other CPU models, which don't have > the "migratable" option, making "+invtsc" work without the need > for extra options. >=20 > This happens because x86_cpu_filter_features() uses > cpu->migratable as argument for s/as/as an/ > x86_cpu_get_supported_feature_word(). This is not useful > because: > 2) on "-cpu host" it only makes QEMU disable features that were > explicitly enabled in the command-line; > 1) on all the other CPU models, cpu->migratable is already false. >=20 > The fix is to just use 'false' as argument to > x86_cpu_get_supported_feature_word() in > x86_cpu_filter_features(). >=20 > Note that: >=20 > * This won't change anything for people using using > "-cpu host" or "-cpu host,migratable=3D" (with no extra > features) because the x86_cpu_get_supported_feature_word() call > on the cpu->host_features check uses cpu->migratable as > argument. > * This won't change anything for any CPU model except "host" > because they all have cpu->migratable =3D=3D false (and only "host" > has the "migratable" property that allows it to be changed). > * This will only cange things for people using "-cpu host,+", s/cange/change/ > where is a non-migratable feature. The only existing > named migratable feature is "invtsc". s/migratable/non-migratable/ ? >=20 > In other words, this change will only affect people using > "-cpu host,+invtsc" (that will now get what they asked for: the > invtsc flag will be enabled). All other use cases are unaffected. >=20 > Signed-off-by: Eduardo Habkost > --- > target-i386/cpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Love the commit:patch signal-to-noise ratio :) But the lengthy explanation is vital, so keep it that way. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --qsJeB3xjGC3rq0W21gLOKMo6R9o712MjC 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/ iQEcBAEBCAAGBQJYATPUAAoJEKeha0olJ0NqVM0H/RC+O7dl4HgZFTY+pOLjSfPh hwBffci7jDViXXsnCU7OY7mgVZXqfHDsB/W0GOCrH9lqk4CHeN/dkI62bk5ZDf2l EGKiSJPamz7HHrWsn2empGJweRaOknCnboJ4nWGiQRu85KjcIfAuqzVexmevRzrY iZch5qNL7QdGdAptu0HDNHPWTwC0h1vueUzMkAMN1trP0Sg/1ktb1l86IfvCIVti Vb7xRFfYZqrH0db4VWfOlJZTih0eA+j5fwJlz+abZAEf98ooVOo3P2q4ev/ssQlF NJd8Gd4V91Ix8c/HbZpNJoawwLvHHnqBLWuEsGCj2CEDI9PDRvS0aC+9c70r3ww= =cqGY -----END PGP SIGNATURE----- --qsJeB3xjGC3rq0W21gLOKMo6R9o712MjC--