[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 80/91] include/hw/pci/pcie_host: Correct PCIE_MMCFG_BUS_MASK
From: |
Michael S. Tsirkin |
Subject: |
[PULL 80/91] include/hw/pci/pcie_host: Correct PCIE_MMCFG_BUS_MASK |
Date: |
Mon, 16 May 2022 06:40:18 -0400 |
From: Francisco Iglesias <frasse.iglesias@gmail.com>
According to [1] address bits 27 - 20 are mapped to the bus number (the
TLPs bus number field is 8 bits). Below is the formula taken from Table
7-1 in [1].
"
Memory Address | PCI Express Configuration Space
A[(20+n-1):20] | Bus Number, 1 ≤ n ≤ 8
"
[1] PCI Express® Base Specification Revision 5.0 Version 1.0
Signed-off-by: Francisco Iglesias <frasse.iglesias@gmail.com>
Message-Id: <20220411221836.17699-2-frasse.iglesias@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/pci/pcie_host.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/hw/pci/pcie_host.h b/include/hw/pci/pcie_host.h
index 076457b270..b3c8ce973c 100644
--- a/include/hw/pci/pcie_host.h
+++ b/include/hw/pci/pcie_host.h
@@ -60,7 +60,7 @@ void pcie_host_mmcfg_update(PCIExpressHost *e,
/*
* PCI express ECAM (Enhanced Configuration Address Mapping) format.
* AKA mmcfg address
- * bit 20 - 28: bus number
+ * bit 20 - 27: bus number
* bit 15 - 19: device number
* bit 12 - 14: function number
* bit 0 - 11: offset in configuration space of a given device
@@ -68,7 +68,7 @@ void pcie_host_mmcfg_update(PCIExpressHost *e,
#define PCIE_MMCFG_SIZE_MAX (1ULL << 29)
#define PCIE_MMCFG_SIZE_MIN (1ULL << 20)
#define PCIE_MMCFG_BUS_BIT 20
-#define PCIE_MMCFG_BUS_MASK 0x1ff
+#define PCIE_MMCFG_BUS_MASK 0xff
#define PCIE_MMCFG_DEVFN_BIT 12
#define PCIE_MMCFG_DEVFN_MASK 0xff
#define PCIE_MMCFG_CONFOFFSET_MASK 0xfff
--
MST
- [PULL 69/91] virtio/vhost-user: dynamically assign VhostUserHostNotifiers, (continued)
- [PULL 69/91] virtio/vhost-user: dynamically assign VhostUserHostNotifiers, Michael S. Tsirkin, 2022/05/16
- [PULL 70/91] virtio: drop name parameter for virtio_init(), Michael S. Tsirkin, 2022/05/16
- [PULL 71/91] virtio: add vhost support for virtio devices, Michael S. Tsirkin, 2022/05/16
- [PULL 72/91] qmp: add QMP command x-query-virtio, Michael S. Tsirkin, 2022/05/16
- [PULL 73/91] qmp: add QMP command x-query-virtio-status, Michael S. Tsirkin, 2022/05/16
- [PULL 75/91] qmp: add QMP commands for virtio/vhost queue-status, Michael S. Tsirkin, 2022/05/16
- [PULL 74/91] qmp: decode feature & status bits in virtio-status, Michael S. Tsirkin, 2022/05/16
- [PULL 76/91] qmp: add QMP command x-query-virtio-queue-element, Michael S. Tsirkin, 2022/05/16
- [PULL 78/91] vhost-user: more master/slave things, Michael S. Tsirkin, 2022/05/16
- [PULL 77/91] hmp: add virtio commands, Michael S. Tsirkin, 2022/05/16
- [PULL 80/91] include/hw/pci/pcie_host: Correct PCIE_MMCFG_BUS_MASK,
Michael S. Tsirkin <=
- [PULL 81/91] include/hw/pci/pcie_host: Correct PCIE_MMCFG_SIZE_MAX, Michael S. Tsirkin, 2022/05/16
- [PULL 82/91] hw/i386: Make pit a property of common x86 base machine type, Michael S. Tsirkin, 2022/05/16
- [PULL 83/91] hw/i386: Make pic a property of common x86 base machine type, Michael S. Tsirkin, 2022/05/16
- [PULL 79/91] docs/vhost-user: Clarifications for VHOST_USER_ADD/REM_MEM_REG, Michael S. Tsirkin, 2022/05/16
- [PULL 84/91] hw/i386/amd_iommu: Fix IOMMU event log encoding errors, Michael S. Tsirkin, 2022/05/16
- [PULL 86/91] virtio-net: align ctrl_vq index for non-mq guest for vhost_vdpa, Michael S. Tsirkin, 2022/05/16
- [PULL 87/91] vhost-vdpa: fix improper cleanup in net_init_vhost_vdpa, Michael S. Tsirkin, 2022/05/16
- [PULL 88/91] vhost-net: fix improper cleanup in vhost_net_start, Michael S. Tsirkin, 2022/05/16
- [PULL 89/91] vhost-vdpa: backend feature should set only once, Michael S. Tsirkin, 2022/05/16
- [PULL 91/91] virtio-net: don't handle mq request in userspace handler for vhost-vdpa, Michael S. Tsirkin, 2022/05/16