mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
Merge remote-tracking branch 'sstabellini/xen-fixes' into staging
* sstabellini/xen-fixes: xen_disk: detach the blkdev before bdrv_delete xen_console: ignore console disconnect events from console/0
This commit is contained in:
commit
49e00ba969
2 changed files with 4 additions and 0 deletions
|
@ -248,6 +248,9 @@ static void con_disconnect(struct XenDevice *xendev)
|
|||
{
|
||||
struct XenConsole *con = container_of(xendev, struct XenConsole, xendev);
|
||||
|
||||
if (!xendev->dev) {
|
||||
return;
|
||||
}
|
||||
if (con->chr)
|
||||
qemu_chr_add_handlers(con->chr, NULL, NULL, NULL, NULL);
|
||||
xen_be_unbind_evtchn(&con->xendev);
|
||||
|
|
|
@ -726,6 +726,7 @@ static void blk_disconnect(struct XenDevice *xendev)
|
|||
if (!blkdev->dinfo) {
|
||||
/* close/delete only if we created it ourself */
|
||||
bdrv_close(blkdev->bs);
|
||||
bdrv_detach_dev(blkdev->bs, blkdev);
|
||||
bdrv_delete(blkdev->bs);
|
||||
}
|
||||
blkdev->bs = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue