Hi Geert,

On Tue, Mar 19, 2019 at 10:34 PM Geert Uytterhoeven
<ge...@linux-m68k.org> wrote:
>
> Hi Magnus,
>
> On Tue, Mar 19, 2019 at 2:24 PM Magnus Damm <magnus.d...@gmail.com> wrote:
> > From: Magnus Damm <damm+rene...@opensource.se>
> >
> > Add a memory bank location check to the whitelist handling.
> >
> > Signed-off-by: Magnus Damm <damm+rene...@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

Reply via email to