qemu-devel
[Top][All Lists]
Advanced

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

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


From: Peter Xu
Subject: Re: [Qemu-devel] [PATCH for 2.8 09/11] memory: handle alias for iommu notifier
Date: Tue, 30 Aug 2016 21:28:04 +0800
User-agent: Mutt/1.5.24 (2015-08-30)

On Tue, Aug 30, 2016 at 11:06:57AM +0800, Jason Wang wrote:
> Cc: Paolo Bonzini <address@hidden>
> Signed-off-by: Jason Wang <address@hidden>

Reviewed-by: Peter Xu <address@hidden>

> ---
>  memory.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/memory.c b/memory.c
> index 0eb6895..ca0a698 100644
> --- a/memory.c
> +++ b/memory.c
> @@ -1515,6 +1515,11 @@ bool memory_region_is_logging(MemoryRegion *mr, 
> uint8_t client)
>  
>  void memory_region_register_iommu_notifier(MemoryRegion *mr, Notifier *n)
>  {
> +    if (mr->alias) {
> +        memory_region_register_iommu_notifier(mr->alias, n);
> +        return;
> +    }
> +
>      if (mr->iommu_ops->notify_started &&
>          QLIST_EMPTY(&mr->iommu_notify.notifiers)) {
>          mr->iommu_ops->notify_started(mr);
> @@ -1554,6 +1559,10 @@ void memory_region_iommu_replay(MemoryRegion *mr, 
> Notifier *n, bool is_write)
>  
>  void memory_region_unregister_iommu_notifier(MemoryRegion *mr, Notifier *n)
>  {
> +    if (mr->alias) {
> +        memory_region_unregister_iommu_notifier(mr->alias, n);
> +        return;
> +    }
>      notifier_remove(n);
>      if (mr->iommu_ops->notify_stopped &&
>          QLIST_EMPTY(&mr->iommu_notify.notifiers)) {
> -- 
> 2.7.4
> 

-- peterx



reply via email to

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