From nobody Mon Apr 29 04:13:09 2024 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=1641799770; cv=none; d=zohomail.com; s=zohoarc; b=mqk2rUGx1RpJ1ZRjG0bSwXMRz5AIPCscOZWUAZ/0hd0KdFZz1MiAf/ui4bo9FvTKZfjVr+JLrMJDZbB2lURSFJz+62xrN0JarLBARw2rwH/Lzri5gqlVd7RHegyFAvJuOpUrRm4Okfye/aMvQP7ES1WAZMwbbCo5I7RID7StKG8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641799770; h=Content-Type:Cc: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=AKB1wcqs7P6pnfvGipeaJG3zqEFmm838XGwBbdRPsng=; b=jMGJqCDWwh59539PSM69jFZ/rxXcKb6uwmDvMRCL/wGvgLy8iircT8L67ou//4dfzUeKGWK2s2D1lfQcRVHJADX9U7K9doSADWVcRCNogc+hNZcM9N/zoGIHFTPU4bIWUAO1bRFA4gr8PWcpDXBQA3bj2Dq9vHreZ/8yjOTlh+M= 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 1641799770719814.5277792807167; Sun, 9 Jan 2022 23:29:30 -0800 (PST) Received: from localhost ([::1]:37036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6p7R-0007gc-JU for importer@patchew.org; Mon, 10 Jan 2022 02:29:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34544) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6oub-00078Y-2f for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:14 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:52109) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6ouZ-0001hp-4W for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:12 -0500 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-587-QJYPP1PoMKy0lQXViY0Oyg-1; Mon, 10 Jan 2022 02:16:09 -0500 Received: by mail-wm1-f70.google.com with SMTP id s190-20020a1ca9c7000000b00347c6c39d9aso3484209wme.5 for ; Sun, 09 Jan 2022 23:16:09 -0800 (PST) Received: from redhat.com ([2a03:c5c0:107d:b60c:c297:16fe:7528:e989]) by smtp.gmail.com with ESMTPSA id j13sm6243039wmq.11.2022.01.09.23.16.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 23:16:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641798970; 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: in-reply-to:in-reply-to:references:references; bh=AKB1wcqs7P6pnfvGipeaJG3zqEFmm838XGwBbdRPsng=; b=QSiswA0x2XXdZ4qAAPosdkw/YfNnClWaR86OlRPivf5VbtPzZxNlCQsq1azMeUBApBBCG2 Vxbcp0HoBN5UYg2gH9xwpcxMWrciyvmZLsYccybJdIgzYylq6P2Ai+C3XuxpZmw2ief10m koKgPLPyvIXUB3udHGosAHhzzxQSiZ4= X-MC-Unique: QJYPP1PoMKy0lQXViY0Oyg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=AKB1wcqs7P6pnfvGipeaJG3zqEFmm838XGwBbdRPsng=; b=w2Up3+lzkKAn3NmlpLoOtMWqSJ1obCFxY7ktE6PkQxsfUTZYk2fls4edLMJV5uhMbq l3MF4Av+hXmfiryzO7PhyaPH9oZxDz9ZSfHWq0o6A7sv2/j1IMuji8bFSSTO79ZZUGQ0 kUhPdjZbTYnUr9ElvqGLa5HZUkAXYTP5CLP9tVZLOZQSAo5p5oT0zFG/AjCRo4FFGFfS 92ZxiIKSyIKltfMEmiLL3SrsXK51Pm/k+6Wy4NG9eJVJBfTpOOX4meEoMrhqhzVIedJw GV7b6InbHz/87Y95UDDgalfwc5uxTHT0c9vxPuXgF+j5NoQihJYUnHGGdTuOT6PptdFC E2JA== X-Gm-Message-State: AOAM532939tLh27FEORveyysC7WJKSRallel6dMmOIktDt5NMaDM6fbY K6DyCxw1kdYDkLX+xfruM7BUEKUMmXWq+5mUm0uasS5tY0JigQkZaYKsPJ+6TGQ4Dnn1E7HQ6Zd xfTBlKoUKPOHFPNMXW8rDLM/anE2rLq5xMONUICZI9bCGuKWLy/vVH948XBXj X-Received: by 2002:a5d:64c6:: with SMTP id f6mr61788800wri.711.1641798967848; Sun, 09 Jan 2022 23:16:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxYK7zcQCBh1HeFykdchqLSmY6jVeNsb3xcTvWFSFIR07X1tZyLmDO4HJrLgf0Cr5sNZzGSOg== X-Received: by 2002:a5d:64c6:: with SMTP id f6mr61788781wri.711.1641798967529; Sun, 09 Jan 2022 23:16:07 -0800 (PST) Date: Mon, 10 Jan 2022 02:16:04 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 01/10] Revert "virtio-pci: add support for configure interrupt" Message-ID: <20220110071547.195669-2-mst@redhat.com> References: <20220110071547.195669-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20220110071547.195669-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline 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=mst@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.597, 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_H3=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: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1641799771803100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This reverts commit d5d24d859c3957ea1674d0e102f96439cdbfe93a. --- hw/virtio/virtio-pci.h | 4 +- hw/virtio/virtio-pci.c | 92 ++++++------------------------------------ 2 files changed, 13 insertions(+), 83 deletions(-) diff --git a/hw/virtio/virtio-pci.h b/hw/virtio/virtio-pci.h index b704acc5a8..2446dcd9ae 100644 --- a/hw/virtio/virtio-pci.h +++ b/hw/virtio/virtio-pci.h @@ -251,7 +251,5 @@ void virtio_pci_types_register(const VirtioPCIDeviceTyp= eInfo *t); * @fixed_queues. */ unsigned virtio_pci_optimal_num_queues(unsigned fixed_queues); -void virtio_pci_set_guest_notifier_fd_handler(VirtIODevice *vdev, VirtQueu= e *vq, - int n, bool assign, - bool with_irqfd); + #endif diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 98fb5493ae..7201cf3dc1 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -727,8 +727,7 @@ static int virtio_pci_get_notifier(VirtIOPCIProxy *prox= y, int queue_no, VirtQueue *vq; =20 if (queue_no =3D=3D VIRTIO_CONFIG_IRQ_IDX) { - *n =3D virtio_config_get_guest_notifier(vdev); - *vector =3D vdev->config_vector; + return -1; } else { if (!virtio_queue_get_num(vdev, queue_no)) { return -1; @@ -803,10 +802,6 @@ static int kvm_virtio_pci_vector_use(VirtIOPCIProxy *p= roxy, int nvqs) return ret; } =20 -static int kvm_virtio_pci_vector_config_use(VirtIOPCIProxy *proxy) -{ - return kvm_virtio_pci_vector_use_one(proxy, VIRTIO_CONFIG_IRQ_IDX); -} =20 static void kvm_virtio_pci_vector_release_one(VirtIOPCIProxy *proxy, int queue_no) @@ -844,11 +839,6 @@ static void kvm_virtio_pci_vector_release(VirtIOPCIPro= xy *proxy, int nvqs) } } =20 -static void kvm_virtio_pci_vector_config_release(VirtIOPCIProxy *proxy) -{ - kvm_virtio_pci_vector_release_one(proxy, VIRTIO_CONFIG_IRQ_IDX); -} - static int virtio_pci_one_vector_unmask(VirtIOPCIProxy *proxy, unsigned int queue_no, unsigned int vector, @@ -930,17 +920,9 @@ static int virtio_pci_vector_unmask(PCIDevice *dev, un= signed vector, } vq =3D virtio_vector_next_queue(vq); } - /* unmask config intr */ - n =3D virtio_config_get_guest_notifier(vdev); - ret =3D virtio_pci_one_vector_unmask(proxy, VIRTIO_CONFIG_IRQ_IDX, vec= tor, - msg, n); - if (ret < 0) { - goto undo_config; - } + return 0; -undo_config: - n =3D virtio_config_get_guest_notifier(vdev); - virtio_pci_one_vector_mask(proxy, VIRTIO_CONFIG_IRQ_IDX, vector, n); + undo: vq =3D virtio_vector_first_queue(vdev, vector); while (vq && unmasked >=3D 0) { @@ -974,8 +956,6 @@ static void virtio_pci_vector_mask(PCIDevice *dev, unsi= gned vector) } vq =3D virtio_vector_next_queue(vq); } - n =3D virtio_config_get_guest_notifier(vdev); - virtio_pci_one_vector_mask(proxy, VIRTIO_CONFIG_IRQ_IDX, vector, n); } =20 static void virtio_pci_vector_poll(PCIDevice *dev, @@ -1007,34 +987,6 @@ static void virtio_pci_vector_poll(PCIDevice *dev, msix_set_pending(dev, vector); } } - /* poll the config intr */ - ret =3D virtio_pci_get_notifier(proxy, VIRTIO_CONFIG_IRQ_IDX, ¬ifie= r, - &vector); - if (ret < 0) { - return; - } - if (vector < vector_start || vector >=3D vector_end || - !msix_is_masked(dev, vector)) { - return; - } - if (k->guest_notifier_pending) { - if (k->guest_notifier_pending(vdev, VIRTIO_CONFIG_IRQ_IDX)) { - msix_set_pending(dev, vector); - } - } else if (event_notifier_test_and_clear(notifier)) { - msix_set_pending(dev, vector); - } -} - -void virtio_pci_set_guest_notifier_fd_handler(VirtIODevice *vdev, VirtQueu= e *vq, - int n, bool assign, - bool with_irqfd) -{ - if (n =3D=3D VIRTIO_CONFIG_IRQ_IDX) { - virtio_config_set_guest_notifier_fd_handler(vdev, assign, with_irq= fd); - } else { - virtio_queue_set_guest_notifier_fd_handler(vq, assign, with_irqfd); - } } =20 static int virtio_pci_set_guest_notifier(DeviceState *d, int n, bool assig= n, @@ -1043,25 +995,17 @@ static int virtio_pci_set_guest_notifier(DeviceState= *d, int n, bool assign, VirtIOPCIProxy *proxy =3D to_virtio_pci_proxy(d); VirtIODevice *vdev =3D virtio_bus_get_device(&proxy->bus); VirtioDeviceClass *vdc =3D VIRTIO_DEVICE_GET_CLASS(vdev); - VirtQueue *vq =3D NULL; - EventNotifier *notifier =3D NULL; - - if (n =3D=3D VIRTIO_CONFIG_IRQ_IDX) { - notifier =3D virtio_config_get_guest_notifier(vdev); - } else { - vq =3D virtio_get_queue(vdev, n); - notifier =3D virtio_queue_get_guest_notifier(vq); - } + VirtQueue *vq =3D virtio_get_queue(vdev, n); + EventNotifier *notifier =3D virtio_queue_get_guest_notifier(vq); =20 if (assign) { int r =3D event_notifier_init(notifier, 0); if (r < 0) { return r; } - virtio_pci_set_guest_notifier_fd_handler(vdev, vq, n, true, with_i= rqfd); + virtio_queue_set_guest_notifier_fd_handler(vq, true, with_irqfd); } else { - virtio_pci_set_guest_notifier_fd_handler(vdev, vq, n, false, - with_irqfd); + virtio_queue_set_guest_notifier_fd_handler(vq, false, with_irqfd); event_notifier_cleanup(notifier); } =20 @@ -1103,7 +1047,6 @@ static int virtio_pci_set_guest_notifiers(DeviceState= *d, int nvqs, bool assign) msix_unset_vector_notifiers(&proxy->pci_dev); if (proxy->vector_irqfd) { kvm_virtio_pci_vector_release(proxy, nvqs); - kvm_virtio_pci_vector_config_release(proxy); g_free(proxy->vector_irqfd); proxy->vector_irqfd =3D NULL; } @@ -1119,11 +1062,7 @@ static int virtio_pci_set_guest_notifiers(DeviceStat= e *d, int nvqs, bool assign) goto assign_error; } } - r =3D virtio_pci_set_guest_notifier(d, VIRTIO_CONFIG_IRQ_IDX, assign, - with_irqfd); - if (r < 0) { - goto config_assign_error; - } + /* Must set vector notifier after guest notifier has been assigned */ if ((with_irqfd || k->guest_notifier_mask) && assign) { if (with_irqfd) { @@ -1132,14 +1071,11 @@ static int virtio_pci_set_guest_notifiers(DeviceSta= te *d, int nvqs, bool assign) msix_nr_vectors_allocated(&proxy->pci_dev)); r =3D kvm_virtio_pci_vector_use(proxy, nvqs); if (r < 0) { - goto config_assign_error; + goto assign_error; } } - r =3D kvm_virtio_pci_vector_config_use(proxy); - if (r < 0) { - goto config_error; - } - r =3D msix_set_vector_notifiers(&proxy->pci_dev, virtio_pci_vector= _unmask, + r =3D msix_set_vector_notifiers(&proxy->pci_dev, + virtio_pci_vector_unmask, virtio_pci_vector_mask, virtio_pci_vector_poll); if (r < 0) { @@ -1154,11 +1090,7 @@ notifiers_error: assert(assign); kvm_virtio_pci_vector_release(proxy, nvqs); } -config_error: - kvm_virtio_pci_vector_config_release(proxy); -config_assign_error: - virtio_pci_set_guest_notifier(d, VIRTIO_CONFIG_IRQ_IDX, !assign, - with_irqfd); + assign_error: /* We get here on assignment failure. Recover by undoing for VQs 0 .. = n. */ assert(assign); --=20 MST From nobody Mon Apr 29 04:13:09 2024 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=1641799253; cv=none; d=zohomail.com; s=zohoarc; b=Aq859N9M1jJd3muO6q9N3KUcXE6zvdOMoEsuqQKyrZsDPF4PLRDDspMjobXuL6vjtUp58O4WW/mpVMnKU7YEZ3uJr4hXVARXdxm23vM+Qf068Kt5mBjDjELiowUBo071iUCwsaICgUMBQmOFQYbXxQb4xxbj1YFAXgJIEL6dqJs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641799253; h=Content-Type:Cc: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=fmd4hVUWpHW/ohBMb7hZhM27Td7QwVWl637W51ZyW5o=; b=I91E6RmmP+B7kksmaoVXO+2JD2WLXM8vbU7ho6LG7GzX7Fnyz3g8FLiui0xTHPIVuvEKJkxLWyE1eISstdJ9gppkkGtQ3zR5rhILjXpXitrjnK0pTnQpXNOAQHOI/Tnn3mLDdRg/rQM2x1jUUyHCGbBrsxUFHG+NDiqKyQi121A= 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 1641799253612884.54501398047; Sun, 9 Jan 2022 23:20:53 -0800 (PST) Received: from localhost ([::1]:56696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6oz6-0001c8-Gq for importer@patchew.org; Mon, 10 Jan 2022 02:20:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6ouf-0007Bg-IN for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:18 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:38880) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6oud-0001iq-Py for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:17 -0500 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-621-3jgA6DHRPOm8UY7JpTWjRA-1; Mon, 10 Jan 2022 02:16:12 -0500 Received: by mail-wm1-f70.google.com with SMTP id m15-20020a7bce0f000000b003473d477618so5900902wmc.8 for ; Sun, 09 Jan 2022 23:16:11 -0800 (PST) Received: from redhat.com ([2a03:c5c0:107d:b60c:c297:16fe:7528:e989]) by smtp.gmail.com with ESMTPSA id o1sm5918606wmc.38.2022.01.09.23.16.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 23:16:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641798975; 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: in-reply-to:in-reply-to:references:references; bh=fmd4hVUWpHW/ohBMb7hZhM27Td7QwVWl637W51ZyW5o=; b=e3aHHtb/73UzMYqg6tIqwTO/BcWuqEWzBNLdTvVjS81T16Gh/JZ0EM7aEyEgzb2m9eZVX0 yk17Sm1XYkItyqJlI8+ochIAy7yUQUJiTeVf/jE8qRQIcq5r/tLaoqa0amXqtEGol26iZy SPSc9FmtsROAtvlGYwf8MIDtydEmhss= X-MC-Unique: 3jgA6DHRPOm8UY7JpTWjRA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=fmd4hVUWpHW/ohBMb7hZhM27Td7QwVWl637W51ZyW5o=; b=7A+88v/0hs32yUWtFZCsIqhcFOruyXIHqZ8TSZQ42fcw7s4YaIkNuyGQJQ9IoBOh/u F964QZVYsarydTHBQbLme6mdtWhMptKOsJJ/49K08+Qz2jipHxwuQjaI4edBNcmdqokU wyM3OtIrutcHlwHPi0u0nuLlpQp04xY/hOQPCH+cK3eODqXkhOdTyKIGDWQrUd0AoSji dPkqJCuoPkBA/jaohbjakKXritqXFwa3gjr2S0V+G8tyBCFkRZauwDws6xngYrh1WB0v luOriIJKmdkutqZdbQXwPQGDU8QfkMQ1ck0RHPzVxSO0ge7U4SdNgFdtFy3fXL0BK6HE lGIQ== X-Gm-Message-State: AOAM532KnKGDdnxFBVH9rCXU2WX1TjeU5XWgf7dax/OOCeCZTebcmH7N aDutogQ5CNw9vGn3X9vD1SsrAJH9/xTO0ZC/6htmdlApzk5vLO0n1BBSfUAIH6klhHBPNrQnYYj nRyqj8vIXLFlBEZR1C5a4p7D61aIh6VOq+uyBd40PzH2NfYEKsTudOwm/VRjd X-Received: by 2002:a1c:4c11:: with SMTP id z17mr342171wmf.0.1641798970497; Sun, 09 Jan 2022 23:16:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJykGD6Exr0Mr3Il/Zqiim9JyjwzWoAwe2tPg++KwWh81spK0rTuzOVvzsYKDKnc0gY+ktQ3sA== X-Received: by 2002:a1c:4c11:: with SMTP id z17mr342166wmf.0.1641798970220; Sun, 09 Jan 2022 23:16:10 -0800 (PST) Date: Mon, 10 Jan 2022 02:16:07 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 02/10] Revert "virtio-mmio: add support for configure interrupt" Message-ID: <20220110071547.195669-3-mst@redhat.com> References: <20220110071547.195669-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20220110071547.195669-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline 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=mst@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.597, 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_H3=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: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1641799255573100003 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This reverts commit d48185f1a40d4e4ed2fa2873a42b2a5eb8748256. --- hw/virtio/virtio-mmio.c | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index 809132018b..72da12fea5 100644 --- a/hw/virtio/virtio-mmio.c +++ b/hw/virtio/virtio-mmio.c @@ -673,30 +673,7 @@ static int virtio_mmio_set_guest_notifier(DeviceState = *d, int n, bool assign, =20 return 0; } -static int virtio_mmio_set_config_guest_notifier(DeviceState *d, bool assi= gn) -{ - VirtIOMMIOProxy *proxy =3D VIRTIO_MMIO(d); - VirtIODevice *vdev =3D virtio_bus_get_device(&proxy->bus); - VirtioDeviceClass *vdc =3D VIRTIO_DEVICE_GET_CLASS(vdev); - bool with_irqfd =3D false; - EventNotifier *notifier =3D virtio_config_get_guest_notifier(vdev); - int r =3D 0; =20 - if (assign) { - r =3D event_notifier_init(notifier, 0); - if (r < 0) { - return r; - } - virtio_config_set_guest_notifier_fd_handler(vdev, assign, with_irq= fd); - } else { - virtio_config_set_guest_notifier_fd_handler(vdev, assign, with_irq= fd); - event_notifier_cleanup(notifier); - } - if (vdc->guest_notifier_mask && vdev->use_guest_notifier_mask) { - vdc->guest_notifier_mask(vdev, VIRTIO_CONFIG_IRQ_IDX, !assign); - } - return r; -} static int virtio_mmio_set_guest_notifiers(DeviceState *d, int nvqs, bool assign) { @@ -718,10 +695,6 @@ static int virtio_mmio_set_guest_notifiers(DeviceState= *d, int nvqs, goto assign_error; } } - r =3D virtio_mmio_set_config_guest_notifier(d, assign); - if (r < 0) { - goto assign_error; - } =20 return 0; =20 --=20 MST From nobody Mon Apr 29 04:13:09 2024 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=1641799254; cv=none; d=zohomail.com; s=zohoarc; b=ZpjRMP28XQ2LB+4hMce3wGo5Tf6WewtA+WXuk5nN6IpUFkKD0VOMLuhZCrWgNR115rDDDNOwAE6cilGp1RjYrBfqEXFxQdCpbh483ch2dGW4VTDRnn+JfqHFvb1cWd6VgmsN4UkHEflFKZrGyorfUIsFhhta5yKg5hjAhWyBcVs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641799254; h=Content-Type:Cc: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=ZUuqkza4Nvqmei+acVjd7Eu/xM5HJzUvA1DqMYNnPjk=; b=n99Yech4Vz4wrcdAI7ezLCIFng4cqk/oIZOU/KVAv7zgKccknn2lRbPNjHV6Qxgvg3GfsO9Ml2ULdsOI1QWQVvuK6zpJxx3btm4yWdfVBikEiY5eCSTtFwChlu7rQLwzH8xecfQlmgcKTwFbEh9lmUu+is7Zu029C9YjBJlNuMs= 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 16417992545801009.800633838284; Sun, 9 Jan 2022 23:20:54 -0800 (PST) Received: from localhost ([::1]:56732 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6oz7-0001dq-Hu for importer@patchew.org; Mon, 10 Jan 2022 02:20:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6oug-0007Bt-Pe for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:18 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:39070) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6oue-0001j2-Rr for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:18 -0500 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-610-a5-3x6a5PDy0MKa7WjgAQw-1; Mon, 10 Jan 2022 02:16:14 -0500 Received: by mail-wr1-f72.google.com with SMTP id v14-20020adfa1ce000000b001a49d6587ceso3758914wrv.21 for ; Sun, 09 Jan 2022 23:16:14 -0800 (PST) Received: from redhat.com ([2a03:c5c0:107d:b60c:c297:16fe:7528:e989]) by smtp.gmail.com with ESMTPSA id l2sm6224446wrs.43.2022.01.09.23.16.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 23:16:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641798975; 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: in-reply-to:in-reply-to:references:references; bh=ZUuqkza4Nvqmei+acVjd7Eu/xM5HJzUvA1DqMYNnPjk=; b=HK2HDy/pFDB3R0lZh9+mPv4N1r1Uqt0C/rhnsMcHXQErm6euf646RvH2OpefO9Tth4b8lQ HtcacMto1nvz2NCIOOBv0WF/CdomgZaVZEC2XDfwcZH6vTNFxOdx4H+1vodtfScmg2Zmim R2DToQQJX5RLv2ZxT3TfGaN2VhuW6l8= X-MC-Unique: a5-3x6a5PDy0MKa7WjgAQw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ZUuqkza4Nvqmei+acVjd7Eu/xM5HJzUvA1DqMYNnPjk=; b=yMS0sGdovH7haxAU1U6jMIXr90kSGjAMHhzPH5KSHUzoBtiPRe1u6LGj15E/JvsD+E 20DObWvv2/PLf59kPQXyP3zSzFPOKpCNOzeyBtJ4MdxWwHveoTf2BNTT9EkujA4EtLPw Yh3Q5tRtshj9+Z7SgybheGM2ksBe2ZE/gRCs3jwNdkVENj4PTEYPOw21ptK3KgkVa03F WWfL1EgNdyMmnAQI6u8iyvJe99Wpzyf5QRXUxNiXpH/Mj6HbWvr7sjxBefJlfsSwbcb3 FvWycXi4syKu3c5YQxFvh+1yQXLLUZWi7jIDEMSUl31R8BGXEIPK5hcpXGrptMhLbVUl bt1g== X-Gm-Message-State: AOAM533nOmBjCUR8XoU/c6pNXdx6J24DzuoZBW69GuufztxVp5r1fyw7 RKJEl7jZDF2raAUeQMQj7SBgTdBGUjrpRHa2LJm3MESzij7vfduTVg2rvbpDCJUwA7USPa1SBuy lngi1P1o3kL6Kt03i8fKc66+L0yke1biaVqAqL9w8paMIcO5UZftxtaQYPflw X-Received: by 2002:a05:600c:3589:: with SMTP id p9mr21077709wmq.109.1641798973349; Sun, 09 Jan 2022 23:16:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJw7kXVcQAz9IT9BPXUs7WoTP6sl7SyCy4xMckPJ2hZy8Mg4rAk2GBxbX5x+cMdv5qkYZFGGUA== X-Received: by 2002:a05:600c:3589:: with SMTP id p9mr21077692wmq.109.1641798973083; Sun, 09 Jan 2022 23:16:13 -0800 (PST) Date: Mon, 10 Jan 2022 02:16:10 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 03/10] Revert "virtio-net: add support for configure interrupt" Message-ID: <20220110071547.195669-4-mst@redhat.com> References: <20220110071547.195669-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20220110071547.195669-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline 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.133.124; envelope-from=mst@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.597, 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_H3=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: , Cc: Peter Maydell , Jason Wang Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1641800156853100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This reverts commit 497679d51087090d5a22fd265d1b96cf92d49d9d. --- include/net/vhost_net.h | 2 -- hw/net/vhost_net-stub.c | 9 --------- hw/net/vhost_net.c | 9 --------- hw/net/virtio-net.c | 4 ++-- 4 files changed, 2 insertions(+), 22 deletions(-) diff --git a/include/net/vhost_net.h b/include/net/vhost_net.h index fc37498550..387e913e4e 100644 --- a/include/net/vhost_net.h +++ b/include/net/vhost_net.h @@ -39,8 +39,6 @@ int vhost_net_set_config(struct vhost_net *net, const uin= t8_t *data, bool vhost_net_virtqueue_pending(VHostNetState *net, int n); void vhost_net_virtqueue_mask(VHostNetState *net, VirtIODevice *dev, int idx, bool mask); -bool vhost_net_config_pending(VHostNetState *net); -void vhost_net_config_mask(VHostNetState *net, VirtIODevice *dev, bool mas= k); int vhost_net_notify_migration_done(VHostNetState *net, char* mac_addr); VHostNetState *get_vhost_net(NetClientState *nc); =20 diff --git a/hw/net/vhost_net-stub.c b/hw/net/vhost_net-stub.c index 126ee35b70..89d71cfb8e 100644 --- a/hw/net/vhost_net-stub.c +++ b/hw/net/vhost_net-stub.c @@ -101,12 +101,3 @@ int vhost_net_set_mtu(struct vhost_net *net, uint16_t = mtu) { return 0; } - -bool vhost_net_config_pending(VHostNetState *net) -{ - return false; -} - -void vhost_net_config_mask(VHostNetState *net, VirtIODevice *dev, bool mas= k) -{ -} diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 9c9fd0a73f..30379d2ca4 100644 --- a/hw/net/vhost_net.c +++ b/hw/net/vhost_net.c @@ -457,15 +457,6 @@ void vhost_net_virtqueue_mask(VHostNetState *net, Virt= IODevice *dev, vhost_virtqueue_mask(&net->dev, dev, idx, mask); } =20 -bool vhost_net_config_pending(VHostNetState *net) -{ - return vhost_config_pending(&net->dev); -} - -void vhost_net_config_mask(VHostNetState *net, VirtIODevice *dev, bool mas= k) -{ - vhost_config_mask(&net->dev, dev, mask); -} VHostNetState *get_vhost_net(NetClientState *nc) { VHostNetState *vhost_net =3D 0; diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 5806a50c8d..5e03c0dd14 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -3169,7 +3169,7 @@ static bool virtio_net_guest_notifier_pending(VirtIOD= evice *vdev, int idx) NetClientState *nc =3D qemu_get_subqueue(n->nic, vq2q(idx)); assert(n->vhost_started); if (idx =3D=3D VIRTIO_CONFIG_IRQ_IDX) { - return vhost_net_config_pending(get_vhost_net(nc->peer)); + return false; } return vhost_net_virtqueue_pending(get_vhost_net(nc->peer), idx); } @@ -3181,9 +3181,9 @@ static void virtio_net_guest_notifier_mask(VirtIODevi= ce *vdev, int idx, NetClientState *nc =3D qemu_get_subqueue(n->nic, vq2q(idx)); assert(n->vhost_started); if (idx =3D=3D VIRTIO_CONFIG_IRQ_IDX) { - vhost_net_config_mask(get_vhost_net(nc->peer), vdev, mask); return; } + vhost_net_virtqueue_mask(get_vhost_net(nc->peer), vdev, idx, mask); } =20 --=20 MST From nobody Mon Apr 29 04:13:09 2024 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=1641799774; cv=none; d=zohomail.com; s=zohoarc; b=KiI7LtUfTC6aflT3NuPaFzmVkJkKVMtR2pmzT4jQWfJzu7AlBQ/NOOe0hgs1TAuI5DZHVRhUXrS5PIpWdITiv2zOrGyatWiBDZKRNWN2KWeAZwVM1fzth/L3QScyWyGogCP+lL6V+zrc/EB2GH6WSwvY1YPvAa9y5vyJg/Dmhqw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641799774; h=Content-Type:Cc: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=F/oNzty8wOZ0UJdfMdde20DU24oDHdNfaZ3a+zRdt7Y=; b=VFPEw9vh2MmbLM1l/BqQ+pjDMHQyq6USGXe8kajOUSdB6p4MzzQCkSgVqalJPXBOAFlYLoyEO5zYsxrrth86L9Vu2fCJ1UmobaYWlharhkANfifedvQ7Z7jMvGccLDHi9dx81/CMn2q56to57gjK+79tJBL27450RG1z/4BK9/Q= 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 16417997742781016.1385906352791; Sun, 9 Jan 2022 23:29:34 -0800 (PST) Received: from localhost ([::1]:37146 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6p7V-0007ku-2u for importer@patchew.org; Mon, 10 Jan 2022 02:29:33 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6ouk-0007H3-3v for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:22 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:25095) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6ouh-0001ku-4U for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:21 -0500 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-622-VK1bO4z0O8e_w_mpN6Cu7w-1; Mon, 10 Jan 2022 02:16:17 -0500 Received: by mail-wr1-f72.google.com with SMTP id h26-20020adfa4da000000b001a652d52d8eso1845578wrb.16 for ; Sun, 09 Jan 2022 23:16:17 -0800 (PST) Received: from redhat.com ([2a03:c5c0:107d:b60c:c297:16fe:7528:e989]) by smtp.gmail.com with ESMTPSA id m5sm5831714wml.14.2022.01.09.23.16.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 23:16:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641798978; 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: in-reply-to:in-reply-to:references:references; bh=F/oNzty8wOZ0UJdfMdde20DU24oDHdNfaZ3a+zRdt7Y=; b=ISuVZJVhcbT9IFiNuzD1J3SMdBow4f3oKrwdjo7AZpBOPPCVPokRTDtMPZz5pLvF1aXXka 6LGIj2/eIsQets9bABCRsTXZ7TuJMfzpQYPw9SIvwku9GNfC8Zrdwxryl0NQ8eRHrWhEJP /01uPsK4QMMRux/u4GYFWM0UmxkCPCI= X-MC-Unique: VK1bO4z0O8e_w_mpN6Cu7w-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=F/oNzty8wOZ0UJdfMdde20DU24oDHdNfaZ3a+zRdt7Y=; b=kKZ43crIokZ4zDXsGbOiARZU+pod/9yVGgagIniOAwLqL9OAQsY27Xa6NVihMlWwDQ Ycqpkk9vQaurZESsZQnKvKdP0h2rIib2WSbYHQtGMu6MyosuP+0oElIxL8QSvCuUKAI+ SnOcfz4wViR1cS4L50kAvwKNXRhrKurcJFUWRwXCGV/wbE29STFntF6xsm1nMql9pv/w rMsFrFZZjKeTLX/jhs6f3g9M/ecuUYGRLGr0SQNQ/fzoNLfjCEIiQUrCM+xd4jK5LToy dNQqHotBhqG60uRoUo8U84FvVhuij9Z+B2YDC7n3VjN33GANUpKzjADl4vCvKm3Wo12q ++pA== X-Gm-Message-State: AOAM533j0a4v6yt/zIFe1yPvYCmStwiQQ2cqUvQuAMvqd6L1sft2UfjX d28uK/PInk/EAyqEuiSSUQ1Bu02gBowCvmAKs7fRlP1vnZDgl/vSMF66+RgxnpbaIYMxswVj11r Yn0Fncx0tKhOdoKNW4LhwqwH+jFDBqIARqtXiWOPdrbOec3CcpTIzi1rjopsX X-Received: by 2002:a05:600c:21cf:: with SMTP id x15mr1362873wmj.8.1641798976019; Sun, 09 Jan 2022 23:16:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXdGNrSQsib8QIieFUXa0KgjuQTHraa9cLksGzACqu/ho8+vNYn+2nUBOHuxTyjcSWj1iI1w== X-Received: by 2002:a05:600c:21cf:: with SMTP id x15mr1362857wmj.8.1641798975844; Sun, 09 Jan 2022 23:16:15 -0800 (PST) Date: Mon, 10 Jan 2022 02:16:13 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 04/10] Revert "vhost: add support for configure interrupt" Message-ID: <20220110071547.195669-5-mst@redhat.com> References: <20220110071547.195669-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20220110071547.195669-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline 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.133.124; envelope-from=mst@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.597, 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_H3=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: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1641799776358100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This reverts commit f7220a7ce21604a4bc6260ccca4dc9068c1f27f2. --- include/hw/virtio/vhost.h | 4 --- hw/virtio/vhost.c | 76 --------------------------------------- 2 files changed, 80 deletions(-) diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index b0f3b78987..58a73e7b7a 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -29,7 +29,6 @@ struct vhost_virtqueue { unsigned long long used_phys; unsigned used_size; EventNotifier masked_notifier; - EventNotifier masked_config_notifier; struct vhost_dev *dev; }; =20 @@ -38,7 +37,6 @@ typedef unsigned long vhost_log_chunk_t; #define VHOST_LOG_BITS (8 * sizeof(vhost_log_chunk_t)) #define VHOST_LOG_CHUNK (VHOST_LOG_PAGE * VHOST_LOG_BITS) #define VHOST_INVALID_FEATURE_BIT (0xff) -#define VHOST_QUEUE_NUM_CONFIG_INR 0 =20 struct vhost_log { unsigned long long size; @@ -118,8 +116,6 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODevic= e *vdev); void vhost_dev_stop(struct vhost_dev *hdev, VirtIODevice *vdev); int vhost_dev_enable_notifiers(struct vhost_dev *hdev, VirtIODevice *vdev); void vhost_dev_disable_notifiers(struct vhost_dev *hdev, VirtIODevice *vde= v); -bool vhost_config_pending(struct vhost_dev *hdev); -void vhost_config_mask(struct vhost_dev *hdev, VirtIODevice *vdev, bool ma= sk); =20 /* Test and clear masked event pending status. * Should be called after unmask to avoid losing events. diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index cbf3b792da..7b03efccec 100644 --- a/hw/virtio/vhost.c +++ b/hw/virtio/vhost.c @@ -1554,67 +1554,6 @@ void vhost_virtqueue_mask(struct vhost_dev *hdev, Vi= rtIODevice *vdev, int n, } } =20 -bool vhost_config_pending(struct vhost_dev *hdev) -{ - assert(hdev->vhost_ops); - if ((hdev->started =3D=3D false) || - (hdev->vhost_ops->vhost_set_config_call =3D=3D NULL)) { - return false; - } - - EventNotifier *notifier =3D - &hdev->vqs[VHOST_QUEUE_NUM_CONFIG_INR].masked_config_notifier; - return event_notifier_test_and_clear(notifier); -} - -void vhost_config_mask(struct vhost_dev *hdev, VirtIODevice *vdev, bool ma= sk) -{ - int fd; - int r; - EventNotifier *notifier =3D - &hdev->vqs[VHOST_QUEUE_NUM_CONFIG_INR].masked_config_notifier; - EventNotifier *config_notifier =3D &vdev->config_notifier; - assert(hdev->vhost_ops); - - if ((hdev->started =3D=3D false) || - (hdev->vhost_ops->vhost_set_config_call =3D=3D NULL)) { - return; - } - if (mask) { - assert(vdev->use_guest_notifier_mask); - fd =3D event_notifier_get_fd(notifier); - } else { - fd =3D event_notifier_get_fd(config_notifier); - } - r =3D hdev->vhost_ops->vhost_set_config_call(hdev, fd); - if (r < 0) { - VHOST_OPS_DEBUG(r, "vhost_set_config_call failed"); - } -} - -static void vhost_stop_config_intr(struct vhost_dev *dev) -{ - int fd =3D -1; - assert(dev->vhost_ops); - if (dev->vhost_ops->vhost_set_config_call) { - dev->vhost_ops->vhost_set_config_call(dev, fd); - } -} - -static void vhost_start_config_intr(struct vhost_dev *dev) -{ - int r; - - assert(dev->vhost_ops); - int fd =3D event_notifier_get_fd(&dev->vdev->config_notifier); - if (dev->vhost_ops->vhost_set_config_call) { - r =3D dev->vhost_ops->vhost_set_config_call(dev, fd); - if (!r) { - event_notifier_set(&dev->vdev->config_notifier); - } - } -} - uint64_t vhost_get_features(struct vhost_dev *hdev, const int *feature_bit= s, uint64_t features) { @@ -1827,16 +1766,6 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODe= vice *vdev) } } =20 - r =3D event_notifier_init( - &hdev->vqs[VHOST_QUEUE_NUM_CONFIG_INR].masked_config_notifier, 0); - if (r < 0) { - return r; - } - event_notifier_test_and_clear( - &hdev->vqs[VHOST_QUEUE_NUM_CONFIG_INR].masked_config_notifier); - if (!vdev->use_guest_notifier_mask) { - vhost_config_mask(hdev, vdev, true); - } if (hdev->log_enabled) { uint64_t log_base; =20 @@ -1869,7 +1798,6 @@ int vhost_dev_start(struct vhost_dev *hdev, VirtIODev= ice *vdev) vhost_device_iotlb_miss(hdev, vq->used_phys, true); } } - vhost_start_config_intr(hdev); return 0; fail_log: vhost_log_put(hdev, false); @@ -1895,9 +1823,6 @@ void vhost_dev_stop(struct vhost_dev *hdev, VirtIODev= ice *vdev) =20 /* should only be called after backend is connected */ assert(hdev->vhost_ops); - event_notifier_test_and_clear( - &hdev->vqs[VHOST_QUEUE_NUM_CONFIG_INR].masked_config_notifier); - event_notifier_test_and_clear(&vdev->config_notifier); =20 if (hdev->vhost_ops->vhost_dev_start) { hdev->vhost_ops->vhost_dev_start(hdev, false); @@ -1915,7 +1840,6 @@ void vhost_dev_stop(struct vhost_dev *hdev, VirtIODev= ice *vdev) } memory_listener_unregister(&hdev->iommu_listener); } - vhost_stop_config_intr(hdev); vhost_log_put(hdev, true); hdev->started =3D false; hdev->vdev =3D NULL; --=20 MST From nobody Mon Apr 29 04:13:09 2024 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=1641800281; cv=none; d=zohomail.com; s=zohoarc; b=Zv+59Lgst+sRP3kmj91bBanieFAaqnjZpnkhLgAPdSWwexin5UG+AMx4ChtrXGt1el/NpbJrkK8f3AE5MwcJkqR4mJHCzAU4YW9WBHnepagezhMLTRRPBf+JGtC2Gsl4ximNq98FPBcA0rYsoy8t/HYKjl3efDjquT+hiYnns2M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641800281; h=Content-Type:Cc: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=WOchQAAD6NyARfKewJc/Jy9v/cbY3+ClrTZDCczKSP0=; b=cSCjPcZJLO5gCZkuF0VWcNNUcC/wNbVdzejau2gRFu5L/94a+1SaGr4TSIWB6U9qpPp8mfZ/Yvbdda8vYvaYB651QY/Wu1P2UGQ82rnS1lN2tRI13wWUWvFxzma3dDPaUaCyQcoLIMXiY6FIrpdU4pZtzJw0uPYZX4+NJfsArFE= 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 1641800281416228.78414352269567; Sun, 9 Jan 2022 23:38:01 -0800 (PST) Received: from localhost ([::1]:44482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6pFf-0004h7-SH for importer@patchew.org; Mon, 10 Jan 2022 02:37:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34608) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6oul-0007LC-MO for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:23 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:43789) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6ouj-0001nk-TQ for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:23 -0500 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-67-QUeVoSvuOz2KqlU5A5VyEw-1; Mon, 10 Jan 2022 02:16:20 -0500 Received: by mail-wm1-f70.google.com with SMTP id z13-20020a05600c0a0d00b003457d6619f8so4533696wmp.1 for ; Sun, 09 Jan 2022 23:16:19 -0800 (PST) Received: from redhat.com ([2a03:c5c0:107d:b60c:c297:16fe:7528:e989]) by smtp.gmail.com with ESMTPSA id 1sm6257866wrb.13.2022.01.09.23.16.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 23:16:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641798981; 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: in-reply-to:in-reply-to:references:references; bh=WOchQAAD6NyARfKewJc/Jy9v/cbY3+ClrTZDCczKSP0=; b=fHv7MrPIOVQzGmwJkhDkqUmEZ/zRQQUEsAxHm/VRTaYAnyZJ5XQentffacAhNmFKPmbRyr DAg3pWJdPMg8+FnN8Yso/hA4wnQXNE/pxB8VBRYGeL0sKOg1OMZIP+DaZ1oAqxljHrlTlk 3YQaMjnjEsHxfNlL5+Eo65A7yv3CLHM= X-MC-Unique: QUeVoSvuOz2KqlU5A5VyEw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=WOchQAAD6NyARfKewJc/Jy9v/cbY3+ClrTZDCczKSP0=; b=uKiTOH7yejSttxptduErmXUyuzy3IzJsRu7k3n8zu+hAwO2Rp8NLliO+RL0T3jnPkM SqxcAfhw6sfCWoHcEvYSxA3C/fK3TDQImkdL2pvwqxqdVT2IrG2Y0ao+10DEf8oKFDH0 lQI5qRfpxjXf80ClqnMkQezoB6dQbXCm1LudBfqSSBTmvA9b84Y/+nfsGJAWvX2gc5jq smIpsQ7Lvujkr5r3dcO8pZveCautxh4GR2wwh8laTS9hXkLbe42bnvrrO1sM7CotYUlJ T+vQY33L+7nl8JsfkDT+RkENHDR7pZNUzomkw4zQsKshmQZ6s+yRECmO8zrDnZj37Yaq aR3w== X-Gm-Message-State: AOAM530iun26NmxP3KI1x0wfhTLxFCKO44TnbItAMcDRsp/WSXw4VIjH S7nYNJPR6A9XTrQEVp8W/kDTjbFzqikhn3UgRRKUJr+Nc0Q82voje+qVuKnVAM2gVPsTacglb7D 90hI97i+QiI61Xqld9u6uTtncbA+43VIzUVAB8gvqYgFrVhCZvDQtRgNMVHbk X-Received: by 2002:a1c:7908:: with SMTP id l8mr20444895wme.16.1641798978639; Sun, 09 Jan 2022 23:16:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmV6rcS4NVOOfwp4gwPsh0EFQQyk0GgcE0CvHPdeU8yVMWme06dlWmHjfrPgI8zOjA4N8uBg== X-Received: by 2002:a1c:7908:: with SMTP id l8mr20444878wme.16.1641798978373; Sun, 09 Jan 2022 23:16:18 -0800 (PST) Date: Mon, 10 Jan 2022 02:16:16 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 05/10] Revert "virtio: add support for configure interrupt" Message-ID: <20220110071547.195669-6-mst@redhat.com> References: <20220110071547.195669-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20220110071547.195669-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline 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=mst@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.597, 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_H3=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: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1641800281854100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This reverts commit 081f864f56307551f59c5e934e3f30a7290d0faa. --- include/hw/virtio/virtio.h | 4 ---- hw/virtio/virtio.c | 29 ----------------------------- 2 files changed, 33 deletions(-) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index d78088d872..605ea79c90 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -111,7 +111,6 @@ struct VirtIODevice bool use_guest_notifier_mask; AddressSpace *dma_as; QLIST_HEAD(, VirtQueue) *vector_queues; - EventNotifier config_notifier; }; =20 struct VirtioDeviceClass { @@ -314,14 +313,11 @@ uint16_t virtio_get_queue_index(VirtQueue *vq); EventNotifier *virtio_queue_get_guest_notifier(VirtQueue *vq); void virtio_queue_set_guest_notifier_fd_handler(VirtQueue *vq, bool assign, bool with_irqfd); -void virtio_config_set_guest_notifier_fd_handler(VirtIODevice *vdev, - bool assign, bool with_ir= qfd); int virtio_device_start_ioeventfd(VirtIODevice *vdev); int virtio_device_grab_ioeventfd(VirtIODevice *vdev); void virtio_device_release_ioeventfd(VirtIODevice *vdev); bool virtio_device_ioeventfd_enabled(VirtIODevice *vdev); EventNotifier *virtio_queue_get_host_notifier(VirtQueue *vq); -EventNotifier *virtio_config_get_guest_notifier(VirtIODevice *vdev); void virtio_queue_set_host_notifier_enabled(VirtQueue *vq, bool enabled); void virtio_queue_host_notifier_read(EventNotifier *n); void virtio_queue_aio_set_host_notifier_handler(VirtQueue *vq, AioContext = *ctx, diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 971e59a663..5d18868d7d 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -3494,14 +3494,7 @@ static void virtio_queue_guest_notifier_read(EventNo= tifier *n) virtio_irq(vq); } } -static void virtio_config_guest_notifier_read(EventNotifier *n) -{ - VirtIODevice *vdev =3D container_of(n, VirtIODevice, config_notifier); =20 - if (event_notifier_test_and_clear(n)) { - virtio_notify_config(vdev); - } -} void virtio_queue_set_guest_notifier_fd_handler(VirtQueue *vq, bool assign, bool with_irqfd) { @@ -3518,23 +3511,6 @@ void virtio_queue_set_guest_notifier_fd_handler(Virt= Queue *vq, bool assign, } } =20 -void virtio_config_set_guest_notifier_fd_handler(VirtIODevice *vdev, - bool assign, bool with_ir= qfd) -{ - EventNotifier *n; - n =3D &vdev->config_notifier; - if (assign && !with_irqfd) { - event_notifier_set_handler(n, virtio_config_guest_notifier_read); - } else { - event_notifier_set_handler(n, NULL); - } - if (!assign) { - /* Test and clear notifier before closing it,*/ - /* in case poll callback didn't have time to run. */ - virtio_config_guest_notifier_read(n); - } -} - EventNotifier *virtio_queue_get_guest_notifier(VirtQueue *vq) { return &vq->guest_notifier; @@ -3608,11 +3584,6 @@ EventNotifier *virtio_queue_get_host_notifier(VirtQu= eue *vq) return &vq->host_notifier; } =20 -EventNotifier *virtio_config_get_guest_notifier(VirtIODevice *vdev) -{ - return &vdev->config_notifier; -} - void virtio_queue_set_host_notifier_enabled(VirtQueue *vq, bool enabled) { vq->host_notifier_enabled =3D enabled; --=20 MST From nobody Mon Apr 29 04:13:09 2024 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=1641799617; cv=none; d=zohomail.com; s=zohoarc; b=cX+pTSfOc/cF4I/A0zUbDAIPlBXpEMQSSJ41dUq03E1wogWmVK8hF0iBaGfopLRPxJEuBOKGSRIk070Y02O/SlQCdreotOrrKiOE85M9C+Wwm6VXpkcwHnQF0U40dVp2/bO4O9KB96ZEs4hYVO2t5TRHMbkYJULMJaXruPetD1Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641799617; h=Content-Type:Cc: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=8WiqLc6NYHaR8eZg0R3KMpJyibUx99d+NRMkU4YwbkE=; b=U1mynkK1RDGC4s0u7lunGkE/nKDRjZaVVs7bioyRcIp3grk5pHlIf+FpYjeTPWr57Qooslp3W7BjPBQzvC8oOCBFMjFD++HS1fRFEsSmwlE5do4qugSZn16hVUepf1FgKm6LPqdMtnfLP/6DJ2rbVHL8g/M8TyJM1V+PJJWm+zk= 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 1641799617423182.56125509258152; Sun, 9 Jan 2022 23:26:57 -0800 (PST) Received: from localhost ([::1]:34990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6p4x-00068j-VR for importer@patchew.org; Mon, 10 Jan 2022 02:26:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6ouo-0007Qs-Az for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:26 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:32994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6oum-0001o5-Pt for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:26 -0500 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-625-KOSMfLO4NEKwzW8wr6Kr_g-1; Mon, 10 Jan 2022 02:16:23 -0500 Received: by mail-wm1-f69.google.com with SMTP id r2-20020a05600c35c200b00345c3b82b22so8454021wmq.0 for ; Sun, 09 Jan 2022 23:16:22 -0800 (PST) Received: from redhat.com ([2a03:c5c0:107d:b60c:c297:16fe:7528:e989]) by smtp.gmail.com with ESMTPSA id z4sm1803530wmf.44.2022.01.09.23.16.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 23:16:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641798984; 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: in-reply-to:in-reply-to:references:references; bh=8WiqLc6NYHaR8eZg0R3KMpJyibUx99d+NRMkU4YwbkE=; b=SFlTMdfNshXRKM5bB6tNaKB30UiPQ6oCZhxnzy++e9EJQe6gHp5kjNhQP2v4rFVngpq2vA z+h5QRDxmS2qBW1ipjGMphbjLE1SOEeFatWEjtkwiQ83yz9/JwM63MVrTDCsz0DlsFo+fc WSH/WD1Q2MLBQKEwt9mCbMcPH7KaAco= X-MC-Unique: KOSMfLO4NEKwzW8wr6Kr_g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=8WiqLc6NYHaR8eZg0R3KMpJyibUx99d+NRMkU4YwbkE=; b=s1MIVriAdmEqaNCeJwK8W3Z0tdI5acqzb58SC4S2DVJVau/RkNqWC+w2f5lfkdvujR VKyS86B7cD0ZimFDa9eKVkHvCNRC6naZaKM7kc+PwuYuyF1P+JDiiUGMiw75f+CMxSJd RQwXt8yiolpVq69kUvPYUi2ZcJ+96n7c8fEw1JigoLMtHTPBc3NzTw+L5H2wgwYH/nM6 ulnPhWPPZoreIzXjseBD0XhJHrsRz2qUOSjTvzYSm+gVkoHRJ1QhQoq0j1WcHTS7Vobi z9SBnWj4yeNeBTbgPS3Ao+o5c2v15AcE6K60UxyiscPqenbDLW1WnE/MYzXNrouF4New DayQ== X-Gm-Message-State: AOAM531KaTwOTsYMvN9+iaXwUO5wcSAkc5lhb/kMLGjxN/tkLE4zn5nR N94IFGhnxOYVT7vCo8aljApcQqzSTKD+oKiWJBuDyin1GF2OFJURPZpAoE5SN+PofexSoNKcMO/ DRa/qNGyTMjq/CBLDO07hJgmTdEw0aOZ7zATr3dEJGP0y88Z4BsH4JwSvN44m X-Received: by 2002:a05:6000:178c:: with SMTP id e12mr63557515wrg.563.1641798981613; Sun, 09 Jan 2022 23:16:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJz5pI+qwY1+o8g0kzYQgTwWZuILvRPh7CP1SgpwPpADvutv6ZASWo+zZRVcwiucYgjC398waQ== X-Received: by 2002:a05:6000:178c:: with SMTP id e12mr63557507wrg.563.1641798981398; Sun, 09 Jan 2022 23:16:21 -0800 (PST) Date: Mon, 10 Jan 2022 02:16:18 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 06/10] Revert "vhost-vdpa: add support for config interrupt" Message-ID: <20220110071547.195669-7-mst@redhat.com> References: <20220110071547.195669-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20220110071547.195669-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline 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=mst@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.597, 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_H3=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: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1641799619086100001 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This reverts commit 634f7c89fbd78f57d00d5d6b39c0ade9df1fe27f. --- hw/virtio/vhost-vdpa.c | 7 ------- hw/virtio/trace-events | 1 - 2 files changed, 8 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index ac0cb575fb..04ea43704f 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdpa.c @@ -734,12 +734,6 @@ static int vhost_vdpa_set_vring_call(struct vhost_dev = *dev, trace_vhost_vdpa_set_vring_call(dev, file->index, file->fd); return vhost_vdpa_call(dev, VHOST_SET_VRING_CALL, file); } -static int vhost_vdpa_set_config_call(struct vhost_dev *dev, - int fd) -{ - trace_vhost_vdpa_set_config_call(dev, fd); - return vhost_vdpa_call(dev, VHOST_VDPA_SET_CONFIG_CALL, &fd); -} =20 static int vhost_vdpa_get_features(struct vhost_dev *dev, uint64_t *features) @@ -810,5 +804,4 @@ const VhostOps vdpa_ops =3D { .vhost_get_device_id =3D vhost_vdpa_get_device_id, .vhost_vq_get_addr =3D vhost_vdpa_vq_get_addr, .vhost_force_iommu =3D vhost_vdpa_force_iommu, - .vhost_set_config_call =3D vhost_vdpa_set_config_call, }; diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events index 595ce015ff..f7ad6be5fb 100644 --- a/hw/virtio/trace-events +++ b/hw/virtio/trace-events @@ -53,7 +53,6 @@ vhost_vdpa_get_features(void *dev, uint64_t features) "de= v: %p features: 0x%"PRI vhost_vdpa_set_owner(void *dev) "dev: %p" vhost_vdpa_vq_get_addr(void *dev, void *vq, uint64_t desc_user_addr, uint6= 4_t avail_user_addr, uint64_t used_user_addr) "dev: %p vq: %p desc_user_add= r: 0x%"PRIx64" avail_user_addr: 0x%"PRIx64" used_user_addr: 0x%"PRIx64 vhost_vdpa_get_iova_range(void *dev, uint64_t first, uint64_t last) "dev: = %p first: 0x%"PRIx64" last: 0x%"PRIx64 -vhost_vdpa_set_config_call(void *dev, int fd)"dev: %p fd: %d" =20 # virtio.c virtqueue_alloc_element(void *elem, size_t sz, unsigned in_num, unsigned o= ut_num) "elem %p size %zd in_num %u out_num %u" --=20 MST From nobody Mon Apr 29 04:13:09 2024 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=1641799771; cv=none; d=zohomail.com; s=zohoarc; b=n2c5j9LnnQveq32uoEFGxgocQCZKerAuXB0dUvY3St4np5ikRYeWqfjtopZiLBJiqCUJ3Cxyho6Koiqh+01ubWlk02m+fE8o7MSyDsmOkGwQFCIC+eNwTgm9SDdJnQYzJjAjirISQ0YmrH0V30SPdaazivwzXwZWDFbBacypnqw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641799771; h=Content-Type:Cc: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=PkmPjMFI2QYTF4ymsLQZDYasSzvI4+OcUcmN+JMqJLE=; b=l9qB5h7EeR/zBVcTSzEqPi469t8Hg62yUzcgWydiHTMmsM0zeBVPUwDgxzcDYUHpsqo2aRWrOdrjVHI5n6KdoaEwGCVZtXa68jpixdaqCksGWlQq4ORslmZoVE/iFvnW3dDRMhOxLC1HNnIsiBLd57OSPsUCR7ar1MqTnl4+MeE= 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 1641799771011116.63167018461047; Sun, 9 Jan 2022 23:29:31 -0800 (PST) Received: from localhost ([::1]:37058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6p7R-0007hU-Tr for importer@patchew.org; Mon, 10 Jan 2022 02:29:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6our-0007aS-Ei for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:29 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:40440) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6oup-0001oF-Tl for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:29 -0500 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-154-nExww7DSMniRij4oar_O_g-1; Mon, 10 Jan 2022 02:16:26 -0500 Received: by mail-wm1-f72.google.com with SMTP id s190-20020a1ca9c7000000b00347c6c39d9aso3484502wme.5 for ; Sun, 09 Jan 2022 23:16:25 -0800 (PST) Received: from redhat.com ([2a03:c5c0:107d:b60c:c297:16fe:7528:e989]) by smtp.gmail.com with ESMTPSA id b14sm5861636wrg.15.2022.01.09.23.16.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 23:16:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641798987; 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: in-reply-to:in-reply-to:references:references; bh=PkmPjMFI2QYTF4ymsLQZDYasSzvI4+OcUcmN+JMqJLE=; b=fwRybQ7QX4kZvUb9CgYNV9ni+EYp4OQLD4/pJguwmyVOE1LdtQXyA6IGsZcAVRpqkzVXhY 7cT6usaJYPkA3vkmtkb/uTTfN6QTDr+ZRDhBpazc8HVWyy8WsmKz84TqFhEyJHoKQEWBC2 BZ9Cpkzlm4DZxiw5DqvWUIcla8n3E2o= X-MC-Unique: nExww7DSMniRij4oar_O_g-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PkmPjMFI2QYTF4ymsLQZDYasSzvI4+OcUcmN+JMqJLE=; b=Ewk2NnYCpGTXNazClrBBLUe7dk/d4QD6vjVsKdeo7ehONjHOlQp6tOGgiSmhPMgEz3 SWOkyKkrQoQjCLUiuB5r07Fbl/1Ro1oZn/s+mC5MSmeBAAHJm5G9JzSvToI2u0nOuRn5 PsaOSFq/dQehUHFSlOeoeiglXNSMwM0q9Nz2UhcBbB/tt1u+CFm2v3rCFSyqKbRRmiw4 x1RTx8Uizor3TxA0SbomwUddxv22WnhklNrS+jPaqPfOGKUn9dTEU1zsBHMnu0onfv0H rZT0fPXAikXuynJnhQt1pV5Zx87mYpyO7gWoRW0NdrXYHv8BwWbMmKkXBhO8ItpX9Ez0 rqeg== X-Gm-Message-State: AOAM533P69xw7Z6LAr4V0BEAYhL0MTJ1CKn3HB1Kiiy4Thj7NOwm2ahR 1GSqk5Nz/DMMYDFEfZeCm2I/cwFcvKWSONyW1F3eYDaHsTH161w7spkCN8y3qnG4oJsVlUEN9cf ghpLHE1jiWydq5e532neT1BFeM77En4eYv5jBGj4cacAkBfboNyYFf2g/dSyU X-Received: by 2002:a05:600c:a54:: with SMTP id c20mr20569125wmq.48.1641798984675; Sun, 09 Jan 2022 23:16:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJx6Z9RD850sa/ddpLJhxSwg5cHDUKVCxYC/tT+ctsq/APOnCRpMEvAtYTujBV345YzlFG/ypw== X-Received: by 2002:a05:600c:a54:: with SMTP id c20mr20569106wmq.48.1641798984419; Sun, 09 Jan 2022 23:16:24 -0800 (PST) Date: Mon, 10 Jan 2022 02:16:21 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 07/10] Revert "vhost: introduce new VhostOps vhost_set_config_call" Message-ID: <20220110071547.195669-8-mst@redhat.com> References: <20220110071547.195669-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20220110071547.195669-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline 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.133.124; envelope-from=mst@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.597, 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_H3=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: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1641799771874100003 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This reverts commit 88062372340d33090b7f089ed3b1a00f530a8914. --- include/hw/virtio/vhost-backend.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-ba= ckend.h index ff34eb7c8a..81bf3109f8 100644 --- a/include/hw/virtio/vhost-backend.h +++ b/include/hw/virtio/vhost-backend.h @@ -126,8 +126,6 @@ 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; @@ -173,7 +171,6 @@ 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 MST From nobody Mon Apr 29 04:13:09 2024 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=1641800339; cv=none; d=zohomail.com; s=zohoarc; b=e3BDUJdFK1cHc4+GsJIMgCQDfwRbZjr25evED92z1nY6HhSXpvzVND9PAbBUSaFXT5oF4G1bnfKkz/vYv52PmAsCUdLdwtH8XGkLtGtT9gHb1pIAQnC0u39mhwvCp6ET5v+zBSDFtnwiyeRVqAyGCN5LlkxBGXAKfCaVLgOES7w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641800339; h=Content-Type:Cc: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=+3mR3mqj9Y549agL9uOKKwNa4Nrh6w+hyJQcYaYC4zg=; b=a5SfoNolIjxn79JCWeEuCowVGrrbqldlUcEt/ieV4+UG3ov4PAihcAU3+he4sMNwcYLK+x0/Mi8fHjRDe51j2MAPlpuuTId4S+8Fj4uUcmeBtHD1Fm85dOSRFbHnbwksYja3ZrJcvYXN0CaylXL5Geug8xuN7Ysq56545Q6Br78= 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 1641800339658647.3140416676346; Sun, 9 Jan 2022 23:38:59 -0800 (PST) Received: from localhost ([::1]:46692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6pGc-0006Mx-Lx for importer@patchew.org; Mon, 10 Jan 2022 02:38:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6ouu-0007fZ-KN for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:36 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:39719) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6ous-0001pd-SC for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:32 -0500 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-467-osls-9TjOJuYn6FFHZvIRg-1; Mon, 10 Jan 2022 02:16:29 -0500 Received: by mail-wm1-f71.google.com with SMTP id az9-20020a05600c600900b0034692565ca8so7394967wmb.9 for ; Sun, 09 Jan 2022 23:16:28 -0800 (PST) Received: from redhat.com ([2a03:c5c0:107d:b60c:c297:16fe:7528:e989]) by smtp.gmail.com with ESMTPSA id x22sm682789wmi.13.2022.01.09.23.16.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 23:16:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641798990; 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: in-reply-to:in-reply-to:references:references; bh=+3mR3mqj9Y549agL9uOKKwNa4Nrh6w+hyJQcYaYC4zg=; b=GYy0hYPzytmLHHYIXIZKuFF0vjr1LnoXwhXdlc2nDzoEmozJAaXQfrrP5QZCZvwqMaLY6N Pg73MYnuCVemLSnsU4wH1rdgs+L5XxhQ4Pcr++zbV4lav7EWTOKtH1/ocB/KKMpnqgU3Oc 0OWBq/17RiYjTRsOXJMEs7s4V2riZZw= X-MC-Unique: osls-9TjOJuYn6FFHZvIRg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+3mR3mqj9Y549agL9uOKKwNa4Nrh6w+hyJQcYaYC4zg=; b=fzgea40Ux4tI9k+BZOzgI0ObwPTF/ven5Z1ZAEoegOH03qkzc/BR5Hd9zIU+y/6FYW kY69lQ6xK6ltlCgwObbmK75GXYK90C7XHuTddN5o96oRD6ph591ejdC6h9mOLNAC6VkJ R4iIV7CLn/LTFVq33stcbKIOb/MWSIbXXhLlUqCik+ZnMDvCKTDOivXl7mMyidD6b77k 1Dl7focfy95FBF6MZUfYFMP0uz9xHbsWmsFRJmqAjXIFUUwp0BQwv2HQ/iveWUhAmSIO y2vuuH0n4Yb/oC6BZnRSJgFPtchZj/U1T1Z3u/C6883kEXQyMsT7cSazveG/MSdWdQRN DwVw== X-Gm-Message-State: AOAM530LSgIyXV4jY5Z2N3nKJN7ycaypOa9I/WCl899lxzkbkzeisOoN yHC1rwmDxs7e/8w/zODoAo7WmUur89IHS1cwaqql5vN/NGqKRFNlL9pRFOcmGsbONwO2/N4cZcI m3B1Zhdbhz9LcQBBsiF8sEY0yA3M7M6WHuZFo6wvtDbyYXksFYLChTy6RquKI X-Received: by 2002:a05:600c:2113:: with SMTP id u19mr5915458wml.16.1641798987441; Sun, 09 Jan 2022 23:16:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHRPqGnrSMtWEEhR6NLQI+Uz15FVE4L404DixnjQ/gAHvknTSzHTvu+jib/aBLHzYKEMgh/A== X-Received: by 2002:a05:600c:2113:: with SMTP id u19mr5915437wml.16.1641798987136; Sun, 09 Jan 2022 23:16:27 -0800 (PST) Date: Mon, 10 Jan 2022 02:16:24 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 08/10] Revert "virtio-pci: decouple the single vector from the interrupt process" Message-ID: <20220110071547.195669-9-mst@redhat.com> References: <20220110071547.195669-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20220110071547.195669-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline 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=mst@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.597, 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_H3=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: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1641800341935100003 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This reverts commit 316011b8a74e777eb3ba03171cd701a291c28867. --- hw/virtio/virtio-pci.c | 163 +++++++++++++++++++---------------------- 1 file changed, 74 insertions(+), 89 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 7201cf3dc1..4bdb6e5694 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -677,6 +677,7 @@ static uint32_t virtio_read_config(PCIDevice *pci_dev, } =20 static int kvm_virtio_pci_vq_vector_use(VirtIOPCIProxy *proxy, + unsigned int queue_no, unsigned int vector) { VirtIOIRQFD *irqfd =3D &proxy->vector_irqfd[vector]; @@ -739,103 +740,87 @@ static int virtio_pci_get_notifier(VirtIOPCIProxy *p= roxy, int queue_no, return 0; } =20 -static int kvm_virtio_pci_vector_use_one(VirtIOPCIProxy *proxy, int queue_= no) -{ - unsigned int vector; - int ret; - EventNotifier *n; - PCIDevice *dev =3D &proxy->pci_dev; - VirtIODevice *vdev =3D virtio_bus_get_device(&proxy->bus); - VirtioDeviceClass *k =3D VIRTIO_DEVICE_GET_CLASS(vdev); - - ret =3D virtio_pci_get_notifier(proxy, queue_no, &n, &vector); - if (ret < 0) { - return ret; - } - if (vector >=3D msix_nr_vectors_allocated(dev)) { - return 0; - } - ret =3D kvm_virtio_pci_vq_vector_use(proxy, vector); - if (ret < 0) { - goto undo; - } - /* - * If guest supports masking, set up irqfd now. - * Otherwise, delay until unmasked in the frontend. - */ - if (vdev->use_guest_notifier_mask && k->guest_notifier_mask) { - ret =3D kvm_virtio_pci_irqfd_use(proxy, n, vector); - if (ret < 0) { - kvm_virtio_pci_vq_vector_release(proxy, vector); - goto undo; - } - } - - return 0; -undo: - - vector =3D virtio_queue_vector(vdev, queue_no); - if (vector >=3D msix_nr_vectors_allocated(dev)) { - return ret; - } - if (vdev->use_guest_notifier_mask && k->guest_notifier_mask) { - ret =3D virtio_pci_get_notifier(proxy, queue_no, &n, &vector); - if (ret < 0) { - return ret; - } - kvm_virtio_pci_irqfd_release(proxy, n, vector); - } - return ret; -} static int kvm_virtio_pci_vector_use(VirtIOPCIProxy *proxy, int nvqs) { - int queue_no; - int ret =3D 0; - VirtIODevice *vdev =3D virtio_bus_get_device(&proxy->bus); - - for (queue_no =3D 0; queue_no < nvqs; queue_no++) { - if (!virtio_queue_get_num(vdev, queue_no)) { - return -1; - } - ret =3D kvm_virtio_pci_vector_use_one(proxy, queue_no); - } - return ret; -} - - -static void kvm_virtio_pci_vector_release_one(VirtIOPCIProxy *proxy, - int queue_no) -{ - VirtIODevice *vdev =3D virtio_bus_get_device(&proxy->bus); - unsigned int vector; - EventNotifier *n; - int ret; - VirtioDeviceClass *k =3D VIRTIO_DEVICE_GET_CLASS(vdev); PCIDevice *dev =3D &proxy->pci_dev; - - ret =3D virtio_pci_get_notifier(proxy, queue_no, &n, &vector); - if (ret < 0) { - return; - } - if (vector >=3D msix_nr_vectors_allocated(dev)) { - return; - } - if (vdev->use_guest_notifier_mask && k->guest_notifier_mask) { - kvm_virtio_pci_irqfd_release(proxy, n, vector); - } - kvm_virtio_pci_vq_vector_release(proxy, vector); -} - -static void kvm_virtio_pci_vector_release(VirtIOPCIProxy *proxy, int nvqs) -{ - int queue_no; VirtIODevice *vdev =3D virtio_bus_get_device(&proxy->bus); - + VirtioDeviceClass *k =3D VIRTIO_DEVICE_GET_CLASS(vdev); + unsigned int vector; + int ret, queue_no; + EventNotifier *n; for (queue_no =3D 0; queue_no < nvqs; queue_no++) { if (!virtio_queue_get_num(vdev, queue_no)) { break; } - kvm_virtio_pci_vector_release_one(proxy, queue_no); + ret =3D virtio_pci_get_notifier(proxy, queue_no, &n, &vector); + if (ret < 0) { + break; + } + if (vector >=3D msix_nr_vectors_allocated(dev)) { + continue; + } + ret =3D kvm_virtio_pci_vq_vector_use(proxy, queue_no, vector); + if (ret < 0) { + goto undo; + } + /* If guest supports masking, set up irqfd now. + * Otherwise, delay until unmasked in the frontend. + */ + if (vdev->use_guest_notifier_mask && k->guest_notifier_mask) { + ret =3D kvm_virtio_pci_irqfd_use(proxy, n, vector); + if (ret < 0) { + kvm_virtio_pci_vq_vector_release(proxy, vector); + goto undo; + } + } + } + return 0; + +undo: + while (--queue_no >=3D 0) { + vector =3D virtio_queue_vector(vdev, queue_no); + if (vector >=3D msix_nr_vectors_allocated(dev)) { + continue; + } + if (vdev->use_guest_notifier_mask && k->guest_notifier_mask) { + ret =3D virtio_pci_get_notifier(proxy, queue_no, &n, &vector); + if (ret < 0) { + break; + } + kvm_virtio_pci_irqfd_release(proxy, n, vector); + } + kvm_virtio_pci_vq_vector_release(proxy, vector); + } + return ret; +} + +static void kvm_virtio_pci_vector_release(VirtIOPCIProxy *proxy, int nvqs) +{ + PCIDevice *dev =3D &proxy->pci_dev; + VirtIODevice *vdev =3D virtio_bus_get_device(&proxy->bus); + unsigned int vector; + int queue_no; + VirtioDeviceClass *k =3D VIRTIO_DEVICE_GET_CLASS(vdev); + EventNotifier *n; + int ret ; + for (queue_no =3D 0; queue_no < nvqs; queue_no++) { + if (!virtio_queue_get_num(vdev, queue_no)) { + break; + } + ret =3D virtio_pci_get_notifier(proxy, queue_no, &n, &vector); + if (ret < 0) { + break; + } + if (vector >=3D msix_nr_vectors_allocated(dev)) { + continue; + } + /* If guest supports masking, clean up irqfd now. + * Otherwise, it was cleaned when masked in the frontend. + */ + if (vdev->use_guest_notifier_mask && k->guest_notifier_mask) { + kvm_virtio_pci_irqfd_release(proxy, n, vector); + } + kvm_virtio_pci_vq_vector_release(proxy, vector); } } =20 --=20 MST From nobody Mon Apr 29 04:13:09 2024 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=1641800812; cv=none; d=zohomail.com; s=zohoarc; b=W1bUqJZzDOdX4lNcXa5/Gyb5oTBvNi6aPBoNkHg7bQwFBbcd/hrx94+D5+WE1jCU0wDFLq4VVN/AoD2xSYVrk+5booaIl5HsaGJXHZw93ErW55KtyHYYeO2P6vVeulkiJQKDvNp8b7MbWyIboYvzyzvzQIcza404QYb9usUK6nc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641800812; h=Content-Type:Cc: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=8XmmyqZVmieLeiSXd0xtOTybRZNrxVtnzzA8VSGPPlE=; b=EYn0xqBo+hPiqDr10NX4XDdSCvWuUbtwgUQBvhEc0WRGSvDMOuJRnjZoXC3Yv6X+kJXwKjWkbyzqjpn7mPmRbWq/Pp6q/0I5FCu71MRVSeq5UY4qhvjVdisUGJbnH9S0UMe4AmgbQ5H5LFayOXFpd6oD0XjaeY3KqsA4GtVe+mo= 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 1641800812866985.6591268182345; Sun, 9 Jan 2022 23:46:52 -0800 (PST) Received: from localhost ([::1]:51132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6pOF-00029B-Hc for importer@patchew.org; Mon, 10 Jan 2022 02:46:51 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6ouy-0007gv-Su for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:57813) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6ouw-0001pn-Rk for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:36 -0500 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-612-I_OpLRdrMSeKeLKy9fgz-Q-1; Mon, 10 Jan 2022 02:16:32 -0500 Received: by mail-wm1-f71.google.com with SMTP id a68-20020a1c9847000000b00346939a2d7cso1792927wme.1 for ; Sun, 09 Jan 2022 23:16:31 -0800 (PST) Received: from redhat.com ([2a03:c5c0:107d:b60c:c297:16fe:7528:e989]) by smtp.gmail.com with ESMTPSA id p13sm6910902wrs.54.2022.01.09.23.16.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 23:16:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641798993; 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: in-reply-to:in-reply-to:references:references; bh=8XmmyqZVmieLeiSXd0xtOTybRZNrxVtnzzA8VSGPPlE=; b=hjH51sJOYew2PJjbxZNxK1jaSMCcYAIntUfOHk/MIXJUQhlob+xZETzptigUUyeINRThw5 LegbOhmzQrFcGA2HKXMmPQBl5joNOs2he9vkGHGKsv4WlarjaLykeZKLgjp5OcHDRhSied 78rFVVD4nI+XMJJrAxOdzVgu7fornzo= X-MC-Unique: I_OpLRdrMSeKeLKy9fgz-Q-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=8XmmyqZVmieLeiSXd0xtOTybRZNrxVtnzzA8VSGPPlE=; b=lbanO4XhxmFEL45DLUUZxHAV1uVkEBR98fSLa3EIeVsTQgpQo1EwJZJ1w8ML7S0H/p UvHeRU224NsKLWKAuCE/25mD9bdJoLvIkZ42VLE1OOaJJdtHsoVlzvOPFXGKTjP4XzvV Jpe2umUGV9wvZUe9hYWZaQAetSHH7exV8xHaqVqwPI4ZsC7XpxordXbjhEMxzAxpf/Kg KpJ/NmHnQNCbK+N38wVK5ApRRyYhejoNnrv0ZFXfn3aX3aYuDZV2uriuvNpoDHNk7wcY ZvuPHAkJpZntoa0TpzU8NJmns+z3No/bgJm2kr40X0fJ0lQhfx+EqSbabQ/kA4jdykdQ g8/Q== X-Gm-Message-State: AOAM533S3owaGjIhvhspU7HWB7eAueBNAUubZaGYOcJ+6ZAqJLqjl+eP Qbi3AB8AVkE73+db/6/lbnA7Q60bUSfK+uKzP4KZu+YZY0tnBYia8JLTPlQHppA8l0G+LY3BW0K xma/ajPn/BJHBRvriJ8r6XwPLVobDrFSXHbqc9JsP4ww4JEDZ/JJ1RxusFD58 X-Received: by 2002:a5d:6881:: with SMTP id h1mr11298019wru.250.1641798990547; Sun, 09 Jan 2022 23:16:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJwFHDZQigfFwNWH3ONKuyVwT6WBQ1hE98sTUq+jbFb+0ZunarAucKAtPlhWpfgc4BdxRjBNrQ== X-Received: by 2002:a5d:6881:: with SMTP id h1mr11298004wru.250.1641798990305; Sun, 09 Jan 2022 23:16:30 -0800 (PST) Date: Mon, 10 Jan 2022 02:16:27 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 09/10] Revert "virtio-pci: decouple notifier from interrupt process" Message-ID: <20220110071547.195669-10-mst@redhat.com> References: <20220110071547.195669-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20220110071547.195669-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline 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.133.124; envelope-from=mst@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.597, 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_H3=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: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1641800815074100007 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This reverts commit e3480ef81f6fb61cc9c04e3b5be8b7e84484fc05. --- hw/virtio/virtio-pci.c | 88 +++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 57 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index 4bdb6e5694..750aa47ec1 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -704,41 +704,29 @@ static void kvm_virtio_pci_vq_vector_release(VirtIOPC= IProxy *proxy, } =20 static int kvm_virtio_pci_irqfd_use(VirtIOPCIProxy *proxy, - EventNotifier *n, + unsigned int queue_no, unsigned int vector) { VirtIOIRQFD *irqfd =3D &proxy->vector_irqfd[vector]; + VirtIODevice *vdev =3D virtio_bus_get_device(&proxy->bus); + VirtQueue *vq =3D virtio_get_queue(vdev, queue_no); + EventNotifier *n =3D virtio_queue_get_guest_notifier(vq); return kvm_irqchip_add_irqfd_notifier_gsi(kvm_state, n, NULL, irqfd->v= irq); } =20 static void kvm_virtio_pci_irqfd_release(VirtIOPCIProxy *proxy, - EventNotifier *n , + unsigned int queue_no, unsigned int vector) { + VirtIODevice *vdev =3D virtio_bus_get_device(&proxy->bus); + VirtQueue *vq =3D virtio_get_queue(vdev, queue_no); + EventNotifier *n =3D virtio_queue_get_guest_notifier(vq); VirtIOIRQFD *irqfd =3D &proxy->vector_irqfd[vector]; int ret; =20 ret =3D kvm_irqchip_remove_irqfd_notifier_gsi(kvm_state, n, irqfd->vir= q); assert(ret =3D=3D 0); } -static int virtio_pci_get_notifier(VirtIOPCIProxy *proxy, int queue_no, - EventNotifier **n, unsigned int *vec= tor) -{ - VirtIODevice *vdev =3D virtio_bus_get_device(&proxy->bus); - VirtQueue *vq; - - if (queue_no =3D=3D VIRTIO_CONFIG_IRQ_IDX) { - return -1; - } else { - if (!virtio_queue_get_num(vdev, queue_no)) { - return -1; - } - *vector =3D virtio_queue_vector(vdev, queue_no); - vq =3D virtio_get_queue(vdev, queue_no); - *n =3D virtio_queue_get_guest_notifier(vq); - } - return 0; -} =20 static int kvm_virtio_pci_vector_use(VirtIOPCIProxy *proxy, int nvqs) { @@ -747,15 +735,12 @@ static int kvm_virtio_pci_vector_use(VirtIOPCIProxy *= proxy, int nvqs) VirtioDeviceClass *k =3D VIRTIO_DEVICE_GET_CLASS(vdev); unsigned int vector; int ret, queue_no; - EventNotifier *n; + for (queue_no =3D 0; queue_no < nvqs; queue_no++) { if (!virtio_queue_get_num(vdev, queue_no)) { break; } - ret =3D virtio_pci_get_notifier(proxy, queue_no, &n, &vector); - if (ret < 0) { - break; - } + vector =3D virtio_queue_vector(vdev, queue_no); if (vector >=3D msix_nr_vectors_allocated(dev)) { continue; } @@ -767,7 +752,7 @@ static int kvm_virtio_pci_vector_use(VirtIOPCIProxy *pr= oxy, int nvqs) * Otherwise, delay until unmasked in the frontend. */ if (vdev->use_guest_notifier_mask && k->guest_notifier_mask) { - ret =3D kvm_virtio_pci_irqfd_use(proxy, n, vector); + ret =3D kvm_virtio_pci_irqfd_use(proxy, queue_no, vector); if (ret < 0) { kvm_virtio_pci_vq_vector_release(proxy, vector); goto undo; @@ -783,11 +768,7 @@ undo: continue; } if (vdev->use_guest_notifier_mask && k->guest_notifier_mask) { - ret =3D virtio_pci_get_notifier(proxy, queue_no, &n, &vector); - if (ret < 0) { - break; - } - kvm_virtio_pci_irqfd_release(proxy, n, vector); + kvm_virtio_pci_irqfd_release(proxy, queue_no, vector); } kvm_virtio_pci_vq_vector_release(proxy, vector); } @@ -801,16 +782,12 @@ static void kvm_virtio_pci_vector_release(VirtIOPCIPr= oxy *proxy, int nvqs) unsigned int vector; int queue_no; VirtioDeviceClass *k =3D VIRTIO_DEVICE_GET_CLASS(vdev); - EventNotifier *n; - int ret ; + for (queue_no =3D 0; queue_no < nvqs; queue_no++) { if (!virtio_queue_get_num(vdev, queue_no)) { break; } - ret =3D virtio_pci_get_notifier(proxy, queue_no, &n, &vector); - if (ret < 0) { - break; - } + vector =3D virtio_queue_vector(vdev, queue_no); if (vector >=3D msix_nr_vectors_allocated(dev)) { continue; } @@ -818,20 +795,21 @@ static void kvm_virtio_pci_vector_release(VirtIOPCIPr= oxy *proxy, int nvqs) * Otherwise, it was cleaned when masked in the frontend. */ if (vdev->use_guest_notifier_mask && k->guest_notifier_mask) { - kvm_virtio_pci_irqfd_release(proxy, n, vector); + kvm_virtio_pci_irqfd_release(proxy, queue_no, vector); } kvm_virtio_pci_vq_vector_release(proxy, vector); } } =20 -static int virtio_pci_one_vector_unmask(VirtIOPCIProxy *proxy, +static int virtio_pci_vq_vector_unmask(VirtIOPCIProxy *proxy, unsigned int queue_no, unsigned int vector, - MSIMessage msg, - EventNotifier *n) + MSIMessage msg) { VirtIODevice *vdev =3D virtio_bus_get_device(&proxy->bus); VirtioDeviceClass *k =3D VIRTIO_DEVICE_GET_CLASS(vdev); + VirtQueue *vq =3D virtio_get_queue(vdev, queue_no); + EventNotifier *n =3D virtio_queue_get_guest_notifier(vq); VirtIOIRQFD *irqfd; int ret =3D 0; =20 @@ -858,15 +836,14 @@ static int virtio_pci_one_vector_unmask(VirtIOPCIProx= y *proxy, event_notifier_set(n); } } else { - ret =3D kvm_virtio_pci_irqfd_use(proxy, n, vector); + ret =3D kvm_virtio_pci_irqfd_use(proxy, queue_no, vector); } return ret; } =20 -static void virtio_pci_one_vector_mask(VirtIOPCIProxy *proxy, +static void virtio_pci_vq_vector_mask(VirtIOPCIProxy *proxy, unsigned int queue_no, - unsigned int vector, - EventNotifier *n) + unsigned int vector) { VirtIODevice *vdev =3D virtio_bus_get_device(&proxy->bus); VirtioDeviceClass *k =3D VIRTIO_DEVICE_GET_CLASS(vdev); @@ -877,7 +854,7 @@ static void virtio_pci_one_vector_mask(VirtIOPCIProxy *= proxy, if (vdev->use_guest_notifier_mask && k->guest_notifier_mask) { k->guest_notifier_mask(vdev, queue_no, true); } else { - kvm_virtio_pci_irqfd_release(proxy, n, vector); + kvm_virtio_pci_irqfd_release(proxy, queue_no, vector); } } =20 @@ -887,7 +864,6 @@ static int virtio_pci_vector_unmask(PCIDevice *dev, uns= igned vector, VirtIOPCIProxy *proxy =3D container_of(dev, VirtIOPCIProxy, pci_dev); VirtIODevice *vdev =3D virtio_bus_get_device(&proxy->bus); VirtQueue *vq =3D virtio_vector_first_queue(vdev, vector); - EventNotifier *n; int ret, index, unmasked =3D 0; =20 while (vq) { @@ -896,8 +872,7 @@ static int virtio_pci_vector_unmask(PCIDevice *dev, uns= igned vector, break; } if (index < proxy->nvqs_with_notifiers) { - n =3D virtio_queue_get_guest_notifier(vq); - ret =3D virtio_pci_one_vector_unmask(proxy, index, vector, msg= , n); + ret =3D virtio_pci_vq_vector_unmask(proxy, index, vector, msg); if (ret < 0) { goto undo; } @@ -913,8 +888,7 @@ undo: while (vq && unmasked >=3D 0) { index =3D virtio_get_queue_index(vq); if (index < proxy->nvqs_with_notifiers) { - n =3D virtio_queue_get_guest_notifier(vq); - virtio_pci_one_vector_mask(proxy, index, vector, n); + virtio_pci_vq_vector_mask(proxy, index, vector); --unmasked; } vq =3D virtio_vector_next_queue(vq); @@ -927,17 +901,15 @@ static void virtio_pci_vector_mask(PCIDevice *dev, un= signed vector) VirtIOPCIProxy *proxy =3D container_of(dev, VirtIOPCIProxy, pci_dev); VirtIODevice *vdev =3D virtio_bus_get_device(&proxy->bus); VirtQueue *vq =3D virtio_vector_first_queue(vdev, vector); - EventNotifier *n; int index; =20 while (vq) { index =3D virtio_get_queue_index(vq); - n =3D virtio_queue_get_guest_notifier(vq); if (!virtio_queue_get_num(vdev, index)) { break; } if (index < proxy->nvqs_with_notifiers) { - virtio_pci_one_vector_mask(proxy, index, vector, n); + virtio_pci_vq_vector_mask(proxy, index, vector); } vq =3D virtio_vector_next_queue(vq); } @@ -953,17 +925,19 @@ static void virtio_pci_vector_poll(PCIDevice *dev, int queue_no; unsigned int vector; EventNotifier *notifier; - int ret; + VirtQueue *vq; =20 for (queue_no =3D 0; queue_no < proxy->nvqs_with_notifiers; queue_no++= ) { - ret =3D virtio_pci_get_notifier(proxy, queue_no, ¬ifier, &vecto= r); - if (ret < 0) { + if (!virtio_queue_get_num(vdev, queue_no)) { break; } + vector =3D virtio_queue_vector(vdev, queue_no); if (vector < vector_start || vector >=3D vector_end || !msix_is_masked(dev, vector)) { continue; } + vq =3D virtio_get_queue(vdev, queue_no); + notifier =3D virtio_queue_get_guest_notifier(vq); if (k->guest_notifier_pending) { if (k->guest_notifier_pending(vdev, queue_no)) { msix_set_pending(dev, vector); --=20 MST From nobody Mon Apr 29 04:13:09 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1641800917854725.2969386474286; Sun, 9 Jan 2022 23:48:37 -0800 (PST) Received: from localhost ([::1]:53540 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6pPv-0003wr-Mv for importer@patchew.org; Mon, 10 Jan 2022 02:48:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6ov2-0007h5-BU for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:49473) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6ov0-0001ry-Ll for qemu-devel@nongnu.org; Mon, 10 Jan 2022 02:16:40 -0500 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-450-MkJAzlOUPiWg5qeAdjG8lg-1; Mon, 10 Jan 2022 02:16:36 -0500 Received: by mail-wr1-f72.google.com with SMTP id v18-20020a5d5912000000b001815910d2c0so3846618wrd.1 for ; Sun, 09 Jan 2022 23:16:36 -0800 (PST) Received: from redhat.com ([2a03:c5c0:107d:b60c:c297:16fe:7528:e989]) by smtp.gmail.com with ESMTPSA id o12sm6379707wrc.69.2022.01.09.23.16.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jan 2022 23:16:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1641798998; 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: in-reply-to:in-reply-to:references:references; bh=6LWUvhDCM9AWtb+UqNtPLAd5SK+8CTL4ZgNvZbCKAms=; b=c57wDiw6dZy4rlZ9ikIuYT55kLoFid+snDzWJlaa0TjFSwy0obG5hUjHVZ8DLZKXmynZKa c4VuI3717w02T8cdNRyB3jTScqf3/3b8S5uLDIfuIlq6ZDDlApnL2tmX6D7xKM2ciHmSuq dny0KZcf0LbyDHUNUdmWr9n7eeoHYZU= X-MC-Unique: MkJAzlOUPiWg5qeAdjG8lg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=6LWUvhDCM9AWtb+UqNtPLAd5SK+8CTL4ZgNvZbCKAms=; b=7xbMzHXJEDgaPRSJq39cyb7Yd92orVf8hwgRWgK39DHL4/7xtyhWorkF8FQt8gXSH6 x+JzDc8rdIudhodqJCixL+dxJkr4tG9sGbXWQGwVmkdjN84omlx/HPMPwhW9KDusQlb0 J2Zfv39RXBX1m6keA1gxiHnaLZ6B+DsHarbVezLCLyVLZAmeS5hME0/MvFEU1zKpJM8h 8g7aiIUYOOYXlTq42t20WVB/b9aSy2Xyt9hQ/zac2Lw0r04ax0jdYKz8LfZRB4WNZcCe lb97JLwr8Afl+enk2+96Y6EcIaVae93DHWKW6HOxQIIp1NjMIbI0/xMa7y0cAjuvjD7T PQEg== X-Gm-Message-State: AOAM533sYGgxtqwCPcd8pwRDmIjjZfHbMcZ7TscIgt4kH+LWIa/5quC0 5pbOznoFKeobuShc0xAFNHOsIrONA65fudPntZ0pFAGzASBJwvPHFglAmuczwnVg48FzkuAVu6V 5/Xvz9l6YkOZF7GQDtsKUgwylw7s1VJN5NuvM6bWxfeVs1Dhbhp9fR3r2IiAM X-Received: by 2002:adf:f48a:: with SMTP id l10mr6112005wro.220.1641798994381; Sun, 09 Jan 2022 23:16:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwjxDv2Xla2jlW+6iq4s2LGPrB0z68yk1ukBbZlFHwPWVpalsYQKPm0NSxRdkBwaJgMpkDFQA== X-Received: by 2002:adf:f48a:: with SMTP id l10mr6111985wro.220.1641798994141; Sun, 09 Jan 2022 23:16:34 -0800 (PST) Date: Mon, 10 Jan 2022 02:16:30 -0500 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Subject: [PULL 10/10] Revert "virtio: introduce macro IRTIO_CONFIG_IRQ_IDX" Message-ID: <20220110071547.195669-11-mst@redhat.com> References: <20220110071547.195669-1-mst@redhat.com> MIME-Version: 1.0 In-Reply-To: <20220110071547.195669-1-mst@redhat.com> X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline 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.133.124; envelope-from=mst@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.597, 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_H3=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: , Cc: Peter Maydell , Jason Wang , "Dr. David Alan Gilbert" , virtio-fs@redhat.com, "Gonglei \(Arei\)" , Gerd Hoffmann , Stefan Hajnoczi , =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1641800919589100003 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This reverts commit bf1d85c166c19af95dbd27b1faba1d2909732323. --- include/hw/virtio/virtio.h | 3 --- hw/display/vhost-user-gpu.c | 6 ------ hw/net/virtio-net.c | 10 ++-------- hw/virtio/vhost-user-fs.c | 6 ------ hw/virtio/vhost-vsock-common.c | 6 ------ hw/virtio/virtio-crypto.c | 6 ------ 6 files changed, 2 insertions(+), 35 deletions(-) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 605ea79c90..8bab9cfb75 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -67,9 +67,6 @@ typedef struct VirtQueueElement =20 #define VIRTIO_NO_VECTOR 0xffff =20 -/* special index value used internally for config irqs */ -#define VIRTIO_CONFIG_IRQ_IDX -1 - #define TYPE_VIRTIO_DEVICE "virtio-device" OBJECT_DECLARE_TYPE(VirtIODevice, VirtioDeviceClass, VIRTIO_DEVICE) =20 diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c index d4a440e815..09818231bd 100644 --- a/hw/display/vhost-user-gpu.c +++ b/hw/display/vhost-user-gpu.c @@ -485,9 +485,6 @@ vhost_user_gpu_guest_notifier_pending(VirtIODevice *vde= v, int idx) { VhostUserGPU *g =3D VHOST_USER_GPU(vdev); =20 - if (idx =3D=3D VIRTIO_CONFIG_IRQ_IDX) { - return false; - } return vhost_virtqueue_pending(&g->vhost->dev, idx); } =20 @@ -496,9 +493,6 @@ vhost_user_gpu_guest_notifier_mask(VirtIODevice *vdev, = int idx, bool mask) { VhostUserGPU *g =3D VHOST_USER_GPU(vdev); =20 - if (idx =3D=3D VIRTIO_CONFIG_IRQ_IDX) { - return; - } vhost_virtqueue_mask(&g->vhost->dev, vdev, idx, mask); } =20 diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 5e03c0dd14..cf8ab0f8af 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -3168,9 +3168,6 @@ static bool virtio_net_guest_notifier_pending(VirtIOD= evice *vdev, int idx) VirtIONet *n =3D VIRTIO_NET(vdev); NetClientState *nc =3D qemu_get_subqueue(n->nic, vq2q(idx)); assert(n->vhost_started); - if (idx =3D=3D VIRTIO_CONFIG_IRQ_IDX) { - return false; - } return vhost_net_virtqueue_pending(get_vhost_net(nc->peer), idx); } =20 @@ -3180,11 +3177,8 @@ static void virtio_net_guest_notifier_mask(VirtIODev= ice *vdev, int idx, VirtIONet *n =3D VIRTIO_NET(vdev); NetClientState *nc =3D qemu_get_subqueue(n->nic, vq2q(idx)); assert(n->vhost_started); - if (idx =3D=3D VIRTIO_CONFIG_IRQ_IDX) { - return; - } - - vhost_net_virtqueue_mask(get_vhost_net(nc->peer), vdev, idx, mask); + vhost_net_virtqueue_mask(get_vhost_net(nc->peer), + vdev, idx, mask); } =20 static void virtio_net_set_config_size(VirtIONet *n, uint64_t host_feature= s) diff --git a/hw/virtio/vhost-user-fs.c b/hw/virtio/vhost-user-fs.c index 9b0349922e..c595957983 100644 --- a/hw/virtio/vhost-user-fs.c +++ b/hw/virtio/vhost-user-fs.c @@ -161,9 +161,6 @@ static void vuf_guest_notifier_mask(VirtIODevice *vdev,= int idx, { VHostUserFS *fs =3D VHOST_USER_FS(vdev); =20 - if (idx =3D=3D VIRTIO_CONFIG_IRQ_IDX) { - return; - } vhost_virtqueue_mask(&fs->vhost_dev, vdev, idx, mask); } =20 @@ -171,9 +168,6 @@ static bool vuf_guest_notifier_pending(VirtIODevice *vd= ev, int idx) { VHostUserFS *fs =3D VHOST_USER_FS(vdev); =20 - if (idx =3D=3D VIRTIO_CONFIG_IRQ_IDX) { - return false; - } return vhost_virtqueue_pending(&fs->vhost_dev, idx); } =20 diff --git a/hw/virtio/vhost-vsock-common.c b/hw/virtio/vhost-vsock-common.c index d1b9c027b6..3f3771274e 100644 --- a/hw/virtio/vhost-vsock-common.c +++ b/hw/virtio/vhost-vsock-common.c @@ -125,9 +125,6 @@ static void vhost_vsock_common_guest_notifier_mask(Virt= IODevice *vdev, int idx, { VHostVSockCommon *vvc =3D VHOST_VSOCK_COMMON(vdev); =20 - if (idx =3D=3D VIRTIO_CONFIG_IRQ_IDX) { - return; - } vhost_virtqueue_mask(&vvc->vhost_dev, vdev, idx, mask); } =20 @@ -136,9 +133,6 @@ static bool vhost_vsock_common_guest_notifier_pending(V= irtIODevice *vdev, { VHostVSockCommon *vvc =3D VHOST_VSOCK_COMMON(vdev); =20 - if (idx =3D=3D VIRTIO_CONFIG_IRQ_IDX) { - return false; - } return vhost_virtqueue_pending(&vvc->vhost_dev, idx); } =20 diff --git a/hw/virtio/virtio-crypto.c b/hw/virtio/virtio-crypto.c index 1d5192f8b4..54f9bbb789 100644 --- a/hw/virtio/virtio-crypto.c +++ b/hw/virtio/virtio-crypto.c @@ -948,9 +948,6 @@ static void virtio_crypto_guest_notifier_mask(VirtIODev= ice *vdev, int idx, =20 assert(vcrypto->vhost_started); =20 - if (idx =3D=3D VIRTIO_CONFIG_IRQ_IDX) { - return; - } cryptodev_vhost_virtqueue_mask(vdev, queue, idx, mask); } =20 @@ -961,9 +958,6 @@ static bool virtio_crypto_guest_notifier_pending(VirtIO= Device *vdev, int idx) =20 assert(vcrypto->vhost_started); =20 - if (idx =3D=3D VIRTIO_CONFIG_IRQ_IDX) { - return false; - } return cryptodev_vhost_virtqueue_pending(vdev, queue, idx); } =20 --=20 MST