1. 20 12月, 2011 1 次提交
  2. 17 12月, 2011 3 次提交
  3. 17 11月, 2011 1 次提交
  4. 01 11月, 2011 2 次提交
  5. 20 10月, 2011 1 次提交
  6. 14 10月, 2011 2 次提交
  7. 30 9月, 2011 1 次提交
  8. 27 9月, 2011 1 次提交
  9. 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
  10. 01 9月, 2011 2 次提交
    • O
      xen/pv-on-hvm kexec+kdump: reset PV devices in kexec or crash kernel · 116df6f0
      Olaf Hering 提交于
      After triggering a crash dump in a HVM guest, the PV backend drivers
      will remain in Connected state. When the kdump kernel starts the PV
      drivers will skip such devices. As a result, no root device is found and
      the vmcore cant be saved.
      
      A similar situation happens after a kexec boot, here the devices will be
      in the Closed state.
      
      With this change all frontend devices with state XenbusStateConnected or
      XenbusStateClosed will be reset by changing the state file to Closing ->
      Closed -> Initializing.  This will trigger a disconnect in the backend
      drivers. Now the frontend drivers will find the backend drivers in state
      Initwait and can connect.
      Signed-off-by: NOlaf Hering <olaf@aepfle.de>
      [v2:
        - add timeout when waiting for backend state change
        (based on feedback from Ian Campell)
        - extent printk message to include backend string
        - add comment to fall-through case in xenbus_reset_frontend]
      Signed-off-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      116df6f0
    • 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
  11. 27 7月, 2011 2 次提交
  12. 01 7月, 2011 2 次提交
  13. 17 3月, 2011 2 次提交
  14. 06 1月, 2011 12 次提交
  15. 23 10月, 2010 1 次提交
  16. 21 10月, 2010 1 次提交
  17. 18 10月, 2010 1 次提交
  18. 05 10月, 2010 1 次提交
  19. 08 8月, 2010 1 次提交
    • D
      xenbus: Make xenbus_switch_state transactional · 5b61cb90
      Daniel Stodden 提交于
      According to the comments, this was how it's been done years ago, but
      apparently took an xbt pointer from elsewhere back then. The code was
      removed because of consistency issues: cancellation wont't roll back
      the saved xbdev->state.
      
      Still, unsolicited writes to the state field remain an issue,
      especially if device shutdown takes thread synchronization, and subtle
      races cause accidental recreation of the device node.
      
      Fixed by reintroducing the transaction. An internal one is sufficient,
      so the xbdev->state value remains consistent.
      
      Also fixes the original hack to prevent infinite recursion. Instead of
      bailing out on the first attempt to switch to Closing, checks call
      depth now.
      Signed-off-by: NDaniel Stodden <daniel.stodden@citrix.com>
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      5b61cb90
  20. 05 8月, 2010 1 次提交
  21. 27 7月, 2010 1 次提交