From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 06/30] nVMX: Decoding memory operands of VMX instructions Date: Mon, 09 May 2011 12:47:01 +0300 Message-ID: <4DC7B815.8020900@redhat.com> References: <1304842511-nyh@il.ibm.com> <201105080818.p488IHeC017932@rice.haifa.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, gleb@redhat.com To: "Nadav Har'El" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:6065 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750911Ab1EIJrH (ORCPT ); Mon, 9 May 2011 05:47:07 -0400 In-Reply-To: <201105080818.p488IHeC017932@rice.haifa.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/08/2011 11:18 AM, Nadav Har'El wrote: > This patch includes a utility function for decoding pointer operands of VMX > instructions issued by L1 (a guest hypervisor) > > + /* > + * TODO: throw #GP (and return 1) in various cases that the VM* > + * instructions require it - e.g., offset beyond segment limit, > + * unusable or unreadable/unwritable segment, non-canonical 64-bit > + * address, and so on. Currently these are not checked. > + */ > + return 0; > +} > + Note: emulate.c now contains a function (linearize()) which does these calculations. We need to generalize it and expose it so nvmx can make use of it. There is no real security concern since these instructions are only allowed from cpl 0 anyway. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.