From nobody Mon May 6 04:49:27 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1669397487; cv=none; d=zohomail.com; s=zohoarc; b=bOPMl6GxNxrV+FVeamPqZeOrOcMemhMIuYJwMorVWZrZEnrZbh/noVYRBdrpR/GAqK1ERkIflBUIpVP7LJxtUjaG6OCINR4wxpQhUBvp42MlH5yyMAsD2zuF+ouaMnzyoxcV/dqD7WVrn6is7p5+11Ddzlh1vVoE288e889N/wk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669397487; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=oheCMzPlxFSw90huN9+zm9vfeGiOj55wqAJi+rQ46y8=; b=NCnnes9g7p2XC0KEku5hAV8BN1pRCdEa2YVN+u+U7jAC2H/7K3knazWSza7T76i+1CZpVaxAgtcDR8hwWLPROQvirrxNyO++fYjXSd1Uia0rb1aV2/J7ElpOx79LKc/N2yOmZrkip7CmB6cxCmyeuokmlCnlDNeWB8wVFOiGpbw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1669397487727901.3252037354929; Fri, 25 Nov 2022 09:31:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oycXS-0004Oo-1O; Fri, 25 Nov 2022 12:30:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oycXH-0004MJ-Tl for qemu-devel@nongnu.org; Fri, 25 Nov 2022 12:30:48 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oycXG-0004Uj-2g for qemu-devel@nongnu.org; Fri, 25 Nov 2022 12:30:47 -0500 Received: by mail-wr1-x434.google.com with SMTP id q7so6887091wrr.8 for ; Fri, 25 Nov 2022 09:30:45 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id o5-20020a05600c510500b003b4ff30e566sm16195031wms.3.2022.11.25.09.30.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 09:30:43 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 38B591FFB8; Fri, 25 Nov 2022 17:30:43 +0000 (GMT) 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:subject:date :message-id:reply-to; bh=oheCMzPlxFSw90huN9+zm9vfeGiOj55wqAJi+rQ46y8=; b=iK+3BbAIUyetIiK+ew4YGxFuekdxe/FKPIBFWQ5DH3qQavsuaZIDWlUjXTlXLgccxL leFFqqlXstse23BZ2EB/XZ+TetJbNRfZSmpx9RY+FMSIR+gjnuwdK94k32/Tv06O/vdq AJG1u80qLpwbuJCupLmpzGetPoZOVVYWkXGTxvshBYluwF9GUv+eUHdbg0lfEdDCY26i Bd9pZs3wYyNn8UxQwhwQDpsyWYr+ugqSV/nKulPxLc8DKKcWhU/jt1LUdhPPTO/uCU4q KpAucvYy4lrNLRItbBLddZvM4YlByTKen1LZzYze7jmuEfgGjP3AOymBKmxhBJ1Nxyst T5Rw== 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 :subject:date:message-id:reply-to; bh=oheCMzPlxFSw90huN9+zm9vfeGiOj55wqAJi+rQ46y8=; b=LL/BqQTEHbGM0ce7GDyEnDfc9XgD9mt6RWJxBZsw3YgD7Ek+ZlLgIR4jjQXJ7a7qUG 7QJtlMEs/QHJxiRtWVCt6gn/hVfXwnVJ1BdSIC3L57xy6NxC9szo22AAKBqU78KZ4cVv gzNTnzvtNh5PTFvo4Oog3gRLvnHn03MJLS6XMbEzuaJ0i761CVn+wKEhnrccUNVns1El UanJvAN2xeaGNwgSnCCIYdb5jHMkXEzH+TqHRdoIggT2KAaH8knIxnSHj6zAkc3o9uZY YHceZoLkq+llduj3BnBMDwFrSsUSCDnAzpShzIWlLBb4JZr/fbyyV4udKh6HltLIOahH mslg== X-Gm-Message-State: ANoB5pmfD8ziZsZjWq+02/SWFqJEVk9CtR9/aCI3+N3yJ0XKYnuCFjjw na/Mwe1rYrhZVY6Wb/OAl7p9dQ== X-Google-Smtp-Source: AA0mqf4lHaTJ22ZQWbUwcSnIWdpW4cihGtzRyReJXIwfpjN3J1JwTmOLPzq91g/+NEo+Xp7zU8K9Lg== X-Received: by 2002:a5d:554b:0:b0:242:84c:8d2 with SMTP id g11-20020a5d554b000000b00242084c08d2mr2217771wrw.555.1669397444109; Fri, 25 Nov 2022 09:30:44 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=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, sgarzare@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Stefan Hajnoczi Subject: [PATCH v2 1/5] include/hw: attempt to document VirtIO feature variables Date: Fri, 25 Nov 2022 17:30:39 +0000 Message-Id: <20221125173043.1998075-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221125173043.1998075-1-alex.bennee@linaro.org> References: <20221125173043.1998075-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1669397490331100006 We have a bunch of variables associated with the device and the vhost backend which are used inconsistently throughout the code base. Lets start trying to bring some order by agreeing what each variable is for. Signed-off-by: Alex Benn=C3=A9e Cc: Stefano Garzarella Cc: "Michael S. Tsirkin" Cc: Stefan Hajnoczi --- v2 - dropped DISCUSS and commentary - separated protocol section for clarity - updated working on vhost->backend_features - made clear guest_features was the written state --- include/hw/virtio/vhost.h | 25 ++++++++++++++++++++++--- include/hw/virtio/virtio.h | 19 ++++++++++++++++++- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index 353252ac3e..eaf628f656 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -88,13 +88,32 @@ struct vhost_dev { int vq_index_end; /* if non-zero, minimum required value for max_queues */ int num_queues; + /** + * vhost feature handling requires matching the feature set + * offered by a backend which may be a subset of the total + * features eventually offered to the guest. + * + * @features: available features provided by the backend + * @acked_features: final negotiated features with front-end driver + * + * @backend_features: this is used in a couple of places to either + * store VHOST_USER_F_PROTOCOL_FEATURES to apply to + * VHOST_USER_SET_FEATURES or VHOST_NET_F_VIRTIO_NET_HDR. Its + * future use should be discouraged and the variable retired as + * its easy to confuse with the VirtIO backend_features. + */ 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 */ + + /** + * @protocol_features: is the vhost-user only feature set by + * VHOST_USER_SET_PROTOCOL_FEATURES. Protocol features are only + * negotiated if VHOST_USER_F_PROTOCOL_FEATURES has been offered + * by the backend (see @features). + */ uint64_t protocol_features; + uint64_t max_queues; uint64_t backend_cap; /* @started: is the vhost device started? */ diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index a973811cbf..0f612067f7 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -93,6 +93,12 @@ enum virtio_device_endian { VIRTIO_DEVICE_ENDIAN_BIG, }; =20 +/** + * struct VirtIODevice - common VirtIO structure + * @name: name of the device + * @status: VirtIO Device Status field + * + */ struct VirtIODevice { DeviceState parent_obj; @@ -100,9 +106,20 @@ struct VirtIODevice uint8_t status; uint8_t isr; uint16_t queue_sel; - uint64_t guest_features; + /** + * These fields represent a set of VirtIO features at various + * levels of the stack. @host_features indicates the complete + * feature set the VirtIO device can offer to the driver. + * @guest_features indicates which features the VirtIO driver has + * selected by writing to the feature register. Finally + * @backend_features represents everything supported by the + * backend (e.g. vhost) and could potentially be a subset of the + * total feature set offered by QEMU. + */ uint64_t host_features; + uint64_t guest_features; uint64_t backend_features; + size_t config_len; void *config; uint16_t config_vector; --=20 2.34.1 From nobody Mon May 6 04:49:27 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1669397507; cv=none; d=zohomail.com; s=zohoarc; b=clVgkFkBbH5oNNJo0He/YUxVy/hPc8F5u3vQQv8S5DOdUg8ODCgxKM7cD/gMUQW06wT75FNC2NnbegDLoxci/wwLBDIXz2haEfrEj9tT53HYXcOk4eCcLPSnyGa/dV0OFUSKNkHvSM653dgyzunW9IS29A3JiGUnxx2abIHrHMs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669397507; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9DG6Z60g5BE8Y2pNczTMVoNVOGhKFXAV6GN7gVc4h2s=; b=kBLTvAkF4FDDDd/bVcMfQIIphwG5pdwSPV591NIlEvZYigEd9JjjM0W28kp3OxH9kKCY9g47QVHMHSLx2uyZ1XofP429ahjYZJqYNv2PRy6m3tehU0Dj7cf6XXzenhtJLnV+PF0qbEfFdHVBVm+QhtxGntz6xLCygN7Cf066SQI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1669397507236886.5578224035181; Fri, 25 Nov 2022 09:31:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oycXX-0004Sy-RM; Fri, 25 Nov 2022 12:31:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oycXJ-0004ND-5j for qemu-devel@nongnu.org; Fri, 25 Nov 2022 12:30:50 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oycXG-0004V0-Sx for qemu-devel@nongnu.org; Fri, 25 Nov 2022 12:30:48 -0500 Received: by mail-wm1-x333.google.com with SMTP id j5-20020a05600c410500b003cfa9c0ea76so3899552wmi.3 for ; Fri, 25 Nov 2022 09:30:46 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id bg3-20020a05600c3c8300b003c71358a42dsm13390884wmb.18.2022.11.25.09.30.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 09:30:44 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4F8421FFBA; Fri, 25 Nov 2022 17:30:43 +0000 (GMT) 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:subject:date :message-id:reply-to; bh=9DG6Z60g5BE8Y2pNczTMVoNVOGhKFXAV6GN7gVc4h2s=; b=JCGUA/1k0LhuYtCV5TcXZpZ7l1URX64L8z2XsMpj6Mctt3BnK/M1GF6qnlo1yg+Xpo Q/Hk9PRaXKCnEzxVHqvX/O3b/mtC5r/9mt66rn0jIOYBdhPdTUG7DkpIxswfyAZL73ZX CLPm32lR7u0+uCZH9Q/qMldgVY6v+t0NUhHxCJhcxqagOjUH5zIxtZlYgbr8xiUllBUS DZuAL9vtP9f7i0E8gG/smHxCDoHL/yiFblSxVOdpmqRcVWIeheckDzBLVd0fUFOjqd3B H8g2wcjfFzEWAaQizksJ5+ih8h4QPufmvJEEmaGe6sIqLfj8q/MzqdBCEQijDX19aEuI O2kg== 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 :subject:date:message-id:reply-to; bh=9DG6Z60g5BE8Y2pNczTMVoNVOGhKFXAV6GN7gVc4h2s=; b=SReTwSPyPochXzmN6hCJq+X5heRgNh4m5nCEPkur45sCnU6Hp8912INGWljVn6IorO 8kOx34SIllggjF/wj4q4TmXfHQLw/5OxXRSb1pzFEBOldvWZFwJ8kF/eu/T2wyvDIWBE mdRdvipYNufoXmLf/MV9gpnBx/xFOI7/rbPweU6lUxRtR/NFvaZ4TXbn0mLXw8UFEBmE MZQjye8CEhBOhMS4vebviyliC22JX+JdvdpEou9uLoYeXKUas4LoWKuLYATC8oUpoeBL rmHrWaYODNQj7SZgYaj/PJ1ghH0K2QxR4cinZRdkD5AMfgw6EuQY/aOKA0JhNc92P5JS FCZg== X-Gm-Message-State: ANoB5pnEd5S0m2eZCAvggFsoXDTPxQVmGc76iDV8i7tCfiPxD0mzU4vg MLOw98alWfSh9KbK19FzUSLJRw== X-Google-Smtp-Source: AA0mqf4d7JailO4h6WJ2PcMV29w/ECruuHZazW6UcMDk9ZvK/3aXBRSxd+STFKJK+BQu36ipKoYc5w== X-Received: by 2002:a05:600c:4aa9:b0:3cf:68bb:f5b8 with SMTP id b41-20020a05600c4aa900b003cf68bbf5b8mr32104682wmp.67.1669397445465; Fri, 25 Nov 2022 09:30:45 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=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, sgarzare@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Christian Borntraeger Subject: [PATCH v2 2/5] include/hw: VM state takes precedence in virtio_device_should_start Date: Fri, 25 Nov 2022 17:30:40 +0000 Message-Id: <20221125173043.1998075-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221125173043.1998075-1-alex.bennee@linaro.org> References: <20221125173043.1998075-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1669397508082100001 The VM status should always preempt the device status for these checks. This ensures the device is in the correct state when we suspend the VM prior to migrations. This restores the checks to the order they where in before the refactoring moved things around. While we are at it lets improve our documentation of the various fields involved and document the two functions. Fixes: 9f6bcfd99f (hw/virtio: move vm_running check to virtio_device_starte= d) Fixes: 259d69c00b (hw/virtio: introduce virtio_device_should_start) Signed-off-by: Alex Benn=C3=A9e Tested-by: Christian Borntraeger --- include/hw/virtio/virtio.h | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 0f612067f7..48f539d0fe 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -133,6 +133,13 @@ struct VirtIODevice bool broken; /* device in invalid state, needs reset */ bool use_disabled_flag; /* allow use of 'disable' flag when needed */ bool disabled; /* device in temporarily disabled state */ + /** + * @use_started: true if the @started flag should be used to check the + * current state of the VirtIO device. Otherwise status bits + * should be checked for a current status of the device. + * @use_started is only set via QMP and defaults to true for all + * modern machines (since 4.1). + */ bool use_started; bool started; bool start_on_kick; /* when virtio 1.0 feature has not been negotiated= */ @@ -408,6 +415,17 @@ static inline bool virtio_is_big_endian(VirtIODevice *= vdev) return false; } =20 + +/** + * virtio_device_should_start() - check if device started + * @vdev - the VirtIO device + * @status - the devices status bits + * + * Check if the device is started. For most modern machines this is + * tracked via the @vdev->started field (to support migration), + * otherwise we check for the final negotiated status bit that + * indicates everything is ready. + */ static inline bool virtio_device_started(VirtIODevice *vdev, uint8_t statu= s) { if (vdev->use_started) { @@ -428,15 +446,11 @@ static inline bool virtio_device_started(VirtIODevice= *vdev, uint8_t status) */ static inline bool virtio_device_should_start(VirtIODevice *vdev, uint8_t = status) { - if (vdev->use_started) { - return vdev->started; - } - if (!vdev->vm_running) { return false; } =20 - return status & VIRTIO_CONFIG_S_DRIVER_OK; + return virtio_device_started(vdev, status); } =20 static inline void virtio_set_started(VirtIODevice *vdev, bool started) --=20 2.34.1 From nobody Mon May 6 04:49:27 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1669397554; cv=none; d=zohomail.com; s=zohoarc; b=kjT7DkxYwPvCNGcjZIcjwzByEtxWKK8BghylsDMN/XhbLaWO543mn0x8Y9wUCJHmVTNY+fO6K2nMQ9K1ZkngbqczNaZQncY2Wj1x+RXq2Pu9JQKF1TNnvlVEztAAUo7mn2+k4/7UKErZdS26KazmM0q5U4LTMr0CR7idSILTwTc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669397554; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KhIII14ps0nVEVy/8MmJ4sK/j5eE6abuNMevIXJoNIs=; b=L99HaxgS4x9ZuEAqXU+pxj4MBdOKfP0zlkwTpmvGFepSB+APFUjBZ1NEK4RDiL4GtaAqxZBkEoNnVCZREQv50erIvz2fpFJ1wva/j9TDY50vRWE9qB+ZDGBgTeZpBnrzTdaRVp15fXBhO+kVgq86i7NI5Mc2qnaG655q1Hmsobs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1669397554172177.08321210744975; Fri, 25 Nov 2022 09:32:34 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oycXY-0004UQ-K7; Fri, 25 Nov 2022 12:31:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oycXK-0004O7-OE for qemu-devel@nongnu.org; Fri, 25 Nov 2022 12:30:51 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oycXI-0004V9-11 for qemu-devel@nongnu.org; Fri, 25 Nov 2022 12:30:49 -0500 Received: by mail-wr1-x42e.google.com with SMTP id z4so7792481wrr.3 for ; Fri, 25 Nov 2022 09:30:47 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id k17-20020a05600c1c9100b003c6b874a0dfsm8014653wms.14.2022.11.25.09.30.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 09:30:44 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6772F1FFBB; Fri, 25 Nov 2022 17:30:43 +0000 (GMT) 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:subject:date :message-id:reply-to; bh=KhIII14ps0nVEVy/8MmJ4sK/j5eE6abuNMevIXJoNIs=; b=XT0Xq5UCZ0tEpEXE6rRkUKa1Kcdpy8U8n3vYOSqQtDSUwoQJcL71clEjVZe20od9zQ WUo0ZOCS/RFgrpq79REiwVbDmKMquuetW000BfCpvH+f93LcxcGAsVvsQy15TSz1zjKV NJaXZ7nieIeik0WU0neicZsfWnGVch/WcfbJ2ZmbS/jlOLulUWMcuylLL5yh+PpTiCwE +ZaZD7GP7sPaZ2LGcUGX8o+rDwWoKfCESbnUcxSlASby5WyngcLN1PRUCqcnUaYS/sE1 DR+fI07aL/xid7gRsTgR9Ocw3jcfhB/PYVMJ3GwGwvHI7x3Z3hqAz4Vt14ANNU8yM/a7 /BbA== 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 :subject:date:message-id:reply-to; bh=KhIII14ps0nVEVy/8MmJ4sK/j5eE6abuNMevIXJoNIs=; b=rx36Q935HiZ+Sk9lLhypWSsFCgIw9pz64TKYpkHursl/EFNPSPpYLS8zEYS1FA0L0b 1U0UrIgsqZfyEAtjlzbUDUSw3ivPvf65X9V60gvF4HAOwWS3jYnMN0ksgkG6fJFXZSmF xhbjjIHnsEFPZ5NmeOi4dTUC2VyvG897QPjmiZQP4Uhtb7NTBNugG4aCoZgKRNjrpJY/ SqxvxBg6t1tSv/RmML9M41OGJtznrsf+jvXbPbVdXHxI9+LfLCM00haZQG/lv13wIj82 r/S5lcyDhb2bKBRexUxLD8Gw68rvbclVD01EZGewtnMJak35lonLCWpCLsUY/ocn3+pl OQmw== X-Gm-Message-State: ANoB5pkX/HtM5g60EUjVxaZ162sRG6FZtpvoyXvxEKswKOXal7MZGEeJ 6mgtqpiwvO0aiawTHi0eBh+bUg== X-Google-Smtp-Source: AA0mqf4K1mefp74X+RNfETuqtIBoonM3Nt/j+jPzq8J+qHU84rdUJp969rj/hxPgnqkde7jaJUxQEQ== X-Received: by 2002:a5d:5952:0:b0:241:a79b:3c41 with SMTP id e18-20020a5d5952000000b00241a79b3c41mr23705868wri.22.1669397446664; Fri, 25 Nov 2022 09:30:46 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=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, sgarzare@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Thomas Huth , Laurent Vivier , Paolo Bonzini Subject: [PATCH v2 3/5] tests/qtests: override "force-legacy" for gpio virtio-mmio tests Date: Fri, 25 Nov 2022 17:30:41 +0000 Message-Id: <20221125173043.1998075-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221125173043.1998075-1-alex.bennee@linaro.org> References: <20221125173043.1998075-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42e.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1669397556335100002 The GPIO device is a VIRTIO_F_VERSION_1 devices but running with a legacy MMIO interface we miss out that feature bit causing confusion. For the GPIO test force the mmio bus to support non-legacy so we can properly test it. Signed-off-by: Alex Benn=C3=A9e Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1333 --- tests/qtest/libqos/virtio-gpio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qtest/libqos/virtio-gpio.c b/tests/qtest/libqos/virtio-g= pio.c index 762aa6695b..f22d7b5eb5 100644 --- a/tests/qtest/libqos/virtio-gpio.c +++ b/tests/qtest/libqos/virtio-gpio.c @@ -154,7 +154,8 @@ static void virtio_gpio_register_nodes(void) QOSGraphEdgeOptions edge_opts =3D { }; =20 /* vhost-user-gpio-device */ - edge_opts.extra_device_opts =3D "id=3Dgpio0,chardev=3Dchr-vhost-user-t= est"; + edge_opts.extra_device_opts =3D "id=3Dgpio0,chardev=3Dchr-vhost-user-t= est " + "-global virtio-mmio.force-legacy=3Dfalse"; qos_node_create_driver("vhost-user-gpio-device", virtio_gpio_device_create); qos_node_consumes("vhost-user-gpio-device", "virtio-bus", &edge_opts); --=20 2.34.1 From nobody Mon May 6 04:49:27 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1669397490; cv=none; d=zohomail.com; s=zohoarc; b=ZLuf0cO5nTyXHCeJKlrIBDHC8hYBu4gYvASf29Qfws4y1nLbuk6titNIAicQxTgPNFrnFLFAH7P7yGcMMaEI1Oc733HpbVR/Pa5TroU7R22oc3mZqTugn3DT14ELwaD1zD5JES3TqNc5uke6Me9Zjj6AbnmBBv39nEmacCFsJCU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669397490; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1Ird9EWm5rUrfSLhU9FEPVhmmn/d7w0Px+XaTSgwxrQ=; b=jaiZrk8T1bOWTBw//chsUJVnRa/zljRTFSUv1y6BJaEurYixyACGeJoDLRyD2Y1FC20IpVdyJ1kyk8oGs+Cbr2AaJZo/67i0tHzhxKs/GvBASdHTwqjBIey7gzM/gqAFEelqaPDGBhYrDNXiI62ZIIkZINwO5jVrUG94RT3xg3s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1669397490600506.7357991766453; Fri, 25 Nov 2022 09:31:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oycXX-0004TL-UV; Fri, 25 Nov 2022 12:31:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oycXM-0004PD-PX for qemu-devel@nongnu.org; Fri, 25 Nov 2022 12:30:54 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oycXJ-0004VQ-42 for qemu-devel@nongnu.org; Fri, 25 Nov 2022 12:30:51 -0500 Received: by mail-wr1-x42d.google.com with SMTP id i12so7846950wrb.0 for ; Fri, 25 Nov 2022 09:30:48 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id g12-20020a5d46cc000000b0022ca921dc67sm4101213wrs.88.2022.11.25.09.30.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 09:30:44 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 7F4831FFBC; Fri, 25 Nov 2022 17:30:43 +0000 (GMT) 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:subject:date :message-id:reply-to; bh=1Ird9EWm5rUrfSLhU9FEPVhmmn/d7w0Px+XaTSgwxrQ=; b=NYpMmAQONbqei4NhdhtgfPWqiYWMpEZg0yrNuQhU80fLybCSTkDMli50KFYlIxsiCR eVXoZHp9KreRzRWQ76cPj9r52H7UWWNAxR7qTHojrCDoeyoXrhe/igNBLeyzU8zEYiSF Igx7b7Z/4ab3SMvtGiG/zkHW5HG12FC/aG7VNC2OFjApZvGiVcZi9SpNUFXucCaPwynE /RSCi0l6PYoCa56TsC2CN0f9aF57OlP2q1M9lk9+BIMtrJgQUuZE/HsdSoCteSWA1Qc6 0p2VQQwE468bH31zf2BbzB/tTqAwTjsIDfn0l7ezupiWvAwZSL+3jsmMbrt/x6H40i82 Xkxw== 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 :subject:date:message-id:reply-to; bh=1Ird9EWm5rUrfSLhU9FEPVhmmn/d7w0Px+XaTSgwxrQ=; b=FEfN974AzA6wWMCoehK0HgRATaUlFUnsvnHxewbcTlNKnPGuiralOtFML7BInKB4qz GCZadHW0qp7EwVEFSviiNRsONQbaMybgC73yqQP7UVnE4Hcqihqs1h8nC80uzgGr9PR3 nO2eEtGWgXCYN4aJLAWaEKniDYF7VSqpWY0xtykBZAMcXcyvbhWfYxtknSpPX0Nr7D75 fappQ4Jde78q9bi3DmJ749HSEcThWb/NKMWcvCG/raP4EOUNQAUUoLx4jDr9JiPp4GHk nUOuo3O8Gw+Fp/LSqD1rxSjN11OGSH4jVcYaszDhUCXU5HIIPh2p0pymC0eOrrGcfzrk 4lQA== X-Gm-Message-State: ANoB5pkyoqUXIqmsOIPrVRL4H/IIyhNbpUZsBDwQJtbcQZ3UfyCdKOir vAZ3pfx1sK/sKML8+F2HaVhGnw== X-Google-Smtp-Source: AA0mqf5rjH81jq1aQhWuh+UwOq+jX065lcdNVeV/Q6uT+8tyft74lPlYoBNqBgTg3JmTH1ptwjJ1Ig== X-Received: by 2002:a5d:50c9:0:b0:241:dc84:eb93 with SMTP id f9-20020a5d50c9000000b00241dc84eb93mr12353618wrt.136.1669397447777; Fri, 25 Nov 2022 09:30:47 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=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, sgarzare@redhat.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v2 4/5] hw/virtio: ensure a valid host_feature set for virtio-user-gpio Date: Fri, 25 Nov 2022 17:30:42 +0000 Message-Id: <20221125173043.1998075-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221125173043.1998075-1-alex.bennee@linaro.org> References: <20221125173043.1998075-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42d.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 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1669397491969100011 There was a disconnect here because vdev->host_features was set to random rubbish. This caused a weird negotiation between the driver and device that took no account of the features provided by the backend. To fix this we must set vdev->host_features once we have initialised the vhost backend. [AJB: however this is confusing because AFAICT none of the other vhost-user devices do this.] Signed-off-by: Alex Benn=C3=A9e --- hw/virtio/vhost-user-gpio.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/virtio/vhost-user-gpio.c b/hw/virtio/vhost-user-gpio.c index 5851cb3bc9..b2496c824c 100644 --- a/hw/virtio/vhost-user-gpio.c +++ b/hw/virtio/vhost-user-gpio.c @@ -228,6 +228,12 @@ static int vu_gpio_connect(DeviceState *dev, Error **e= rrp) return ret; } =20 + /* + * Once we have initialised the vhost backend we can finally set + * the what host features are available for this device. + */ + vdev->host_features =3D vhost_dev->features; + /* restore vhost state */ if (virtio_device_started(vdev, vdev->status)) { vu_gpio_start(vdev); --=20 2.34.1 From nobody Mon May 6 04:49:27 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1669397521; cv=none; d=zohomail.com; s=zohoarc; b=EJqMfqSSW+ngRF6p4ECxn3METAJ+W35X5+rlms6ekTeZMufx042vOFsHQMGR5Gk+OjiNZT8sseGOzydFXaU7sGIOUU35AR3CBs5pllET2Ml8p+C1kKTGIJzw9YI2yJYW9q5s/01q93ABF8lz6ldPvGqG1OoJGbnITby6SHQshRo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1669397521; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BJQ/JEKALcH9lJ7xFy8iXB5Ea36VbtyMrZxDHC60VlY=; b=c2vjj1xcZwfgXdjsNjX6ggGytkq9WZT1DsASC9BmlJAv6f06MeVpK5eR+isnP+SoKEOdX0/iEgalFaW7trZtsn5XKPKBqAeYvXxWU7srZmOo49kSgrMbZT34BYdNv9ie/mVxrqzMChJ3MnnaZcZ6ulwX8qk+OGQwBPbnynuu3Uo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1669397521439308.5562319795804; Fri, 25 Nov 2022 09:32:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oycXa-0004V3-N7; Fri, 25 Nov 2022 12:31:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oycXO-0004PG-OB for qemu-devel@nongnu.org; Fri, 25 Nov 2022 12:30:57 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oycXK-0004Vu-VC for qemu-devel@nongnu.org; Fri, 25 Nov 2022 12:30:53 -0500 Received: by mail-wr1-x430.google.com with SMTP id cl5so7765794wrb.9 for ; Fri, 25 Nov 2022 09:30:50 -0800 (PST) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id u10-20020a05600c19ca00b003c5571c27a1sm7843052wmq.32.2022.11.25.09.30.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Nov 2022 09:30:46 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B68581FFBD; Fri, 25 Nov 2022 17:30:43 +0000 (GMT) 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:subject:date :message-id:reply-to; bh=BJQ/JEKALcH9lJ7xFy8iXB5Ea36VbtyMrZxDHC60VlY=; b=AUagxbEO11o/1lfmwfVUjY8I5arrrcNeztWvK4rAJFq54a3oDh//kSmc2cySSkLg4n ysNKCxIfwErf1dDKR7cR9yNU4AO6usKTAAsVvZ5pfJlUYbTZWLwwnxF0FImJaujYVGSm 8yyi6DEwDGbpSlUdUbV2Ug7DRB0ahYsQ/H356W2n0Scriu/F/iE9pcw8KlyghvNRruA+ 90F4Pgw5yalJlkLFpycPIRm8VeUr70HoiqxpobCmUbtn1wkBAw/EaFDhEEN89efrjONj 7ndCkykUjb4SGk8n47a37dUINVdyAw1jq2EfBf22OwwPMGVEneutR8rFHNSio8RpqRzX JzPA== 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 :subject:date:message-id:reply-to; bh=BJQ/JEKALcH9lJ7xFy8iXB5Ea36VbtyMrZxDHC60VlY=; b=SUdb0Juy916WcAhq9YJI52Mk/NRD+ViUB7tbnQ3z77TuQkYoLcx2VGL8wOyMYNLYH9 sF2jys//BvJVugQvpbPxpZbiDq1VjFBp4MRBrgbv971p1LB2FPPk+jgY2BM/3DXBY0Ds Kgs1IvK/JKYvdTPHLExbGaamIepkqu3AazaJ7LkSH+DelfnbZ49/jYRVvKD4t9Lkmml7 X86w3XWi/Qra44WdYbsz+4IjW0tsg4ZxFWfWqP2n6jL38eqHuII/ep3kg3Whrwt+YxYW nn/bSSN4aVXxeuOus1DlL/x/eIKbwAdfq7yZOJWcGERc4qYz6oOnv9rE8s+mH7GV6OKI kBdA== X-Gm-Message-State: ANoB5pkS4dtkqk5S9oEpNbjg5gO7lVOObZmGL0ihErwquzYhhpBdFXhL BnbrxJvBuBSTlTcGmFxOyD2CKQ== X-Google-Smtp-Source: AA0mqf4tc/v4dZG5knPEY6J9AERU3/HzESOdymW2ApKD+PVJ6HF282Ix0wpPJA2Q2HrlOzVk3IE+Fw== X-Received: by 2002:adf:e3d2:0:b0:241:d676:a787 with SMTP id k18-20020adfe3d2000000b00241d676a787mr16445813wrm.694.1669397449063; Fri, 25 Nov 2022 09:30:49 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=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, sgarzare@redhat.com, German Maglione , Raphael Norwitz , =?UTF-8?q?Alex=20Benn=C3=A9e?= , "Gonglei (Arei)" , Kevin Wolf , Hanna Reitz , Jason Wang , Paolo Bonzini , Fam Zheng , "Dr. David Alan Gilbert" , qemu-block@nongnu.org (open list:Block layer core), virtio-fs@redhat.com (open list:virtiofs) Subject: [PATCH v2 5/5] vhost: enable vrings in vhost_dev_start() for vhost-user devices Date: Fri, 25 Nov 2022 17:30:43 +0000 Message-Id: <20221125173043.1998075-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221125173043.1998075-1-alex.bennee@linaro.org> References: <20221125173043.1998075-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x430.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 autolearn=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1669397522170100003 From: Stefano Garzarella Commit 02b61f38d3 ("hw/virtio: incorporate backend features in features") properly negotiates VHOST_USER_F_PROTOCOL_FEATURES with the vhost-user backend, but we forgot to enable vrings as specified in docs/interop/vhost-user.rst: If ``VHOST_USER_F_PROTOCOL_FEATURES`` has not been negotiated, the ring starts directly in the enabled state. If ``VHOST_USER_F_PROTOCOL_FEATURES`` has been negotiated, the ring is initialized in a disabled state and is enabled by ``VHOST_USER_SET_VRING_ENABLE`` with parameter 1. Some vhost-user front-ends already did this by calling vhost_ops.vhost_set_vring_enable() directly: - backends/cryptodev-vhost.c - hw/net/virtio-net.c - hw/virtio/vhost-user-gpio.c But most didn't do that, so we would leave the vrings disabled and some backends would not work. We observed this issue with the rust version of virtiofsd [1], which uses the event loop [2] provided by the vhost-user-backend crate where requests are not processed if vring is not enabled. Let's fix this issue by enabling the vrings in vhost_dev_start() for vhost-user front-ends that don't already do this directly. Same thing also in vhost_dev_stop() where we disable vrings. [1] https://gitlab.com/virtio-fs/virtiofsd [2] https://github.com/rust-vmm/vhost/blob/240fc2966/crates/vhost-user-back= end/src/event_loop.rs#L217 Fixes: 02b61f38d3 ("hw/virtio: incorporate backend features in features") Reported-by: German Maglione Tested-by: German Maglione Signed-off-by: Stefano Garzarella Acked-by: Raphael Norwitz Message-Id: <20221123131630.52020-1-sgarzare@redhat.com> Signed-off-by: Alex Benn=C3=A9e --- include/hw/virtio/vhost.h | 6 +++-- backends/cryptodev-vhost.c | 4 ++-- backends/vhost-user.c | 4 ++-- hw/block/vhost-user-blk.c | 4 ++-- hw/net/vhost_net.c | 8 +++---- hw/scsi/vhost-scsi-common.c | 4 ++-- hw/virtio/vhost-user-fs.c | 4 ++-- hw/virtio/vhost-user-gpio.c | 4 ++-- hw/virtio/vhost-user-i2c.c | 4 ++-- hw/virtio/vhost-user-rng.c | 4 ++-- hw/virtio/vhost-vsock-common.c | 4 ++-- hw/virtio/vhost.c | 44 ++++++++++++++++++++++++++++++---- hw/virtio/trace-events | 4 ++-- 13 files changed, 67 insertions(+), 31 deletions(-) diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index eaf628f656..1cafa0d776 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -203,24 +203,26 @@ static inline bool vhost_dev_is_started(struct vhost_= dev *hdev) * vhost_dev_start() - start the vhost device * @hdev: common vhost_dev structure * @vdev: the VirtIODevice structure + * @vrings: true to have vrings enabled in this call * * Starts the vhost device. From this point VirtIO feature negotiation * can start and the device can start processing VirtIO transactions. * * Return: 0 on success, < 0 on error. */ -int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev); +int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev, bool vring= s); =20 /** * vhost_dev_stop() - stop the vhost device * @hdev: common vhost_dev structure * @vdev: the VirtIODevice structure + * @vrings: true to have vrings disabled in this call * * Stop the vhost device. After the device is stopped the notifiers * can be disabled (@vhost_dev_disable_notifiers) and the device can * be torn down (@vhost_dev_cleanup). */ -void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev); +void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev, bool vring= s); =20 /** * DOC: vhost device configuration handling diff --git a/backends/cryptodev-vhost.c b/backends/cryptodev-vhost.c index bc13e466b4..572f87b3be 100644 --- a/backends/cryptodev-vhost.c +++ b/backends/cryptodev-vhost.c @@ -94,7 +94,7 @@ cryptodev_vhost_start_one(CryptoDevBackendVhost *crypto, goto fail_notifiers; } =20 - r =3D vhost_dev_start(&crypto->dev, dev); + r =3D vhost_dev_start(&crypto->dev, dev, false); if (r < 0) { goto fail_start; } @@ -111,7 +111,7 @@ static void cryptodev_vhost_stop_one(CryptoDevBackendVhost *crypto, VirtIODevice *dev) { - vhost_dev_stop(&crypto->dev, dev); + vhost_dev_stop(&crypto->dev, dev, false); vhost_dev_disable_notifiers(&crypto->dev, dev); } =20 diff --git a/backends/vhost-user.c b/backends/vhost-user.c index 5dedb2d987..7bfcaef976 100644 --- a/backends/vhost-user.c +++ b/backends/vhost-user.c @@ -85,7 +85,7 @@ vhost_user_backend_start(VhostUserBackend *b) } =20 b->dev.acked_features =3D b->vdev->guest_features; - ret =3D vhost_dev_start(&b->dev, b->vdev); + ret =3D vhost_dev_start(&b->dev, b->vdev, true); if (ret < 0) { error_report("Error start vhost dev"); goto err_guest_notifiers; @@ -120,7 +120,7 @@ vhost_user_backend_stop(VhostUserBackend *b) return; } =20 - vhost_dev_stop(&b->dev, b->vdev); + vhost_dev_stop(&b->dev, b->vdev, true); =20 if (k->set_guest_notifiers) { ret =3D k->set_guest_notifiers(qbus->parent, diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 0d5190accf..1177064631 100644 --- a/hw/block/vhost-user-blk.c +++ b/hw/block/vhost-user-blk.c @@ -178,7 +178,7 @@ static int vhost_user_blk_start(VirtIODevice *vdev, Err= or **errp) } =20 s->dev.vq_index_end =3D s->dev.nvqs; - ret =3D vhost_dev_start(&s->dev, vdev); + ret =3D vhost_dev_start(&s->dev, vdev, true); if (ret < 0) { error_setg_errno(errp, -ret, "Error starting vhost"); goto err_guest_notifiers; @@ -213,7 +213,7 @@ static void vhost_user_blk_stop(VirtIODevice *vdev) return; } =20 - vhost_dev_stop(&s->dev, vdev); + vhost_dev_stop(&s->dev, vdev, true); =20 ret =3D k->set_guest_notifiers(qbus->parent, s->dev.nvqs, false); if (ret < 0) { diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 26e4930676..043058ff43 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -259,7 +259,7 @@ static int vhost_net_start_one(struct vhost_net *net, goto fail_notifiers; } =20 - r =3D vhost_dev_start(&net->dev, dev); + r =3D vhost_dev_start(&net->dev, dev, false); if (r < 0) { goto fail_start; } @@ -308,7 +308,7 @@ fail: if (net->nc->info->poll) { net->nc->info->poll(net->nc, true); } - vhost_dev_stop(&net->dev, dev); + vhost_dev_stop(&net->dev, dev, false); fail_start: vhost_dev_disable_notifiers(&net->dev, dev); fail_notifiers: @@ -329,7 +329,7 @@ static void vhost_net_stop_one(struct vhost_net *net, if (net->nc->info->poll) { net->nc->info->poll(net->nc, true); } - vhost_dev_stop(&net->dev, dev); + vhost_dev_stop(&net->dev, dev, false); if (net->nc->info->stop) { net->nc->info->stop(net->nc); } @@ -606,7 +606,7 @@ err_start: assert(r >=3D 0); } =20 - vhost_dev_stop(&net->dev, vdev); + vhost_dev_stop(&net->dev, vdev, false); =20 return r; } diff --git a/hw/scsi/vhost-scsi-common.c b/hw/scsi/vhost-scsi-common.c index 767f827e55..18ea5dcfa1 100644 --- a/hw/scsi/vhost-scsi-common.c +++ b/hw/scsi/vhost-scsi-common.c @@ -68,7 +68,7 @@ int vhost_scsi_common_start(VHostSCSICommon *vsc) goto err_guest_notifiers; } =20 - ret =3D vhost_dev_start(&vsc->dev, vdev); + ret =3D vhost_dev_start(&vsc->dev, vdev, true); if (ret < 0) { error_report("Error start vhost dev"); goto err_guest_notifiers; @@ -101,7 +101,7 @@ void vhost_scsi_common_stop(VHostSCSICommon *vsc) VirtioBusClass *k =3D VIRTIO_BUS_GET_CLASS(qbus); int ret =3D 0; =20 - vhost_dev_stop(&vsc->dev, vdev); + vhost_dev_stop(&vsc->dev, vdev, true); =20 if (k->set_guest_notifiers) { ret =3D k->set_guest_notifiers(qbus->parent, vsc->dev.nvqs, false); diff --git a/hw/virtio/vhost-user-fs.c b/hw/virtio/vhost-user-fs.c index dc4014cdef..d97b179e6f 100644 --- a/hw/virtio/vhost-user-fs.c +++ b/hw/virtio/vhost-user-fs.c @@ -76,7 +76,7 @@ static void vuf_start(VirtIODevice *vdev) } =20 fs->vhost_dev.acked_features =3D vdev->guest_features; - ret =3D vhost_dev_start(&fs->vhost_dev, vdev); + ret =3D vhost_dev_start(&fs->vhost_dev, vdev, true); if (ret < 0) { error_report("Error starting vhost: %d", -ret); goto err_guest_notifiers; @@ -110,7 +110,7 @@ static void vuf_stop(VirtIODevice *vdev) return; } =20 - vhost_dev_stop(&fs->vhost_dev, vdev); + vhost_dev_stop(&fs->vhost_dev, vdev, true); =20 ret =3D k->set_guest_notifiers(qbus->parent, fs->vhost_dev.nvqs, false= ); if (ret < 0) { diff --git a/hw/virtio/vhost-user-gpio.c b/hw/virtio/vhost-user-gpio.c index b2496c824c..b38e4d4cf0 100644 --- a/hw/virtio/vhost-user-gpio.c +++ b/hw/virtio/vhost-user-gpio.c @@ -81,7 +81,7 @@ static int vu_gpio_start(VirtIODevice *vdev) */ vhost_ack_features(&gpio->vhost_dev, feature_bits, vdev->guest_feature= s); =20 - ret =3D vhost_dev_start(&gpio->vhost_dev, vdev); + ret =3D vhost_dev_start(&gpio->vhost_dev, vdev, false); if (ret < 0) { error_report("Error starting vhost-user-gpio: %d", ret); goto err_guest_notifiers; @@ -139,7 +139,7 @@ static void vu_gpio_stop(VirtIODevice *vdev) return; } =20 - vhost_dev_stop(vhost_dev, vdev); + vhost_dev_stop(vhost_dev, vdev, false); =20 ret =3D k->set_guest_notifiers(qbus->parent, vhost_dev->nvqs, false); if (ret < 0) { diff --git a/hw/virtio/vhost-user-i2c.c b/hw/virtio/vhost-user-i2c.c index 1c9f3d20dc..dc5c828ba6 100644 --- a/hw/virtio/vhost-user-i2c.c +++ b/hw/virtio/vhost-user-i2c.c @@ -46,7 +46,7 @@ static void vu_i2c_start(VirtIODevice *vdev) =20 i2c->vhost_dev.acked_features =3D vdev->guest_features; =20 - ret =3D vhost_dev_start(&i2c->vhost_dev, vdev); + ret =3D vhost_dev_start(&i2c->vhost_dev, vdev, true); if (ret < 0) { error_report("Error starting vhost-user-i2c: %d", -ret); goto err_guest_notifiers; @@ -80,7 +80,7 @@ static void vu_i2c_stop(VirtIODevice *vdev) return; } =20 - vhost_dev_stop(&i2c->vhost_dev, vdev); + vhost_dev_stop(&i2c->vhost_dev, vdev, true); =20 ret =3D k->set_guest_notifiers(qbus->parent, i2c->vhost_dev.nvqs, fals= e); if (ret < 0) { diff --git a/hw/virtio/vhost-user-rng.c b/hw/virtio/vhost-user-rng.c index f9084cde58..201a39e220 100644 --- a/hw/virtio/vhost-user-rng.c +++ b/hw/virtio/vhost-user-rng.c @@ -47,7 +47,7 @@ static void vu_rng_start(VirtIODevice *vdev) } =20 rng->vhost_dev.acked_features =3D vdev->guest_features; - ret =3D vhost_dev_start(&rng->vhost_dev, vdev); + ret =3D vhost_dev_start(&rng->vhost_dev, vdev, true); if (ret < 0) { error_report("Error starting vhost-user-rng: %d", -ret); goto err_guest_notifiers; @@ -81,7 +81,7 @@ static void vu_rng_stop(VirtIODevice *vdev) return; } =20 - vhost_dev_stop(&rng->vhost_dev, vdev); + vhost_dev_stop(&rng->vhost_dev, vdev, true); =20 ret =3D k->set_guest_notifiers(qbus->parent, rng->vhost_dev.nvqs, fals= e); if (ret < 0) { diff --git a/hw/virtio/vhost-vsock-common.c b/hw/virtio/vhost-vsock-common.c index a67a275de2..d21c72b401 100644 --- a/hw/virtio/vhost-vsock-common.c +++ b/hw/virtio/vhost-vsock-common.c @@ -70,7 +70,7 @@ int vhost_vsock_common_start(VirtIODevice *vdev) } =20 vvc->vhost_dev.acked_features =3D vdev->guest_features; - ret =3D vhost_dev_start(&vvc->vhost_dev, vdev); + ret =3D vhost_dev_start(&vvc->vhost_dev, vdev, true); if (ret < 0) { error_report("Error starting vhost: %d", -ret); goto err_guest_notifiers; @@ -105,7 +105,7 @@ void vhost_vsock_common_stop(VirtIODevice *vdev) return; } =20 - vhost_dev_stop(&vvc->vhost_dev, vdev); + vhost_dev_stop(&vvc->vhost_dev, vdev, true); =20 ret =3D k->set_guest_notifiers(qbus->parent, vvc->vhost_dev.nvqs, fals= e); if (ret < 0) { diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index d1c4c20b8c..7fb008bc9e 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -1777,15 +1777,36 @@ int vhost_dev_get_inflight(struct vhost_dev *dev, u= int16_t queue_size, return 0; } =20 +static int vhost_dev_set_vring_enable(struct vhost_dev *hdev, int enable) +{ + if (!hdev->vhost_ops->vhost_set_vring_enable) { + return 0; + } + + /* + * For vhost-user devices, if VHOST_USER_F_PROTOCOL_FEATURES has not + * been negotiated, the rings start directly in the enabled state, and + * .vhost_set_vring_enable callback will fail since + * VHOST_USER_SET_VRING_ENABLE is not supported. + */ + if (hdev->vhost_ops->backend_type =3D=3D VHOST_BACKEND_TYPE_USER && + !virtio_has_feature(hdev->backend_features, + VHOST_USER_F_PROTOCOL_FEATURES)) { + return 0; + } + + return hdev->vhost_ops->vhost_set_vring_enable(hdev, enable); +} + /* Host notifiers must be enabled at this point. */ -int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev) +int vhost_dev_start(struct vhost_dev *hdev, VirtIODevice *vdev, bool vring= s) { int i, r; =20 /* should only be called after backend is connected */ assert(hdev->vhost_ops); =20 - trace_vhost_dev_start(hdev, vdev->name); + trace_vhost_dev_start(hdev, vdev->name, vrings); =20 vdev->vhost_started =3D true; hdev->started =3D true; @@ -1830,10 +1851,16 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIOD= evice *vdev) goto fail_log; } } + if (vrings) { + r =3D vhost_dev_set_vring_enable(hdev, true); + if (r) { + goto fail_log; + } + } if (hdev->vhost_ops->vhost_dev_start) { r =3D hdev->vhost_ops->vhost_dev_start(hdev, true); if (r) { - goto fail_log; + goto fail_start; } } if (vhost_dev_has_iommu(hdev) && @@ -1848,6 +1875,10 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODe= vice *vdev) } } return 0; +fail_start: + if (vrings) { + vhost_dev_set_vring_enable(hdev, false); + } fail_log: vhost_log_put(hdev, false); fail_vq: @@ -1866,18 +1897,21 @@ fail_features: } =20 /* Host notifiers must be enabled at this point. */ -void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev) +void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev, bool vring= s) { int i; =20 /* should only be called after backend is connected */ assert(hdev->vhost_ops); =20 - trace_vhost_dev_stop(hdev, vdev->name); + trace_vhost_dev_stop(hdev, vdev->name, vrings); =20 if (hdev->vhost_ops->vhost_dev_start) { hdev->vhost_ops->vhost_dev_start(hdev, false); } + if (vrings) { + vhost_dev_set_vring_enable(hdev, false); + } for (i =3D 0; i < hdev->nvqs; ++i) { vhost_virtqueue_stop(hdev, vdev, diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events index 820dadc26c..14fc5b9bb2 100644 --- a/hw/virtio/trace-events +++ b/hw/virtio/trace-events @@ -9,8 +9,8 @@ vhost_section(const char *name) "%s" vhost_reject_section(const char *name, int d) "%s:%d" vhost_iotlb_miss(void *dev, int step) "%p step %d" vhost_dev_cleanup(void *dev) "%p" -vhost_dev_start(void *dev, const char *name) "%p:%s" -vhost_dev_stop(void *dev, const char *name) "%p:%s" +vhost_dev_start(void *dev, const char *name, bool vrings) "%p:%s vrings:%d" +vhost_dev_stop(void *dev, const char *name, bool vrings) "%p:%s vrings:%d" =20 =20 # vhost-user.c --=20 2.34.1