Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-05-19 Thread Markus Armbruster
Jun Li junm...@gmail.com writes: On 05/15/2014 11:07 PM, Michael S. Tsirkin wrote: On Wed, Apr 16, 2014 at 10:20:57PM +0800, Jun Li wrote: [...] diff --git a/vl.c b/vl.c index 9975e5a..1713c68 100644 --- a/vl.c +++ b/vl.c @@ -1184,6 +1184,22 @@ void add_boot_device_path(int32_t bootindex,

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-05-19 Thread Jun Li
On 05/19/2014 03:18 PM, Markus Armbruster wrote: Jun Li junm...@gmail.com writes: On 05/15/2014 11:07 PM, Michael S. Tsirkin wrote: On Wed, Apr 16, 2014 at 10:20:57PM +0800, Jun Li wrote: [...] diff --git a/vl.c b/vl.c index 9975e5a..1713c68 100644 --- a/vl.c +++ b/vl.c @@ -1184,6 +1184,22

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-05-17 Thread Jun Li
On 05/15/2014 11:07 PM, Michael S. Tsirkin wrote: On Wed, Apr 16, 2014 at 10:20:57PM +0800, Jun Li wrote: Add remove_boot_device_path() function to remove bootindex when hot-unplug a device. This patch fixed virtio-blk/virtio-net/scsi-disk/scsi-generic device. So it has fixed bug1086603, ref:

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-05-15 Thread Michael S. Tsirkin
On Wed, Apr 16, 2014 at 10:20:57PM +0800, Jun Li wrote: Add remove_boot_device_path() function to remove bootindex when hot-unplug a device. This patch fixed virtio-blk/virtio-net/scsi-disk/scsi-generic device. So it has fixed bug1086603, ref:

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-05-14 Thread Michael S. Tsirkin
On Mon, May 12, 2014 at 11:51:35PM +0800, Jun Li wrote: On 05/11/2014 05:17 PM, Marcel Apfelbaum wrote: On Sun, 2014-05-11 at 11:07 +0800, lijun wrote: On 04/22/2014 05:21 PM, Marcel Apfelbaum wrote: On Wed, 2014-04-16 at 22:20 +0800, Jun Li wrote: Add remove_boot_device_path() function to

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-05-12 Thread Jun Li
On 05/11/2014 05:17 PM, Marcel Apfelbaum wrote: On Sun, 2014-05-11 at 11:07 +0800, lijun wrote: On 04/22/2014 05:21 PM, Marcel Apfelbaum wrote: On Wed, 2014-04-16 at 22:20 +0800, Jun Li wrote: Add remove_boot_device_path() function to remove bootindex when hot-unplug a device. This patch

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-05-11 Thread Marcel Apfelbaum
On Sun, 2014-05-11 at 11:07 +0800, lijun wrote: On 04/22/2014 05:21 PM, Marcel Apfelbaum wrote: On Wed, 2014-04-16 at 22:20 +0800, Jun Li wrote: Add remove_boot_device_path() function to remove bootindex when hot-unplug a device. This patch fixed virtio-blk/virtio-net/scsi-disk/scsi-generic

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-05-10 Thread lijun
On 04/22/2014 05:21 PM, Marcel Apfelbaum wrote: On Wed, 2014-04-16 at 22:20 +0800, Jun Li wrote: Add remove_boot_device_path() function to remove bootindex when hot-unplug a device. This patch fixed virtio-blk/virtio-net/scsi-disk/scsi-generic device. So it has fixed bug1086603, ref:

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-04-28 Thread Paolo Bonzini
Il 22/04/2014 11:21, Marcel Apfelbaum ha scritto: Here is the *real* problem: fw_boot_order list is not queried again on guest reboot, so 'touching' the list has no effect. While your code is correct (as far as I can tell), it seems that his place is after the above problem is solved. Doesn't

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-04-28 Thread Marcel Apfelbaum
On Mon, 2014-04-28 at 11:22 +0200, Paolo Bonzini wrote: Il 22/04/2014 11:21, Marcel Apfelbaum ha scritto: Here is the *real* problem: fw_boot_order list is not queried again on guest reboot, so 'touching' the list has no effect. While your code is correct (as far as I can tell), it seems

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-04-28 Thread Paolo Bonzini
Il 28/04/2014 11:38, Marcel Apfelbaum ha scritto: Doesn't Jun's patch fix a dangling pointer? If so, that would come first anyway. It removes pointers from a dead list, and it only deals with some symptom. Yeah, but dangling pointers are bad anyway. I think we should include Jun's patch.

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-04-28 Thread Marcel Apfelbaum
On Mon, 2014-04-28 at 13:32 +0200, Paolo Bonzini wrote: Il 28/04/2014 11:38, Marcel Apfelbaum ha scritto: Doesn't Jun's patch fix a dangling pointer? If so, that would come first anyway. It removes pointers from a dead list, and it only deals with some symptom. Yeah, but dangling

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-04-28 Thread Paolo Bonzini
Il 28/04/2014 14:43, Marcel Apfelbaum ha scritto: Yeah, but dangling pointers are bad anyway. I think we should include Jun's patch. I have nothing against it, but maybe you/someone answer this question which I honestly don't have the answer for: After this patch you can replace a boot-able

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-04-28 Thread Marcel Apfelbaum
On Mon, 2014-04-28 at 14:48 +0200, Paolo Bonzini wrote: Il 28/04/2014 14:43, Marcel Apfelbaum ha scritto: Yeah, but dangling pointers are bad anyway. I think we should include Jun's patch. I have nothing against it, but maybe you/someone answer this question which I honestly don't have

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-04-22 Thread Marcel Apfelbaum
On Wed, 2014-04-16 at 22:20 +0800, Jun Li wrote: Add remove_boot_device_path() function to remove bootindex when hot-unplug a device. This patch fixed virtio-blk/virtio-net/scsi-disk/scsi-generic device. So it has fixed bug1086603, ref: https://bugzilla.redhat.com/show_bug.cgi?id=1086603

[Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-04-16 Thread Jun Li
Add remove_boot_device_path() function to remove bootindex when hot-unplug a device. This patch fixed virtio-blk/virtio-net/scsi-disk/scsi-generic device. So it has fixed bug1086603, ref: https://bugzilla.redhat.com/show_bug.cgi?id=1086603 Make some changes based on Andreas's good suggestion.