Skip to content
  • Anthony PERARD's avatar
    cb323146
    xen-bus: Fix backend state transition on device reset · cb323146
    Anthony PERARD authored
    
    
    When a frontend wants to reset its state and the backend one, it
    starts with setting "Closing", then waits for the backend (QEMU) to do
    the same.
    
    But when QEMU is setting "Closing" to its state, it triggers an event
    (xenstore watch) that re-execute xen_device_backend_changed() and set
    the backend state to "Closed". QEMU should wait for the frontend to
    set "Closed" before doing the same.
    
    Before setting "Closed" to the backend_state, we are also going to
    check if there is a frontend. If that the case, when the backend state
    is set to "Closing" the frontend should react and sets its state to
    "Closing" then "Closed". The backend should wait for that to happen.
    
    Fixes: b6af8926
    Signed-off-by: default avatarAnthony PERARD <anthony.perard@citrix.com>
    Reviewed-by: default avatarPaul Durrant <paul.durrant@citrix.com>
    Message-Id: <20190823101534.465-2-anthony.perard@citrix.com>
    cb323146
    xen-bus: Fix backend state transition on device reset
    Anthony PERARD authored
    
    
    When a frontend wants to reset its state and the backend one, it
    starts with setting "Closing", then waits for the backend (QEMU) to do
    the same.
    
    But when QEMU is setting "Closing" to its state, it triggers an event
    (xenstore watch) that re-execute xen_device_backend_changed() and set
    the backend state to "Closed". QEMU should wait for the frontend to
    set "Closed" before doing the same.
    
    Before setting "Closed" to the backend_state, we are also going to
    check if there is a frontend. If that the case, when the backend state
    is set to "Closing" the frontend should react and sets its state to
    "Closing" then "Closed". The backend should wait for that to happen.
    
    Fixes: b6af8926
    Signed-off-by: default avatarAnthony PERARD <anthony.perard@citrix.com>
    Reviewed-by: default avatarPaul Durrant <paul.durrant@citrix.com>
    Message-Id: <20190823101534.465-2-anthony.perard@citrix.com>
Loading