aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2012-10-29 08:55:40 +0100
committerKeir Fraser <keir@xen.org>2012-10-29 08:55:40 +0100
commit2eff6ca69f3736ea150d12117d9cf7c16c415f2f (patch)
treec731b2a08c42bcb7d132d44956ac2fde3d5ee748
parent75985fb641dd06b5d18cb16ba24d571606f54950 (diff)
downloadxen-2eff6ca69f3736ea150d12117d9cf7c16c415f2f.tar.gz
xen-2eff6ca69f3736ea150d12117d9cf7c16c415f2f.tar.bz2
xen-2eff6ca69f3736ea150d12117d9cf7c16c415f2f.zip
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@xen.org> Tested-and-Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> xen-unstable changeset: 25908:12fa949b9060 xen-unstable date: Fri Sep 14 18:47:57 UTC 2012
-rw-r--r--tools/firmware/hvmloader/xenbus.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/firmware/hvmloader/xenbus.c b/tools/firmware/hvmloader/xenbus.c
index 71024ebe4d..eeb7001b4b 100644
--- a/tools/firmware/hvmloader/xenbus.c
+++ b/tools/firmware/hvmloader/xenbus.c
@@ -64,6 +64,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
@@ -72,7 +74,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;
}