lkml.org 
[lkml]   [2012]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] kvm: fix cpuid eax
    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.


    \
     
     \ /
      Last update: 2012-05-01 09:41    [W:0.024 / U:30.592 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site