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

[Xen-changelog] Avoid div-by-zero crash if vmx guest specifies bogus timer



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 1283d309a6034aa99b8347e1500f2f47e0b65e6a
# Parent  381cafbbc3d24b1d6dd9e2fb56aa6d501e6aaac8
Avoid div-by-zero crash if vmx guest specifies bogus timer
divisor.

Signed-off-by: Xiaofeng Ling <xiaofeng.ling@xxxxxxxxx>

diff -r 381cafbbc3d2 -r 1283d309a603 xen/arch/x86/vmx_intercept.c
--- a/xen/arch/x86/vmx_intercept.c      Sun Dec 18 19:27:42 2005
+++ b/xen/arch/x86/vmx_intercept.c      Sun Dec 18 19:29:43 2005
@@ -203,6 +203,12 @@
     u64 nsec_delta = (unsigned int)((NOW() - vpit->inject_point));
     if (nsec_delta > vpit->period)
         VMX_DBG_LOG(DBG_LEVEL_1, "VMX_PIT:long time has passed from last 
injection!");
+    if(vpit->init_val == 0)
+    {
+        printk("PIT init value == 0!\n");
+        domain_crash_synchronous();
+    }
+
     vpit->count = vpit->init_val - ((nsec_delta * PIT_FREQ / 1000000000ULL) % 
vpit->init_val );
 }
 

_______________________________________________
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®.