Skip to contentSkip to conversation

xen: Fix IDE unplug

PATCH Applied Anthony PERARD 3 participants 3 messages Apr 11, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 hw/ide/piix.c | 1 +
 1 file changed, 1 insertion(+)
hw/ide/piix.c +1 -0
index 0a4cbcb..6d76ce9 100644
@@ -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);
         }
     }
Signature · 1 line
Anthony PERARD
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Anthony PERARD

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.

Quoted 18 lines
 hw/ide/piix.c | 1 +
 1 file changed, 1 insertion(+)
hw/ide/piix.c +1 -0
index 0a4cbcb..6d76ce9 100644
@@ -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);
         }
     }
Signature · 1 line
Anthony PERARD
Applied
#2 lore raw
Quoted 17 lines · Stefano Stabellini
Quoted 9 lines · Anthony PERARD

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.

Quoted 3 lines
 hw/ide/piix.c | 1 +
 1 file changed, 1 insertion(+)
Quoted 16 lines
Quoted 15 lines
hw/ide/piix.c +1 -0
index 0a4cbcb..6d76ce9 100644
@@ -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);
         }
     }
Signature · 1 line
Anthony PERARD

Thanks, applied to my IDE tree:

https://github.com/jnsnow/qemu/commits/ide
https://github.com/jnsnow/qemu.git

--js