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: Christophe de Dinechin
Subject: Re: [PATCH v3 09/16] libqos: access VIRTIO 1.0 vring in little-endian
Date: Tue, 22 Oct 2019 18:51:39 +0200
User-agent: mu4e 1.3.2; emacs 26.2

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?


--
Cheers,
Christophe de Dinechin (IRC c3d)




reply via email to

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