From patchwork Tue Jul 26 19:21:31 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: 593471 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b811:0:0:0:0 with SMTP id fc17csp3821603mab; Tue, 26 Jul 2022 12:33:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sL4MKBM8HVKyFtE+sjLW5Ll4LcGrgaq2xcKkaxxJAWYWI7OgHSc+jFvvPh5rMuZDk0nRkV X-Received: by 2002:a05:622a:612:b0:31e:f64a:6dbe with SMTP id z18-20020a05622a061200b0031ef64a6dbemr15704076qta.29.1658864029467; Tue, 26 Jul 2022 12:33:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658864029; cv=none; d=google.com; s=arc-20160816; b=vWyHLFEL4QTB2m09MvAqllBbkP+yNYLr7GoxoopqapfirqmqLlUzFKxaMYBTDG9OoB B8yZLhg8ai+0rq7I1MXcNAbtjzeJL1whbOxtjku7Bih9GmqRUgw4zg7z/Rs7Q7ACxg3b qUbwr0hjgXGOylMfXW8X9G/EZ4OqZ+cWGMZD9CYUSl04FnWXEsex99/pj/PDxUnM+jVc QML/gYQE2BNxnRWaKp/NeFEb/2NaPJiCIksqucfCjXw2lKplGvgZ1OXAi7zNSQdePDAp dEI3Oc1Tdx4Fivfj9XzW3Rv8Le5ai0dgkx3NWxV5UWnLWCWpvbXO+zfDZCwHhsJ2q1Ex IB/Q== 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=YA8bK0QimOlD2NvATId4ShuayIO9M3XtMDLWtyqNjMU=; b=jZ+EXwMwdQuGAoK7gAzpToBV1yZiiZTQWvG6LWRgJMoPZh8xmZLSr0ufn7lYfJucbB LlAximnbKgwCzHUG9ZKa5uLTafHQEI7UctcPLKV3v8kAinZquWgP6NfS5a09D4C89P+Q +t0ux9lDc5Dho4kb4OghGCKICggRQHb/I4Bs1lAW3fkVZvt780gvGfrcReFJiSQ/LMiJ AD3Wn8wx0g4pdQCYIMFa6ep3NhW5FhLiuQg59/10d+fOS46pPEciuyyv7CtJI+GzA7Hw 1gUZZjld10QyQj93rJPNUtjbcWRivF8uTTqRSE4YcK2oMaoFIJ6jrPkPA4KLokm+o5Y/ 6/ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rvCiJcli; 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 93-20020aed30e6000000b0031ee2477705si8462551qtf.632.2022.07.26.12.33.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Jul 2022 12:33:49 -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=rvCiJcli; 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]:40702 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGQJQ-00061R-Tr for patch@linaro.org; Tue, 26 Jul 2022 15:33:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGQ7v-0003A5-T3 for qemu-devel@nongnu.org; Tue, 26 Jul 2022 15:21:58 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:40548) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oGQ7t-0002Gz-Rr for qemu-devel@nongnu.org; Tue, 26 Jul 2022 15:21:55 -0400 Received: by mail-wr1-x431.google.com with SMTP id m17so21166314wrw.7 for ; Tue, 26 Jul 2022 12:21:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YA8bK0QimOlD2NvATId4ShuayIO9M3XtMDLWtyqNjMU=; b=rvCiJcliKYs27pOKccyWbWtEwBAGTJnUIVV3uD0ieM/Jj0FL/nfm1fESd0M6AaLIQ9 UtPCVOd+dJQUqnefBkpnS7b9Qrjsw93toP7BioknpsGhscDPCGth7OVMgyMu8r4wlr/K R46chISaJ0kVR9ouJ/mZODJDG07oHeJF3hq/Z6gWS5uSY1LoUf0T3RzbKtH1vZLh3e29 xOzX5TsbtKjCoPV3tPWWjsyDE/18Hwo305voq5+BmVUPLx+V0Nqj1/+1ohcJHxCnVJsJ sdUcwzKRNndiAlGNhHQFcZDTDtWAW4uJ0yh4wcsDIlVyZuPet60YWUrJ1wDrCw2DhEay GqHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YA8bK0QimOlD2NvATId4ShuayIO9M3XtMDLWtyqNjMU=; b=fSKa6cKkNVeMI9Wedeuxmz86fQvb+Kz0YosJDGLGIqgXeBERfTKoCvmHu7qjj+mvjP j6ycdBWOit5h28jriv4gGCOfvipaSmHomsId7htdBi0/rJyISBQ8j08oivK/wrtZjC6S M7ubLMx5G5nwUNDTjkjRBtOEk+XAust/hqOpNUXRGP10tF6eDfm2lHcSUeVsxum0akIr LHI+zE3YeQtHZsNCJoMIGjukNjMvmwbksfgRlnOgGncZ3BXY3BLFgKeI6gSAMuFj04WD gEHgo/bDDfmonbACJ9aXneBKgwwKk9fzC0+nXMB1oWwZPo+wbamovY+ufXrsifebhVrB RWhw== X-Gm-Message-State: AJIora94J0EAJhvahOUkcYrLt92PC5gzSXtfeWYdwxciaX7DHb6JulV7 CxYVglJwjNumfkIEhYs6VhBLkQ== X-Received: by 2002:a05:6000:2a8:b0:21d:8c81:7eb0 with SMTP id l8-20020a05600002a800b0021d8c817eb0mr11435997wry.460.1658863312083; Tue, 26 Jul 2022 12:21:52 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id h21-20020a05600c351500b003a31df6af2esm25229340wmq.1.2022.07.26.12.21.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jul 2022 12:21:51 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8A6AA1FFBA; Tue, 26 Jul 2022 20:21:50 +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, mark.cave-ayland@ilande.co.uk, jasowang@redhat.com, =?utf-8?q?Alex_Benn?= =?utf-8?q?=C3=A9e?= Subject: [PATCH v3 02/21] include/hw: document vhost_dev feature life-cycle Date: Tue, 26 Jul 2022 20:21:31 +0100 Message-Id: <20220726192150.2435175-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220726192150.2435175-1-alex.bennee@linaro.org> References: <20220726192150.2435175-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.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 --- 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;