[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] hvm: Do not crash guest if it does an unaligned access to an HPET



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1195638549 0
# Node ID ae6f4c7f15cbc2a7192c91e513682e3d13de9f4f
# Parent  00fec8212ae68014c18c894d751185c0a65a8c3a
hvm: Do not crash guest if it does an unaligned access to an HPET
register. Some CrashMe test apaprently does this and we don't want
that to crash the domain it runs in.
From: Dexuan Cui <dexuan.cui@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/hpet.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff -r 00fec8212ae6 -r ae6f4c7f15cb xen/arch/x86/hvm/hpet.c
--- a/xen/arch/x86/hvm/hpet.c   Wed Nov 21 09:45:22 2007 +0000
+++ b/xen/arch/x86/hvm/hpet.c   Wed Nov 21 09:49:09 2007 +0000
@@ -127,9 +127,13 @@ static inline int hpet_check_access_leng
 {
     if ( (addr & (len - 1)) || (len > 8) )
     {
-        gdprintk(XENLOG_ERR, "HPET: access across register boundary: "
+        /*
+         * According to ICH9 specification, unaligned accesses may result
+         * in unexpected behaviour or master abort, but should not crash/hang.
+         * Hence we read all-ones, drop writes, and log a warning.
+         */
+        gdprintk(XENLOG_WARNING, "HPET: access across register boundary: "
                  "%lx %lx\n", addr, len);
-        domain_crash(current->domain);
         return -EINVAL;
     }
 

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.