From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2 0/3] Fix task switches into/out of VM86 Date: Mon, 30 Jan 2012 15:28:07 +0200 Message-ID: <4F269AE7.2060204@redhat.com> References: <1327692216-20450-1-git-send-email-kwolf@redhat.com> <20120127195239.GB2938@redhat.com> <4F265961.3070501@redhat.com> <20120130085541.GI30469@redhat.com> <4F267254.7040900@redhat.com> <4F2674BB.2000608@redhat.com> <20120130105022.GC23536@redhat.com> <4F268626.5090209@redhat.com> <20120130123127.GH23536@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Kevin Wolf , kvm@vger.kernel.org, joerg.roedel@amd.com, yoshikawa.takuya@oss.ntt.co.jp, mtosatti@redhat.com To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:16996 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751722Ab2A3N2N (ORCPT ); Mon, 30 Jan 2012 08:28:13 -0500 In-Reply-To: <20120130123127.GH23536@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 01/30/2012 02:31 PM, Gleb Natapov wrote: > On Mon, Jan 30, 2012 at 01:59:34PM +0200, Avi Kivity wrote: > > > > It's best to make it independent (like svm, and force vmx to emulate > > > > this behaviour). Real mode forces cpl to 0, vm86 forces cpl to 3, > > > > protected mode (and I think long mode) uses cs.rpl. > > > This is what vmx does, not svm. > > > > That's the architectural definition, except for mode switch sequences. > > vmx implements it directly which means that mode switch sequences > > sometimes fail, either in guest software (setting cr0.pe while cs & 3 != > > 0) or in "microcode" (emulate.c). > > > The fact that vmx check for cpl by (cs & 3) looks incorrect. It > should check dpl. > Which check? -- error compiling committee.c: too many arguments to function