diff mbox

[for-2.6] xen: Fix IDE unplug

Message ID 1460382666-29885-1-git-send-email-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Anthony PERARD April 11, 2016, 1:51 p.m. UTC
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>
---
 hw/ide/piix.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Stefano Stabellini April 11, 2016, 6:22 p.m. UTC | #1
On Mon, 11 Apr 2016, Anthony PERARD wrote:
> 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>

Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>


>  hw/ide/piix.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/ide/piix.c b/hw/ide/piix.c
> index 0a4cbcb..6d76ce9 100644
> --- a/hw/ide/piix.c
> +++ b/hw/ide/piix.c
> @@ -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);
>          }
>      }
> -- 
> Anthony PERARD
>
John Snow April 11, 2016, 8:31 p.m. UTC | #2
On 04/11/2016 02:22 PM, Stefano Stabellini wrote:
> On Mon, 11 Apr 2016, Anthony PERARD wrote:
>> 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>
> 
> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> 
> 
>>  hw/ide/piix.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/hw/ide/piix.c b/hw/ide/piix.c
>> index 0a4cbcb..6d76ce9 100644
>> --- a/hw/ide/piix.c
>> +++ b/hw/ide/piix.c
>> @@ -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);
>>          }
>>      }
>> -- 
>> Anthony PERARD
>>
> 

Thanks, applied to my IDE tree:

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

--js
diff mbox

Patch

diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index 0a4cbcb..6d76ce9 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -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);
         }
     }