From patchwork Mon Oct 10 17:28:41 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: 613760 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2117248pvb; Mon, 10 Oct 2022 10:33:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7SgcgBiuZoVcUL7IJjppVGuHcbDXAuI2s5Q7keLnO+bsnaCBWF4dtJvNzpU7IeVpprxXB7 X-Received: by 2002:a05:622a:8a:b0:35d:5434:cd1 with SMTP id o10-20020a05622a008a00b0035d54340cd1mr15877380qtw.655.1665423205958; Mon, 10 Oct 2022 10:33:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665423205; cv=none; d=google.com; s=arc-20160816; b=hM43NwH8RGvR3FwP7t/K2TIOo78cinWM92yCZXmHVzmBeF5eLIU5O+vCLl5nsg2DKM v5+AG9a23Wn7aZ3uk3zlQkWs9BKIDVDZAmNqC5oL3PKT89iEev0wqwEFMBaEzuV9l83f a0xlt40UaU4+eQ3d4dlTxy7kWDIvD/l748F4XbRYNO0EpVlczlzodoKzDXLotKAUjzQD vT98rdCKDcdmKlbrIW4fxGmQMwLQte+Vz0JP9ymFmod62V/h1OK40bl6zMIgfSrJxX8S JVFJcG/Pg5eXlQvuBGDTMxjr1t0e0RTfbfmxhvsREWBHM+66Ir4w1SQZGzFsR9gDXj+s y4cA== 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=rfuSsgJ8/3kGgCVZkv5tOI5S+PHvx8Oz4NxCMhgWj98=; b=kChffh4nZVJV3v5YFPx8pXkO87uhxQHk8b+mUh5sXx/BFhwAjLVqInL8SDDcpKjRXi lHjUsFkl7CSjkU7hguuf34o3EVT3oaxMKNco/V72CoKXcfpcWBHmVi4WTWl3Zc+pMcBX JqbUFWwsfXA9ENayTyDurxDd5hq7K+ierGcocELZMLSnvqL3DRJJY+Ukt9DDguhr/gcT ygMmQryBSAtJNr15zYGfwdHA77EX8VHJLcgVwoTmW1O58lUwCnARHK09fok7hGQ1fdR8 fyhCti0DkMAHM6mqileVyTSXbditcalE4nYzKhrEzljBuNpdNk5YOOrnSukXDWqiYP02 WrgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=foacEpD4; 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 s12-20020a05620a29cc00b006ed1daa8056si1774725qkp.661.2022.10.10.10.33.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Oct 2022 10:33:25 -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=foacEpD4; 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]:52478 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohweb-0002tW-Gi for patch@linaro.org; Mon, 10 Oct 2022 13:33:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohwaG-0007ek-Sg for qemu-devel@nongnu.org; Mon, 10 Oct 2022 13:28:56 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:23675) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohwaB-0006Ow-Cl for qemu-devel@nongnu.org; Mon, 10 Oct 2022 13:28:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665422930; 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=rfuSsgJ8/3kGgCVZkv5tOI5S+PHvx8Oz4NxCMhgWj98=; b=foacEpD4kKc+/BPbk2MFBrNj6Ryr6iCAyIOAlX/EZrbM4rLtRuuPQ9amREaHuTxwPiHIy2 LB17pMHbbRp4x8aaqs1XLzE7oZ5T8c1cd2DAjXUi9F3F+HJNwhp2tWFiVhHY7mJ4OENJUb lQtOTTMfVRGxlwwR9LmyJ+vW/etanEY= 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.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-553-XR5EWz1kP-qh0nTlV7iA5A-1; Mon, 10 Oct 2022 13:28:47 -0400 X-MC-Unique: XR5EWz1kP-qh0nTlV7iA5A-1 Received: by mail-wm1-f69.google.com with SMTP id k2-20020a05600c1c8200b003c3dd3aa638so4806635wms.1 for ; Mon, 10 Oct 2022 10:28:47 -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=rfuSsgJ8/3kGgCVZkv5tOI5S+PHvx8Oz4NxCMhgWj98=; b=B0H+rsiKqDAy3uJvUkUT3GBbhCM45drGjOeSghJXK6Po1fjEpGItK9MhaSZay86ExV Vh11StvKzsk0MLT87TurbWjiKzuzmMh8rk53O+etc533CLYwOIVIIF6xo+MWSJVKrNYd YXCf2nWK3RevSV2iEv9f821txIItDdeMDXF/R5dG/nNaootqv4jz+mQMTqB/VL54qmFb YEvmHVJKzDlog8OMLL+qSPM/jA/BRMZArXoG41BqbgdTL8TwWSPAyRSbxBEZ3yrrHhHb y/S0UHjRAN4AycKKiuar6Zj7wJ6snlQDyZu2rTfygg2JEMVDMl1FigUwPvCCrei8ai5C iyjA== X-Gm-Message-State: ACrzQf2ffiGtoPTgPAg2rQ5AuA7H6MMg3PfcKTpTew+7Lart8yJNK0ZG QyFl0IP/C5BHgZOzh151H5Gsm9LVIyqXA88XnDuPN8wSAYhiy+sf/JJLYr4buZirBZdHipxmMfE 4t1ew6puPflLGhAEv0QfMhJNtsTQp/xZsiSw3k68bFOfRfCGl7edZXyU44xLa X-Received: by 2002:a5d:608d:0:b0:22e:7bde:c19d with SMTP id w13-20020a5d608d000000b0022e7bdec19dmr12336886wrt.494.1665422926188; Mon, 10 Oct 2022 10:28:46 -0700 (PDT) X-Received: by 2002:a5d:608d:0:b0:22e:7bde:c19d with SMTP id w13-20020a5d608d000000b0022e7bdec19dmr12336866wrt.494.1665422925889; Mon, 10 Oct 2022 10:28:45 -0700 (PDT) Received: from redhat.com ([2.55.183.131]) by smtp.gmail.com with ESMTPSA id u2-20020a7bc042000000b003b4e009deb2sm12924785wmc.41.2022.10.10.10.28.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 10:28:45 -0700 (PDT) Date: Mon, 10 Oct 2022 13:28:41 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Alex =?utf-8?q?Benn=C3=A9e?= , Philippe =?utf-8?q?M?= =?utf-8?q?athieu-Daud=C3=A9?= Subject: [PULL 01/55] hw/virtio: incorporate backend features in features Message-ID: <20221010172813.204597-2-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.129.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 There are some extra bits used over a vhost-user connection which are hidden from the device itself. We need to set them here to ensure we enable things like the protocol extensions. Currently net/vhost-user.c has it's own inscrutable way of persisting this data but it really should live in the core vhost_user code. Signed-off-by: Alex Bennée Message-Id: <20220726192150.2435175-7-alex.bennee@linaro.org> Message-Id: <20220802095010.3330793-2-alex.bennee@linaro.org> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daudé --- hw/virtio/vhost-user.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 70748e61e0..0b7e41ffe8 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -1460,7 +1460,14 @@ static int vhost_user_set_features(struct vhost_dev *dev, */ bool log_enabled = features & (0x1ULL << VHOST_F_LOG_ALL); - return vhost_user_set_u64(dev, VHOST_USER_SET_FEATURES, features, + /* + * We need to include any extra backend only feature bits that + * might be needed by our device. Currently this includes the + * VHOST_USER_F_PROTOCOL_FEATURES bit for enabling protocol + * features. + */ + return vhost_user_set_u64(dev, VHOST_USER_SET_FEATURES, + features | dev->backend_features, log_enabled); }