qemu-devel
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: PGP signature


reply via email to

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