diff options
author | Philippe Mathieu-Daudé | 2020-10-11 17:04:23 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé | 2021-01-04 23:24:44 +0100 |
commit | 8d40def66d744a964c2675a19c11f644d288dd4f (patch) | |
tree | 960390db0ec52c6ce7fe109bfe70fdb9ac4e346e /hw/i386 | |
parent | hw/pci-host/uninorth: Use the PCI_FUNC() macro from 'hw/pci/pci.h' (diff) | |
download | qemu-8d40def66d744a964c2675a19c11f644d288dd4f.tar.gz qemu-8d40def66d744a964c2675a19c11f644d288dd4f.tar.xz qemu-8d40def66d744a964c2675a19c11f644d288dd4f.zip |
hw: Use the PCI_SLOT() macro from 'hw/pci/pci.h'
We already have a generic PCI_SLOT() macro in "hw/pci/pci.h"
to extract the PCI slot identifier, use it.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Paul Durrant <paul@xen.org>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20201012124506.3406909-5-philmd@redhat.com>
Diffstat (limited to 'hw/i386')
-rw-r--r-- | hw/i386/xen/xen-hvm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index 096c46fef1..68821d90f5 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -140,7 +140,7 @@ typedef struct XenIOState { int xen_pci_slot_get_pirq(PCIDevice *pci_dev, int irq_num) { - return irq_num + ((pci_dev->devfn >> 3) << 2); + return irq_num + (PCI_SLOT(pci_dev->devfn) << 2); } void xen_piix3_set_irq(void *opaque, int irq_num, int level) |