qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Lieven <pl@kamp.de>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: pbonzini@redhat.com, rth@twiddle.net, qemu-devel@nongnu.org,
	afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH] target-i386: add a list of enforceable CPU models to the help output
Date: Wed, 26 Aug 2015 20:38:35 +0200	[thread overview]
Message-ID: <55DE07AB.9040401@kamp.de> (raw)
In-Reply-To: <20150826155404.GH4230@thinpad.lan.raisama.net>

Am 26.08.2015 um 17:54 schrieb Eduardo Habkost:
> On Mon, Aug 24, 2015 at 11:17:04AM +0200, Peter Lieven wrote:
>> this patch adds a probe that lists all enforceable and migrateable
>> CPU models to the -cpu help output. The idea is to know a priory
>> which CPU modules can be exposed to the user without loosing any
>> feature flags.
>>
>> Signed-off-by: Peter Lieven <pl@kamp.de>
> [...]
>> +/*
>> + * Check if the CPU Definition is enforcable on the current host CPU
>> + * and contains no unmigratable flags.
>> + *
>> + * Returns: true if the CPU can be enforced and migrated.
>> + */
>> +static bool x86_cpu_enforce_and_migratable(X86CPUDefinition *def)
>> +{
>> +    int i;
>> +    for (i = 0; i < ARRAY_SIZE(feature_word_info); i++) {
>> +        FeatureWordInfo *fw = &feature_word_info[i];
>> +        uint32_t eax, ebx, ecx, edx, host;
>> +        host_cpuid(fw->cpuid_eax, 0, &eax, &ebx, &ecx, &edx);
> This isn't how you check if the CPU model can run in "enforce" mode.
> Please read x86_cpu_filter_features().

I did, but will do again. The problem is that x86_cpu_filter_features
requires enabled KVM to run. I believed internally it does something
similar to what I do here.

>
> Also, you can't tell if a CPU model is runnable in enforce mode unless
> you know what's the accelerator being used (see
> x86_cpu_filter_features()). How do you suggest we show
> accelerator-specific information in help output?
>

The subject was missing that the goal was to list enforceable models
in KVM mode. The output of the help page mentions this.

Andreas suggested to make annotations to the list of CPU models.
In theory it would be possible to have different annotations for different
accelerators.

Peter

  reply	other threads:[~2015-08-26 18:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-24  9:17 [Qemu-devel] [PATCH] target-i386: add a list of enforceable CPU models to the help output Peter Lieven
2015-08-24 10:28 ` [Qemu-devel] CPU Model kvm64 and Windows2012R2 Peter Lieven
2015-08-24 11:50   ` Paolo Bonzini
2015-08-24 11:59     ` Peter Lieven
2015-08-24 11:51   ` Paolo Bonzini
2015-08-24 15:46 ` [Qemu-devel] [PATCH] target-i386: add a list of enforceable CPU models to the help output Eric Blake
2015-08-24 19:36   ` Peter Lieven
2015-08-26 18:38     ` Eduardo Habkost
2015-08-26 18:46       ` Peter Lieven
2015-08-26 19:00         ` Eduardo Habkost
2015-08-26 19:19           ` Peter Lieven
2015-08-24 20:22 ` Andreas Färber
2015-08-24 21:35   ` Peter Lieven
2015-08-26 15:54 ` Eduardo Habkost
2015-08-26 18:38   ` Peter Lieven [this message]
2015-08-26 19:12     ` Eduardo Habkost

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=55DE07AB.9040401@kamp.de \
    --to=pl@kamp.de \
    --cc=afaerber@suse.de \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).