From patchwork Tue Jun 28 04:43:03 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: 585498 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5036:0:0:0:0 with SMTP id e22csp442557mab; Mon, 27 Jun 2022 22:36:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sr7LPwSSwuXkbpjpIGqW8oPoMXXM3dECGhbh6Z4TgtV0q5K5kV20bxYmAWeA716ljCSQwL X-Received: by 2002:ac8:5c46:0:b0:315:a78a:4cb1 with SMTP id j6-20020ac85c46000000b00315a78a4cb1mr12308778qtj.560.1656394577164; Mon, 27 Jun 2022 22:36:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656394577; cv=none; d=google.com; s=arc-20160816; b=bJyRa1OibwgwwTuus4drjhacpfJ+TNWEsYkaTsq4payhE8LrBtDxrKNQlD/x2J9pXe FkrvlF3K8jlrSjqvVa7A2yn4n5Ja0lr3yvmc96yAZikVfBQ6X0Vpf7ItdNft73xihdcC sKNG+QovFYN6tsGWvNkjo9WOYFXw3VtPxkZwmUj1InSpoJONepEHS/stDV93IsmJ8xOa 1Kse+apz1RZGtjmBK0N8AnCshitFf07sCVRv5B/M11FI/YzZm0U3Xwc1fbT9429/TUdK DsarX8mxxr29qy9eK+wcvHghaMV+wUfRQcURIqDQmhkTvZvRTNdMLarVgKotpwj7yjCP evRQ== 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=Mn/g7m0RmM5cceBjPMwfMkeTDlaWZwcXKTll3LlqMLQ=; b=YtTt3y5NaF85W6cmKRf2q+G1rAg6CYDf4XGgGv0ydHLSFXUOBTAYyWZA/yi0mR9AiD Af4GMnYd81vbOXjU5XiqH34SgLDQ8KK8NlonDkM5r06iytsE46qP8dlLkzY1yv+9XiFM ds+P+lVidqhxCHt/EoRI6MRK6MDupKWtAY/U8wCvl8aP2vK/DID1kvEbAjHiRVgL928j lADNr0lTuPQNSKneuFYgZCT+bgHA6LsXdNXpbPyDMHWo3VSunZxZ+1g/VqXxH5WE8PAC w1bL+YTTCYLxaAuSt4xgxZ7Z7DBG6LjKRZIa+BTQrTkr6AWxhp/klFS0dLmK3jK05JFs vcqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=N90Ej6LP; 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 d19-20020ac800d3000000b002f93c4a2337si6244620qtg.472.2022.06.27.22.36.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Jun 2022 22:36:17 -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=N90Ej6LP; 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]:44400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o63tY-0005hw-O4 for patch@linaro.org; Tue, 28 Jun 2022 01:36:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41624) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o634D-0000NF-Jv for qemu-devel@nongnu.org; Tue, 28 Jun 2022 00:43:13 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:37865) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o634C-0006tY-1a for qemu-devel@nongnu.org; Tue, 28 Jun 2022 00:43:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656391391; 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=Mn/g7m0RmM5cceBjPMwfMkeTDlaWZwcXKTll3LlqMLQ=; b=N90Ej6LPlPewDm/o07wgXGkw6l9omowsS31ACDq7OZbyUiKO6VMaIEax2GARAUWCJo8s8Q EQWZcU/QNdFbfsBbOJ6K0Yb034tF2LCr/Gi9inho2sbYS4pEUCW9lbxJl92heE+cPS/sJf NFL6BDAvvpi36OO7Skr0dl87EZ+dfIY= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-593-m4bKAoQ-OyCNv69Ot8YPZA-1; Tue, 28 Jun 2022 00:43:08 -0400 X-MC-Unique: m4bKAoQ-OyCNv69Ot8YPZA-1 Received: by mail-wm1-f69.google.com with SMTP id z11-20020a05600c0a0b00b003a043991610so4282223wmp.8 for ; Mon, 27 Jun 2022 21:43:08 -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=Mn/g7m0RmM5cceBjPMwfMkeTDlaWZwcXKTll3LlqMLQ=; b=kIQoQcvlHHPsF2+cJ6WmZbKv5IS7lbRj1iEMcHIELNVLZxWvEm+3D5Fr/bf95QjMpB zksYuJf0b8VmlDv/3NIgKKIC0J3FZIsy4FqsZWqCYzHs9Vcelv54jIq+qravJRI9DQl+ aZE59w76ImlwM/Q0WUbhN4goUjbPwL4ZuOSHnhf0R9Jja27k6CA41NOXndqns60qGFgX VAD2D2fif3JRakjoN8JsSZFNPcVWycwZVnFpMQ3KFLFeVKS6qATUWDt5RmkklT9ntPFQ Xl9Hk1ey4lxEeHi2SpPfBRyWWbOx4QI7s8JyeoIyRMKrYJx3I3YHRSxUkeQhIkIKpr0O Jmmw== X-Gm-Message-State: AJIora+UIa0hksoSAQ13fQEi8CC6lNVJQsBia4A9qs0vn+Fyekk48mwl 1UkXgIg4rMK9ItHR2Pv+Snr3mhWwVNg+LPANJ49mw28p3M7DScRL+XR74geUvksXGNoa17fQtwS 0JNt8+rCCKkKD1bhIRpQcpzj9ksU02sk7VjVJPNFvTHw+BZRsfvVug7uJmy5U X-Received: by 2002:a05:6000:911:b0:21d:2100:b97b with SMTP id bz17-20020a056000091100b0021d2100b97bmr274225wrb.649.1656391387402; Mon, 27 Jun 2022 21:43:07 -0700 (PDT) X-Received: by 2002:a05:6000:911:b0:21d:2100:b97b with SMTP id bz17-20020a056000091100b0021d2100b97bmr274209wrb.649.1656391387143; Mon, 27 Jun 2022 21:43:07 -0700 (PDT) Received: from redhat.com ([2.52.23.204]) by smtp.gmail.com with ESMTPSA id n12-20020a5d6b8c000000b0020c5253d8fcsm14641936wrx.72.2022.06.27.21.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 21:43:06 -0700 (PDT) Date: Tue, 28 Jun 2022 00:43:03 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Alex =?utf-8?q?Benn=C3=A9e?= , Stefan Hajnoczi Subject: [PULL 12/12] include/hw/virtio: document vhost_ack_features Message-ID: <20220628044201.217173-13-mst@redhat.com> References: <20220628044201.217173-1-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220628044201.217173-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 Signed-off-by: Alex Bennée Message-Id: <20220524154056.2896913-5-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi --- include/hw/virtio/vhost.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index bfc71b7c50..a346f23d13 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -260,6 +260,16 @@ void vhost_virtqueue_mask(struct vhost_dev *hdev, VirtIODevice *vdev, int n, */ uint64_t vhost_get_features(struct vhost_dev *hdev, const int *feature_bits, uint64_t features); + +/** + * vhost_ack_features() - set vhost acked_features + * @hdev: common vhost_dev structure + * @feature_bits: pointer to terminated table of feature bits + * @features: requested feature set + * + * This sets the internal hdev->acked_features to the intersection of + * the backends advertised features and the supported feature_bits. + */ void vhost_ack_features(struct vhost_dev *hdev, const int *feature_bits, uint64_t features); bool vhost_has_free_slot(void);