WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Real-mode bug with AMD, gPXE, and 32-bit rep movs

To: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, "Huang2, Wei" <Wei.Huang2@xxxxxxx>, Christoph Egger <Christoph.Egger@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Real-mode bug with AMD, gPXE, and 32-bit rep movs
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Thu, 26 Mar 2009 14:43:47 +0000
Cc:
Delivery-date: Thu, 26 Mar 2009 07:44:20 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <de76405a0903260525i1e1b660ds6c7e59a75624c786@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcmuDil9E6ZWqxKUTGCWf4Uc26CWtQAExtpc
Thread-topic: [Xen-devel] Real-mode bug with AMD, gPXE, and 32-bit rep movs
User-agent: Microsoft-Entourage/12.15.0.081119
On 26/03/2009 12:25, "George Dunlap" <George.Dunlap@xxxxxxxxxxxxx> wrote:

> There are three possibilities I came up with:
> 1) The same thing would happen outside of SVM; in which case it's
> (sort of) a gPXE bug for using an instruction that won't work on AMD
> boxes.
> 2) Xen is subtly screwing up the VM state, causing the AMD hardware
> not to recognize that this shouldn't cause a #GP
> 3) AMD hardware (at least some of it) doesn't handle 32-bit rep movs
> instructions in 16-bit mode.

It must surely be a Xen bug. Doing 32-bit ops in 16-bit mode is a completely
standard thing that all processors will support. The other alternative is
perhaps we have somehow managed to build ourselves a bogus gpxe image.

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.

I can give some help tracking this down when I'm back next week, if it's not
resolved by then. It's also the sort of thing which may interest Tim Deegan,
who has also worked on real mode support on the Intel side in the past.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel