From patchwork Tue Aug 2 09:49:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 594849 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp4198255maz; Tue, 2 Aug 2022 02:58:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR5BZcyjJOzeqWAxk/gftJGpC498fD6LfgmnEJxEIRdgVrg8440DjJtVkOYeHR4NPEQNJIHH X-Received: by 2002:a05:6214:2307:b0:46e:5fbc:3c30 with SMTP id gc7-20020a056214230700b0046e5fbc3c30mr17173771qvb.21.1659434316363; Tue, 02 Aug 2022 02:58:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659434316; cv=none; d=google.com; s=arc-20160816; b=nbTFjCZBK9ItsE0DAj78mpvSm5qRl01kt3B5t17UyuRzB5/pPZIJu1v6a/4es5yhT8 hVFJmCgjGamLmhQuZeZxCRRrsXKGII3OpnM1EXCJ3JLqWoQcPrLuF0EFCg3RCTIBiIXc UrczDWys+ltJpjQdrjvOsLBO+kHDoM4lhXRTgwCLQtEmtaPh15Y5l+99AkFwz+N0YYOd LflyaLCaY9JdIEa6B9+QF5BAPWm9Se5nGY/hKh0kb13ZQ2SmZwDFQbW4fSMweHw0bEo0 V1Bi8NUnV47ccnejQJ6R4/J0Dm5zLe42wYT7XNgMlaUBOmkALS+mU389pbsr3Z0TgWQG 7m+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=b2j/kb8GdcOCxPJdxE8uUIOafIPdVMpQHMJ+EKtT808=; b=GnGOAYEBCsJjbiSl/hJaxn0EyTij9DQ3ypUOp0wYM3MrN0oi5Aho4z1z4lJBnTbrvY wt7KSuYLymkxQRK1rsd9VLslrgv5kpjniJHCpe/Ka7LqcKVI628JF69z/C7texfSHVev fhZ9CLxit0gsfAVB10XltpQlaViUeWt01jd0Ub+sJPQMyeu3CYe4ztVVy2OFnCM2TITb Ap+beYSxHrDdyVvd7oC+zWKXJ86r5K5wtocGJxftn4xL8vavcZVreXxd2qBK2wuSx9t4 rnysHNbrWtmzM/BOlbjNSkgVOKVX4VAN/RIyUX9I5iYkPFVoCYGySUxqjR1O30rBxmBU jj3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VUtWBMO0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id fn4-20020ad45d64000000b00474730398cbsi7941412qvb.179.2022.08.02.02.58.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Aug 2022 02:58:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VUtWBMO0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oIofa-0008Qm-BN for patch@linaro.org; Tue, 02 Aug 2022 05:58:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oIoXd-0001HS-Ex for qemu-devel@nongnu.org; Tue, 02 Aug 2022 05:50:23 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:39737) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oIoXb-0002Mq-TU for qemu-devel@nongnu.org; Tue, 02 Aug 2022 05:50:21 -0400 Received: by mail-wr1-x42c.google.com with SMTP id m13so13216320wrq.6 for ; Tue, 02 Aug 2022 02:50:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=b2j/kb8GdcOCxPJdxE8uUIOafIPdVMpQHMJ+EKtT808=; b=VUtWBMO0NTR4B5G8bJmReMeHCB5+5EghhApZ5v+JT53Tu9HnwJoqO/jafntZKmTsg+ s+5MS2QaAIzqt0CVeTHxQHcatcZdbJQc8N9NEHZAUTdQfBdr0JwfuSRjbyPQxhUMVgDL lBy3nydnZhASOh93V4wVf68SDTQmzF8xBw2BSJT0h2jitB2nZ3JwgxeB1zXz+AoesiM/ dfb9AHDxp9PXNUuyI67FfHQ6kFMwmTZA056DhV5bTLxYAQWJR7eEz1gdmxJD1lYvSeKn MVsmNdOKtI6RCMVU1GE4s+8iIng41VSxaCSq8sjoYufgD3dolynhTWmYMrNv/trTd/mc Fk9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=b2j/kb8GdcOCxPJdxE8uUIOafIPdVMpQHMJ+EKtT808=; b=u4/QPj4MYSfLm+ELIpIWEK2aGm++wWHy0tVhIEzja8RSB1e/EuQTUHukmXyhrIN8DT pESNxTOIXDvJR6suVSzUK+ynIS0p0CE2OB1sKcfv1MjQ43+hW09tdeJtp+oNDcn+/f3P 37w7EaQY4tPw7FOi+Rnhed4pJAPPAZkWk2WE3C2cVCY8v9aA23Cg+la+X0ns6lXmrCRQ xoMmXSbKFUS+YnLNFA4Ms+6IrnngqTn/9T+g22vM5euZb6hO1yxi+rmW6rU9NWi1AmsI ZNT/pJghF8T7n54KGHgYtIWNU1AEGlOp7IeaqGwKjAzsSt3Zi1j+Xw4PJ2eIDzU7H3IM zezQ== X-Gm-Message-State: ACgBeo15Jvi6C0ovk9FCM8A1r4njOgb8XbqbFuv6xjVzm9YsZFBEeCXI Vjvlgo3p2mMRK6sx0hzhjteaWw== X-Received: by 2002:a05:6000:887:b0:21e:24a0:f302 with SMTP id ca7-20020a056000088700b0021e24a0f302mr12097520wrb.466.1659433819206; Tue, 02 Aug 2022 02:50:19 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id t16-20020a5d42d0000000b0021f17542fe2sm10877072wrr.84.2022.08.02.02.50.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 02:50:17 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 26EFA1FFBE; Tue, 2 Aug 2022 10:50:11 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: slp@redhat.com, mst@redhat.com, marcandre.lureau@redhat.com, stefanha@redhat.com, mathieu.poirier@linaro.org, viresh.kumar@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Jason Wang Subject: [PATCH v4 06/22] include/hw: document vhost_dev feature life-cycle Date: Tue, 2 Aug 2022 10:49:54 +0100 Message-Id: <20220802095010.3330793-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220802095010.3330793-1-alex.bennee@linaro.org> References: <20220802095010.3330793-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Try and explicitly document the various state of feature bits as related to the vhost_dev structure. Importantly the backend_features can advertise things like VHOST_USER_F_PROTOCOL_FEATURES which is never exposed to the driver and is only present in the vhost-user feature negotiation. Signed-off-by: Alex Bennée Acked-by: Jason Wang Reviewed-by: Philippe Mathieu-Daudé --- include/hw/virtio/vhost.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index a346f23d13..586c5457e2 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -86,8 +86,11 @@ struct vhost_dev { /* if non-zero, minimum required value for max_queues */ int num_queues; uint64_t features; + /** @acked_features: final set of negotiated features */ uint64_t acked_features; + /** @backend_features: backend specific feature bits */ uint64_t backend_features; + /** @protocol_features: final negotiated protocol features */ uint64_t protocol_features; uint64_t max_queues; uint64_t backend_cap;