From: Jan Kiszka <jan.kiszka@siemens.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
Bjorn Helgaas <bhelgaas@google.com>,
x86@kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
jailhouse-dev@googlegroups.com, linux-pci@vger.kernel.org,
virtualization@lists.linux-foundation.org,
Benedikt Spranger <b.spranger@linutronix.de>
Subject: Re: [PATCH 2/6] pci: Scan all functions when probing while running over Jailhouse
Date: Tue, 27 Feb 2018 08:25:45 +0100 [thread overview]
Message-ID: <b830dc87-4953-835f-8479-fb57e55a035c@siemens.com> (raw)
In-Reply-To: <20180222205753.GE16519@bhelgaas-glaptop.roam.corp.google.com>
On 2018-02-22 21:57, Bjorn Helgaas wrote:
> On Mon, Jan 22, 2018 at 07:12:46AM +0100, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> PCI and PCIBIOS probing only scans devices at function number 0/8/16/...
>> Subdevices (e.g. multiqueue) have function numbers which are not a
>> multiple of 8.
>
> Suggested text:
>
> Per PCIe r4.0, sec 7.5.1.1.9, multi-function devices are required to
> have a function 0. Therefore, Linux scans for devices at function 0
> (devfn 0/8/16/...) and only scans for other functions if function 0
> has its Multi-Function Device bit set or ARI or SR-IOV indicate
> there are more functions.
>
> The Jailhouse hypervisor may pass individual functions of a
> multi-function device to a guest without passing function 0, which
> means a Linux guest won't find them.
>
> Change Linux PCI probing so it scans all function numbers when
> running as a guest over Jailhouse.
>
> This is technically prohibited by the spec, so it is possible that
> PCI devices without the Multi-Function Device bit set may have
> unexpected behavior in response to this probe.
>
>> The simple hypervisor Jailhouse passes subdevices directly w/o providing
>> a virtual PCI topology like KVM. As a consequence a PCI passthrough from
>> Jailhouse to a guest will not be detected by Linux.
>>
>> Based on patch by Benedikt Spranger, adding Jailhouse probing to avoid
>> changing the behavior in the absence of the hypervisor.
>>
>> CC: Benedikt Spranger <b.spranger@linutronix.de>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>
> With subject change to:
>
> PCI: Scan all functions when running over Jailhouse
>
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
>
Thanks, all suggestions picked up for next round.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2018-02-27 7:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-22 6:12 [PATCH 0/6] jailhouse: Enhance secondary Jailhouse guest support /wrt PCI Jan Kiszka
2018-01-22 6:12 ` [PATCH 1/6] jailhouse: Provide detection for non-x86 systems Jan Kiszka
2018-01-22 6:12 ` [PATCH 2/6] pci: Scan all functions when probing while running over Jailhouse Jan Kiszka
2018-02-22 20:57 ` Bjorn Helgaas
2018-02-27 7:25 ` Jan Kiszka [this message]
2018-02-23 13:23 ` Andy Shevchenko
2018-02-27 7:22 ` Jan Kiszka
2018-02-27 15:48 ` Andy Shevchenko
2018-01-22 6:12 ` [PATCH 3/6] x86/jailhouse: Enable PCI mmconfig access in inmates Jan Kiszka
2018-01-22 6:12 ` [PATCH 4/6] x86: Consolidate PCI_MMCONFIG configs Jan Kiszka
2018-01-28 17:26 ` Andy Shevchenko
2018-02-27 7:19 ` Jan Kiszka
2018-02-27 15:47 ` Andy Shevchenko
2018-01-22 6:12 ` [PATCH 5/6] x86/jailhouse: Allow to use PCI_MMCONFIG without ACPI Jan Kiszka
2018-01-22 6:12 ` [PATCH 6/6] MAINTAINERS: Add entry for Jailhouse Jan Kiszka
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=b830dc87-4953-835f-8479-fb57e55a035c@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=b.spranger@linutronix.de \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=hpa@zytor.com \
--cc=jailhouse-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=virtualization@lists.linux-foundation.org \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®