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

[Xen-devel] [PATCH][HVM] Fix guest hang producing "PIT: bad access" mess

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH][HVM] Fix guest hang producing "PIT: bad access" messages
From: "Christoph Egger" <Christoph.Egger@xxxxxxx>
Date: Fri, 11 Jan 2008 12:08:01 +0100
Cc: Keir Fraser <Keir.Fraser@xxxxxxxxxxxxx>
Delivery-date: Fri, 11 Jan 2008 03:30:27 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.7
Hi

When the HVM guest atomically reads two bytes from the PIT via  "rep insb"
and the two bytes crosses pages, then in xen/arch/x86/hvm/i8254.c, 
handle_pit_io(), p->data_is_ptr is 1 which leads to an unhandled read.

Since reading the first byte does not change the guest rip, an endless loop
of VMEXIT_IOIO happens. This leads to an endless stream of "PIT: bad access"
xen messages => Guest hangs.

This has been accurately reproduced on NetBSD/amd64 as HVM guest
and this also been seen on 64bit Windows guests.

The attached patch handles the page-crossing access in the PIT emulation.

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>


-- 
AMD Saxony, Dresden, Germany
Operating System Research Center

Legal Information:
AMD Saxony Limited Liability Company & Co. KG
Sitz (Geschäftsanschrift):
   Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland
Registergericht Dresden: HRA 4896
vertretungsberechtigter Komplementär:
   AMD Saxony LLC (Sitz Wilmington, Delaware, USA)
Geschäftsführer der AMD Saxony LLC:
   Dr. Hans-R. Deppe, Thomas McCoy

Attachment: xen_pit.diff
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>