|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH v4] hvmloader: Enable MMIO and I/O decode, after all resource allocation
On 15.04.2020 11:32, Shamsundara Havanur, Harsha wrote:
> On Wed, 2020-04-15 at 09:13 +0200, Jan Beulich wrote:
>> On 14.04.2020 19:15, Harsha Shamsundara Havanur wrote:
>>> @@ -526,10 +538,17 @@ void pci_setup(void)
>>> * has IO enabled, even if there is no I/O BAR on that
>>> * particular device.
>>> */
>>> - cmd = pci_readw(vga_devfn, PCI_COMMAND);
>>> - cmd |= PCI_COMMAND_IO;
>>> - pci_writew(vga_devfn, PCI_COMMAND, cmd);
>>> + pci_devfn_decode_type[vga_devfn] |= PCI_COMMAND_IO;
>>> }
>>> +
>>> + /* Enable bus master, memory and I/O decode. */
>>> + for ( devfn = 0; devfn < 256; devfn++ )
>>> + if ( pci_devfn_decode_type[devfn] )
>>> + {
>>> + cmd = pci_readw(devfn, PCI_COMMAND);
>>> + cmd |= (PCI_COMMAND_MASTER |
>>> pci_devfn_decode_type[devfn]);
>>> + pci_writew(devfn, PCI_COMMAND, cmd);
>>> + }
>>
>> This still regresses the setting of MASTER afaict: You only set
>> that bit now if either IO or MEMORY would also get set. But be
>> sure to honor the original code not doing the write when vendor/
>> device IDs are all ones.
>>
> If condition ensures that for devices with vendor/device IDs all ones
> are skipped as it would evaluate to false. But this would also skip
> enabling Bus master for devices whose vendor/device IDs are not all
> ones but IO or memory BARs are not programmed for them. Is there a
> possibility of this happening?
I think so, yes - programming of DMA requests can in principle also
be done via custom config space fields.
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |