xen: Fix IDE unplug

After commit e5e7855 (blockdev: Separate BB name management), starting a
guest with PVHVM support result in this assert:
qemu-system-i386: block/block-backend.c:173: blk_delete: Assertion `!blk->name' failed.

A backtrace show that a caller is pci_piix3_xen_ide_unplug().

This patch fix it.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Message-id: 1460382666-29885-1-git-send-email-anthony.perard@citrix.com
Signed-off-by: John Snow <jsnow@redhat.com>
This commit is contained in:
Anthony PERARD 2016-04-12 16:47:52 -04:00 committed by John Snow
parent d44122ecd0
commit d1fc684f36
1 changed files with 1 additions and 0 deletions

View File

@ -189,6 +189,7 @@ int pci_piix3_xen_ide_unplug(DeviceState *dev)
idedev = pci_ide->bus[di->bus].slave;
}
idedev->conf.blk = NULL;
monitor_remove_blk(blk);
blk_unref(blk);
}
}