From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, linuxppc-dev@lists.ozlabs.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
Paul Mackerras <paulus@samba.org>,
David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [kernel] powerpc/powernv: Fix iommu table size calculation hook for small tables
Date: Mon, 1 May 2017 12:58:53 +1000 (AEST) [thread overview]
Message-ID: <3wGTdn0hdzz9sNK@ozlabs.org> (raw)
In-Reply-To: <20170413070527.16989-1-aik@ozlabs.ru>
On Thu, 2017-04-13 at 07:05:27 UTC, Alexey Kardashevskiy wrote:
> When the userspace requests a small TCE table (which takes less than
> the system page size) and more than 1 TCE level, the existing code
> returns a single page size which is a bug as each additional TCE level
> requires at least one page and this is what
> pnv_pci_ioda2_table_alloc_pages() does. And we end up seeing
> WARN_ON(!ret && ((*ptbl)->it_allocated_size != table_size))
> in drivers/vfio/vfio_iommu_spapr_tce.c.
>
> This replaces incorrect _ALIGN_UP() (which aligns zero up to zero) with
> max_t() to fix the bug.
>
> Besides removing WARN_ON(), there should be no other changes in
> behaviour.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/e49a6a2173346d316c0e65d054a3cd
cheers
prev parent reply other threads:[~2017-05-01 2:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-13 7:05 [PATCH kernel] powerpc/powernv: Fix iommu table size calculation hook for small tables Alexey Kardashevskiy
2017-04-28 6:19 ` Alexey Kardashevskiy
2017-05-01 2:58 ` Michael Ellerman [this message]
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=3wGTdn0hdzz9sNK@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=aik@ozlabs.ru \
--cc=david@gibson.dropbear.id.au \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).