[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b830dc87-4953-835f-8479-fb57e55a035c@siemens.com>
Date: Tue, 27 Feb 2018 08:25:45 +0100
From: Jan Kiszka <jan.kiszka@...mens.com>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H . Peter Anvin" <hpa@...or.com>,
Bjorn Helgaas <bhelgaas@...gle.com>, x86@...nel.org,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
jailhouse-dev@...glegroups.com, linux-pci@...r.kernel.org,
virtualization@...ts.linux-foundation.org,
Benedikt Spranger <b.spranger@...utronix.de>
Subject: Re: [PATCH 2/6] pci: Scan all functions when probing while running
over Jailhouse
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@...mens.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@...utronix.de>
>> Signed-off-by: Jan Kiszka <jan.kiszka@...mens.com>
>
> With subject change to:
>
> PCI: Scan all functions when running over Jailhouse
>
> Acked-by: Bjorn Helgaas <bhelgaas@...gle.com>
>
Thanks, all suggestions picked up for next round.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
Powered by blists - more mailing lists