All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark McLoughlin <markmc@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: Anthony Liguori <anthony@codemonkey.ws>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH 4/4] kvm: Trim cpu features not supported by kvm
Date: Tue, 12 May 2009 12:52:34 +0100	[thread overview]
Message-ID: <1242129154.18544.13.camel@blaa> (raw)
In-Reply-To: <1241359444-8538-5-git-send-email-avi@redhat.com>

On Sun, 2009-05-03 at 17:04 +0300, Avi Kivity wrote:
> Remove cpu features that are not supported by kvm from the cpuid features
> reported to the guest.
> 
> Signed-off-by: Avi Kivity <avi@redhat.com>
....
> @@ -1699,5 +1714,20 @@ CPUX86State *cpu_x86_init(const char *cpu_model)
>  
>      qemu_init_vcpu(env);
>  
> +    if (kvm_enabled()) {
> +        kvm_trim_features(&env->cpuid_features,
> +                          kvm_arch_get_supported_cpuid(env, 1, R_EDX),
> +                          feature_name);

This isn't work in qemu.git because the features are only queried from
qemu_init_vcpu() (see kvm_arch_init_vcpu())

The obvious fix is to move qemu_init_vcpu() after the feature trimming,
but that requires us to split env->kvm_state initialization out of
kvm_init_vcpu()

Also, it works in qemu-kvm.git, but only because actually call
kvm_qemu_init_env() twice - once before feature trimming and once after.

Cheers,
Mark.


WARNING: multiple messages have this Message-ID (diff)
From: Mark McLoughlin <markmc@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [PATCH 4/4] kvm: Trim cpu features not supported by kvm
Date: Tue, 12 May 2009 12:52:34 +0100	[thread overview]
Message-ID: <1242129154.18544.13.camel@blaa> (raw)
In-Reply-To: <1241359444-8538-5-git-send-email-avi@redhat.com>

On Sun, 2009-05-03 at 17:04 +0300, Avi Kivity wrote:
> Remove cpu features that are not supported by kvm from the cpuid features
> reported to the guest.
> 
> Signed-off-by: Avi Kivity <avi@redhat.com>
....
> @@ -1699,5 +1714,20 @@ CPUX86State *cpu_x86_init(const char *cpu_model)
>  
>      qemu_init_vcpu(env);
>  
> +    if (kvm_enabled()) {
> +        kvm_trim_features(&env->cpuid_features,
> +                          kvm_arch_get_supported_cpuid(env, 1, R_EDX),
> +                          feature_name);

This isn't work in qemu.git because the features are only queried from
qemu_init_vcpu() (see kvm_arch_init_vcpu())

The obvious fix is to move qemu_init_vcpu() after the feature trimming,
but that requires us to split env->kvm_state initialization out of
kvm_init_vcpu()

Also, it works in qemu-kvm.git, but only because actually call
kvm_qemu_init_env() twice - once before feature trimming and once after.

Cheers,
Mark.

  reply	other threads:[~2009-05-12 11:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-03 14:04 [PATCH 0/4] Fix kvm cpuid reporting Avi Kivity
2009-05-03 14:04 ` [Qemu-devel] " Avi Kivity
2009-05-03 14:04 ` [PATCH 1/4] kvm: Add support for querying supported cpu features Avi Kivity
2009-05-03 14:04   ` [Qemu-devel] " Avi Kivity
2009-05-08 20:50   ` Anthony Liguori
2009-05-08 20:50     ` [Qemu-devel] " Anthony Liguori
2009-05-08 21:09     ` Anthony Liguori
2009-05-08 21:09       ` [Qemu-devel] " Anthony Liguori
2009-05-09  8:41       ` Avi Kivity
2009-05-09  8:41         ` [Qemu-devel] " Avi Kivity
2009-05-03 14:04 ` [PATCH 2/4] Make x86 cpuid feature names available in file scope Avi Kivity
2009-05-03 14:04   ` [Qemu-devel] " Avi Kivity
2009-05-03 14:04 ` [PATCH 3/4] Fix x86 feature modifications for features that set multiple bits Avi Kivity
2009-05-03 14:04   ` [Qemu-devel] " Avi Kivity
2009-05-03 14:04 ` [PATCH 4/4] kvm: Trim cpu features not supported by kvm Avi Kivity
2009-05-03 14:04   ` [Qemu-devel] " Avi Kivity
2009-05-12 11:52   ` Mark McLoughlin [this message]
2009-05-12 11:52     ` Mark McLoughlin

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=1242129154.18544.13.camel@blaa \
    --to=markmc@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --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.