linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: Wan Zongshun <vincent.wan@amd.com>
Cc: iommu@lists.linux-foundation.org,
	Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>,
	Borislav Petkov <bp@suse.de>, Ray Huang <ray.huang@amd.com>,
	ken.xue@amd.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/6] iommu/amd: Manage iommu_group for non-pci devices
Date: Thu, 7 Jan 2016 13:06:59 +0100	[thread overview]
Message-ID: <20160107120659.GC19149@8bytes.org> (raw)
In-Reply-To: <1451988444-4694-7-git-send-email-vincent.wan@amd.com>

On Tue, Jan 05, 2016 at 05:07:24AM -0500, Wan Zongshun wrote:
> +static struct iommu_group *amd_iommu_device_group(struct device *dev)
> +{
> +	if (dev_is_pci(dev))
> +		return pci_device_group(dev);
> +
> +	return acpihid_device_group(dev);
> +}
> +
>  /*****************************************************************************
>   *
>   * The next functions belong to the dma_ops mapping/unmapping code.
> @@ -3202,7 +3233,7 @@ static const struct iommu_ops amd_iommu_ops = {
>  	.iova_to_phys = amd_iommu_iova_to_phys,
>  	.add_device = amd_iommu_add_device,
>  	.remove_device = amd_iommu_remove_device,
> -	.device_group = pci_device_group,
> +	.device_group = amd_iommu_device_group,

Does this work? Which bus do the ACPIHID devices belong to (what does
dev->bus point to)? If it is not &pci_bus_type, then the iommu core code
will not create an iommu group for the devices.


	Joerg


  reply	other threads:[~2016-01-07 12:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05 10:07 [PATCH 0/6] iommu/amd: enable ACPI hardware ID device support Wan Zongshun
2016-01-05 10:07 ` [PATCH 1/6] iommu/amd: Modify ivhd_header structure to support type 11h and 40h Wan Zongshun
2016-01-05 10:07 ` [PATCH 2/6] iommu/amd: Use the most comprehensive IVHD type that the driver can support Wan Zongshun
2016-01-05 10:07 ` [PATCH 3/6] iommu/amd: Add new map for storing IVHD dev entry type HID Wan Zongshun
2016-01-05 10:07 ` [PATCH 4/6] iommu/amd: Introduces ivrs_acpihid kernel parameter Wan Zongshun
2016-01-05 10:07 ` [PATCH 5/6] iommu/amd: Add support for non-pci devices Wan Zongshun
2016-01-07 12:04   ` Joerg Roedel
2016-01-08  3:15     ` Wan ZongShun
2016-01-08 12:18       ` Joerg Roedel
2016-01-08 14:52         ` Wan Zongshun
2016-01-08 17:01           ` Joerg Roedel
2016-01-09  9:47             ` Wan Zongshun
2016-01-20 12:00               ` Joerg Roedel
2016-01-05 10:07 ` [PATCH 6/6] iommu/amd: Manage iommu_group " Wan Zongshun
2016-01-07 12:06   ` Joerg Roedel [this message]
2016-01-08  1:44     ` Wan ZongShun
2016-01-05 15:40 ` [PATCH 0/6] iommu/amd: enable ACPI hardware ID device support Suravee Suthikulpanit

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=20160107120659.GC19149@8bytes.org \
    --to=joro@8bytes.org \
    --cc=Suravee.Suthikulpanit@amd.com \
    --cc=bp@suse.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=ken.xue@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ray.huang@amd.com \
    --cc=vincent.wan@amd.com \
    /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).