From nobody Tue Feb 10 10:55:23 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1636044937; cv=none; d=zohomail.com; s=zohoarc; b=S11AM/IxIVVnMdx5oO1BHvFibUz55jIm5LdSA4d6Mr2amXDl2QWiKDsDimtjkhoWOdCsinxcayzlH3g0ACMiB+lV208xUodknr+bjkm2k7Wn8/ZpGJ96SER9FTFnXJHlFC2ndfiypr/HYd70xyMY4pC0EDEpdg+TX59RmYgUpRA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1636044937; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dXqJdu8m4mfKoJRJDUh9ecC0KPJj1oKZs1EF2JRfya8=; b=Rtc1lsO8qiazm5IXptAp7G7NWj0QnIBjqgC/LSsRusi24enKMY8CnSwbg41XBEJBPOVBNMxwbDpo4offYz7kqKt7pEa/hxTIa04P1hxtJznt4fUQFnzptoHuEBOkeNOm+r1/k017jD3N2vAI9jjaNB4A0HdQof4EV4bFbxHfxP0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1636044937196334.918468417946; Thu, 4 Nov 2021 09:55:37 -0700 (PDT) Received: from localhost ([::1]:32988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mig1X-0004RY-RS for importer@patchew.org; Thu, 04 Nov 2021 12:55:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mifwi-0002MW-E2 for qemu-devel@nongnu.org; Thu, 04 Nov 2021 12:50:36 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:59756) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mifwg-0005ks-Ql for qemu-devel@nongnu.org; Thu, 04 Nov 2021 12:50:36 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-173-3N3G6fDYO6-EnFBzwAuf2w-1; Thu, 04 Nov 2021 12:50:31 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5B84F79EEA; Thu, 4 Nov 2021 16:50:30 +0000 (UTC) Received: from laptop.redhat.com (ovpn-12-34.pek2.redhat.com [10.72.12.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5928019723; Thu, 4 Nov 2021 16:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1636044634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dXqJdu8m4mfKoJRJDUh9ecC0KPJj1oKZs1EF2JRfya8=; b=JumEqJiPzZqwKE0V2hLprRMkyBbxYvTZPmULFcwFseAUOyKSlVeqJoOMmA+I/9+ua6lEXl AceabDusLv8B7rt+eF4ZTimvqRP8MHJFOQXM+G5lpy24Rjgsr0T8v7AiGERTK/g7xaJxcy 0ZZlLpQqmwMFSp8JDuDNpCuIp+S6zL8= X-MC-Unique: 3N3G6fDYO6-EnFBzwAuf2w-1 From: Cindy Lu To: lulu@redhat.com, mst@redhat.com, jasowang@redhat.com, kraxel@redhat.com, dgilbert@redhat.com, stefanha@redhat.com, arei.gonglei@huawei.com, marcandre.lureau@redhat.com, qemu-devel@nongnu.org Subject: [PATCH v10 04/10] vhost: introduce new VhostOps vhost_set_config_call Date: Fri, 5 Nov 2021 00:48:21 +0800 Message-Id: <20211104164827.21911-5-lulu@redhat.com> In-Reply-To: <20211104164827.21911-1-lulu@redhat.com> References: <20211104164827.21911-1-lulu@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lulu@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=lulu@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -33 X-Spam_score: -3.4 X-Spam_bar: --- X-Spam_report: (-3.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.648, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1636044938032100001 Content-Type: text/plain; charset="utf-8" This patch introduces new VhostOps vhost_set_config_call. This function all= ows the vhost to set the event fd to kernel Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-ba= ckend.h index 81bf3109f8..ff34eb7c8a 100644 --- a/include/hw/virtio/vhost-backend.h +++ b/include/hw/virtio/vhost-backend.h @@ -126,6 +126,8 @@ typedef int (*vhost_get_device_id_op)(struct vhost_dev = *dev, uint32_t *dev_id); =20 typedef bool (*vhost_force_iommu_op)(struct vhost_dev *dev); =20 +typedef int (*vhost_set_config_call_op)(struct vhost_dev *dev, + int fd); typedef struct VhostOps { VhostBackendType backend_type; vhost_backend_init vhost_backend_init; @@ -171,6 +173,7 @@ typedef struct VhostOps { vhost_vq_get_addr_op vhost_vq_get_addr; vhost_get_device_id_op vhost_get_device_id; vhost_force_iommu_op vhost_force_iommu; + vhost_set_config_call_op vhost_set_config_call; } VhostOps; =20 int vhost_backend_update_device_iotlb(struct vhost_dev *dev, --=20 2.21.3