From patchwork Mon May 16 20:54:30 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: 572987 Delivered-To: patch@linaro.org Received: by 2002:a5d:5051:0:0:0:0:0 with SMTP id h17csp773593wrt; Mon, 16 May 2022 14:58:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIxaCWiqPRkJ8Fg9TSsRIAhc+LuGJNTJOqE+DLUHihkh458hzW+qkwWRJ2MldLG9aoOvIe X-Received: by 2002:a05:622a:15cb:b0:2f3:f90f:1939 with SMTP id d11-20020a05622a15cb00b002f3f90f1939mr17364526qty.374.1652738303815; Mon, 16 May 2022 14:58:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652738303; cv=none; d=google.com; s=arc-20160816; b=I4e4SWKjzclMUzp8znzgVC2/E7HQICLbooOUn+GDM4nY+q+7bbgqj8xp+2ccu/ewsy eNlWTEtz1R9gtX3tOAbmeIgqk+6+Ms2Uk45eg2tIlSr8im/M5uz8P8CqXpbqfsEXSvLe y3+G9BsVUv5lwCuRx8fw2EAZuY5LJ6fEt9D/roycvX4Dd8hA+Ncz7Xy7zj+hDYLukZpZ nWnguDMF0bXgoEaWIiLb9fPkgg5Hpj0x720iDom+72NWsMhANa5hA/LP5C1LTYEFDSHk YxMLPn6scF5+aJjdqeYEIEjWiAKQt2fH1PBZzHsM9hbQi9OZzaoi4t0s1rNjQsZmjZ08 qYUA== 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=6TBSwgl4erp1QVjV6hUdkH53hYVNMfCm5ztMd9UNMOM=; b=JQKOl+6s8ItdydmrVOUDouMKc1ac02H332W41XXZ+THkEHyMrTj0J4iu6Xm7XGl/bm GkXVFG7JvbmbAjcy2IpkJ4gJ6YTU0Al9PnmKAeuCTyzTYXmD/DoVlsmlMvG05P84iSss ubLSjvSbwxDKmA+Kc5Mswo13ffc03rZFWaCfPtIjLucr0K/xdTdjJAGVFSdbghLouNLT aNb4VD2mKEXxNRYQEUMEAMvyyAn0cq4rMApA1DfBDwDzPXeaMTerm6oCjHQez1YZDqRx QHsHT7VocCwBcFOjH5NP963Q0G9hqq3j95HiWePTJGcvt6gcbNMbpd5fUrS0ZKaipWNa AlQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QRS4SFD5; 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 12-20020a05621420cc00b00461dc6f69c9si110908qve.503.2022.05.16.14.58.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 May 2022 14:58:23 -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=QRS4SFD5; 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]:56812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nqijP-0004rg-A4 for patch@linaro.org; Mon, 16 May 2022 17:58:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqhjj-0001vG-Mp for qemu-devel@nongnu.org; Mon, 16 May 2022 16:54:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:42649) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nqhjh-0006ms-PN for qemu-devel@nongnu.org; Mon, 16 May 2022 16:54:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652734477; 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=6TBSwgl4erp1QVjV6hUdkH53hYVNMfCm5ztMd9UNMOM=; b=QRS4SFD5htlGPz+5HGk64eauPbQEw4pisOk9YgX31cA/SigZuB6BRwMYojrK+kc5TqHEsQ oxqg/6VC0nA2foqhgr9+qSRh2uXUWHz6Ipfzy5Y91nhUYrSJJ8IR2QrtHHNEifJDLibClO rKyyS0PkatVrCzgp9NOQaE7ehj6bREY= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-661-MmZpWV5JPrq1WCu4DRdfeQ-1; Mon, 16 May 2022 16:54:35 -0400 X-MC-Unique: MmZpWV5JPrq1WCu4DRdfeQ-1 Received: by mail-ed1-f70.google.com with SMTP id ay24-20020a056402203800b0042a96a76ba5so4445711edb.20 for ; Mon, 16 May 2022 13:54:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=6TBSwgl4erp1QVjV6hUdkH53hYVNMfCm5ztMd9UNMOM=; b=7CKMI5lccsG1bAUch/dvGasBbv9yBY+NnUBp4t9V8owHlEbCVlJ0WEfbbi6FE2rXUO z3xLeXfiKpmQF6V+xUeKlavmZnFJd9H3beFrd4B1qH4821rwutZbjYi69JgmUMtTtbxZ gwn9utRNWBIojOnaiZfY7cBcbZhYPxzDoPKoP/Ge7fjlI59ZFd2vyHIYoDWRTY0HjaOE r1YMh9ALltWPr/1MgiMwRDZbmWzwDzAtueUD1Fmr1LrEZS6cIls2OeTH03sLainHt1WJ RkO6+dyfzouqKiS+msGbDdNysg4sq4JkNO8d5K9Vd0pp3LDT35tnZmX0I6tOAfD1O1ky iDng== X-Gm-Message-State: AOAM53029TAv67VMJ2mNdYpg7busZDitTjGEdkujeciPNyfXHn78xcbz mX5hH6wk5nGQVBYNtNrR2HjWDpe7fmtvK0C/L6zv0WzZQriUKxGqCrXbOfdtfafsTuqjAicp3T6 YljcInYCPPmzVvQFgK+Yv5j/7lcIRnU/D2aC5xq230RrZZ2igpkX480PScOJr X-Received: by 2002:a17:907:1b1e:b0:6d7:31b0:e821 with SMTP id mp30-20020a1709071b1e00b006d731b0e821mr16994538ejc.334.1652734474374; Mon, 16 May 2022 13:54:34 -0700 (PDT) X-Received: by 2002:a17:907:1b1e:b0:6d7:31b0:e821 with SMTP id mp30-20020a1709071b1e00b006d731b0e821mr16994514ejc.334.1652734474062; Mon, 16 May 2022 13:54:34 -0700 (PDT) Received: from redhat.com ([2.55.131.38]) by smtp.gmail.com with ESMTPSA id a17-20020a50ff11000000b0042a2d9af0f8sm5689009edu.79.2022.05.16.13.54.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 13:54:33 -0700 (PDT) Date: Mon, 16 May 2022 16:54:30 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Alex =?utf-8?q?Benn=C3=A9e?= , Jiang Liu Subject: [PULL v2 64/86] vhost-user.rst: add clarifying language about protocol negotiation Message-ID: <20220516204913.542894-65-mst@redhat.com> References: <20220516204913.542894-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220516204913.542894-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.129.124; envelope-from=mst@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, 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" From: Alex Bennée Make the language about feature negotiation explicitly clear about the handling of the VHOST_USER_F_PROTOCOL_FEATURES feature bit. Try and avoid the sort of bug introduced in vhost.rs REPLY_ACK processing: https://github.com/rust-vmm/vhost/pull/24 Signed-off-by: Alex Bennée Cc: Jiang Liu Message-Id: <20210226111619.21178-1-alex.bennee@linaro.org> Message-Id: <20220321153037.3622127-8-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- docs/interop/vhost-user.rst | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/interop/vhost-user.rst b/docs/interop/vhost-user.rst index 9159476678..73e710fe32 100644 --- a/docs/interop/vhost-user.rst +++ b/docs/interop/vhost-user.rst @@ -332,6 +332,18 @@ bit was dedicated for this purpose:: #define VHOST_USER_F_PROTOCOL_FEATURES 30 +Note that VHOST_USER_F_PROTOCOL_FEATURES is the UNUSED (30) feature +bit defined in `VIRTIO 1.1 6.3 Legacy Interface: Reserved Feature Bits +`_. +VIRTIO devices do not advertise this feature bit and therefore VIRTIO +drivers cannot negotiate it. + +This reserved feature bit was reused by the vhost-user protocol to add +vhost-user protocol feature negotiation in a backwards compatible +fashion. Old vhost-user master and slave implementations continue to +work even though they are not aware of vhost-user protocol feature +negotiation. + Ring states ----------- @@ -890,7 +902,8 @@ Front-end message types Get the protocol feature bitmask from the underlying vhost implementation. Only legal if feature bit ``VHOST_USER_F_PROTOCOL_FEATURES`` is present in - ``VHOST_USER_GET_FEATURES``. + ``VHOST_USER_GET_FEATURES``. It does not need to be acknowledged by + ``VHOST_USER_SET_FEATURES``. .. Note:: Back-ends that report ``VHOST_USER_F_PROTOCOL_FEATURES`` must @@ -906,7 +919,8 @@ Front-end message types Enable protocol features in the underlying vhost implementation. Only legal if feature bit ``VHOST_USER_F_PROTOCOL_FEATURES`` is present in - ``VHOST_USER_GET_FEATURES``. + ``VHOST_USER_GET_FEATURES``. It does not need to be acknowledged by + ``VHOST_USER_SET_FEATURES``. .. Note:: Back-ends that report ``VHOST_USER_F_PROTOCOL_FEATURES`` must support