From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: x86: Disallow hypercalls for guest callers in rings > 0 Date: Mon, 03 Aug 2009 17:24:37 +0300 Message-ID: <4A76F325.7020309@redhat.com> References: <4A76EA7B.4080509@siemens.com> <4A76EE85.1090404@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Jan Kiszka , kvm-devel To: Anthony Liguori Return-path: Received: from mx2.redhat.com ([66.187.237.31]:40222 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932186AbZHCO6I (ORCPT ); Mon, 3 Aug 2009 10:58:08 -0400 In-Reply-To: <4A76EE85.1090404@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: On 08/03/2009 05:04 PM, Anthony Liguori wrote: > > Actually, VT mandates that vmcalls can only be done from CPL=0. > That's exactly how I misremembered it. However the docs say IF not in VMX operation THEN #UD; ELSIF in VMX non-root operation THEN VM exit; ELSIF (RFLAGS.VM = 1) OR (IA32_EFER.LMA = 1 and CS.L = 0) THEN #UD; ELSIF CPL > 0 THEN #GP(0); So CPL > 0 is only enforced on VMCALL from the hypervisor, not the guest (tip: don't ask what VMCALL in the hypervisor means). > SVM allows hypercalls from CPL>0 unfortunately. Yeah. -- error compiling committee.c: too many arguments to function