1. 19 12月, 2011 1 次提交
  2. 27 9月, 2011 1 次提交
  3. 23 9月, 2011 1 次提交
    • O
      xen/pv-on-hvm kexec: add xs_reset_watches to shutdown watches from old kernel · ddacf5ef
      Olaf Hering 提交于
      Add new xs_reset_watches function to shutdown watches from old kernel after
      kexec boot.  The old kernel does not unregister all watches in the
      shutdown path.  They are still active, the double registration can not
      be detected by the new kernel.  When the watches fire, unexpected events
      will arrive and the xenwatch thread will crash (jumps to NULL).  An
      orderly reboot of a hvm guest will destroy the entire guest with all its
      resources (including the watches) before it is rebuilt from scratch, so
      the missing unregister is not an issue in that case.
      
      With this change the xenstored is instructed to wipe all active watches
      for the guest.  However, a patch for xenstored is required so that it
      accepts the XS_RESET_WATCHES request from a client (see changeset
      23839:42a45baf037d in xen-unstable.hg). Without the patch for xenstored
      the registration of watches will fail and some features of a PVonHVM
      guest are not available. The guest is still able to boot, but repeated
      kexec boots will fail.
      
      [v5: use xs_single instead of passing a dummy string to xs_talkv]
      [v4: ignore -EEXIST in xs_reset_watches]
      [v3: use XS_RESET_WATCHES instead of XS_INTRODUCE]
      [v2: move all code which deals with XS_INTRODUCE into xs_introduce()
          (based on feedback from Ian Campbell); remove casts from kvec assignment]
      Signed-off-by: NOlaf Hering <olaf@aepfle.de>
      [v1: Redid the git description a bit]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      ddacf5ef
  4. 01 9月, 2011 1 次提交
    • O
      xen/pv-on-hvm kexec: prevent crash in xenwatch_thread() when stale watch events arrive · c4c303c7
      Olaf Hering 提交于
      During repeated kexec boots xenwatch_thread() can crash because
      xenbus_watch->callback is cleared by xenbus_watch_path() if a node/token
      combo for a new watch happens to match an already registered watch from
      an old kernel.  In this case xs_watch returns -EEXISTS, then
      register_xenbus_watch() does not remove the to-be-registered watch from
      the list of active watches but returns the -EEXISTS to the caller
      anyway.
      
      Because the watch is still active in xenstored it will cause an event
      which will arrive in the new kernel. process_msg() will find the
      encapsulated struct xenbus_watch in its list of registered watches and
      puts the "empty" watch handle in the queue for xenwatch_thread().
      xenwatch_thread() then calls ->callback which was cleared earlier by
      xenbus_watch_path().
      
      To prevent that crash in a guest running on an old xen toolstack remove
      the special -EEXIST handling.
      
      v2:
       - remove the EEXIST handing in register_xenbus_watch() instead of
         checking for ->callback in process_msg()
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NOlaf Hering <olaf@aepfle.de>
      c4c303c7
  5. 03 6月, 2010 1 次提交
  6. 04 11月, 2009 1 次提交
  7. 31 3月, 2009 1 次提交
  8. 09 1月, 2009 1 次提交
  9. 03 7月, 2008 1 次提交
  10. 27 7月, 2007 1 次提交
  11. 18 7月, 2007 1 次提交