From: Magnus Damm <magnus.damm@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH/RFC V2] iommu/ipmmu-vmsa: Disable IPMMU when address expansion is not needed
Date: Tue, 19 Mar 2019 22:47:38 +0900 [thread overview]
Message-ID: <CANqRtoT6pvnMi9sY8Wat1AArpGwc_uEthA8mjNQ9zGvm823JPg@mail.gmail.com> (raw)
In-Reply-To: <CAMuHMdWKVc34NGATrJggQgutRbzKhh82S4=6tp6ZOcMz0w5ASA@mail.gmail.com>
Hi Geert,
On Tue, Mar 19, 2019 at 10:34 PM Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
>
> Hi Magnus,
>
> On Tue, Mar 19, 2019 at 2:24 PM Magnus Damm <magnus.damm@gmail.com> wrote:
> > From: Magnus Damm <damm+renesas@opensource.se>
> >
> > Add a memory bank location check to the whitelist handling.
> >
> > Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
>
> Thanks for your patch!
>
> > --- 0001/drivers/iommu/ipmmu-vmsa.c
> > +++ work/drivers/iommu/ipmmu-vmsa.c 2019-03-19 21:04:43.000000000 +0900
> > @@ -17,6 +17,7 @@
> > #include <linux/io.h>
> > #include <linux/io-pgtable.h>
> > #include <linux/iommu.h>
> > +#include <linux/memblock.h>
> > #include <linux/of.h>
> > #include <linux/of_device.h>
> > #include <linux/of_iommu.h>
> > @@ -797,6 +798,12 @@ static bool ipmmu_slave_whitelist(struct
> > if (!soc_device_match(soc_rcar_gen3_whitelist))
> > return false;
> >
> > + /* In case all system memory fits within 32 bits of physical space
> > + * then assume the IPMMU will not be needed for address expansion.
> > + */
> > + if (memblock_end_of_DRAM() <= SZ_4G)
> > + return false;
>
> The IPMMU may still be useful for IO virtualization, with KVM+VFIO.
You're right.
> Perhaps the check can be enhanced to keep it enabled when the CPU cores
> are running in HYP mode?
That might indeed be useful.
Next quarter perhaps you and I can discuss a bit about IO
virtualization with KVM?
Cheers,
/ magnus
prev parent reply other threads:[~2019-03-19 13:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-19 13:25 [PATCH/RFC V2] iommu/ipmmu-vmsa: Disable IPMMU when address expansion is not needed Magnus Damm
2019-03-19 13:34 ` Geert Uytterhoeven
2019-03-19 13:47 ` Magnus Damm [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=CANqRtoT6pvnMi9sY8Wat1AArpGwc_uEthA8mjNQ9zGvm823JPg@mail.gmail.com \
--to=magnus.damm@gmail.com \
--cc=geert@linux-m68k.org \
--cc=linux-renesas-soc@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;
as well as URLs for NNTP newsgroup(s).