From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH] KVM: x86 emulator: reject SYSENTER in compatibility mode on AMD guests Date: Wed, 1 Feb 2012 09:00:44 -0200 Message-ID: <20120201110044.GA26183@amt.cnet> References: <1328092020-18511-1-git-send-email-avi@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, Stephan =?iso-8859-1?Q?B=E4rwolf?= To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:63657 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753954Ab2BALCX (ORCPT ); Wed, 1 Feb 2012 06:02:23 -0500 Content-Disposition: inline In-Reply-To: <1328092020-18511-1-git-send-email-avi@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Feb 01, 2012 at 12:27:00PM +0200, Avi Kivity wrote: > If the guest thinks it's an AMD, it will not have prepared the SYSENTER MSRs, > and if the guest executes SYSENTER in compatibility mode, it will fails. > > Detect this condition and #UD instead, like the spec says. Note the SYSENTER_CS & 0xfffc == 0 check protects against a fatal error (unlike the SYSCALL bug), in case of zeroed MSRs.