[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [PATCH 09/10] pci: set PCI multi-function bit appro
From: |
Isaku Yamahata |
Subject: |
Re: [Qemu-devel] Re: [PATCH 09/10] pci: set PCI multi-function bit appropriately. |
Date: |
Fri, 18 Jun 2010 22:38:20 +0900 |
User-agent: |
Mutt/1.5.19 (2009-01-05) |
On Fri, Jun 18, 2010 at 03:44:04PM +0300, Michael S. Tsirkin wrote:
> > > If I understand correctly what this does, it goes over
> > > other functions of the same device, and sets the MULTI_FUNCTION bit
> > > for them if there's more than one function.
> > > Instead, why don't we just set PCI_HEADER_TYPE_MULTI_FUNCTION
> > > in relevant devices?
> >
> > pci address, devfn ,is exported to users as addr property,
> > so users can populate pci function(PCIDevice in qemu)
> > at arbitrary devfn.
> > It means each function(PCIDevice) don't know whether pci device
> > (PCIDevice[8]) is multi function or not.
> > So I chose to handle it in pci generic layer.
> >
> > It can be argued that it's user operation fault and that
> > the missing part is validation checks to catch such user errors.
>
> Exactly. Another part that is missing is a way to hotplug
> a multifunction device.
Yes, multi function hot plug is also on my wish list.
> OTOH I think that hotplug of separate functions has no chance to work,
> so users are better off getting an error.
>
> > But I prefer more flexible and more user friendly way.
>
> I think that most users would only add many functions
> to a device as a result of an error.
>
> If we really want the ability to put unrelated devices
> as functions in a single one, let's just add
> a 'multifunction' qdev property, and validate that
> it is set appropriately.
I think "unrelated" is policy. There is no obvious way to determine
which functions can be in a same device.
For example, popular chipset contains isa bridge, ide controller,
usb controller, sound and modem in a single device as functions.
It's up to hardware designer policy which functions are grouped into
a device.
So qemu should be able to populate any function in a device,
and leave such policy check to higher level tool like libvirt/virt-manager.
--
yamahata
- [Qemu-devel] Re: [PATCH 03/10] pci: fix pci_bus_reset() with 64bit BAR and several clean ups., (continued)
- [Qemu-devel] [PATCH 01/10] pci_bridge: split out pci bridge code into pci_bridge.c from pci.c, Isaku Yamahata, 2010/06/17
- [Qemu-devel] [PATCH 02/10] qdev: export qdev_reset() for later use., Isaku Yamahata, 2010/06/17
- [Qemu-devel] [PATCH 06/10] pci: eliminate work around in pci_device_reset()., Isaku Yamahata, 2010/06/17
- [Qemu-devel] [PATCH 09/10] pci: set PCI multi-function bit appropriately., Isaku Yamahata, 2010/06/17
- [Qemu-devel] Re: [PATCH 09/10] pci: set PCI multi-function bit appropriately., Michael S. Tsirkin, 2010/06/17
- [Qemu-devel] Re: [PATCH 09/10] pci: set PCI multi-function bit appropriately., Isaku Yamahata, 2010/06/17
- [Qemu-devel] Re: [PATCH 09/10] pci: set PCI multi-function bit appropriately., Michael S. Tsirkin, 2010/06/18
- Re: [Qemu-devel] Re: [PATCH 09/10] pci: set PCI multi-function bit appropriately.,
Isaku Yamahata <=
- Re: [Qemu-devel] Re: [PATCH 09/10] pci: set PCI multi-function bit appropriately., Michael S. Tsirkin, 2010/06/18
- Re: [Qemu-devel] Re: [PATCH 09/10] pci: set PCI multi-function bit appropriately., Jamie Lokier, 2010/06/18
- Re: [Qemu-devel] Re: [PATCH 09/10] pci: set PCI multi-function bit appropriately., Michael S. Tsirkin, 2010/06/20
[Qemu-devel] [PATCH 10/10] pci: don't overwrite multi functio bit in pci header type., Isaku Yamahata, 2010/06/17
[Qemu-devel] Re: [PATCH 00/10] pci: pci to pci bridge clean up and enhancement, Michael S. Tsirkin, 2010/06/17