All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <shuahkh@osg.samsung.com>
To: joro@8bytes.org, alex.williamson@redhat.com
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu: fix trace_map() to report original iova and original size
Date: Mon, 19 Jan 2015 09:45:09 -0700	[thread overview]
Message-ID: <54BD3495.7070501@osg.samsung.com> (raw)
In-Reply-To: <1421375383-8930-1-git-send-email-shuahkh@osg.samsung.com>

On 01/15/2015 07:29 PM, Shuah Khan wrote:
> iommu_map() calls trace_map() with iova and size. trace_map()
> should report original iova and original size as opposed to
> iova and size after they get changed during mapping. size is
> always zero at the end of mapping which is useless to report
> and iova as it gets incremented, it is not as useful as the
> original iova. Change iommu_map() to call trace_map() to
> report original iova and original size.
> 
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> Reported-by: Alex Williamson <alex.williamson@redhat.com>
> ---
>  drivers/iommu/iommu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index f7718d7..fbf8827 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -1084,7 +1084,7 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova,
>  	if (ret)
>  		iommu_unmap(domain, orig_iova, orig_size - size);
>  	else
> -		trace_map(iova, paddr, size);
> +		trace_map(orig_iova, paddr, orig_size);
>  
>  	return ret;
>  }
> 


Joerg,

Just makeing sure you saw this as well. I saw your responses on the
trace_unmap() patches that you pulled them in.

thanks,
-- Shuah

-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978

WARNING: multiple messages have this Message-ID (diff)
From: Shuah Khan <shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
To: joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org,
	alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] iommu: fix trace_map() to report original iova and original size
Date: Mon, 19 Jan 2015 09:45:09 -0700	[thread overview]
Message-ID: <54BD3495.7070501@osg.samsung.com> (raw)
In-Reply-To: <1421375383-8930-1-git-send-email-shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>

On 01/15/2015 07:29 PM, Shuah Khan wrote:
> iommu_map() calls trace_map() with iova and size. trace_map()
> should report original iova and original size as opposed to
> iova and size after they get changed during mapping. size is
> always zero at the end of mapping which is useless to report
> and iova as it gets incremented, it is not as useful as the
> original iova. Change iommu_map() to call trace_map() to
> report original iova and original size.
> 
> Signed-off-by: Shuah Khan <shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
> Reported-by: Alex Williamson <alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/iommu/iommu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index f7718d7..fbf8827 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -1084,7 +1084,7 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova,
>  	if (ret)
>  		iommu_unmap(domain, orig_iova, orig_size - size);
>  	else
> -		trace_map(iova, paddr, size);
> +		trace_map(orig_iova, paddr, orig_size);
>  
>  	return ret;
>  }
> 


Joerg,

Just makeing sure you saw this as well. I saw your responses on the
trace_unmap() patches that you pulled them in.

thanks,
-- Shuah

-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org | (970) 217-8978

  reply	other threads:[~2015-01-19 16:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16  2:29 [PATCH] iommu: fix trace_map() to report original iova and original size Shuah Khan
2015-01-19 16:45 ` Shuah Khan [this message]
2015-01-19 16:45   ` Shuah Khan
2015-01-26 12:16 ` Joerg Roedel
2015-01-26 12:16   ` Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54BD3495.7070501@osg.samsung.com \
    --to=shuahkh@osg.samsung.com \
    --cc=alex.williamson@redhat.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.