• Y
    s390x/pci: make hot-unplug handler smoother · 93d16d81
    Yi Min Zhao 提交于
    The current implementation of hot-unplug handler is abrupt. Any pci
    operation will be just rejected if pci device is unconfigured. Thus a
    pci device can not be reset or destroyed in a right, smooth and safe
    way.
    
    Improve this as follows:
    - Notify the guest via a HP_EVENT_DECONFIGURE_REQUEST(0x303) event in
      the unplug handler, giving it a chance to deconfigure the device via
      sclp and allowing us to continue hot-unplug afterwards.
    - Set up a timer that will generate the HP_EVENT_CONFIGURE_TO_STBRES
      (0x304) event as before if the guest did not react after an adequate
      time.
    Signed-off-by: NYi Min Zhao <zyimin@linux.vnet.ibm.com>
    Reviewed-by: NPierre Morel <pmorel@linux.vnet.ibm.com>
    Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
    93d16d81
s390-pci-bus.h 9.5 KB