[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target-i386: add a list of enforceable CPU mode
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH] target-i386: add a list of enforceable CPU models to the help output |
Date: |
Wed, 26 Aug 2015 12:54:04 -0300 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
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 <address@hidden>
[...]
> +/*
> + * 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().
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?
--
Eduardo
- Re: [Qemu-devel] CPU Model kvm64 and Windows2012R2, (continued)
Re: [Qemu-devel] [PATCH] target-i386: add a list of enforceable CPU models to the help output, Andreas Färber, 2015/08/24
Re: [Qemu-devel] [PATCH] target-i386: add a list of enforceable CPU models to the help output,
Eduardo Habkost <=