qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>, qemu-devel@nongnu.org
Cc: Igor Mammedov <imammedo@redhat.com>, Bandan Das <bsd@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	jtomko@redhat.com
Subject: Re: [Qemu-devel] [PATCH] target-i386: Don't cpu->migratable field when filtering features
Date: Fri, 14 Oct 2016 14:36:52 -0500	[thread overview]
Message-ID: <b1e991be-db55-fe6e-561d-8ea1ffe3809d@redhat.com> (raw)
In-Reply-To: <1476473294-11052-1-git-send-email-ehabkost@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2293 bytes --]

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.
> 
> This is inconsistent with all other CPU models, which don't have
> the "migratable" option, making "+invtsc" work without the need
> for extra options.
> 
> 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.
> 
> The fix is to just use 'false' as argument to
> x86_cpu_get_supported_feature_word() in
> x86_cpu_filter_features().
> 
> Note that:
> 
> * This won't change anything for people using using
>   "-cpu host" or "-cpu host,migratable=<on|off>" (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 == false (and only "host"
>   has the "migratable" property that allows it to be changed).
> * This will only cange things for people using "-cpu host,+<feature>",

s/cange/change/

>   where <feature> is a non-migratable feature. The only existing
>   named migratable feature is "invtsc".

s/migratable/non-migratable/ ?

> 
> 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.
> 
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  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 <eblake@redhat.com>

-- 
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 --]

  reply	other threads:[~2016-10-14 19:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-14 19:28 [Qemu-devel] [PATCH] target-i386: Don't cpu->migratable field when filtering features Eduardo Habkost
2016-10-14 19:36 ` Eric Blake [this message]
2016-10-14 19:43   ` Eduardo Habkost
2016-10-17 10:20 ` Ján Tomko

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=b1e991be-db55-fe6e-561d-8ea1ffe3809d@redhat.com \
    --to=eblake@redhat.com \
    --cc=bsd@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=jtomko@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).