diff options
author | Keir Fraser <keir@xen.org> | 2012-10-29 08:56:47 +0100 |
---|---|---|
committer | Keir Fraser <keir@xen.org> | 2012-10-29 08:56:47 +0100 |
commit | 1ab7d41bd151ab4097416bc6d6f0ed78fe2dcd78 (patch) | |
tree | c45233f5175d582df38b0cb5195ee212505db210 | |
parent | 7ce4c765975097bddffaa2fc482d5c16355687af (diff) | |
download | xen-1ab7d41bd151ab4097416bc6d6f0ed78fe2dcd78.tar.gz xen-1ab7d41bd151ab4097416bc6d6f0ed78fe2dcd78.tar.bz2 xen-1ab7d41bd151ab4097416bc6d6f0ed78fe2dcd78.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.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/firmware/hvmloader/xenbus.c b/tools/firmware/hvmloader/xenbus.c index 90245f57b1..2bae76f36e 100644 --- a/tools/firmware/hvmloader/xenbus.c +++ b/tools/firmware/hvmloader/xenbus.c @@ -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; } |