iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Florian Dazinger <florian-Q0TRQrZM+Zzk1uMJSBkQmQ@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC PATCH 0/5] amd_iommu: Refactor IOMMU group and support virtual aliases
Date: Tue, 09 Oct 2012 13:33:30 -0600	[thread overview]
Message-ID: <1349811210.2759.300.camel@ul30vt.home> (raw)
In-Reply-To: <20121009205758.45c9fcc0-mGxavARqDwv/PtFMR13I2A@public.gmane.org>

On Tue, 2012-10-09 at 20:57 +0200, Florian Dazinger wrote:
> Am Tue, 09 Oct 2012 12:35:39 -0600
> schrieb Alex Williamson <alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>:
> 
> > On Tue, 2012-10-09 at 20:27 +0200, Florian Dazinger wrote:
> > > Am Mon, 08 Oct 2012 22:49:28 -0600
> > > schrieb Alex Williamson <alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>:
> > > 
> > > > This series is meant to refactor IOMMU group support in amd_iommu
> > > > to properly support virtual aliases.  If multiple devices alias to
> > > > the same virtual alias, they should be grouped together.  This code
> > > > also verifies whether the alias should be the root of the group vs
> > > > devices above the alias.
> > > > 
> > > > This seems to do the right thing on my system, but that's not saying
> > > > a lot since it doesn't do anything interesting with aliases.  I'd
> > > > appreciate if Joerg and Florian could test this on their systems.
> > > > Thanks,
> > > > 
> > > > Alex
> > > > 
> > > > ---
> > > > 
> > > > Alex Williamson (5):
> > > >       amd_iommu: Properly account for virtual aliases in IOMMU groups
> > > >       amd_iommu: Split IOMMU group allocation and attach
> > > >       amd_iommu: Split upstream bus device lookup
> > > >       amd_iommu: Split IOMMU Group topology walk
> > > >       amd_iommu: Split IOMMU group initialization
> > > > 
> > > > 
> > > >  drivers/iommu/amd_iommu.c       |  184 ++++++++++++++++++++++++++++++---------
> > > >  drivers/iommu/amd_iommu_types.h |    1 
> > > >  2 files changed, 142 insertions(+), 43 deletions(-)
> > > > 
> > > 
> > > patch #5 does not apply cleanly on top of 3.6, I had to edit
> > > amd_iommu_types.h manually (easy enough), apart from that, it is
> > > working fine!
> > 
> > Thanks Florian.  Would you mind also reporting
> > 'find /sys/kernel/iommu_groups' for both stock 3.6 and with this series
> > applied?  I think we want to find that devices 07:00.0 and 08:04.0 are
> > grouped together and I'd like to verify whether that actually works.
> > Thanks,
> > 
> > Alex
> 
> shure... there does not seem to be much difference?
> 
> with stock 3.6:
> /sys/kernel/iommu_groups/19                                                                                                                                                                                                                
> /sys/kernel/iommu_groups/19/devices                                                                                                                                                                                                        
> /sys/kernel/iommu_groups/19/devices/0000:07:00.0                                                                                                                                                                                           
> /sys/kernel/iommu_groups/20                                                                                                                                                                                                                
> /sys/kernel/iommu_groups/20/devices                                                                                                                                                                                                        
> /sys/kernel/iommu_groups/20/devices/0000:08:04.0 
> 
> 
> 3.6 + your patch-series:
> 3.6 with your patch-series:
> /sys/kernel/iommu_groups/19
> /sys/kernel/iommu_groups/19/devices
> /sys/kernel/iommu_groups/19/devices/0000:07:00.0
> /sys/kernel/iommu_groups/20
> /sys/kernel/iommu_groups/20/devices
> /sys/kernel/iommu_groups/20/devices/0000:08:04.0

Ok, I was thinking we'd see these last two devices together, but on
second thought this is exactly what the alias is telling us, ie. it can
distinguish a DMA from a device on bus 08 from a DMA from 07:00.0
itself, but it cannot distinguish between devices on bus 08 (hopefully
that's actually true).  If you somehow had a device 08:05.0 you would
see a new group 21 with just that device on stock 3.6 whereas with the
patches you should see 08:05.0 added to group 20.  If we plugged this
same card into an Intel VT-d system, the grouping would be done as I was
thinking with both 07:00.0 and 08:04.0 being in group 19.  Thanks again
for your testing,

Alex

  parent reply	other threads:[~2012-10-09 19:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-09  4:49 [RFC PATCH 0/5] amd_iommu: Refactor IOMMU group and support virtual aliases Alex Williamson
     [not found] ` <20121009044057.16302.44577.stgit-xdHQ/5r00wBBDLzU/O5InQ@public.gmane.org>
2012-10-09  4:49   ` [RFC PATCH 1/5] amd_iommu: Split IOMMU group initialization Alex Williamson
     [not found]     ` <20121009044935.16302.93049.stgit-xdHQ/5r00wBBDLzU/O5InQ@public.gmane.org>
2012-10-09 14:33       ` Shuah Khan
     [not found]         ` <CAKocOOOTp7BMbqFyZx=rH-2uOC51C17JTjP77w7=7KB8jKh=hA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-09 14:41           ` Alex Williamson
2012-10-09  4:49   ` [RFC PATCH 2/5] amd_iommu: Split IOMMU Group topology walk Alex Williamson
2012-10-09  4:49   ` [RFC PATCH 3/5] amd_iommu: Split upstream bus device lookup Alex Williamson
2012-10-09  4:49   ` [RFC PATCH 4/5] amd_iommu: Split IOMMU group allocation and attach Alex Williamson
2012-10-09  4:50   ` [RFC PATCH 5/5] amd_iommu: Properly account for virtual aliases in IOMMU groups Alex Williamson
2012-10-09 18:27   ` [RFC PATCH 0/5] amd_iommu: Refactor IOMMU group and support virtual aliases Florian Dazinger
     [not found]     ` <20121009202738.7e047e64-mGxavARqDwv/PtFMR13I2A@public.gmane.org>
2012-10-09 18:35       ` Alex Williamson
     [not found]         ` <1349807739.2759.292.camel-85EaTFmN5p//9pzu0YdTqQ@public.gmane.org>
2012-10-09 18:57           ` Florian Dazinger
     [not found]             ` <20121009205758.45c9fcc0-mGxavARqDwv/PtFMR13I2A@public.gmane.org>
2012-10-09 19:33               ` Alex Williamson [this message]
2012-10-18 21:29   ` Alex Williamson
     [not found]     ` <1350595750.2112.438.camel-xdHQ/5r00wBBDLzU/O5InQ@public.gmane.org>
2012-10-24 15:28       ` 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=1349811210.2759.300.camel@ul30vt.home \
    --to=alex.williamson-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=florian-Q0TRQrZM+Zzk1uMJSBkQmQ@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).