qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1/5] qom: adopt rwlock to protect accessing dev


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 1/5] qom: adopt rwlock to protect accessing dev from removing it
Date: Wed, 25 Jul 2012 11:08:14 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

Il 25/07/2012 05:31, Liu Ping Fan ha scritto:
> From: Liu Ping Fan <address@hidden>
> 
> 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 <address@hidden>
> ---
>  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?

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]