[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250523154934-mutt-send-email-mst@kernel.org>
Date: Fri, 23 May 2025 15:50:52 -0400
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org,
Willem de Bruijn <willemdebruijn.kernel@...il.com>,
Jason Wang <jasowang@...hat.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Xuan Zhuo <xuanzhuo@...ux.alibaba.com>,
Eugenio Pérez <eperezma@...hat.com>
Subject: Re: [PATCH net-next 1/8] virtio: introduce virtio_features_t
On Thu, May 22, 2025 at 05:26:33PM +0200, Paolo Abeni wrote:
> On 5/22/25 9:29 AM, Paolo Abeni wrote:
> > On 5/21/25 6:02 PM, Michael S. Tsirkin wrote:
> >> On Wed, May 21, 2025 at 12:32:35PM +0200, Paolo Abeni wrote:
> >>> +++ b/include/linux/virtio_features.h
> >>> @@ -0,0 +1,23 @@
> >>> +/* SPDX-License-Identifier: GPL-2.0 */
> >>> +#ifndef _LINUX_VIRTIO_FEATURES_H
> >>> +#define _LINUX_VIRTIO_FEATURES_H
> >>> +
> >>> +#include <linux/bits.h>
> >>> +
> >>> +#if IS_ENABLED(CONFIG_ARCH_SUPPORTS_INT128)
> >>> +#define VIRTIO_HAS_EXTENDED_FEATURES
> >>> +#define VIRTIO_FEATURES_MAX 128
> >>> +#define VIRTIO_FEATURES_WORDS 4
> >>> +#define VIRTIO_BIT(b) _BIT128(b)
> >>> +
> >>> +typedef __uint128_t virtio_features_t;
> >>
> >> Since we are doing it anyway, what about __bitwise ?
> >
> > Yep, I will add it in the next revision.
>
> Uhm... this is actually problematic, as a key point of keeping the
> diffstat manageable is converting only the relevant drivers to use the
> extended features set - and adjust accordingly local variables and
> expressions.
>
> The above means that in other devices a lot of code relies on extended
> features being (harmlessly, because nobody is going to set the highest
> bits for such features) downgraded to u64, or u64 promoted to
> virtio_features_t.
>
> The __bitwise annotation generates warning for each of them; avoiding
> that warning require touching the same code I wanted to leave unmodified
> (and bring back a terrible diffstat).
>
> /P
I am not insisting here, we can do it later as a patch on top.
But - could you give an example pls?
Powered by blists - more mailing lists