[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 09/16] libqos: access VIRTIO 1.0 vring in little-endian
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v3 09/16] libqos: access VIRTIO 1.0 vring in little-endian |
Date: |
Wed, 23 Oct 2019 09:37:22 +0100 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
On Tue, Oct 22, 2019 at 06:51:39PM +0200, Christophe de Dinechin wrote:
>
> Stefan Hajnoczi writes:
> [...]
> > +static uint16_t qvirtio_readw(QVirtioDevice *d, QTestState *qts, uint64_t
> > addr)
> > +{
> > + uint16_t val = qtest_readw(qts, addr);
> > +
> > + if (d->features & (1ull << VIRTIO_F_VERSION_1) &&
> > qtest_big_endian(qts)) {
>
> For my education, I was wondering why tests use the (1ull << FEATURE)
> notation and not an equivalent of virtio_has_feature()? Is this
> intentional, or just legacy?
It's historical, libqos never defined an equivalent helper function.
Stefan
signature.asc
Description: PGP signature
- Re: [PATCH v3 07/16] libqos: enforce Device Initialization order, (continued)
[PATCH v3 08/16] libqos: implement VIRTIO 1.0 FEATURES_OK step, Stefan Hajnoczi, 2019/10/19
[PATCH v3 09/16] libqos: access VIRTIO 1.0 vring in little-endian, Stefan Hajnoczi, 2019/10/19
[PATCH v3 10/16] libqos: add iteration support to qpci_find_capability(), Stefan Hajnoczi, 2019/10/19
[PATCH v3 11/16] libqos: pass full QVirtQueue to set_queue_address(), Stefan Hajnoczi, 2019/10/19
[PATCH v3 12/16] libqos: add MSI-X callbacks to QVirtioPCIDevice, Stefan Hajnoczi, 2019/10/19
[PATCH v3 13/16] libqos: expose common virtqueue setup/cleanup functions, Stefan Hajnoczi, 2019/10/19
[PATCH v3 14/16] libqos: make the virtio-pci BAR index configurable, Stefan Hajnoczi, 2019/10/19
[PATCH v3 15/16] libqos: extract Legacy virtio-pci.c code, Stefan Hajnoczi, 2019/10/19