From: Bandan Das <bsd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Igor Mammedov" <imammedo@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH] target-i386: Disable CPUID_EXT_MONITOR when KVM is enabled
Date: Fri, 24 May 2013 21:21:59 -0400 [thread overview]
Message-ID: <jpg8v33kg5k.fsf@redhat.com> (raw)
In-Reply-To: jpg1u8vlv4h.fsf@redhat.com
Forwarding message by Eduardo. I had misspelled nongnu.org in my first attempt!
The spaces/tab comment by Eduardo has been fixed.
Eduardo Habkost <ehabkost@redhat.com> writes:
>
> By default, CPUID_EXT_MONITOR is enabled for some cpu models
> such as Opteron_G3. Disable it if kvm_enabled() is true since
> monitor/mwait aren't supported by KVM yet.
>
> Signed-off-by: Bandan Das <bsd@redhat.com>
Interesting, I haven't noticed that TCG supports CPUID_EXT_MONITOR.
I believe that's yet another reason to make the KVM CPU models separate
classes from the TCG CPU models: because
"-machine ...,accel=kvm -cpu Foo" and "-machine ...,accel=tcg -cpu Foo"
_already_ have different meanings today and result in different CPUs.
Making them classes would just make the fact that they _are_ different
CPU models explicit.
> ---
> There is no user visible side-effect to this behavior, the aim
> is to clean up the default flags that are not supported (yet).
There is one user-visible effect: "-cpu ...,enforce" will stop failing
because of missing KVM support for CPUID_EXT_MONITOR. But that's exactly
the point: there's no point in having CPU model definitions that would
never work as-is with neither TCG or KVM. This patch is changing the
meaning of (e.g.) "-machine ...,accel=kvm -cpu Opteron_G3" to match what
was already happening in practice.
>
> target-i386/cpu.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index 1a501d9..c83ba1c 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -1749,6 +1749,7 @@ static void cpu_x86_register(X86CPU *cpu, const char *name, Error **errp)
>
> if (kvm_enabled()) {
> def->features[FEAT_KVM] |= kvm_default_features;
> + def->features[FEAT_1_ECX] &= ~CPUID_EXT_MONITOR;
You are mixing spaces and tabs, here.
> }
> def->features[FEAT_1_ECX] |= CPUID_EXT_HYPERVISOR;
>
> --
> 1.8.1.4
>
--
Eduardo
> By default, CPUID_EXT_MONITOR is enabled for some cpu models
> such as Opteron_G3. Disable it if kvm_enabled() is true since
> monitor/mwait aren't supported by KVM yet.
>
> Signed-off-by: Bandan Das <bsd@redhat.com>
> ---
> There is no user visible side-effect to this behavior, the aim
> is to clean up the default flags that are not supported (yet).
>
> target-i386/cpu.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index 1a501d9..c83ba1c 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -1749,6 +1749,7 @@ static void cpu_x86_register(X86CPU *cpu, const char *name, Error **errp)
>
> if (kvm_enabled()) {
> def->features[FEAT_KVM] |= kvm_default_features;
> + def->features[FEAT_1_ECX] &= ~CPUID_EXT_MONITOR;
> }
> def->features[FEAT_1_ECX] |= CPUID_EXT_HYPERVISOR;
next prev parent reply other threads:[~2013-05-25 1:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-25 1:13 [Qemu-devel] [PATCH] target-i386: Disable CPUID_EXT_MONITOR when KVM is enabled Bandan Das
2013-05-25 1:21 ` Bandan Das [this message]
2013-05-25 6:25 ` Paolo Bonzini
2013-05-27 12:09 ` Eduardo Habkost
2013-05-27 12:21 ` Paolo Bonzini
2013-05-27 13:07 ` Eduardo Habkost
2013-05-27 13:14 ` Paolo Bonzini
2013-05-27 13:32 ` Eduardo Habkost
2013-05-28 16:34 ` Bandan Das
2013-05-28 16:46 ` Paolo Bonzini
2013-05-28 16:48 ` Andreas Färber
2013-05-29 14:31 ` 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=jpg8v33kg5k.fsf@redhat.com \
--to=bsd@redhat.com \
--cc=afaerber@suse.de \
--cc=ehabkost@redhat.com \
--cc=imammedo@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.