From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A188B28506C for ; Sun, 16 Nov 2025 07:36:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763278596; cv=none; b=BeeTYTziPgJ2jtCS44Z20vlOIU5eSomwlGH62erIJsabh2vxHy1VUJRwdryKYMPsIRDFOBHSUKZxz/kDdgdY6CE4l6te28NIJjrS+dU9urFL8RyW4y/Axk25kVvG1cfqj768u8aD71rhN468MmxdRNoAVeHIEJWP1dpTW3cJUEQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763278596; c=relaxed/simple; bh=/wU2PjO/9k2SX10eUAJ2SEQukhtmpyHpHIXxtUzeWto=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=hqlDd2wyRiHgr8yehg7CXbh9gpbTO8rGu9+C+xAZx5mlRAKVl1N29344/UQzQfAcaharkycNWn/CLov6PSBUFifz36i4JzUICItVwUqrGtiCWBoc6Y6vdB5/k6KfCWC8ipzhSAv3Ji74LBBvQgFPkTCpTsf5Gbf62C/XB23tXGM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=GVxE7X4E; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=Qqh623P/; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GVxE7X4E"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="Qqh623P/" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763278593; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=b0yaVDVgrAO7aUVp8P++ObXwpVxREDZ1FEXCsETlzo0=; b=GVxE7X4ENlScj1fJJahzREgc1flYEwPCrXSsSUeNvy0QILsMt+0JddfiskKjd3DpT1oE8n NKrzvPU+/m9j9FEaoul7a3Z96pY8d1GFpcf4ueURE5hIXy0RjSlWZsWEkKP7mKhN3kO0rd N0cUerxPlKjb6LorUF8ysMIgO2s9mSM= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-262-tyA6YkTfNlKww29FcoD1qA-1; Sun, 16 Nov 2025 02:36:32 -0500 X-MC-Unique: tyA6YkTfNlKww29FcoD1qA-1 X-Mimecast-MFC-AGG-ID: tyA6YkTfNlKww29FcoD1qA_1763278591 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-42b3155274eso1267331f8f.0 for ; Sat, 15 Nov 2025 23:36:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1763278591; x=1763883391; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=b0yaVDVgrAO7aUVp8P++ObXwpVxREDZ1FEXCsETlzo0=; b=Qqh623P/iRVGRWu89+BHV5Gz6faoTprK/wvT/Nz1c3adtOwfy445Us+QmfT5/NwgU0 ATpEEAhUEbfALx6CXvgcsKvgMfrLqvsUN6Wit3XwBCV1qaeLwmYzTVj/9bocsMULpSvd Os+a9eNLZVyjkXFUnoG1Ni044Gf2rqNKM0LPHdDimvkbP93pqRXYWwtf4iVq93xiWS2Y DJ2m1E7gBptLha2YtuRgWAj+fyqK6w8pqO93nhq0+bRQB9zT+eoYPJtbc7kRhAoxZUKn iJH6i/Et+TptzS5Mrdq+IzzhhLCHbpOKbSKaPHzvujzv5YlksTT1Z47qzA5vSDB3fGbx Z3YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763278591; x=1763883391; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=b0yaVDVgrAO7aUVp8P++ObXwpVxREDZ1FEXCsETlzo0=; b=Fb5yNUeVfJUI1glxSmHB/HNrO4+OHHWP/RAQ91k4SH1Iu2xtdUwedmemXnwdAEXiE8 Fkd2m1qHz2ejAHxbWS2oSEY+xhLXFOTj8p3XUK60BoNmNoKVy4mnpAYm0YHme24rdPLS LBoWCuLSdQZO/Svy57f0Nuw6Vi156awRUJptrfB3yiEBy5253OMj0jopElCCGthK6OMB Mg/eCs1vVUKpMKDvePQPRc2RpoLk0TY5n1KWRRERfqh19GA8WwvfeoJaQH3BZ5cMfLwL Szo6GElgcXiMo9sITd5u6AD0eAK+l/MjnovKJ7CHJjjObjHNaXfPG/as8RFlL9KkAAyS KO5A== X-Gm-Message-State: AOJu0YwtJMY+m9YMqTBsAysuvtS3E9fVLXmia0hF7BND21PK1b1CbMGF 1k6DzOUMMvJcOYfh7RNZIt6cRHHvfsFigy+u7UY/tg7d+mTn2vSj0WAa5NJ17t9cqGFt+8Wcou8 CRhfhJWk/vqqFkzFx10UmV2XfTb+UjA2DTQzmSOLdZ53Y04xqYdH3/lCHgBJPEtmrTyi/QL6ca1 7OUprzioTiHm+h/Q1Vh6S5tRFvJpmyA078q8z3UWCDXkQ= X-Gm-Gg: ASbGncuSmO0EEk+3cUrb8woQY6NumMSVEplAE1CS2SgfQAFf3b51ktN6E2bnttvLpzw vM2PXa1yapcbf1Qn2L6fioMM+VtwYvJPEx//lZG79wEhWt81F11WamVeW4xbEudVtOvEPHo2vQF cSvtp2oxS70G6f4JMf/UYaHGDh7Wa4kAEGjq7jOb6NWgww4E5g9UBlSTmOUWBuo5cxOwTcUbh3E Pi6RSQo3KS8WLdVPe7tlVaizTtw56f6t4Spx++l36tN1X/Bmi7bpeOCKTQdvuFN+qonSF5KghQd CfvZXuR9iZd9Jfi+HApae5ywYVm/c7t9RTkfVbPE/TRynuCKbgeX/VdVm4Cey1prNwsi+jJ7MLA 5/h9kTDT8fLWilAkBm6I= X-Received: by 2002:a05:600c:4744:b0:46e:48fd:a1a9 with SMTP id 5b1f17b1804b1-4778fea8ab2mr86716405e9.33.1763278590863; Sat, 15 Nov 2025 23:36:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IHqZuOeT1wAABazsJ0HksCXcwMYVBBLygHfL8/xmHfq4axK6seTI4Hh3FvYH1PcGLCWD6fslw== X-Received: by 2002:a05:600c:4744:b0:46e:48fd:a1a9 with SMTP id 5b1f17b1804b1-4778fea8ab2mr86716095e9.33.1763278590441; Sat, 15 Nov 2025 23:36:30 -0800 (PST) Received: from redhat.com (IGLD-80-230-39-63.inter.net.il. [80.230.39.63]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47796a8a695sm79746965e9.13.2025.11.15.23.36.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Nov 2025 23:36:30 -0800 (PST) Date: Sun, 16 Nov 2025 02:36:27 -0500 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Cc: Andrew Lunn , Paolo Abeni , Jason Wang , Eugenio =?utf-8?B?UMOpcmV6?= , Xuan Zhuo , Jonathan Corbet , kvm@vger.kernel.org, virtualization@lists.linux.dev, netdev@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v3 0/2] virtio: feature related cleanups Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Cleanup around handling of feature bits: - address word/dword/qword confusion - simplify interfaces so callers do not need to remember in which 64 bit chunk each bit belongs changes from v2: - drop unnecessary casts - rework the interface to use array of bits not arrays of qwords Michael S. Tsirkin (2): virtio: clean up features qword/dword terms vhost: switch to arrays of feature bits drivers/vhost/net.c | 44 ++++++++++++++------------ drivers/vhost/scsi.c | 9 ++++-- drivers/vhost/test.c | 10 ++++-- drivers/vhost/vhost.h | 42 +++++++++++++++++++----- drivers/vhost/vsock.c | 10 +++--- drivers/virtio/virtio.c | 12 +++---- drivers/virtio/virtio_debug.c | 10 +++--- drivers/virtio/virtio_pci_modern_dev.c | 6 ++-- include/linux/virtio.h | 2 +- include/linux/virtio_config.h | 2 +- include/linux/virtio_features.h | 29 +++++++++-------- include/linux/virtio_pci_modern.h | 8 ++--- scripts/lib/kdoc/kdoc_parser.py | 2 +- 13 files changed, 114 insertions(+), 72 deletions(-) -- MST