Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp655667rdb; Fri, 22 Dec 2023 00:29:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IFp3ARjN/WnsnsW6HMO42ME8BH62nAG3n891RKUBFogx+MONSx8Iiq2TWSn8Z0vWHAy6RZT X-Received: by 2002:a05:6214:1c84:b0:67e:d88f:4641 with SMTP id ib4-20020a0562141c8400b0067ed88f4641mr1071299qvb.125.1703233768273; Fri, 22 Dec 2023 00:29:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703233768; cv=none; d=google.com; s=arc-20160816; b=VJKHwShKTiu96krchIls0Zu/nbTsWu5w5kOFVy325p6qedJbIQbAl5oLmJTvqpahbs kcCBRzc6H1sJi8EtdmJ6+LpcC9ZM4qa5ZTXHwOTrlLefgRxxJB97k/dgsqRAUYX4/EPP rBQXuKfVQtvn0GVLabV+STKDJwspXYurIQrvawqxqtnUuo6tdpDmCTmpDns2rz1hd25v npOxrt1nN8qJ9e4Mu+oJZRkRkYVpefnlpJPsT/wkfZot+Y5p/BouS8tuV6WcuKRNCG3x lyYP9NdIhxN/eNLD4alZ6JZw2oK8+QjbxtDEPkXjf6XCa35pfY3s1n3UfozqxRZYBhXE k5Eg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+1/Sz19OR6XWaD99Hs0XiYIWs6pPYgQ5leaKhAq6DJY=; fh=oise/SyU3eH1/G/gM6/31LDLVK1xzbvNXL6QU9Goy3o=; b=TpGzojSy8M1DFWI2f4INsH1k4qT6FJgWJT20hnTKZ7t0eH8dIZClFiXlxCRRJXe3YZ mTPah/kKhEvrKplUz8YCOAS4wlVGDLl01n6608CN4RV52J+T7fhQeg+iRvVgjqDUmNeD pXDTsm7vmbkSZuVJWK8fMxOOd0186E8Tv0XPkZBt5JSYhqsuZ3lbgJCjtZEVb6SeH8v8 hozdzAx1oD9GmYalqAva2dL9ps1W28TER6TY4VZztA67u2r/qmjlFWOZdeWs4ww7LWva zKy7yHd2KJzaXMeKHL70A4GdCqEpZygjGRloO0Mv7z8kY5bKVuz2VBlf0ZKrNnFuRa9B eTCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=b4nlJEgg; spf=pass (google.com: domain of linux-kernel+bounces-9504-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9504-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id w19-20020a0ce113000000b0067f4a5be921si4233477qvk.106.2023.12.22.00.29.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 00:29:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9504-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=b4nlJEgg; spf=pass (google.com: domain of linux-kernel+bounces-9504-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9504-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 002131C2536E for ; Fri, 22 Dec 2023 08:29:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CF05FD53F; Fri, 22 Dec 2023 08:29:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="b4nlJEgg" 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 C09ECC8CB for ; Fri, 22 Dec 2023 08:29:10 +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=1703233749; 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=+1/Sz19OR6XWaD99Hs0XiYIWs6pPYgQ5leaKhAq6DJY=; b=b4nlJEggy78sDx6v1o9eyjy8xlaWS3GpPlvTg0nEjetA01XPv53lY2aQLc+KemGseARCeQ Ten+JzlHR7XyR8WP3+MU5ov8MFPXbzOdKvHd8o4sO+zp2WsLoRzlh3VHMv9qj4Wa7iHeyQ 5h0hiRf89qFS83zAk2rvWn/G9You0aY= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-503-AcKK_gY1PhWCIoghtOPgNw-1; Fri, 22 Dec 2023 03:29:08 -0500 X-MC-Unique: AcKK_gY1PhWCIoghtOPgNw-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-3368698f0caso992874f8f.1 for ; Fri, 22 Dec 2023 00:29:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703233746; x=1703838546; 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=+1/Sz19OR6XWaD99Hs0XiYIWs6pPYgQ5leaKhAq6DJY=; b=LSMxVVM8Rp9u9hRy2oYmNQg6QXfJ7P2lM0S77Z8Lx9sqjyJYmEtxLcw9/UICd3+KOa 9p6KjZIq2HJ5jexm5lyG1lowa6x8a7Kld58VNPSR+STiDxycsT5YwPmC+TMADl6XKtgi 8Uc8276La7Els9ZZCF6WAvjq2e4xbEwvPEJHbmvRH1MLhyU8EVgi6PZ5s99VTnCYnQMA pgcA4+XDfpQOlBvoOLqIZhxLX5v+RTlg6yqL56EPG/AtzqJZVDtZD6P8Uyv1Rk6jkH43 zxGEZG9WYCyR9+oN7RnHAf2C6v6fOX1k9z68j9SKMw78hVOSBMjddGteeCxnaDf1WbJ+ zjxw== X-Gm-Message-State: AOJu0YyQJCejLM8ZILnhPlVafOxEA74xec7vKIIVqObuVU/lDZsHIIAA joiuzCGT3QNayuj85h2lGhuRyc91h3IAbqkLuNiuYoF2Ax+CXOxi6ReT3n0RjiKF5J9lAWAO3qt DQtId95b90qjt761AGcTpr7XdO3NrORG8euA+U50E X-Received: by 2002:a05:600c:5248:b0:40d:494a:cb9 with SMTP id fc8-20020a05600c524800b0040d494a0cb9mr60320wmb.62.1703233746653; Fri, 22 Dec 2023 00:29:06 -0800 (PST) X-Received: by 2002:a05:600c:5248:b0:40d:494a:cb9 with SMTP id fc8-20020a05600c524800b0040d494a0cb9mr60308wmb.62.1703233746369; Fri, 22 Dec 2023 00:29:06 -0800 (PST) Received: from redhat.com ([2.55.177.189]) by smtp.gmail.com with ESMTPSA id m17-20020adffe51000000b003364a0e6983sm3731542wrs.62.2023.12.22.00.29.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 00:29:05 -0800 (PST) Date: Fri, 22 Dec 2023 03:29:02 -0500 From: "Michael S. Tsirkin" To: Dragos Tatulea Cc: "eperezma@redhat.com" , "xuanzhuo@linux.alibaba.com" , Parav Pandit , Gal Pressman , "virtualization@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "si-wei.liu@oracle.com" , "jasowang@redhat.com" , "kvm@vger.kernel.org" , Saeed Mahameed , "leon@kernel.org" Subject: Re: [PATCH vhost v4 02/15] vdpa: Add VHOST_BACKEND_F_CHANGEABLE_VQ_ADDR_IN_SUSPEND flag Message-ID: <20231222032713-mutt-send-email-mst@kernel.org> References: <70adc734331c1289dceb3bcdc991f3da7e4db2f0.camel@nvidia.com> <17abeefd02c843cddf64efbeadde49ad15c365a1.camel@nvidia.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <17abeefd02c843cddf64efbeadde49ad15c365a1.camel@nvidia.com> On Thu, Dec 21, 2023 at 03:07:22PM +0000, Dragos Tatulea wrote: > > > > In that case you're right, we don't need feature flags. But I think it > > > > would be great to also move the error return in case userspace tries > > > > to modify vq parameters out of suspend state. > > > > > > > On the driver side or on the core side? > > > > > > > Core side. > > > Checking my understanding:?instead of the feature flags there would be a check > (for .set_vq_addr and .set_vq_state) to return an error if they are called under > DRIVER_OK and not suspended state? Yea this looks much saner, if we start adding feature flags for each OPERATION_X_LEGAL_IN_STATE_Y then we will end up with N^2 feature bits which is not reasonable. -- MST