[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 23/47] pci: fix PCI resource reserve capability on BE
From: |
Michael Roth |
Subject: |
[PATCH 23/47] pci: fix PCI resource reserve capability on BE |
Date: |
Tue, 14 Dec 2021 18:01:01 -0600 |
From: "Michael S. Tsirkin" <mst@redhat.com>
PCI resource reserve capability should use LE format as all other PCI
things. If we don't then seabios won't boot:
=== PCI new allocation pass #1 ===
PCI: check devices
PCI: QEMU resource reserve cap: size 10000000000000 type io
PCI: secondary bus 1 size 10000000000000 type io
PCI: secondary bus 1 size 00200000 type mem
PCI: secondary bus 1 size 00200000 type prefmem
=== PCI new allocation pass #2 ===
PCI: out of I/O address space
This became more important since we started reserving IO by default,
previously no one noticed.
Fixes: e2a6290aab ("hw/pcie-root-port: Fix hotplug for PCI devices requiring
IO")
Cc: marcel.apfelbaum@gmail.com
Fixes: 226263fb5c ("hw/pci: add QEMU-specific PCI capability to the Generic PCI
Express Root Port")
Cc: zuban32s@gmail.com
Fixes: 6755e618d0 ("hw/pci: add PCI resource reserve capability to legacy PCI
bridge")
Cc: jing2.liu@linux.intel.com
Tested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
(cherry picked from commit 0e464f7d993113119f0fd17b890831440734ce15)
Signed-off-by: Michael Roth <michael.roth@amd.com>
---
hw/pci/pci_bridge.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
index 3789c17edc..6a1e8e433c 100644
--- a/hw/pci/pci_bridge.c
+++ b/hw/pci/pci_bridge.c
@@ -448,11 +448,11 @@ int pci_bridge_qemu_reserve_cap_init(PCIDevice *dev, int
cap_offset,
PCIBridgeQemuCap cap = {
.len = cap_len,
.type = REDHAT_PCI_CAP_RESOURCE_RESERVE,
- .bus_res = res_reserve.bus,
- .io = res_reserve.io,
- .mem = res_reserve.mem_non_pref,
- .mem_pref_32 = res_reserve.mem_pref_32,
- .mem_pref_64 = res_reserve.mem_pref_64
+ .bus_res = cpu_to_le32(res_reserve.bus),
+ .io = cpu_to_le64(res_reserve.io),
+ .mem = cpu_to_le32(res_reserve.mem_non_pref),
+ .mem_pref_32 = cpu_to_le32(res_reserve.mem_pref_32),
+ .mem_pref_64 = cpu_to_le64(res_reserve.mem_pref_64)
};
int offset = pci_add_capability(dev, PCI_CAP_ID_VNDR,
--
2.25.1
- [PATCH 14/47] plugins: do not limit exported symbols if modules are active, (continued)
- [PATCH 14/47] plugins: do not limit exported symbols if modules are active, Michael Roth, 2021/12/14
- [PATCH 15/47] qemu-sockets: fix unix socket path copy (again), Michael Roth, 2021/12/14
- [PATCH 16/47] vhost-vsock: fix migration issue when seqpacket is supported, Michael Roth, 2021/12/14
- [PATCH 17/47] hw/arm/virt: Rename default_bus_bypass_iommu, Michael Roth, 2021/12/14
- [PATCH 18/47] hw/i386: Rename default_bus_bypass_iommu, Michael Roth, 2021/12/14
- [PATCH 19/47] bios-tables-test: allow changes in DSDT ACPI tables for q35, Michael Roth, 2021/12/14
- [PATCH 20/47] hw/i386/acpi: fix conflicting IO address range for acpi pci hotplug in q35, Michael Roth, 2021/12/14
- [PATCH 01/47] virtio-balloon: don't start free page hinting if postcopy is possible, Michael Roth, 2021/12/14
- [PATCH 21/47] bios-tables-test: Update ACPI DSDT table golden blobs for q35, Michael Roth, 2021/12/14
- [PATCH 22/47] block: introduce max_hw_iov for use in scsi-generic, Michael Roth, 2021/12/14
- [PATCH 23/47] pci: fix PCI resource reserve capability on BE,
Michael Roth <=
- [PATCH 24/47] tests/acpi/bios-tables-test: add and allow changes to a new q35 DSDT table blob, Michael Roth, 2021/12/14
- [PATCH 25/47] tests/acpi/pcihp: add unit tests for hotplug on multifunction bridges for q35, Michael Roth, 2021/12/14
- [PATCH 26/47] tests/acpi/bios-tables-test: update DSDT blob for multifunction bridge test, Michael Roth, 2021/12/14
- [PATCH 27/47] block/file-posix: Fix return value translation for AIO discards, Michael Roth, 2021/12/14
- [PATCH 28/47] Partially revert "build: -no-pie is no functional linker flag", Michael Roth, 2021/12/14
- [PATCH 29/47] target-i386: mmu: use pg_mode instead of HF_LMA_MASK, Michael Roth, 2021/12/14
- [PATCH 30/47] target-i386: mmu: fix handling of noncanonical virtual addresses, Michael Roth, 2021/12/14
- [PATCH 02/47] target/arm: Don't skip M-profile reset entirely in user mode, Michael Roth, 2021/12/14
- [PATCH 31/47] hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands, Michael Roth, 2021/12/14
- [PATCH 32/47] hw: m68k: virt: Add compat machine for 6.1, Michael Roth, 2021/12/14