On Wed, Jul 25, 2012 at 5:08 PM, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote: > Il 25/07/2012 05:31, Liu Ping Fan ha scritto: >> From: Liu Ping Fan <pingfank@xxxxxxxxxxxxxxxxxx> >> >> rwlock: >> qemu_device_tree_mutex >> >> rd side: >> --device_del(destruction of device will be postphoned until unplug >> ack from guest), >> --pci hot-unplug >> --iteration (qdev_reset_all) >> >> wr side: >> --device_add >> >> Signed-off-by: Liu Ping Fan <pingfank@xxxxxxxxxxxxxxxxxx> >> --- >> hw/pci-hotplug.c | 4 ++++ >> hw/qdev-monitor.c | 17 ++++++++++++++++- >> hw/qdev.c | 2 ++ >> 3 files changed, 22 insertions(+), 1 deletions(-) >> >> diff --git a/hw/pci-hotplug.c b/hw/pci-hotplug.c >> index e7fb780..b3b88c1 100644 >> --- a/hw/pci-hotplug.c >> +++ b/hw/pci-hotplug.c >> @@ -265,9 +265,11 @@ static int pci_device_hot_remove(Monitor *mon, const char *pci_addr) >> return -1; >> } >> >> + qemu_rwlock_rdlock_devtree(); > > This is not defined anywhere, is a piece missing in the patch? > Oh, yes, I miss the patch. In that patch, these rwlock are just place holder. I see there is already try to implement rwlock for qemu. http://lists.gnu.org/archive/html/qemu-devel/2011-10/msg00192.html and is it the time for introduce rwlock for qemu? Thanks, pingfan > Paolo > -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html