- vdpa: suspend function return 0 when the vdpa device is stopped - vdpa: don't suspend/resume device when vdpa device not started - vdpa: support vdpa device suspend/resume - vdpa: correct param passed in when unregister save - vdpa: set vring enable only if the vring address has already been set - shadow_dev: introduce shadow dev for virtio-net device - revert "tcg/loongarch64: Fix tcg_out_mov() Aborted" - migration: Set downtime_start even for postcopy - gdb-xml: fix duplicate register in arm-neon.xml - iotests: fix default machine type detection - migration: fix RAMBlock add NULL check - s390x: Fix spelling errors - ppc: spelling fixes - hw/scsi/vhost-scsi: don't double close vhostfd on error - virtio/vhost-vsock: don't double close vhostfd, remove redundant cleanup - hw/scsi/vhost-scsi: don't leak vqs on error - hw/i386/pc: Add missing property descriptions - pcie_aer: Don't trigger a LSI if none are defined - pci: Export the pci_intx() function - hw/qdev: Cosmetic around documentation - tests/unit: fix a -Wformat-truncation warning - tests/avocado: mark ReplayKernelNormal.test_mips64el_malta as flaky - i386/sev: Avoid SEV-ES crash due to missing MSR_EFER_LMA bit - ui/vnc-clipboard: fix inflate_buffer - hw/usb/hcd-xhci.c: spelling: tranfer Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com> (cherry picked from commit 68fee7dc06a6beb5f69d951e22a7f16091f269ff)
60 lines
1.9 KiB
Diff
60 lines
1.9 KiB
Diff
From 0d74ea5e0426c6ebf8666e8b88469b838d03ea01 Mon Sep 17 00:00:00 2001
|
|
From: boringandboring <wangjinlei_yewu@cmss.chinamobile.com>
|
|
Date: Thu, 7 Dec 2023 16:55:35 +0800
|
|
Subject: [PATCH] pci: Export the pci_intx() function
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
cherry picked from 2fedf46e34d2377760b2d26cf85487b772bca6fa
|
|
|
|
Move the pci_intx() definition to the PCI header file, so that it can
|
|
be called from other PCI files. It is used by the next patch.
|
|
|
|
Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
|
|
Message-Id: <20211116170133.724751-3-fbarrat@linux.ibm.com>
|
|
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Reviewed-by: Cédric Le Goater <clg@kaod.org>
|
|
Signed-off-by: boringandboring <wangjinlei_yewu@cmss.chinamobile.com>
|
|
---
|
|
hw/pci/pci.c | 5 -----
|
|
include/hw/pci/pci.h | 5 +++++
|
|
2 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
|
|
index 7a62f0e1fc..9ea67dba31 100644
|
|
--- a/hw/pci/pci.c
|
|
+++ b/hw/pci/pci.c
|
|
@@ -1504,11 +1504,6 @@ static void pci_irq_handler(void *opaque, int irq_num, int level)
|
|
pci_change_irq_level(pci_dev, irq_num, change);
|
|
}
|
|
|
|
-static inline int pci_intx(PCIDevice *pci_dev)
|
|
-{
|
|
- return pci_get_byte(pci_dev->config + PCI_INTERRUPT_PIN) - 1;
|
|
-}
|
|
-
|
|
qemu_irq pci_allocate_irq(PCIDevice *pci_dev)
|
|
{
|
|
int intx = pci_intx(pci_dev);
|
|
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
|
|
index 5b36334a28..483d5c7c72 100644
|
|
--- a/include/hw/pci/pci.h
|
|
+++ b/include/hw/pci/pci.h
|
|
@@ -735,6 +735,11 @@ void lsi53c8xx_handle_legacy_cmdline(DeviceState *lsi_dev);
|
|
qemu_irq pci_allocate_irq(PCIDevice *pci_dev);
|
|
void pci_set_irq(PCIDevice *pci_dev, int level);
|
|
|
|
+static inline int pci_intx(PCIDevice *pci_dev)
|
|
+{
|
|
+ return pci_get_byte(pci_dev->config + PCI_INTERRUPT_PIN) - 1;
|
|
+}
|
|
+
|
|
static inline void pci_irq_assert(PCIDevice *pci_dev)
|
|
{
|
|
pci_set_irq(pci_dev, 1);
|
|
--
|
|
2.27.0
|
|
|