All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] kvm: userspace: Initialise ECX value with 'count' as host_cpuid now expects it
Date: Tue, 17 Feb 2009 18:11:55 +0000	[thread overview]
Message-ID: <499AFDEB.8080603@redhat.com> (raw)
In-Reply-To: <1234885535-8332-1-git-send-email-amit.shah@redhat.com>

Amit Shah wrote:
> host_cpuid now accepts a 'count' parameter for cpuid. Initialise the value
> of ecx before any call to the function.
>
> Signed-off-by: Amit Shah <amit.shah@redhat.com>
> ---
>  qemu/qemu-kvm-x86.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c
> index 5264015..b1e2da2 100644
> --- a/qemu/qemu-kvm-x86.c
> +++ b/qemu/qemu-kvm-x86.c
> @@ -534,6 +534,7 @@ int kvm_arch_qemu_init_env(CPUState *cenv)
>  #endif
>  
>      copy.regs[R_EAX] = 0;
> +    copy.regs[R_ECX] = 0;
>      qemu_kvm_cpuid_on_env(&copy);
>      limit = copy.regs[R_EAX];
>  
> @@ -559,6 +560,7 @@ int kvm_arch_qemu_init_env(CPUState *cenv)
>      }
>  
>      copy.regs[R_EAX] = 0x80000000;
> +    copy.regs[R_ECX] = 0;
>      qemu_kvm_cpuid_on_env(&copy);
>      limit = copy.regs[R_EAX]; 
>   

Does this make any difference?  Neither function actually depends on ecx.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


  reply	other threads:[~2009-02-17 18:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-17 15:45 [PATCH] kvm: userspace: Initialise ECX value with 'count' as host_cpuid now expects it Amit Shah
2009-02-17 18:11 ` Avi Kivity [this message]
2009-02-18  4:58   ` Amit Shah

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=499AFDEB.8080603@redhat.com \
    --to=avi@redhat.com \
    --cc=amit.shah@redhat.com \
    --cc=kvm@vger.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.