All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, kvm@vger.kernel.org,
	linux-kernel@vger.kernel.org, davej@redhat.com
Subject: Re: [PATCH] kvm: fix cpuid eax
Date: Tue, 1 May 2012 10:24:25 +0300	[thread overview]
Message-ID: <20120501072425.GC22191@redhat.com> (raw)
In-Reply-To: <20120430143902.GA10181@redhat.com>

On Mon, Apr 30, 2012 at 05:39:03PM +0300, Michael S. Tsirkin wrote:
> cpuid eax should return the max leaf so that
> guests can find out the valid range.
> This matches Xen et al.
> 
> Tested using -cpu host.
> 
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Gleb Natapov <gleb@redhat.com>

> ---
>  arch/x86/kvm/cpuid.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> index 7d00d2d..bda4877 100644
> --- a/arch/x86/kvm/cpuid.c
> +++ b/arch/x86/kvm/cpuid.c
> @@ -397,7 +397,7 @@ static int do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
>  	case KVM_CPUID_SIGNATURE: {
>  		char signature[12] = "KVMKVMKVM\0\0";
>  		u32 *sigptr = (u32 *)signature;
> -		entry->eax = 0;
> +		entry->eax = KVM_CPUID_FEATURES;
>  		entry->ebx = sigptr[0];
>  		entry->ecx = sigptr[1];
>  		entry->edx = sigptr[2];
> -- 
> MST
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

--
			Gleb.

  parent reply	other threads:[~2012-05-01  7:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-30 14:39 [PATCH] kvm: fix cpuid eax Michael S. Tsirkin
2012-04-30 18:23 ` H. Peter Anvin
2012-04-30 20:37 ` Anthony Liguori
2012-04-30 20:40   ` H. Peter Anvin
2012-04-30 20:41   ` Michael S. Tsirkin
2012-05-01 12:53   ` Avi Kivity
2012-05-01 12:56     ` Avi Kivity
2012-05-07  8:26       ` Ingo Molnar
2012-05-01  7:24 ` Gleb Natapov [this message]
2012-05-01 12:54 ` Avi Kivity

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=20120501072425.GC22191@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi@redhat.com \
    --cc=davej@redhat.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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.