From patchwork Mon Oct 10 17:28:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 613759 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2115501pvb; Mon, 10 Oct 2022 10:30:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6D+v8HQWes90QI14eX/Y46vLUeIrj7BQX72XgkyAm1ifBz3soBCVP8QgB4IiNp/1+IHaau X-Received: by 2002:ac8:7f42:0:b0:35c:b7f0:3411 with SMTP id g2-20020ac87f42000000b0035cb7f03411mr15866614qtk.210.1665423015640; Mon, 10 Oct 2022 10:30:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665423015; cv=none; d=google.com; s=arc-20160816; b=AQ88eepbzhkoTf/bImJMEl+ntsUqRUSuRC45Ht97zlZmFN8zRuBsMfD4eVh5ubaWhw Oj+YC/zXWrZFDUj8QC9cVj7Yg0f7PjTTau5pvykaPbInT9m0sHFMSEH48fWkBV8ez3jZ 4aKBbcxzcoYa+lmL8hEafq1X9VF/vOtcfqhS7j0hFDxuuWcfg652CNbdcJKxXGXcOEkF 4jZEfdMUJAtfwr09AqAUqy2tEVSIz4elGfW/UYvGRO9nGxSVIEZ4yvNee7eJavdhPvKc KkfluwgXxVkA2hV89F7ekomCZQ/CC0RLYfrvMezGJIAHIaqF+QPgm1I/m0SkFLsqA2Mp j+9w== 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:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=C17R4uZqGLEi0seyRZv7bdzpjpcef+51Q4h/UGlzozI=; b=fWFFXqH3eRRoE6q2MYgUIoEncWg/gB/AoiEWqcLY5a9SVyVY98KPRyLvNXJXItPM2b 7X4P1Fkj7w+Dyr+HoBc8aMrLN1EzEAwv77UrnDcux2C7xplibu68KsLeiRRQsnWXz1AG zycwnW+NyvhC8/lpE53XWo/IthHgYryVtkVZAzIddyxJrPcwHs1PjnWVtQJaHa5Vd2oh VEKe5OYP+uKWzfNZoKt5JaDQZYXeQ0nJoDPy+/+CmTNbfW/XA7VBD0wIhziPxDNKndn2 bCZDzthAxcqXKxNEd4t2hBZa8wverkee+xkR3LY7lHD8DMfMa9kHjrKMUW6ZCP47Zz8o VK/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Y+OB9/KF"; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id gh10-20020a05621429ca00b00498f6c644easi5417575qvb.374.2022.10.10.10.30.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Oct 2022 10:30:15 -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=@redhat.com header.s=mimecast20190719 header.b="Y+OB9/KF"; 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=redhat.com Received: from localhost ([::1]:48874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohwbW-0007xU-Vy for patch@linaro.org; Mon, 10 Oct 2022 13:30:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohwaL-0007v3-Q5 for qemu-devel@nongnu.org; Mon, 10 Oct 2022 13:29:01 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:30351) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohwaH-0006QY-Az for qemu-devel@nongnu.org; Mon, 10 Oct 2022 13:29:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665422936; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=C17R4uZqGLEi0seyRZv7bdzpjpcef+51Q4h/UGlzozI=; b=Y+OB9/KFgKj2khtazSClewo8GHZ2F5J05YfVLYb6oDjOFEthRIpCPsVC3D6tPkzerUrT2c t5bZnoouj10VIOhjIL+2n9612rAqR+CWyaCOuotY1B8aFD2J9s1TaPU4itMhEFDMkpaf6H RayS00/8AHpAtsrGV0pXB5uc0m4/fhs= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-60-tCd9lUVgO3uPgHdwj7OgTw-1; Mon, 10 Oct 2022 13:28:55 -0400 X-MC-Unique: tCd9lUVgO3uPgHdwj7OgTw-1 Received: by mail-wr1-f71.google.com with SMTP id k30-20020adfb35e000000b0022e04708c18so2982630wrd.22 for ; Mon, 10 Oct 2022 10:28:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=C17R4uZqGLEi0seyRZv7bdzpjpcef+51Q4h/UGlzozI=; b=MM5Y8CWOrBFU/yEr+H24n8dByhms4fLr3vcL9WXwoo86CuOIWpOO/D2hITllINJpB6 dG3D++TZOXCO86P8W3mIDe91SF8PrS3j47hHZPOS//weQzVZrLMvD/Tf/Dcdsfpov275 2Rr+oF1a1nrAVkmudHqYcAkNb3obYf0VmV3YamF4nMoPbPgZ/8xv76vGzQYmmSdXb6Rr BWnmBt9wcKEs1URszlp2EFpj+qEJ5TRi47igbTw5wMf5yMWlaUhqn5D8p6u8UVJOaUDN lEB89JxCibs/nA5OYBBcQospCH1hwP2IEMUxV80HVfwcmSiRq4T+tue8plVco6TKc7Cx t+Qg== X-Gm-Message-State: ACrzQf32exYkKews8dHCtIrK9brHijM0yzQ6wTysoMh4y04dC4zD2tJt yzJ1wDge7ht2w4B2I9e5NveQvZD99YcukS1aMB0RESVo7UWIjFxEHHhQBLFwgP8ys4n7Ocvr393 4V3fFUu0aV2Hz2LCG6mMHQhw/3Ruikk7r50xV1O93pTwPNBXrVGx98shNucff X-Received: by 2002:a05:600c:34c2:b0:3b4:7a98:5f5a with SMTP id d2-20020a05600c34c200b003b47a985f5amr13509088wmq.156.1665422934217; Mon, 10 Oct 2022 10:28:54 -0700 (PDT) X-Received: by 2002:a05:600c:34c2:b0:3b4:7a98:5f5a with SMTP id d2-20020a05600c34c200b003b47a985f5amr13509063wmq.156.1665422933862; Mon, 10 Oct 2022 10:28:53 -0700 (PDT) Received: from redhat.com ([2.55.183.131]) by smtp.gmail.com with ESMTPSA id i9-20020a5d5229000000b0022cd59331b2sm9540464wra.95.2022.10.10.10.28.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 10:28:53 -0700 (PDT) Date: Mon, 10 Oct 2022 13:28:50 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Alex =?utf-8?q?Benn=C3=A9e?= , Jason Wang , Philippe =?utf-8?q?Mathieu-Daud=C3=A9?= Subject: [PULL 03/55] include/hw: document vhost_dev feature life-cycle Message-ID: <20221010172813.204597-4-mst@redhat.com> References: <20221010172813.204597-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221010172813.204597-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Received-SPF: pass client-ip=170.10.133.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, 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 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" From: Alex Bennée 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 Message-Id: <20220802095010.3330793-7-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin 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;