[Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-05-17 Thread David Hildenbrand
For multi stage hotplug handlers, we'll have to do some error handling in some hotplug functions, so let's use a local error variable (except for unplug requests). Also, add code to pass control to the final stage hotplug handler at the parent bus. Signed-off-by: David Hildenbrand --- hw/i386/p

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-14 Thread Igor Mammedov
On Thu, 14 Jun 2018 08:14:05 +0200 David Hildenbrand wrote: > On 14.06.2018 00:05, Michael S. Tsirkin wrote: > > On Wed, Jun 13, 2018 at 09:37:54PM +0200, David Hildenbrand wrote: > > [ ... specific to machine_foo wiring ...] > > > > virtio_mem_plug() { > >

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-14 Thread Igor Mammedov
On Wed, 13 Jun 2018 17:51:01 +0200 David Hildenbrand wrote: > On 13.06.2018 17:48, Igor Mammedov wrote: > > On Wed, 13 Jun 2018 12:58:46 +0200 > > David Hildenbrand wrote: > > > >> On 08.06.2018 17:12, Michael S. Tsirkin wrote: > >>> On Fri, Jun 08, 2018 at 03:07:53PM +0200, David Hildenbra

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-07 Thread Igor Mammedov
On Mon, 4 Jun 2018 13:27:01 +0200 David Hildenbrand wrote: > On 31.05.2018 16:13, Igor Mammedov wrote: > > On Wed, 30 May 2018 16:13:32 +0200 > > David Hildenbrand wrote: > > > >> On 30.05.2018 15:08, Igor Mammedov wrote: > >>> On Thu, 17 May 2018 10:15:17 +0200 > >>> David Hildenbrand wro

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-07 Thread David Hildenbrand
On 07.06.2018 15:44, Igor Mammedov wrote: > On Mon, 4 Jun 2018 13:27:01 +0200 > David Hildenbrand wrote: > >> On 31.05.2018 16:13, Igor Mammedov wrote: >>> On Wed, 30 May 2018 16:13:32 +0200 >>> David Hildenbrand wrote: >>> On 30.05.2018 15:08, Igor Mammedov wrote: > On Thu, 17 May

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-08 Thread Igor Mammedov
On Thu, 7 Jun 2018 16:00:54 +0200 David Hildenbrand wrote: > On 07.06.2018 15:44, Igor Mammedov wrote: > > On Mon, 4 Jun 2018 13:27:01 +0200 > > David Hildenbrand wrote: > > > >> On 31.05.2018 16:13, Igor Mammedov wrote: > >>> On Wed, 30 May 2018 16:13:32 +0200 > >>> David Hildenbrand wrot

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-08 Thread David Hildenbrand
>>> if (TYPE_PC_DIMM) { >>> pc_dimm_plug() >>> /* do here additional concrete machine specific things */ >>> } else if (TYPE_VIRTIO_MEM) { >>> virtio_mem_plug() <- do forwarding in there >>> /* and do here additional concrete machine specific things */ >>> } else if (TYPE_CPU) { >

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-08 Thread David Hildenbrand
On 08.06.2018 14:55, Michael S. Tsirkin wrote: > On Fri, Jun 08, 2018 at 02:32:09PM +0200, David Hildenbrand wrote: >> > if (TYPE_PC_DIMM) { > pc_dimm_plug() > /* do here additional concrete machine specific things */ > } else if (TYPE_VIRTIO_MEM) { > virtio_mem_plug

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-08 Thread Michael S. Tsirkin
On Fri, Jun 08, 2018 at 02:32:09PM +0200, David Hildenbrand wrote: > > >>> if (TYPE_PC_DIMM) { > >>> pc_dimm_plug() > >>> /* do here additional concrete machine specific things */ > >>> } else if (TYPE_VIRTIO_MEM) { > >>> virtio_mem_plug() <- do forwarding in there > >>> /* and do

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-08 Thread Michael S. Tsirkin
On Fri, Jun 08, 2018 at 03:07:53PM +0200, David Hildenbrand wrote: > On 08.06.2018 14:55, Michael S. Tsirkin wrote: > > On Fri, Jun 08, 2018 at 02:32:09PM +0200, David Hildenbrand wrote: > >> > > if (TYPE_PC_DIMM) { > > pc_dimm_plug() > > /* do here additional concrete machine s

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-13 Thread David Hildenbrand
On 08.06.2018 17:12, Michael S. Tsirkin wrote: > On Fri, Jun 08, 2018 at 03:07:53PM +0200, David Hildenbrand wrote: >> On 08.06.2018 14:55, Michael S. Tsirkin wrote: >>> On Fri, Jun 08, 2018 at 02:32:09PM +0200, David Hildenbrand wrote: >>> if (TYPE_PC_DIMM) { >>> pc_dimm_plug() >>

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-13 Thread Igor Mammedov
On Wed, 13 Jun 2018 12:58:46 +0200 David Hildenbrand wrote: > On 08.06.2018 17:12, Michael S. Tsirkin wrote: > > On Fri, Jun 08, 2018 at 03:07:53PM +0200, David Hildenbrand wrote: > >> On 08.06.2018 14:55, Michael S. Tsirkin wrote: > >>> On Fri, Jun 08, 2018 at 02:32:09PM +0200, David Hildenb

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-13 Thread David Hildenbrand
On 13.06.2018 17:48, Igor Mammedov wrote: > On Wed, 13 Jun 2018 12:58:46 +0200 > David Hildenbrand wrote: > >> On 08.06.2018 17:12, Michael S. Tsirkin wrote: >>> On Fri, Jun 08, 2018 at 03:07:53PM +0200, David Hildenbrand wrote: On 08.06.2018 14:55, Michael S. Tsirkin wrote: > On Fri

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-13 Thread Michael S. Tsirkin
On Wed, Jun 13, 2018 at 05:51:01PM +0200, David Hildenbrand wrote: > On 13.06.2018 17:48, Igor Mammedov wrote: > > On Wed, 13 Jun 2018 12:58:46 +0200 > > David Hildenbrand wrote: > > > >> On 08.06.2018 17:12, Michael S. Tsirkin wrote: > >>> On Fri, Jun 08, 2018 at 03:07:53PM +0200, David Hildenbr

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-13 Thread David Hildenbrand
>>> [ ... specific to machine_foo wiring ...] >>> >>> virtio_mem_plug() { >>> [... some machine specific wiring ...] >>> >>> bus_hotplug_ctrl = qdev_get_bus_hotplug_handler() >>> bus_hotplug_ctrl->plug(bus_hotplug_ctrl, dev) >>> >>> [... some more mac

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-13 Thread Michael S. Tsirkin
On Wed, Jun 13, 2018 at 09:37:54PM +0200, David Hildenbrand wrote: > >>> [ ... specific to machine_foo wiring ...] > >>> > >>> virtio_mem_plug() { > >>> [... some machine specific wiring ...] > >>> > >>> bus_hotplug_ctrl = qdev_get_bus_hotplug_handler() > >>>

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-13 Thread David Hildenbrand
On 14.06.2018 00:05, Michael S. Tsirkin wrote: > On Wed, Jun 13, 2018 at 09:37:54PM +0200, David Hildenbrand wrote: > [ ... specific to machine_foo wiring ...] > > virtio_mem_plug() { > [... some machine specific wiring ...] > > bus_hotplug_ctrl

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-05-30 Thread Igor Mammedov
On Thu, 17 May 2018 10:15:17 +0200 David Hildenbrand wrote: > For multi stage hotplug handlers, we'll have to do some error handling > in some hotplug functions, so let's use a local error variable (except > for unplug requests). I'd split out introducing local error into separate patch so patch

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-05-30 Thread David Hildenbrand
On 30.05.2018 15:08, Igor Mammedov wrote: > On Thu, 17 May 2018 10:15:17 +0200 > David Hildenbrand wrote: > >> For multi stage hotplug handlers, we'll have to do some error handling >> in some hotplug functions, so let's use a local error variable (except >> for unplug requests). > I'd split out

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-05-31 Thread Igor Mammedov
On Wed, 30 May 2018 16:13:32 +0200 David Hildenbrand wrote: > On 30.05.2018 15:08, Igor Mammedov wrote: > > On Thu, 17 May 2018 10:15:17 +0200 > > David Hildenbrand wrote: > > > >> For multi stage hotplug handlers, we'll have to do some error handling > >> in some hotplug functions, so let's

Re: [Qemu-devel] [PATCH v4 04/14] pc: prepare for multi stage hotplug handlers

2018-06-04 Thread David Hildenbrand
On 31.05.2018 16:13, Igor Mammedov wrote: > On Wed, 30 May 2018 16:13:32 +0200 > David Hildenbrand wrote: > >> On 30.05.2018 15:08, Igor Mammedov wrote: >>> On Thu, 17 May 2018 10:15:17 +0200 >>> David Hildenbrand wrote: >>> For multi stage hotplug handlers, we'll have to do some error h