From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2244C7EE29 for ; Fri, 9 Jun 2023 09:29:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241547AbjFIJ31 (ORCPT ); Fri, 9 Jun 2023 05:29:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241464AbjFIJ27 (ORCPT ); Fri, 9 Jun 2023 05:28:59 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A9193C3F for ; Fri, 9 Jun 2023 02:22:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1686302500; 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=yrvz2NuuJ8t+PjTH8hQDFouZJRAvGRd7mM5s6NiOOaU=; b=VEulbuZSenqb41bfbWhG5LSAnkrDQxkv+G06R0rA4DQvEJocA7GFOw2zlKwzwbM3bvHa48 tVcFzpc0eE6DKGi00AGSTrwFo7koBHiIgTPhlYh3lWjo20TW/k1ZKhHXJ2HlRjoHn2zNNy RrKg5qyuTcZwSpvSuVlamYgA2AfnL/I= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-333-jjshG5t0OBG9vTCK3FCePw-1; Fri, 09 Jun 2023 05:21:37 -0400 X-MC-Unique: jjshG5t0OBG9vTCK3FCePw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 405448028B2; Fri, 9 Jun 2023 09:21:36 +0000 (UTC) Received: from eperezma.remote.csb (unknown [10.39.193.246]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2C101202696C; Fri, 9 Jun 2023 09:21:33 +0000 (UTC) From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: mst@redhat.com, Jason Wang Cc: Zhu Lingshan , virtualization@lists.linux-foundation.org, "Gonglei (Arei)" , longpeng2@huawei.com, Lei Yang , Parav Pandit , Gautam Dawar , Dragos Tatulea , Laurent Vivier , linux-api@vger.kernel.org, Liuxiangdong , linux-kernel@vger.kernel.org, alvaro.karsz@solid-run.com, Shannon Nelson , Stefano Garzarella , Cindy Lu , si-wei.liu@oracle.com, Harpreet Singh Anand Subject: [PATCH v2 1/4] vdpa: add VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK flag Date: Fri, 9 Jun 2023 11:21:24 +0200 Message-Id: <20230609092127.170673-2-eperezma@redhat.com> In-Reply-To: <20230609092127.170673-1-eperezma@redhat.com> References: <20230609092127.170673-1-eperezma@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This feature flag allows the driver enabling virtqueues both before and after DRIVER_OK. This is needed for software assisted live migration, so userland can restore the device status in devices with control virtqueue before the dataplane is enabled. Signed-off-by: Eugenio PĂ©rez Acked-by: Shannon Nelson --- include/uapi/linux/vhost_types.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/uapi/linux/vhost_types.h b/include/uapi/linux/vhost_types.h index c5690a8992d8..4889e6d70b15 100644 --- a/include/uapi/linux/vhost_types.h +++ b/include/uapi/linux/vhost_types.h @@ -165,5 +165,9 @@ struct vhost_vdpa_iova_range { #define VHOST_BACKEND_F_SUSPEND 0x4 /* Device can be resumed */ #define VHOST_BACKEND_F_RESUME 0x5 +/* Device supports the driver enabling virtqueues both before and after + * DRIVER_OK + */ +#define VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK 0x6 #endif -- 2.31.1