qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V2 09/11] memory: handle alias for iommu notifie


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH V2 09/11] memory: handle alias for iommu notifier
Date: Thu, 3 Nov 2016 17:55:53 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0


On 03/11/2016 10:27, Jason Wang wrote:
> Cc: Paolo Bonzini <address@hidden>
> Signed-off-by: Jason Wang <address@hidden>
> ---
>  memory.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/memory.c b/memory.c
> index 33110e9..2bfc37f 100644
> --- a/memory.c
> +++ b/memory.c
> @@ -1603,6 +1603,11 @@ static void 
> memory_region_update_iommu_notify_flags(MemoryRegion *mr)
>  void memory_region_register_iommu_notifier(MemoryRegion *mr,
>                                             IOMMUNotifier *n)
>  {
> +    if (mr->alias) {
> +        memory_region_register_iommu_notifier(mr->alias, n);
> +        return;
> +    }
> +
>      /* We need to register for at least one bitfield */
>      assert(n->notifier_flags != IOMMU_NOTIFIER_NONE);
>      QLIST_INSERT_HEAD(&mr->iommu_notify, n, node);
> @@ -1643,6 +1648,10 @@ void memory_region_iommu_replay(MemoryRegion *mr, 
> IOMMUNotifier *n,
>  void memory_region_unregister_iommu_notifier(MemoryRegion *mr,
>                                               IOMMUNotifier *n)
>  {
> +    if (mr->alias) {
> +        memory_region_unregister_iommu_notifier(mr->alias, n);
> +        return;
> +    }
>      QLIST_REMOVE(n, node);
>      memory_region_update_iommu_notify_flags(mr);
>  }
> 

Acked-by: Paolo Bonzini <address@hidden>



reply via email to

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