Re: [PATCH v2 1/6] pci: implement power state

2021-11-15 Thread Gerd Hoffmann
Hi, > > new_addr = pci_bar_address(d, i, r->type, r->size); > > +if (!d->has_power) { > > +new_addr = PCI_BAR_UNMAPPED; > > +} > > > > /* This bar isn't changed */ > > if (new_addr == r->addr) > > I am a bit confused about why this is nec

Re: [PATCH v2 1/6] pci: implement power state

2021-11-15 Thread Michael S. Tsirkin
On Thu, Nov 11, 2021 at 02:08:54PM +0100, Gerd Hoffmann wrote: > This allows to power off pci devices. In "off" state the devices will > not be visible. No pci config space access, no pci bar access, no dma. > > Default state is "on", so this patch (alone) should not change behavior. > > Use ca

Re: [PATCH v2 1/6] pci: implement power state

2021-11-15 Thread Michael S. Tsirkin
On Thu, Nov 11, 2021 at 02:08:54PM +0100, Gerd Hoffmann wrote: > This allows to power off pci devices. In "off" state the devices will > not be visible. No pci config space access, no pci bar access, no dma. > > Default state is "on", so this patch (alone) should not change behavior. > > Use ca

[PATCH v2 1/6] pci: implement power state

2021-11-11 Thread Gerd Hoffmann
This allows to power off pci devices. In "off" state the devices will not be visible. No pci config space access, no pci bar access, no dma. Default state is "on", so this patch (alone) should not change behavior. Use case: Allows hotplug controllers implement slot power. Hotplug controllers