From nobody Thu Dec 18 08:06:54 2025 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1665425693; cv=none; d=zohomail.com; s=zohoarc; b=bnvw/qOBNCSdcRvnZdCCF8HLeLTI2PGPa98EtW1Bm3HKCeopFYgTszIxQ8lULwV+sJrzmHtllS1JG8mELLGWV7Vcmt0E0GQZEJbnbuFSCWztIMKP+ZHDiZb4RubPOtTFJuTO9MaMKNb3yJWFfQvKXbXAtHwDlIC/aAbjwnw/ics= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1665425693; h=Content-Type: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=HRj4VYmR6ExoX4uKQoRfOBfhkySi+nf7yI8Vb5MpRTo=; b=MV6JZ9yiLM7qfGCbVxzV6P97Es37vpti0Nuq93obJVKxs6SW0X9emG+tFltzFbml+NkFuZYLYCZ9oo2v2klEZuJTN69JNzs8aKaBwcrGBqYcp7Y8aXROyGWB6MiYx+8f2Bg2V8KKGkugOpFk5Mf3sQOEY0UDbZWD29VBv1f2s4U= 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 1665425693644748.0857039782579; Mon, 10 Oct 2022 11:14:53 -0700 (PDT) Received: from localhost ([::1]:43888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ohxIi-0001zV-Fg for importer@patchew.org; Mon, 10 Oct 2022 14:14:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohwbq-0002Zv-A8 for qemu-devel@nongnu.org; Mon, 10 Oct 2022 13:30:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:38430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohwbk-0006z8-Tn for qemu-devel@nongnu.org; Mon, 10 Oct 2022 13:30:34 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-402-Fim9x-p_NwKf3ABgNrrU1Q-1; Mon, 10 Oct 2022 13:30:27 -0400 Received: by mail-wm1-f71.google.com with SMTP id n19-20020a7bcbd3000000b003c4a72334e7so1433175wmi.8 for ; Mon, 10 Oct 2022 10:30:27 -0700 (PDT) Received: from redhat.com ([2.55.183.131]) by smtp.gmail.com with ESMTPSA id u6-20020adfed46000000b0022e04bfa661sm9374010wro.59.2022.10.10.10.30.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Oct 2022 10:30:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665423028; 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: in-reply-to:in-reply-to:references:references; bh=HRj4VYmR6ExoX4uKQoRfOBfhkySi+nf7yI8Vb5MpRTo=; b=PWyLpo+mcefIWweJg7/BRDW0YKrC+HaXVuqZWFBMRvm9QSyN8p48RtSVK1+nVOFWhxr9W5 M3ekobAfsJwvit+YbZHYn9L8S3zSIbNKVFU48usc1aJbB8gPjtKWA57SJg976Q3rYYPKqs JGwyhNhwpHfBgk66Axo/iCXPBrSPAgM= X-MC-Unique: Fim9x-p_NwKf3ABgNrrU1Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to: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=HRj4VYmR6ExoX4uKQoRfOBfhkySi+nf7yI8Vb5MpRTo=; b=C4f7qtnYQck057+Gd+CE4nd5cb51MgQ2wlTsNlWiW7qyeWr/R23k7NGzEgII5hB/Dx IosyTY9MJhWom5WabGt6s/mmIpJpmSXVwWqn3if2R8vKTKp8ISKJQKHjHTIK1zZcr71s lF7rmKihZKU9qQjd6Oa5YEwJ3Qy4KMPgpK87ucibln3dbiNFUxXpQNEOrqGOmH/5oOGc ZwygNmXeo8wOwHpv9b1LAZuIGtBwmchLzHZV/wLdYoVPzgXCHLmABkSo8N3Mm/gPyBUj P8Iso1za8jfRhxM0aucVF5jTw9CQ7vYkIESskmtaS+0eFp34hMHljCS1F+H/N98aXKWl KzvQ== X-Gm-Message-State: ACrzQf34adRZ3Kr/QjPPjYu7+pCbvLcgiaVGvWENFGMyW9BZy8UkRgUK bcWGiU0RfZcVI0eaO3Up6eifqw/yzrdOY1QPREBhvXqv5AlFbAAnHvD6F4PV+pCrMwwCIEmSjDB LRXcesTo7r3Ce3rTxcK1lgxHOlqRt4KT5nSvQhEGpiNFb/zzV24O/Tl8ibT9R X-Received: by 2002:adf:d224:0:b0:22e:6578:ed57 with SMTP id k4-20020adfd224000000b0022e6578ed57mr12237417wrh.512.1665423024305; Mon, 10 Oct 2022 10:30:24 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Dicd1mAKBqqxLUJA1tNDTsOpZBgO/Y/+5/B2LR9Kk0fyEmSsfxaYmR7EH7Rw2lppijTs1uA== X-Received: by 2002:adf:d224:0:b0:22e:6578:ed57 with SMTP id k4-20020adfd224000000b0022e6578ed57mr12237395wrh.512.1665423023929; Mon, 10 Oct 2022 10:30:23 -0700 (PDT) Date: Mon, 10 Oct 2022 13:30:19 -0400 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Cc: Peter Maydell , Daniil Tatianin , Raphael Norwitz , Kevin Wolf , Hanna Reitz , qemu-block@nongnu.org Subject: [PULL 23/55] vhost-user-blk: make 'config_wce' part of 'host_features' Message-ID: <20221010172813.204597-24-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 (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=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=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" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1665425695102100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Daniil Tatianin No reason to have this be a separate field. This also makes it more akin to what the virtio-blk device does. Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz Message-Id: <20220906073111.353245-5-d-tatianin@yandex-team.ru> Reviewed-by: Raphael Norwitz Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/vhost-user-blk.h | 1 - hw/block/vhost-user-blk.c | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/hw/virtio/vhost-user-blk.h b/include/hw/virtio/vhost-u= ser-blk.h index 7c91f15040..ea085ee1ed 100644 --- a/include/hw/virtio/vhost-user-blk.h +++ b/include/hw/virtio/vhost-user-blk.h @@ -34,7 +34,6 @@ struct VHostUserBlk { struct virtio_blk_config blkcfg; uint16_t num_queues; uint32_t queue_size; - uint32_t config_wce; struct vhost_dev dev; struct vhost_inflight *inflight; VhostUserState vhost_user; diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c index 92bfe56b45..aa4831f27a 100644 --- a/hw/block/vhost-user-blk.c +++ b/hw/block/vhost-user-blk.c @@ -260,9 +260,6 @@ static uint64_t vhost_user_blk_get_features(VirtIODevic= e *vdev, virtio_add_feature(&features, VIRTIO_BLK_F_FLUSH); virtio_add_feature(&features, VIRTIO_BLK_F_RO); =20 - if (s->config_wce) { - virtio_add_feature(&features, VIRTIO_BLK_F_CONFIG_WCE); - } if (s->num_queues > 1) { virtio_add_feature(&features, VIRTIO_BLK_F_MQ); } @@ -595,7 +592,8 @@ static Property vhost_user_blk_properties[] =3D { DEFINE_PROP_UINT16("num-queues", VHostUserBlk, num_queues, VHOST_USER_BLK_AUTO_NUM_QUEUES), DEFINE_PROP_UINT32("queue-size", VHostUserBlk, queue_size, 128), - DEFINE_PROP_BIT("config-wce", VHostUserBlk, config_wce, 0, true), + DEFINE_PROP_BIT64("config-wce", VHostUserBlk, parent_obj.host_features, + VIRTIO_BLK_F_CONFIG_WCE, true), DEFINE_PROP_BIT64("discard", VHostUserBlk, parent_obj.host_features, VIRTIO_BLK_F_DISCARD, true), DEFINE_PROP_BIT64("write-zeroes", VHostUserBlk, parent_obj.host_featur= es, --=20 MST