qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1] pci: Don't register a specialized 'config_wr


From: Marcel Apfelbaum
Subject: Re: [Qemu-devel] [PATCH v1] pci: Don't register a specialized 'config_write' if default behavior is intended
Date: Sun, 21 Jun 2015 11:20:18 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 06/17/2015 10:17 PM, Shmulik Ladkani wrote:
Hi,

On Wed, 17 Jun 2015 12:37:18 +0300, address@hidden wrote:
BTW, did you notice a bug here?  If yes, can you elaborate?

No, not a direct bug.
We noticed this while working on related code areas.

There's some history behind this.

In 95d6580 'msi: Invoke msi/msix_write_config from PCI core', the calls
to msi[x]_write_config have been added into pci_default_write_config,
and many specialized 'config_write' methods have been eliminated.

However there was a bug in 95d6580 - the values written to msi/msix
were always 0.
This was recently fixed in d7efb7e
      'pci: avoid losing config updates to MSI/MSIX cap regs'
Got it.


I assume that device authors were either (1) unware of the
generalization, thus kept invoking msi[x]_write_config explicitly, or
(2) trying to overcome the "lost writes".

Anyway, I'm no PCI expert here, but I assume the side-effect invoking
msi[x]_write_config twice (explicitly from the specialized config_write,
then implicitly from pci_default_write_config) isn't desired.
Of course.


Meaning, the suggested patch follows the spirit of 95d6580.
Let me know if my analysis is flawed.
Thank you for the patch, you are completely right.
My 'Reviewed-by' tag is there, I think Michael, the PCI
maintainer, will take it shortly.

Thanks,
Marcel


Regards,
Shmulik





reply via email to

[Prev in Thread] Current Thread [Next in Thread]