All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
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: Mon, 30 Apr 2012 15:37:14 -0500	[thread overview]
Message-ID: <4F9EF7FA.3060007@codemonkey.ws> (raw)
In-Reply-To: <20120430143902.GA10181@redhat.com>

On 04/30/2012 09:39 AM, 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.

What KVM does here predates Xen and Hyper-V.

This is an ABI breaker.

Regards,

Anthony Liguori

>
> Tested using -cpu host.
>
> Signed-off-by: Michael S. Tsirkin<mst@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];

  parent reply	other threads:[~2012-04-30 20:37 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 [this message]
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
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=4F9EF7FA.3060007@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --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.