From: Avi Kivity <avi@redhat.com>
To: stephan.baerwolf@tu-ilmenau.de
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: x86 emulator: reject SYSENTER in compatibility mode on AMD guests
Date: Wed, 01 Feb 2012 13:03:43 +0200 [thread overview]
Message-ID: <4F291C0F.7050803@redhat.com> (raw)
In-Reply-To: <4F291B1A.4090009@tu-ilmenau.de>
On 02/01/2012 12:59 PM, Stephan Bärwolf wrote:
> On 02/01/12 11:50, Avi Kivity wrote:
> > On 02/01/2012 12:45 PM, Stephan Bärwolf wrote:
> >> On 02/01/12 11:27, Avi Kivity wrote:
> >>>
> >>> +static bool vendor_intel(struct x86_emulate_ctxt *ctxt)
> >>> +{
> >>> + u32 eax, ebx, ecx, edx;
> >> Just to be clean:
> >>
> >> Shouldn't eax and ecx be initialized to zero?
> > Either get_cpuid() initializes them and returns true, or it returns
> > false and we never evaluate them.
> This isn't what I mean.
>
> CPUID will only return back the VENDOR (in ebx..edx) if you call it
> with eax=0x00000000 and ecx=0x00000000 (see cpu docs).
>
> Of course the compiler should set these two vars to zero (?)
> But what if somebody wants to read this code sometime later ??
> (The compiler will optimize the "set to zero" away...)
>
Ah, right of course. Will update.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2012-02-01 11:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-01 10:27 [PATCH] KVM: x86 emulator: reject SYSENTER in compatibility mode on AMD guests Avi Kivity
2012-02-01 10:45 ` Stephan Bärwolf
2012-02-01 10:50 ` Avi Kivity
2012-02-01 10:59 ` Stephan Bärwolf
2012-02-01 11:03 ` Avi Kivity [this message]
2012-02-01 11:00 ` Marcelo Tosatti
2012-02-01 13:25 ` 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=4F291C0F.7050803@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=stephan.baerwolf@tu-ilmenau.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox