qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 2/7] libqos: add iteration support to qpci_find_capability


From: Thomas Huth
Subject: Re: [PATCH v2 2/7] libqos: add iteration support to qpci_find_capability()
Date: Wed, 16 Oct 2019 14:12:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

On 11/10/2019 10.56, Stefan Hajnoczi wrote:
> VIRTIO 1.0 PCI devices have multiple PCI_CAP_ID_VNDR capabilities so we
> need a way to iterate over them.  Extend qpci_find_capability() to take
> the last address.
> 
> Signed-off-by: Stefan Hajnoczi <address@hidden>
> ---
>  tests/libqos/pci.h |  2 +-
>  tests/libqos/pci.c | 18 ++++++++++++------
>  2 files changed, 13 insertions(+), 7 deletions(-)
> 
> diff --git a/tests/libqos/pci.h b/tests/libqos/pci.h
> index a5389a5845..590c175190 100644
> --- a/tests/libqos/pci.h
> +++ b/tests/libqos/pci.h
> @@ -86,7 +86,7 @@ bool qpci_has_buggy_msi(QPCIDevice *dev);
>  bool qpci_check_buggy_msi(QPCIDevice *dev);
>  
>  void qpci_device_enable(QPCIDevice *dev);
> -uint8_t qpci_find_capability(QPCIDevice *dev, uint8_t id);
> +uint8_t qpci_find_capability(QPCIDevice *dev, uint8_t id, uint8_t 
> start_addr);

In case you respin, I'd like to suggest to add a comment in front of
that prototype, explaining how the start_addr is meant to work (but the
source code is trivial enough, so there's no need to respin just because
of this, IMHO).

Reviewed-by: Thomas Huth <address@hidden>



reply via email to

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