From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: x86 emulator: reject SYSENTER in compatibility mode on AMD guests Date: Wed, 01 Feb 2012 12:50:42 +0200 Message-ID: <4F291902.60808@redhat.com> References: <1328092020-18511-1-git-send-email-avi@redhat.com> <4F2917D5.2040203@tu-ilmenau.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Marcelo Tosatti , kvm@vger.kernel.org To: stephan.baerwolf@tu-ilmenau.de Return-path: Received: from mx1.redhat.com ([209.132.183.28]:5051 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753845Ab2BAKus (ORCPT ); Wed, 1 Feb 2012 05:50:48 -0500 In-Reply-To: <4F2917D5.2040203@tu-ilmenau.de> Sender: kvm-owner@vger.kernel.org List-ID: On 02/01/2012 12:45 PM, Stephan B=E4rwolf wrote: > On 02/01/12 11:27, Avi Kivity wrote: > > =20 > > +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. > regards Stephan > > + > > + return ctxt->ops->get_cpuid(ctxt, &eax, &ebx, &ecx, &edx) > > + && ebx =3D=3D X86EMUL_CPUID_VENDOR_GenuineIntel_ebx > > + && ecx =3D=3D X86EMUL_CPUID_VENDOR_GenuineIntel_ecx > > + && edx =3D=3D X86EMUL_CPUID_VENDOR_GenuineIntel_edx; > > +} > > + > --=20 error compiling committee.c: too many arguments to function