From patchwork Tue Feb 28 09:39:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xingtao Yao (Fujitsu)\" via" X-Patchwork-Id: 13154619 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4A34AC64EC7 for ; Tue, 28 Feb 2023 09:41:02 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWwSm-0002Ki-ER; Tue, 28 Feb 2023 04:40:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWwSl-0002Ka-2h for qemu-devel@nongnu.org; Tue, 28 Feb 2023 04:39:59 -0500 Received: from szxga03-in.huawei.com ([45.249.212.189]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWwSi-0003Bd-Be for qemu-devel@nongnu.org; Tue, 28 Feb 2023 04:39:58 -0500 Received: from kwepemi100025.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4PQsdv4LSnzKmQF; Tue, 28 Feb 2023 17:34:43 +0800 (CST) Received: from DESKTOP-27KDQMV.china.huawei.com (10.174.148.223) by kwepemi100025.china.huawei.com (7.221.188.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Tue, 28 Feb 2023 17:39:40 +0800 To: , , CC: , , , , , , , Longpeng Subject: [PATCH v1 0/3] virtio-pci: optimize set_guest_notifier Date: Tue, 28 Feb 2023 17:39:34 +0800 Message-ID: <20230228093937.2515-1-longpeng2@huawei.com> X-Mailer: git-send-email 2.25.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.148.223] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi100025.china.huawei.com (7.221.188.158) X-CFilter-Loop: Reflected Received-SPF: pass client-ip=45.249.212.189; envelope-from=longpeng2@huawei.com; helo=szxga03-in.huawei.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, 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: , Reply-to: "Longpeng(Mike)" X-Patchwork-Original-From: "Longpeng(Mike)" via From: "Xingtao Yao (Fujitsu)\" via" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org From: Longpeng This patchset optimizes the time-consuming operation in virtio_pci_set_guest_notifier, especially for the vhost-vdpa migration, the time spend on set_guest_notifier can reduce 87% in some cases. Longpeng (Mike) (3): virtio-pci: submit msi route changes in batch kvm-irqchip: use KVMRouteChange API to update msi route virtio-pci: defer to commit kvm irq routing when enable msi/msix accel/kvm/kvm-all.c | 10 +-- accel/stubs/kvm-stub.c | 2 +- hw/intc/ioapic.c | 5 +- hw/misc/ivshmem.c | 6 +- hw/vfio/pci.c | 5 +- hw/virtio/virtio-pci.c | 140 ++++++++++++++++++++++++++++++++----- include/hw/virtio/virtio.h | 1 + include/sysemu/kvm.h | 2 +- target/i386/kvm/kvm.c | 6 +- 9 files changed, 145 insertions(+), 32 deletions(-)