From nobody Tue May 21 13:28:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1607501536; cv=none; d=zohomail.com; s=zohoarc; b=EvAgYpuVTdjmjFzbGPtcvjF9eI2yYljquU9tp4NP59oOuDvf7D5+VpOzwYrTXJ7Jek1JHbyiaFJ9E+fk2n5h9Kz2UyAwfPpsMm0EnwFAv8fih7TE5HJJAzhpa5YODrNiKr8uLTuMzN90CgN1F33XsFt0UGXf5olLaBA/vIu+sAc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607501536; h=Content-Type:Content-Transfer-Encoding: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=dDMdyJ88wgwNXqHkLuw5KGq5Ud0jmhDLtFd5/wWfmRk=; b=RIwjo0uehhWBor5H3IZSLKgeNSEOY9nf970Fhayl+nLTUhV6O/ngJPoU/I4sdJmxsrgoP3NAjh6/4w/PflZUpADij9P5rzJ/67HfiamfdaJ27cXJf73hIcYosVV7pC9qJQDMYRhj/4ZHg05kvWs1i0JqHqc2CVwiNE9yOAkFxRE= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1607501536385798.6902216003256; Wed, 9 Dec 2020 00:12:16 -0800 (PST) Received: from localhost ([::1]:51604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmua7-00056C-0g for importer@patchew.org; Wed, 09 Dec 2020 03:12:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmuYO-0003Tm-5Y; Wed, 09 Dec 2020 03:10:28 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:2991) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmuYM-00070A-58; Wed, 09 Dec 2020 03:10:27 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4CrV8G2Nslzhpmv; Wed, 9 Dec 2020 16:09:50 +0800 (CST) Received: from DESKTOP-7FEPK9S.china.huawei.com (10.174.187.219) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Wed, 9 Dec 2020 16:10:15 +0800 From: Shenming Lu To: Alex Williamson , Kirti Wankhede , Cornelia Huck , "Dr . David Alan Gilbert" , Eric Auger , , Marcel Apfelbaum Subject: [RFC PATCH v2 1/3] vfio: Move the saving of the config space to the right place in VFIO migration Date: Wed, 9 Dec 2020 16:09:17 +0800 Message-ID: <20201209080919.156-2-lushenming@huawei.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20201209080919.156-1-lushenming@huawei.com> References: <20201209080919.156-1-lushenming@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.174.187.219] X-CFilter-Loop: Reflected 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=45.249.212.191; envelope-from=lushenming@huawei.com; helo=szxga05-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, RCVD_IN_MSPIKE_H2=-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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lorenzo Pieralisi , Neo Jia , Marc Zyngier , qemu-devel@nongnu.org, lushenming@huawei.com, qemu-arm@nongnu.org, yuzenghui@huawei.com, wanghaibin.wang@huawei.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" On ARM64 the VFIO SET_IRQS ioctl is dependent on the VM interrupt setup, if the restoring of the VFIO PCI device config space is before the VGIC, an error might occur in the kernel. So we move the saving of the config space to the non-iterable process, so that it will be called after the VGIC according to their priorities. As for the possible dependence of the device specific migration data on it's config space, we can let the vendor driver to include any config info it needs in its own data stream. (Should we note this in the header file linux-headers/linux/vfio.h?) Signed-off-by: Shenming Lu --- hw/vfio/migration.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c index 00daa50ed8..3b9de1353a 100644 --- a/hw/vfio/migration.c +++ b/hw/vfio/migration.c @@ -575,11 +575,6 @@ static int vfio_save_complete_precopy(QEMUFile *f, voi= d *opaque) return ret; } =20 - ret =3D vfio_save_device_config_state(f, opaque); - if (ret) { - return ret; - } - ret =3D vfio_update_pending(vbasedev); if (ret) { return ret; @@ -620,6 +615,19 @@ static int vfio_save_complete_precopy(QEMUFile *f, voi= d *opaque) return ret; } =20 +static void vfio_save_state(QEMUFile *f, void *opaque) +{ + VFIODevice *vbasedev =3D opaque; + int ret; + + /* The device specific data is migrated in the iterable process. */ + ret =3D vfio_save_device_config_state(f, opaque); + if (ret) { + error_report("%s: Failed to save device config space", + vbasedev->name); + } +} + static int vfio_load_setup(QEMUFile *f, void *opaque) { VFIODevice *vbasedev =3D opaque; @@ -670,11 +678,7 @@ static int vfio_load_state(QEMUFile *f, void *opaque, = int version_id) switch (data) { case VFIO_MIG_FLAG_DEV_CONFIG_STATE: { - ret =3D vfio_load_device_config_state(f, opaque); - if (ret) { - return ret; - } - break; + return vfio_load_device_config_state(f, opaque); } case VFIO_MIG_FLAG_DEV_SETUP_STATE: { @@ -720,6 +724,7 @@ static SaveVMHandlers savevm_vfio_handlers =3D { .save_live_pending =3D vfio_save_pending, .save_live_iterate =3D vfio_save_iterate, .save_live_complete_precopy =3D vfio_save_complete_precopy, + .save_state =3D vfio_save_state, .load_setup =3D vfio_load_setup, .load_cleanup =3D vfio_load_cleanup, .load_state =3D vfio_load_state, --=20 2.19.1 From nobody Tue May 21 13:28:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1607501690; cv=none; d=zohomail.com; s=zohoarc; b=Vbsev0LrtEJP6oB+i5u63Haxxl9O4U9TcOdXW8KjU8Z6H15CcU3Eq5Sg3Ikf9SE0pu/tnMTtue8amehoiXa6fRTqrlNM/1LEPw7loy8s/usB68nFp/08FvRQQty+rbz0Gm23kwb3y8Eo9/zjN2G1nYXGpfRZZxJavnuBqa9J5AY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607501690; h=Content-Type:Content-Transfer-Encoding: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=i9yeRsb2G8OJiGFhGvBg8SGIrOzB/385BOFCgl7OyZc=; b=PAtMbf6BjrIuQzejqZsma1YrbknoODRVcE0kG3MVGJXYBzwEaz8Xib88J5z1qMrFVBBgfKlv/QqoiwaZnfmGCmSGFZ3ZaLc2XbMmJ1IpdJKi1mHXxWkFH3cjGyKUuG2t46I024fXOf8KjsVDOKSua4buvBm/rORnUnaF0lgAexk= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1607501690646574.8033747167424; Wed, 9 Dec 2020 00:14:50 -0800 (PST) Received: from localhost ([::1]:57008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmucb-0007Ml-E3 for importer@patchew.org; Wed, 09 Dec 2020 03:14:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmuYY-0003hL-Uv; Wed, 09 Dec 2020 03:10:38 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:2889) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmuYW-00075n-Nc; Wed, 09 Dec 2020 03:10:38 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CrV8S2fbkz15Zk0; Wed, 9 Dec 2020 16:10:00 +0800 (CST) Received: from DESKTOP-7FEPK9S.china.huawei.com (10.174.187.219) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Wed, 9 Dec 2020 16:10:21 +0800 From: Shenming Lu To: Alex Williamson , Kirti Wankhede , Cornelia Huck , "Dr . David Alan Gilbert" , Eric Auger , , Marcel Apfelbaum Subject: [RFC PATCH v2 2/3] vfio: Set the priority of the VFIO VM state change handler explicitly Date: Wed, 9 Dec 2020 16:09:18 +0800 Message-ID: <20201209080919.156-3-lushenming@huawei.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20201209080919.156-1-lushenming@huawei.com> References: <20201209080919.156-1-lushenming@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.174.187.219] X-CFilter-Loop: Reflected 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=45.249.212.190; envelope-from=lushenming@huawei.com; helo=szxga04-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, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lorenzo Pieralisi , Neo Jia , Marc Zyngier , qemu-devel@nongnu.org, lushenming@huawei.com, qemu-arm@nongnu.org, yuzenghui@huawei.com, wanghaibin.wang@huawei.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" In the VFIO VM state change handler, VFIO devices are transitioned in the _SAVING state, which should keep them from sending interrupts. Then we can save the pending states of all interrupts in the GIC VM state change handler (on ARM). So we have to set the priority of the VFIO VM state change handler explicitly (like virtio devices) to ensure it is called before the GIC's in saving. Signed-off-by: Shenming Lu Reviewed-by: Kirti Wankhede Reviewed-by: Cornelia Huck --- hw/vfio/migration.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c index 3b9de1353a..97ea82b100 100644 --- a/hw/vfio/migration.c +++ b/hw/vfio/migration.c @@ -862,7 +862,8 @@ static int vfio_migration_init(VFIODevice *vbasedev, register_savevm_live(id, VMSTATE_INSTANCE_ID_ANY, 1, &savevm_vfio_hand= lers, vbasedev); =20 - migration->vm_state =3D qemu_add_vm_change_state_handler(vfio_vmstate_= change, + migration->vm_state =3D qdev_add_vm_change_state_handler(vbasedev->dev, + vfio_vmstate_ch= ange, vbasedev); migration->migration_state.notify =3D vfio_migration_state_notifier; add_migration_state_change_notifier(&migration->migration_state); --=20 2.19.1 From nobody Tue May 21 13:28:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1607501569; cv=none; d=zohomail.com; s=zohoarc; b=B/U28fK0ZQJoswAWaB5Muv965wo8A61LYkRnXeVKH6dQPZC9n1uf3FQ9708f7vR8YfsVPdsckiJCMlxrQ3jEleNr+mF8x1j+fcS7yREdFW9cUGjCUYI/CC53dI4c+o6+y+nrus+X9zriT+x/CpMxa5xl9ulwcRXWhuogh/bZ5oM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607501569; h=Content-Type:Content-Transfer-Encoding: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=RaX88t6VM/BMBFKLt4tEMGqpsbYpWp2284JFJbaXUqo=; b=SCWyUoQiG2hThyUccpuI4dMDBzpEbKrJpobD7KmU/HnmUZvUPzvYPn4a61q4xoL684ziZ5K2hG7uioZaiB+8Oc7nI23HVHCA31GvD2pS0N7vM5uCNiD3m6BZvL3wMlLBcixYfT88XEc2kfAUX04F6mnpU19Sp6tNz1Et+7FCieA= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1607501569139163.96826950087245; Wed, 9 Dec 2020 00:12:49 -0800 (PST) Received: from localhost ([::1]:53506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmuad-0005sM-Tb for importer@patchew.org; Wed, 09 Dec 2020 03:12:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmuYZ-0003j2-Rw; Wed, 09 Dec 2020 03:10:39 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:2888) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmuYX-00075m-9j; Wed, 09 Dec 2020 03:10:39 -0500 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CrV8S2HQwz15YxT; Wed, 9 Dec 2020 16:10:00 +0800 (CST) Received: from DESKTOP-7FEPK9S.china.huawei.com (10.174.187.219) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Wed, 9 Dec 2020 16:10:25 +0800 From: Shenming Lu To: Alex Williamson , Kirti Wankhede , Cornelia Huck , "Dr . David Alan Gilbert" , Eric Auger , , Marcel Apfelbaum Subject: [RFC PATCH v2 3/3] vfio: Avoid disabling and enabling vectors repeatedly in VFIO migration Date: Wed, 9 Dec 2020 16:09:19 +0800 Message-ID: <20201209080919.156-4-lushenming@huawei.com> X-Mailer: git-send-email 2.27.0.windows.1 In-Reply-To: <20201209080919.156-1-lushenming@huawei.com> References: <20201209080919.156-1-lushenming@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.174.187.219] X-CFilter-Loop: Reflected 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=45.249.212.190; envelope-from=lushenming@huawei.com; helo=szxga04-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, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lorenzo Pieralisi , Neo Jia , Marc Zyngier , qemu-devel@nongnu.org, lushenming@huawei.com, qemu-arm@nongnu.org, yuzenghui@huawei.com, wanghaibin.wang@huawei.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Different from the normal situation when the guest starts, we can know the max unmasked vetctor (at the beginning) after msix_load() in VFIO migration. So in order to avoid ineffectively disabling and enabling vectors repeatedly, let's allocate all needed vectors first and then enable these unmasked vectors one by one without disabling. Signed-off-by: Shenming Lu --- hw/pci/msix.c | 17 +++++++++++++++++ hw/vfio/pci.c | 10 ++++++++-- include/hw/pci/msix.h | 2 ++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/hw/pci/msix.c b/hw/pci/msix.c index 67e34f34d6..bf291d3ff8 100644 --- a/hw/pci/msix.c +++ b/hw/pci/msix.c @@ -557,6 +557,23 @@ unsigned int msix_nr_vectors_allocated(const PCIDevice= *dev) return dev->msix_entries_nr; } =20 +int msix_get_max_unmasked_vector(PCIDevice *dev) +{ + int max_unmasked_vector =3D -1; + int vector; + + if ((dev->config[dev->msix_cap + MSIX_CONTROL_OFFSET] & + (MSIX_ENABLE_MASK | MSIX_MASKALL_MASK)) =3D=3D MSIX_ENABLE_MASK) { + for (vector =3D 0; vector < dev->msix_entries_nr; vector++) { + if (!msix_is_masked(dev, vector)) { + max_unmasked_vector =3D vector; + } + } + } + + return max_unmasked_vector; +} + static int msix_set_notifier_for_vector(PCIDevice *dev, unsigned int vecto= r) { MSIMessage msg; diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 51dc373695..e755ed2514 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -568,6 +568,9 @@ static void vfio_msix_vector_release(PCIDevice *pdev, u= nsigned int nr) =20 static void vfio_msix_enable(VFIOPCIDevice *vdev) { + int max_unmasked_vector =3D msix_get_max_unmasked_vector(&vdev->pdev); + unsigned int used_vector =3D MAX(max_unmasked_vector, 0); + vfio_disable_interrupts(vdev); =20 vdev->msi_vectors =3D g_new0(VFIOMSIVector, vdev->msix->entries); @@ -586,9 +589,12 @@ static void vfio_msix_enable(VFIOPCIDevice *vdev) * triggering to userspace, then immediately release the vector, leavi= ng * the physical device with no vectors enabled, but MSI-X enabled, just * like the guest view. + * If there are unmasked vectors (such as in migration) which will be + * enabled soon, we can allocate them here to avoid ineffectively disa= bling + * and enabling vectors repeatedly later. */ - vfio_msix_vector_do_use(&vdev->pdev, 0, NULL, NULL); - vfio_msix_vector_release(&vdev->pdev, 0); + vfio_msix_vector_do_use(&vdev->pdev, used_vector, NULL, NULL); + vfio_msix_vector_release(&vdev->pdev, used_vector); =20 if (msix_set_vector_notifiers(&vdev->pdev, vfio_msix_vector_use, vfio_msix_vector_release, NULL)) { diff --git a/include/hw/pci/msix.h b/include/hw/pci/msix.h index 4c4a60c739..4bfb463fa6 100644 --- a/include/hw/pci/msix.h +++ b/include/hw/pci/msix.h @@ -23,6 +23,8 @@ void msix_uninit_exclusive_bar(PCIDevice *dev); =20 unsigned int msix_nr_vectors_allocated(const PCIDevice *dev); =20 +int msix_get_max_unmasked_vector(PCIDevice *dev); + void msix_save(PCIDevice *dev, QEMUFile *f); void msix_load(PCIDevice *dev, QEMUFile *f); =20 --=20 2.19.1