From: =?ISO-8859-1?Q?Stephan_B=E4rwolf?= Subject: Re: [PATCH] KVM: x86 emulator: reject SYSENTER in compatibility mode on AMD guests Date: Wed, 01 Feb 2012 11:45:41 +0100 Message-ID: <4F2917D5.2040203@tu-ilmenau.de> References: <1328092020-18511-1-git-send-email-avi@redhat.com> Reply-To: stephan.baerwolf@tu-ilmenau.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from wega.rz.tu-ilmenau.de ([141.24.4.159]:58444 "EHLO wega.rz.tu-ilmenau.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753845Ab2BAKra (ORCPT ); Wed, 1 Feb 2012 05:47:30 -0500 In-Reply-To: <1328092020-18511-1-git-send-email-avi@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 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? regards Stephan > + > + return ctxt->ops->get_cpuid(ctxt, &eax, &ebx, &ecx, &edx) > + && ebx == X86EMUL_CPUID_VENDOR_GenuineIntel_ebx > + && ecx == X86EMUL_CPUID_VENDOR_GenuineIntel_ecx > + && edx == X86EMUL_CPUID_VENDOR_GenuineIntel_edx; > +} > +