From nobody Mon Feb 9 13:35:15 2026 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 C203632AAD4 for ; Wed, 14 Jan 2026 18:49:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768416559; cv=none; b=WepnZuvpY24Dtkad5TWg73g8T7N88BqGlRxjPunheu7V+BkAeEu0XqCVtiW45TBqKrsSCJYIla38ScsX2p8Kz4N622sYE0V2Tly0DYD2xeWDwBS0Jh4aOakjbYyEhlpNFZyB6iRJTrkO+PMVtpG9UE/IxC5B87EhkirZrbgJB8s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768416559; c=relaxed/simple; bh=kPIwutlaHYRIMwkFfJxglxNcT7ptoTo+B+svMdU9qk8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SDlSNjhToF7p5FtCd3FM0K5aAze4dqwJuETk6UQghJrFIM8WXIaFeQVsRrgYVsix5zGvgYC6bGBP67aYVuKMu+3sRuIa8fyu4ji6V5Yy+Lse89DKPiIAAeHQUB+jVMNuzabtVHOmkxk2K4nJNwq4fOq5HJ60AhEDQwjooTZ7aqc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=D82OY0pc; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="D82OY0pc" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768416556; 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=41EkAV6iOHfW6IoRMF7mDhbBMoIqwfBDSPK0zgIerfs=; b=D82OY0pc5AY+c1PZspKEf+WD2W4EthaSYaPMJGbCOFbomlxwvp6jVAqZSsMhYjVU2e+S9X r4XCOvmk/3zn2d+wSVnDWmc05MYVwxgZKAo+1zuxUxo++lcOHDhmXfHx642qPS0DiXhdh9 5pQduhvbMXk/FCOXpD/qRgsKgUUd8E0= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-353-qUsWU6d0NiqPX08vkDs3Kg-1; Wed, 14 Jan 2026 13:49:13 -0500 X-MC-Unique: qUsWU6d0NiqPX08vkDs3Kg-1 X-Mimecast-MFC-AGG-ID: qUsWU6d0NiqPX08vkDs3Kg_1768416552 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 59E8818005B8; Wed, 14 Jan 2026 18:49:12 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.45.224.103]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 58A7B19560B4; Wed, 14 Jan 2026 18:49:08 +0000 (UTC) From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: "Michael S . Tsirkin " Cc: Maxime Coquelin , Xuan Zhuo , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , virtualization@lists.linux.dev, jasowang@redhat.com, Stefano Garzarella , Yongji Xie , linux-kernel@vger.kernel.org, Cindy Lu , Laurent Vivier Subject: [PATCH v12 06/13] vhost: forbid change vq groups ASID if DRIVER_OK is set Date: Wed, 14 Jan 2026 19:48:32 +0100 Message-ID: <20260114184839.926884-7-eperezma@redhat.com> In-Reply-To: <20260114184839.926884-1-eperezma@redhat.com> References: <20260114184839.926884-1-eperezma@redhat.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="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Only vdpa_sim support it. Forbid this behaviour as there is no use for it right now, we can always enable it in the future with a feature flag. Signed-off-by: Eugenio P=C3=A9rez --- v12: Fix typo in patch message (MST). --- drivers/vhost/vdpa.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 9d25b735b43d..3f0184d42075 100644 --- a/drivers/vhost/vdpa.c +++ b/drivers/vhost/vdpa.c @@ -682,6 +682,8 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v= , unsigned int cmd, return -EFAULT; if (idx >=3D vdpa->ngroups || s.num >=3D vdpa->nas) return -EINVAL; + if (ops->get_status(vdpa) & VIRTIO_CONFIG_S_DRIVER_OK) + return -EBUSY; if (!ops->set_group_asid) return -EOPNOTSUPP; return ops->set_group_asid(vdpa, idx, s.num); --=20 2.52.0