From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC PATCH 0/3] Add segment limit checks to emulator Date: Thu, 08 Jul 2010 11:07:48 +0300 Message-ID: <4C358754.4090204@redhat.com> References: <1278537839-20144-1-git-send-email-m.gamal005@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org To: Mohammed Gamal Return-path: Received: from mx1.redhat.com ([209.132.183.28]:65208 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752574Ab0GHIHv (ORCPT ); Thu, 8 Jul 2010 04:07:51 -0400 In-Reply-To: <1278537839-20144-1-git-send-email-m.gamal005@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 07/08/2010 12:23 AM, Mohammed Gamal wrote: > After some conversation with Avi concerning why unreal mode has been seen to work > with KVM on Intel. It clears out the scenario is caused as follows: > > - guest enters big real mode > - kvm squashes limit to 64k-1 > - guest executes instructions with offset> 64k > - cpu issues #GP due to limit violation > - kvm handle_rmode_exception() -> emulator > - emulator ignores limit, emulates instruction > > With these applied I am getting vmentry failures with SeaBIOS and > gPXE. So it's needless to say that these patches are not meant for merging! > btw, we'll want unit tests for those. Access just below the limit, access that's partially within and partially outside the limit, with base=0 and base!=0, in 16, 32 and 64 bit modes. IIRC the emulator only builds in 64 bits. I'll see what it takes to make it build and run on 32 bits. -- error compiling committee.c: too many arguments to function