hvmloader: clear the whole shared-info page when shutting down xenbus
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 22 Jul 2010 14:19:25 +0000 (15:19 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 22 Jul 2010 14:19:25 +0000 (15:19 +0100)
since the contents might be in the wrong word-size for later users.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
tools/firmware/hvmloader/xenbus.c

index e980e47bef92c07ad680992f77e7e329c4aff56a..12d67b38e743b42f3691f3445e86fd546f74ec3b 100644 (file)
@@ -63,9 +63,8 @@ void xenbus_shutdown(void)
      * having used the rings. */
     memset(rings, 0, sizeof *rings);
 
-    /* Clear the xenbus event-channel too */
-    get_shared_info()->evtchn_pending[event / sizeof (unsigned long)]
-        &= ~(1UL << ((event % sizeof (unsigned long))));    
+    /* Clear the event-channel state too. */
+    memset(get_shared_info(), 0, PAGE_SIZE);
 
     rings = NULL;
 }