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

[Xen-changelog] [xen-4.1-testing] hvmloader: Do not zero the wallclock fields in shared-info.


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
  • Date: Mon, 29 Oct 2012 23:55:11 +0000
  • Delivery-date: Mon, 29 Oct 2012 23:55:21 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1351497407 -3600
# Node ID d601e331d615e06f08f461e105419c80b2eec20e
# Parent  69d1cc78a5bd066ca84019512c6e3d60c1a3fef4
hvmloader: Do not zero the wallclock fields in shared-info.

These fields need to be valid at all times. Hypervisor ensures this
even across 32/64-bit guest transitions.

This fixes a bug where wallclock time is incorrect for booting 32-bit
HVM guests.

This should be backported to Xen 4.1 and 4.2.

Signed-off-by: Keir Fraser <keir@xxxxxxx>
Tested-and-Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
xen-unstable changeset: 25908:12fa949b9060
xen-unstable date: Fri Sep 14 18:47:57 UTC 2012
---


diff -r 69d1cc78a5bd -r d601e331d615 tools/firmware/hvmloader/xenbus.c
--- a/tools/firmware/hvmloader/xenbus.c Fri Oct 26 16:10:04 2012 +0100
+++ b/tools/firmware/hvmloader/xenbus.c Mon Oct 29 08:56:47 2012 +0100
@@ -56,6 +56,8 @@ void xenbus_setup(void)
 /* Reset the xenbus connection so the next kernel can start again. */
 void xenbus_shutdown(void)
 {
+    struct shared_info *shinfo = get_shared_info();
+
     ASSERT(rings != NULL);
 
     /* We zero out the whole ring -- the backend can handle this, and it's 
@@ -64,7 +66,9 @@ void xenbus_shutdown(void)
     memset(rings, 0, sizeof *rings);
 
     /* Clear the event-channel state too. */
-    memset(get_shared_info(), 0, PAGE_SIZE);
+    memset(shinfo->vcpu_info, 0, sizeof(shinfo->vcpu_info));
+    memset(shinfo->evtchn_pending, 0, sizeof(shinfo->evtchn_pending));
+    memset(shinfo->evtchn_mask, 0, sizeof(shinfo->evtchn_mask));
 
     rings = NULL;
 }

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.