Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xbd detachment



David Young wrote:
I am experimenting with detaching xbd(4) units during shutdown.
xbd_xenbus_detach() hangs in this the loop, below:
 hypervisor_mask_event(sc->sc_evtchn);
 event_remove_handler(sc->sc_evtchn, &xbd_handler, sc);
 while (xengnt_status(sc->sc_ring_gntref)) {
 tsleep(xbd_xenbus_detach, PRIBIO, "xbd_ref", hz/2);
} xengnt_revoke_access(sc->sc_ring_gntref);
 uvm_km_free(kernel_map, (vaddr_t)sc->sc_ring.sring,
 PAGE_SIZE, UVM_KMF_WIRED);
The dom0 is expected not to use the grant table ring during device removal, and clear transfering/writing/reading states. If it does not (hence, infinite loop on status), something is wrong in dom0. What version/OS are you running as dom0? Is the vbd (dom0 side) a file (used through vnd(4)), or a block device?
> Should this routine follow some other protocol in order to close down
> and revoke the grant_ref_t?
Hardly, revocation will end in panic() (you cannot free a grant table entry while there is a read/write lock acquired by the other end on the referenced page).
--
Jean-Yves Migeon
jeanyves.migeon%free.fr@localhost


Home | Main Index | Thread Index | Old Index

AltStyle によって変換されたページ (->オリジナル) /