lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 22 Jun 2009 16:55:37 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	Matthew Wilcox <matthew@....cx>
CC:	Alex Chiang <achiang@...com>, jbarnes@...tuousgeek.org,
	linux-arch@...r.kernel.org, Kyle McMartin <kyle@...artin.ca>,
	Tony Luck <tony.luck@...el.com>,
	Russell King <linux@....linux.org.uk>,
	Arnd Bergmann <arnd@...db.de>,
	Yoshinori Sato <ysato@...rs.sourceforge.jp>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Jeff Dike <jdike@...toit.com>, linux-kernel@...r.kernel.org,
	Ralf Baechle <ralf@...ux-mips.org>,
	David Howells <dhowells@...hat.com>,
	Paul Mundt <lethal@...ux-sh.org>,
	Ivan Kokshaysky <ink@...assic.park.msu.ru>,
	Ingo Molnar <mingo@...hat.com>,
	"David S. Miller" <davem@...emloft.net>,
	Avi Kivity <avi@...hat.com>
Subject: Re: [PATCH] PCI: remove pcibios_scan_all_fns()

On 06/22/09 11:30, Matthew Wilcox wrote:
> On Mon, Jun 22, 2009 at 11:20:24AM -0700, Jeremy Fitzhardinge wrote:
>   
>>> I'd like to know what the KVM / Xen / ... people think about this.
>>> I don't know if they rely on function 5 being able to show up out of
>>> the blue.
>>>       
>> We want to be able to export specific functions to a particular domain,
>> so it might see a PCI device with only function 5.
>>
>> It looks like we lose that ability with this patch, is that right?
>>     
>
> That would be correct.  I'm guessing your out-of-tree code sets
> pcibios_scan_all_fns()?
>   

Yes.

> Now, there are various options.  One is that you could remap config
> space accesses -- domain:bus:dev.fn in the guest don't have to match
> domain:bus:dev.fn in the host.  That's a certain amount of overhead in
> every config space access, but it doesn't have to be a large one.
>   

I think the problem with that is that certain devices have fixed
functions at fixed function numbers, so the drivers just expect the
function to be there and nowhere else (AFAIK there's no way to do
discovery on functions).  Now perhaps you'd never export just some
functions to such devices, but that was the answer when I proposed doing
this.

And if we did want to do this, would it be acceptible to put config
space remapping in?  I presume that's something that would have to be in
the generic pci library?

> Another would be that you could create dummy devices in the guest at
> function 0, and then the guest would scan all the functions.  A little
> ugly, perhaps.
>   

I wonder if that would upset drivers.  Assuming they can cope with just
being given some functions, how could one generically make a function
look present-but-dummy enough to not upset the driver?

> A third would be for guests to not do this scanning at all.  You could
> present the devices through something like the openfirmware tree, and
> create them insteaqd of scanning for them.  If you care about startup
> time, this is probably the way to go.
>   

I don't think startup time is an overriding concern.

    J
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ