All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org>
To: Alex Williamson
	<alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>,
	Jiang Liu <jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	James Smart <jsmart2021-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: kernel BUG at drivers/iommu/intel-iommu.c:608
Date: Sun, 7 Apr 2019 16:02:31 -0700	[thread overview]
Message-ID: <8d876549-21da-e027-0157-8737b10e26f8@acm.org> (raw)
In-Reply-To: <20190407150650.060cc508-hfcDOgR9qeA@public.gmane.org>

On 4/7/19 2:06 PM, Alex Williamson wrote:
> On Sun, 7 Apr 2019 12:10:38 -0700
> Bart Van Assche <bvanassche-HInyCGIudOg@public.gmane.org> wrote:
>> If I tell qemu to use PCI pass-through for a PCI adapter and next load the
>> lpfc driver for an lpfc adapter that has not been passed through to any VM
>> a kernel bug is hit. Do you perhaps know whether it should be possible to
>> a load kernel driver in this scenario? If so, do you know what should change
>> to avoid that this kernel bug is hit? Should the iommu code be modified or
>> should the lpfc code be modified? I'm asking you because I think that you
>> introduced the BUG() statement that was hit. See also commit ab8dfe251571
>> ("iommu/vt-d: Introduce helper functions to improve code readability"; v3.17).
> 
> Do both of these lpfc devices belong to the same IOMMU group?
> (/sys/kernel/iommu_groups/)  Thanks,

Hi Alex,

Apparently the two Emulex (lpfc) and the two QLogic ports are in the same IOMMU group:

# lspci | grep -E 'QLogic|Emulex'
01:00.0 Fibre Channel: Emulex Corporation Lancer Gen6: LPe32000 Fibre Channel Host Adapter (rev 01)
01:00.1 Fibre Channel: Emulex Corporation Lancer Gen6: LPe32000 Fibre Channel Host Adapter (rev 01)
02:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
02:00.1 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)

# ls -d /sys/kernel/iommu_groups/*/devices/0000:0[12]:00.*
/sys/kernel/iommu_groups/1/devices/0000:01:00.0
/sys/kernel/iommu_groups/1/devices/0000:01:00.1
/sys/kernel/iommu_groups/1/devices/0000:02:00.0
/sys/kernel/iommu_groups/1/devices/0000:02:00.1

Thanks,

Bart.

WARNING: multiple messages have this Message-ID (diff)
From: Bart Van Assche <bvanassche@acm.org>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: iommu@lists.linux-foundation.org, Joerg Roedel <jroedel@suse.de>,
	Jiang Liu <jiang.liu@linux.intel.com>,
	James Smart <jsmart2021@gmail.com>
Subject: Re: kernel BUG at drivers/iommu/intel-iommu.c:608
Date: Sun, 7 Apr 2019 16:02:31 -0700	[thread overview]
Message-ID: <8d876549-21da-e027-0157-8737b10e26f8@acm.org> (raw)
Message-ID: <20190407230231.g-wVmbMt1UOFrMJbHuYhOVPrun3Z0zl0s3wj0cahZMI@z> (raw)
In-Reply-To: <20190407150650.060cc508@x1.home>

On 4/7/19 2:06 PM, Alex Williamson wrote:
> On Sun, 7 Apr 2019 12:10:38 -0700
> Bart Van Assche <bvanassche@acm.org> wrote:
>> If I tell qemu to use PCI pass-through for a PCI adapter and next load the
>> lpfc driver for an lpfc adapter that has not been passed through to any VM
>> a kernel bug is hit. Do you perhaps know whether it should be possible to
>> a load kernel driver in this scenario? If so, do you know what should change
>> to avoid that this kernel bug is hit? Should the iommu code be modified or
>> should the lpfc code be modified? I'm asking you because I think that you
>> introduced the BUG() statement that was hit. See also commit ab8dfe251571
>> ("iommu/vt-d: Introduce helper functions to improve code readability"; v3.17).
> 
> Do both of these lpfc devices belong to the same IOMMU group?
> (/sys/kernel/iommu_groups/)  Thanks,

Hi Alex,

Apparently the two Emulex (lpfc) and the two QLogic ports are in the same IOMMU group:

# lspci | grep -E 'QLogic|Emulex'
01:00.0 Fibre Channel: Emulex Corporation Lancer Gen6: LPe32000 Fibre Channel Host Adapter (rev 01)
01:00.1 Fibre Channel: Emulex Corporation Lancer Gen6: LPe32000 Fibre Channel Host Adapter (rev 01)
02:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
02:00.1 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)

# ls -d /sys/kernel/iommu_groups/*/devices/0000:0[12]:00.*
/sys/kernel/iommu_groups/1/devices/0000:01:00.0
/sys/kernel/iommu_groups/1/devices/0000:01:00.1
/sys/kernel/iommu_groups/1/devices/0000:02:00.0
/sys/kernel/iommu_groups/1/devices/0000:02:00.1

Thanks,

Bart.
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  parent reply	other threads:[~2019-04-07 23:02 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-07 19:10 kernel BUG at drivers/iommu/intel-iommu.c:608 Bart Van Assche
2019-04-07 19:10 ` Bart Van Assche
     [not found] ` <a523ea10-3dab-fa2c-1ecf-5cf32077565f-HInyCGIudOg@public.gmane.org>
2019-04-07 21:06   ` Alex Williamson
2019-04-07 21:06     ` Alex Williamson
     [not found]     ` <20190407150650.060cc508-hfcDOgR9qeA@public.gmane.org>
2019-04-07 23:02       ` Bart Van Assche [this message]
2019-04-07 23:02         ` Bart Van Assche
     [not found]         ` <8d876549-21da-e027-0157-8737b10e26f8-HInyCGIudOg@public.gmane.org>
2019-04-07 23:31           ` Alex Williamson
2019-04-07 23:31             ` Alex Williamson
     [not found]             ` <20190407173132.24032810-hfcDOgR9qeA@public.gmane.org>
2019-04-08 15:13               ` Bart Van Assche
2019-04-08 15:13                 ` Bart Van Assche
     [not found]                 ` <1554736414.118779.265.camel-HInyCGIudOg@public.gmane.org>
2019-04-08 15:23                   ` Alex Williamson
2019-04-08 15:23                     ` Alex Williamson
     [not found]                     ` <20190408092345.01751472-hfcDOgR9qeA@public.gmane.org>
2019-04-08 15:30                       ` Bart Van Assche
2019-04-08 15:30                         ` Bart Van Assche
2019-04-08 15:55                       ` Christoph Hellwig
2019-04-08 15:55                         ` Christoph Hellwig
2019-04-08 17:10                       ` Robin Murphy
2019-04-08 17:10                         ` Robin Murphy
     [not found]                         ` <c5511683-9739-9c74-418b-cf2aed6b294a-5wv7dgnIgG8@public.gmane.org>
2019-04-08 18:05                           ` Alex Williamson
2019-04-08 18:05                             ` Alex Williamson

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=8d876549-21da-e027-0157-8737b10e26f8@acm.org \
    --to=bvanassche-hinycgiudog@public.gmane.org \
    --cc=alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=jiang.liu-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=jroedel-l3A5Bk7waGM@public.gmane.org \
    --cc=jsmart2021-Re5JQEeQqe8AvxtiuMwx3w@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.