mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Gary R Hook <gary.hook@amd.com>
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu: Limit the IOVA page range to the specified addresses
Date: Thu, 26 Oct 2017 10:32:01 +0200	[thread overview]
Message-ID: <20171026103201.6ac9f21c@t450s.home> (raw)
In-Reply-To: <150827532101.76237.2380796046683480798.stgit@sosxen2.amd.com>

On Tue, 17 Oct 2017 16:22:01 -0500
Gary R Hook <gary.hook@amd.com> wrote:

> From: amd <amd@sosxen2.amd.com>
> 
> The extent of pages specified when applying a reserved region should
> include up to the last page of the range, but not the page following
> the range.
> 
> Signed-off-by: Gary R Hook <gary.hook@amd.com>
> ---
>  drivers/iommu/amd_iommu.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
> index 27eb0d6fcdc2..bb3ef33e3784 100644
> --- a/drivers/iommu/amd_iommu.c
> +++ b/drivers/iommu/amd_iommu.c
> @@ -3271,7 +3271,7 @@ static void amd_iommu_apply_resv_region(struct device *dev,
>  	unsigned long start, end;
>  
>  	start = IOVA_PFN(region->start);
> -	end   = IOVA_PFN(region->start + region->length);
> +	end   = IOVA_PFN(region->start + region->length - 1);
>  
>  	WARN_ON_ONCE(reserve_iova(&dma_dom->iovad, start, end) == NULL);
>  }

This looks like a fix, should we include:

Fixes: 8d54d6c8b8f3 ('iommu/amd: Implement apply_dm_region call-back')


Thanks,
Alex

  reply	other threads:[~2017-10-26  8:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17 21:22 Gary R Hook
2017-10-26  8:32 ` Alex Williamson [this message]
2017-10-27 15:20   ` Gary R Hook

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=20171026103201.6ac9f21c@t450s.home \
    --to=alex.williamson@redhat.com \
    --cc=gary.hook@amd.com \
    --cc=iommu@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®