From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>, xen-devel@lists.xenproject.org
Cc: Jan Beulich <jbeulich@suse.com>
Subject: Re: [PATCH] pci: treat class 0 devices as endpoints
Date: Tue, 8 May 2018 11:08:24 +0100 [thread overview]
Message-ID: <3dbdbd1b-c8d7-3638-6228-bfe6d6ea2e4e@citrix.com> (raw)
In-Reply-To: <20180508093301.7311-1-roger.pau@citrix.com>
On 08/05/18 10:33, Roger Pau Monne wrote:
> Class 0 devices are legacy pre PCI 2.0 devices that didn't have a
> class code. Treat them as endpoints, so that they can be handled by
> the IOMMU and properly passed-through to the hardware domain.
>
> Such device has been seen on a Super Micro server, lspci -vv reports:
>
> 00:13.0 Non-VGA unclassified device: Intel Corporation Device a135 (rev 31)
> Subsystem: Super Micro Computer Inc Device 0931
> Flags: bus master, fast devsel, latency 0, IRQ 11
> Memory at df222000 (64-bit, non-prefetchable) [size=4K]
> Capabilities: [80] Power Management version 3
>
> Arguably this is not a legacy device (since this is a new server), but
> in any case Xen needs to deal with it.
>
> Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
FWIW, An updated lspci reports:
00:13.0 Non-VGA unclassified device: Intel Corporation Sunrise Point-H Integrated Sensor Hub (rev 31)
Subsystem: Super Micro Computer Inc Device 0931
~Andrew
> ---
> Cc: Jan Beulich <jbeulich@suse.com>
> ---
> xen/drivers/passthrough/pci.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
> index 1db69d5b99..c4890a4295 100644
> --- a/xen/drivers/passthrough/pci.c
> +++ b/xen/drivers/passthrough/pci.c
> @@ -927,10 +927,11 @@ enum pdev_type pdev_type(u16 seg, u8 bus, u8 devfn)
> case PCI_CLASS_BRIDGE_HOST:
> return DEV_TYPE_PCI_HOST_BRIDGE;
>
> - case 0x0000: case 0xffff:
> + case 0xffff:
> return DEV_TYPE_PCI_UNKNOWN;
> }
>
> + /* NB: treat legacy pre PCI 2.0 devices (class_device == 0) as endpoints. */
> return pos ? DEV_TYPE_PCIe_ENDPOINT : DEV_TYPE_PCI;
> }
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-05-08 10:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-08 9:33 [PATCH] pci: treat class 0 devices as endpoints Roger Pau Monne
2018-05-08 10:08 ` Andrew Cooper [this message]
2018-05-14 12:46 ` Jan Beulich
2018-05-14 14:01 ` Roger Pau Monné
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=3dbdbd1b-c8d7-3638-6228-bfe6d6ea2e4e@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.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).