Re: [PATCH 13/15] hotplug: introduce qdev_unplug_complete() to remove device from views

2012-08-13 Thread Marcelo Tosatti
On Thu, Aug 09, 2012 at 10:00:16AM +0200, Paolo Bonzini wrote: Il 09/08/2012 09:28, liu ping fan ha scritto: VCPU threadI/O thread = get MMIO request rcu_read_lock() walk memory

Re: [PATCH 13/15] hotplug: introduce qdev_unplug_complete() to remove device from views

2012-08-13 Thread Marcelo Tosatti
On Fri, Aug 10, 2012 at 02:42:58PM +0800, liu ping fan wrote: On Thu, Aug 9, 2012 at 4:00 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 09/08/2012 09:28, liu ping fan ha scritto: VCPU threadI/O thread

Re: [PATCH 13/15] hotplug: introduce qdev_unplug_complete() to remove device from views

2012-08-10 Thread liu ping fan
On Thu, Aug 9, 2012 at 4:00 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 09/08/2012 09:28, liu ping fan ha scritto: VCPU threadI/O thread = get MMIO request rcu_read_lock() walk

Re: [PATCH 13/15] hotplug: introduce qdev_unplug_complete() to remove device from views

2012-08-09 Thread liu ping fan
On Wed, Aug 8, 2012 at 5:52 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 08/08/2012 08:25, Liu Ping Fan ha scritto: +void qdev_unplug_complete(DeviceState *dev, Error **errp) +{ +/* isolate from mem view */ +qdev_unmap(dev); +qemu_lock_devtree(); +/* isolate from device

Re: [PATCH 13/15] hotplug: introduce qdev_unplug_complete() to remove device from views

2012-08-09 Thread Paolo Bonzini
Il 09/08/2012 09:28, liu ping fan ha scritto: VCPU threadI/O thread = get MMIO request rcu_read_lock() walk memory map qdev_unmap()

[PATCH 13/15] hotplug: introduce qdev_unplug_complete() to remove device from views

2012-08-08 Thread Liu Ping Fan
From: Liu Ping Fan pingf...@linux.vnet.ibm.com When guest confirm the removal of device, we should --unmap from MemoryRegion view --isolated from device tree view Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com --- hw/acpi_piix4.c |4 ++-- hw/pci.c| 13 -

Re: [PATCH 13/15] hotplug: introduce qdev_unplug_complete() to remove device from views

2012-08-08 Thread Paolo Bonzini
Il 08/08/2012 08:25, Liu Ping Fan ha scritto: +void qdev_unplug_complete(DeviceState *dev, Error **errp) +{ +/* isolate from mem view */ +qdev_unmap(dev); +qemu_lock_devtree(); +/* isolate from device tree */ +qdev_unset_parent(dev); +qemu_unlock_devtree(); +

Re: [PATCH 13/15] hotplug: introduce qdev_unplug_complete() to remove device from views

2012-08-08 Thread Avi Kivity
On 08/08/2012 12:52 PM, Paolo Bonzini wrote: Il 08/08/2012 08:25, Liu Ping Fan ha scritto: +void qdev_unplug_complete(DeviceState *dev, Error **errp) +{ +/* isolate from mem view */ +qdev_unmap(dev); +qemu_lock_devtree(); +/* isolate from device tree */ +