Skip to contentSkip to conversation

simple Xen fixes

GIT PULL New Stefano Stabellini 2 participants 4 messages Mar 27, 2012 – Mar 30, 2012

lore
Share & tools
lore
#0 lore raw

Hi Anthony,
I have a couple of old Xen one-line fixes laying around:

Stefano Stabellini (2):
xen_console: ignore console disconnect events from console/0
xen_disk: detach the blkdev before bdrv_delete

 hw/xen_console.c |    3 +++
 hw/xen_disk.c    |    1 +
 2 files changed, 4 insertions(+), 0 deletions(-)

Please pull:

git://xenbits.xen.org/people/sstabellini/qemu-dm.git xen-fixes

They should also go into stable-1.0.

Cheers,

Stefano

#1 lore raw

PATCH 1/2 xen_console: ignore console disconnect events from console/0

The first console has a different location compared to other PV devices (console, rather than device/console/0) and doesn't obey the xenstore state protocol. We already special case the first console in con_init and con_initialise, we should also do it in con_disconnect.

---
 hw/xen_console.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
hw/xen_console.c +3 -0
index edcb31c..3794b19 100644
@@ -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);
Signature · 1 line
1.7.2.5
#2 lore raw

PATCH 2/2 xen_disk: detach the blkdev before bdrv_delete

In reply to Stefano Stabellini

We need to detach the blkdev from the BlockDriverState before calling bdrv_delete.

---
 hw/xen_disk.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
hw/xen_disk.c +1 -0
index 68fa36a..bf06fc1 100644
@@ -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;
Signature · 1 line
1.7.2.5
#3 lore raw
In reply to Stefano Stabellini
Quoted 10 lines · Stefano Stabellini

Hi Anthony,
I have a couple of old Xen one-line fixes laying around:

Stefano Stabellini (2):
xen_console: ignore console disconnect events from console/0
xen_disk: detach the blkdev before bdrv_delete

  hw/xen_console.c |    3 +++
  hw/xen_disk.c    |    1 +
  2 files changed, 4 insertions(+), 0 deletions(-)

Pulled. Thanks.

Regards,

Anthony Liguori

Quoted 15 lines

Please pull:

git://xenbits.xen.org/people/sstabellini/qemu-dm.git xen-fixes

They should also go into stable-1.0.

Cheers,

Stefano