From nobody Sun Feb 8 14:10:47 2026 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 093002D7814 for ; Fri, 16 Jan 2026 14:05:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768572331; cv=none; b=PfElZDqxZSeYRzCi3k6ec9Gdg6YucFasJ5HB8t8rPCOJgN2zMyKZDyOOWLZvbJrTJysoy3hDdXFJ3T3GXOVd8F+7iM/JM0sXeHcg4+gmSJkJaop2WyebDtnU+zxcaoDihLl7zni/JBKGGujRpscDi2VECkMVg0+ZnQZOANHv7hg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768572331; c=relaxed/simple; bh=kPIwutlaHYRIMwkFfJxglxNcT7ptoTo+B+svMdU9qk8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=X/CLj+DD/dn+Vf+ohgL6CikD/94IAkYOtnQ5dXEAhi2X0IfqBWX4w3sa3L8wJf36MzB321B6VQ1b6/VNWKkFol12W6TZLxpjtVZ80mVKjKkXHWJ/6RCLGhz6XKqe3UOp7U0ao2gTNf0dCYG+LU+xi1zh2sYQGDZQfgnKo8vS3Os= 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=EUCJwVKZ; arc=none smtp.client-ip=170.10.133.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="EUCJwVKZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768572329; 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=EUCJwVKZhagvU/SgXpZDUTuMv+KTR6+suhTd2isAYy4mexen/M49DsLmfsVYjrptk3uygH Ev34u0dooC1MNY/AenCa3U1jEvHjqJyvDlSvdr5PEVUz5OIcYAPQEeoiG7qcsxOrR7FDub l2J4MvnPquu7l/+JkkVPKa1N8bRNndA= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-624-dpkpZP6qM06ow8FyA493wg-1; Fri, 16 Jan 2026 09:05:27 -0500 X-MC-Unique: dpkpZP6qM06ow8FyA493wg-1 X-Mimecast-MFC-AGG-ID: dpkpZP6qM06ow8FyA493wg_1768572327 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D608F1956088; Fri, 16 Jan 2026 14:05:26 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.45.226.82]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E7FBD30002D6; Fri, 16 Jan 2026 14:05:22 +0000 (UTC) From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: "Michael S . Tsirkin " Cc: Laurent Vivier , linux-kernel@vger.kernel.org, jasowang@redhat.com, Xuan Zhuo , =?UTF-8?q?Eugenio=20P=C3=A9rez?= , Maxime Coquelin , Cindy Lu , virtualization@lists.linux.dev, Yongji Xie , Stefano Garzarella Subject: [PATCH v14 06/13] vhost: forbid change vq groups ASID if DRIVER_OK is set Date: Fri, 16 Jan 2026 15:04:48 +0100 Message-ID: <20260116140455.1560491-7-eperezma@redhat.com> In-Reply-To: <20260116140455.1560491-1-eperezma@redhat.com> References: <20260116140455.1560491-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.4.1 on 10.30.177.4 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 Acked-by: Jason Wang --- 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