On 11/10/2019 10.56, Stefan Hajnoczi wrote:
> The Legacy virtio-pci interface always uses BAR 0.  VIRTIO 1.0 may need
> to use a different BAR index, so make it configurable.
> 
> Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com>
> ---
>  tests/libqos/virtio-pci.h | 2 ++
>  tests/libqos/virtio-pci.c | 3 ++-
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/libqos/virtio-pci.h b/tests/libqos/virtio-pci.h
> index b620c30451..f2d53aa377 100644
> --- a/tests/libqos/virtio-pci.h
> +++ b/tests/libqos/virtio-pci.h
> @@ -25,6 +25,8 @@ typedef struct QVirtioPCIDevice {
>      uint16_t config_msix_entry;
>      uint64_t config_msix_addr;
>      uint32_t config_msix_data;
> +
> +    uint8_t bar_idx;

I think I'd rather make that an "int" instead of "uint8_t" ... but
that's just my personal taste, so anyway:

Reviewed-by: Thomas Huth <th...@redhat.com>

Reply via email to