From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 2/2] VMX: Reinject real mode exception Date: Mon, 14 Jul 2008 13:04:17 +0300 Message-ID: <487B24A1.3090309@qumranet.com> References: <4879E9C8.2010208@web.de> <4879EFAE.3080805@qumranet.com> <4879F4C0.1090609@web.de> <487A1F26.7060700@qumranet.com> <487A1FE0.5040309@qumranet.com> <0B53E02A2965CE4F9ADB38B34501A3A10653F536@orsmsx505.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Jan Kiszka , kvm-devel , Mohammed Gamal , Anthony Liguori , Rik van Riel To: "Nakajima, Jun" Return-path: Received: from il.qumranet.com ([212.179.150.194]:17013 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755887AbYGNKET (ORCPT ); Mon, 14 Jul 2008 06:04:19 -0400 In-Reply-To: <0B53E02A2965CE4F9ADB38B34501A3A10653F536@orsmsx505.amr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Nakajima, Jun wrote: > On 7/13/2008 8:31:44 AM, Avi Kivity wrote: > >> Avi Kivity wrote: >> >>> Well, xen and bochs do not push an error code for real mode #GP. I >>> tried running the attached test program but it doesn't work on real >>> hardware (it does work on bochs). >>> >>> >> Jun, perhaps you can clarify? do #GP exceptions in real-mode push an >> error code? >> > > Avi, > > Exceptions in real-mode do not push an error code in the stack. Thanks. You might consider updating the documentation, for example #DF states that an error code of 0 is always pushed. > In vm86 mode #GP exceptions push an error code, triggering a protected-mode handler in the monitor, as you know. Is it possible that the guest is actually using vm86 mode? > No, it's a real mode guest. It's emulated using vm86, of course, but it thinks it's in real mode. The question was, when we inject a #GP, #SS, or #DF exception, should we also inject an error code, and according to your clarification, the answer is no. -- error compiling committee.c: too many arguments to function