Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp28642rdb; Wed, 20 Dec 2023 05:32:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IFiWcXbCXAawadFWamKkxBFzKErIZZf39sx4oDcjVDpA3Dyp6UPQrFz3K8nIQu/zOINeXID X-Received: by 2002:a05:6871:20c6:b0:1fb:75c:4001 with SMTP id rz6-20020a05687120c600b001fb075c4001mr22933303oab.97.1703079172175; Wed, 20 Dec 2023 05:32:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703079172; cv=none; d=google.com; s=arc-20160816; b=aMapBaiW0za1pWPD9IrrsmOg9zNWyOqrvPjC+SpreeBllSSu+V/6uHz6t+O8lWj+JN UzNKVv4cjW6B/mzXAnBnmlZnngijg7Vnfxccr9KUud2WHDbo1SDc+muBYSnxKXxYIjSI kMDAE7S16jc+qlEgX95BE682ikAvyBBfC34XYJhualU7mmRob212ypy/mHT+K+5dIPsU YsBe6QMnj/yJkAFdEN8s5/fkOCWRU87DWGVmHjcWJjfEws/Hp3173X0uDsWZjKlHQYHN OMGxLPliNweVM0rf7dt/ixmp0CW7KfGD9JJni4CuZ6VAPNRF2TYRCEY/n8J2+68J0d7B 6rrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=VMzfUMpfCRySKV14r2ACq/M+O86IvQcMgWeUukBTaDE=; fh=hxXmUt799qooV3ViOShcE413A80tUh8nKexgab11OsU=; b=yO4P/HurLvpbhKoZeH0RdmfMGiuC6Aor21hhhIoe3skGBrYWzXbEHmob860OWWYbQ+ IUtow/KSO6kkD1H9q9osJIgFkBjgvWkRXeLzN6OWKFZAuyykTlOl6bC8tFe40REylVGZ F3RK1N25LS2Al+JenF4qay50lpUHxNTwoj+uZv6TCyVBKGwZLcHAzUSukM8w5G7ccDPY emMEPyUkPzEVASsAWUctYPGFee/QATGj9IV5XNq8B98JY/Wqa11FnS7dJeJ194CLlERh kycja2CS7cgOU35x05qaGPCSJXgiyZHy416BSkypP/L+9LCX2iCvncZsQW2G9JshXK2L pulA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Fw/7IhDR"; spf=pass (google.com: domain of linux-kernel+bounces-6962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p3-20020a631e43000000b005c701bf0e27si19228726pgm.79.2023.12.20.05.32.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 05:32:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Fw/7IhDR"; spf=pass (google.com: domain of linux-kernel+bounces-6962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6962-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id BA5EE2827A5 for ; Wed, 20 Dec 2023 13:32:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 965EC3529C; Wed, 20 Dec 2023 13:32:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Fw/7IhDR" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E00F2D634 for ; Wed, 20 Dec 2023 13:32:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1703079159; 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=VMzfUMpfCRySKV14r2ACq/M+O86IvQcMgWeUukBTaDE=; b=Fw/7IhDRA+57AMeTrk8LZo5kM3Rg7Lf/+v5HcPuYUrxY/HH5nFJn485jT+9qpo399TlduM nLHet7/U2fHlaXbz7vy0JjMaOT9attxDnyAuWzeRk3LkPywjopWt7oVRcGHlsSPYcezfEX 3dAf5MKcvtnpxDRULIJ9tNim6yl+GyU= Received: from mail-yw1-f197.google.com (mail-yw1-f197.google.com [209.85.128.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-27-A3SpkW-JN-qYItsCG6C8sQ-1; Wed, 20 Dec 2023 08:32:37 -0500 X-MC-Unique: A3SpkW-JN-qYItsCG6C8sQ-1 Received: by mail-yw1-f197.google.com with SMTP id 00721157ae682-5d12853cb89so76644367b3.3 for ; Wed, 20 Dec 2023 05:32:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703079157; x=1703683957; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VMzfUMpfCRySKV14r2ACq/M+O86IvQcMgWeUukBTaDE=; b=CXUDf/N5VM6xnZjLWVS8JLLsSRaQl5se6UP60TqxfqWrw63POEY58DCzuI27MRHgzo jloKMHWzdfSBz4vd3rveCm1hqC+eCZRtmv2XlvhFDLMRTrqjnmwufuL7xkxsjbj1/b1Q vX3nO955VwjmMU+9nwoV9/brVgbeZibg1CRRlpy9KJuWTbbq/FfhSKtg69RFQQBYOYzb VNTvz+k7GTUbFVxo/zkUfTRAIZuO76uQz8A7PiPnbEfh9Q51cs45XytwEX++z0WYorHV VONVO/vau1oGhv5UFXrAn5PiDB2OAREKNLqDsQrmfIxR+8ZLUpVoKVj3S7BetRS4gpKC Pg2g== X-Gm-Message-State: AOJu0Yxa5yZHS2R4MPNkmZM4zMj72b5G2Qs8sy4MCfcbyj83Wsdd6VAy nBivip64KJ1twOuDY7ffuUPGMpdkKlOJ/0x+PWjDh6cEI/XMS6v9+ec7vaKipESrz/9Zz6pqUnZ GEebTuVVCPZE3vH6xO4O8OBo0NZaWgBmPw4Z36KfA X-Received: by 2002:a81:7104:0:b0:5d7:9515:6ae3 with SMTP id m4-20020a817104000000b005d795156ae3mr14296464ywc.33.1703079157225; Wed, 20 Dec 2023 05:32:37 -0800 (PST) X-Received: by 2002:a81:7104:0:b0:5d7:9515:6ae3 with SMTP id m4-20020a817104000000b005d795156ae3mr14296452ywc.33.1703079157026; Wed, 20 Dec 2023 05:32:37 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231219180858.120898-1-dtatulea@nvidia.com> <20231219180858.120898-3-dtatulea@nvidia.com> In-Reply-To: From: Eugenio Perez Martin Date: Wed, 20 Dec 2023 14:32:01 +0100 Message-ID: Subject: Re: [PATCH vhost v4 02/15] vdpa: Add VHOST_BACKEND_F_CHANGEABLE_VQ_ADDR_IN_SUSPEND flag To: Jason Wang Cc: Dragos Tatulea , "Michael S . Tsirkin" , Si-Wei Liu , Saeed Mahameed , Leon Romanovsky , virtualization@lists.linux-foundation.org, Gal Pressman , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Parav Pandit , Xuan Zhuo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Dec 20, 2023 at 5:06=E2=80=AFAM Jason Wang wr= ote: > > On Wed, Dec 20, 2023 at 11:46=E2=80=AFAM Jason Wang = wrote: > > > > On Wed, Dec 20, 2023 at 2:09=E2=80=AFAM Dragos Tatulea wrote: > > > > > > The virtio spec doesn't allow changing virtqueue addresses after > > > DRIVER_OK. Some devices do support this operation when the device is > > > suspended. The VHOST_BACKEND_F_CHANGEABLE_VQ_ADDR_IN_SUSPEND flag > > > advertises this support as a backend features. > > > > There's an ongoing effort in virtio spec to introduce the suspend state= . > > > > So I wonder if it's better to just allow such behaviour? > > Actually I mean, allow drivers to modify the parameters during suspend > without a new feature. > That would be ideal, but how do userland checks if it can suspend + change properties + resume? The only way that comes to my mind is to make sure all parents return error if userland tries to do it, and then fallback in userland. I'm ok with that, but I'm not sure if the current master & previous kernel has a coherent behavior. Do they return error? Or return success without changing address / vq state?