From: Tim Deegan Subject: Re: Real-mode bug with AMD, gPXE, and 32-bit rep movs Date: Thu, 26 Mar 2009 14:54:46 +0000 Message-ID: <20090326145446.GK11733@york.uk.xensource.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: George Dunlap , Christoph Egger , "Huang2, Wei" , Xen-devel List-Id: xen-devel@lists.xenproject.org At 14:43 +0000 on 26 Mar (1238078627), Keir Fraser wrote: > Your assertion that it causes GP on Intel is weird. We should be running in > the emulator already since for the movs to 0x200000 to work we must be > running in big real mode (i.e., one of the segment registers has a limit > greater than 0xffff) and so we cannot be emulating that by running the guest > in vm86 mode. We do use vm86 mode for big-real-mode; we just clip the segment limits to 16 bits and carry on, since almost all instructions don't use the big segments. Then when we take a fault for the A32 REP MOVS with the >16-bit offset we go into the emulator and it does the right thing. Cheers, Tim. -- Tim Deegan Principal Software Engineer, Citrix Systems (R&D) Ltd. [Company #02300071, SL9 0DZ, UK.]