mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
hw/pci: factor PCI reserve resources to a separate structure
Factor "bus_reserve", "io_reserve", "mem_reserve", "pref32_reserve" and "pref64_reserve" fields of the "GenPCIERootPort" structure out to "PCIResReserve" structure, so that other PCI bridges can reuse it to add resource reserve capability. Signed-off-by: Jing Liu <jing2.liu@linux.intel.com> Reviewed-by: Marcel Apfelbaum<marcel.apfelbaum@gmail.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
db812c4073
commit
9e8993991e
@@ -133,11 +133,19 @@ typedef struct PCIBridgeQemuCap {
|
||||
|
||||
#define REDHAT_PCI_CAP_RESOURCE_RESERVE 1
|
||||
|
||||
/*
|
||||
* PCI BUS/IO/MEM/PREFMEM additional resources recorded as a
|
||||
* capability in PCI configuration space to reserve on firmware init.
|
||||
*/
|
||||
typedef struct PCIResReserve {
|
||||
uint32_t bus;
|
||||
uint64_t io;
|
||||
uint64_t mem_non_pref;
|
||||
uint64_t mem_pref_32;
|
||||
uint64_t mem_pref_64;
|
||||
} PCIResReserve;
|
||||
|
||||
int pci_bridge_qemu_reserve_cap_init(PCIDevice *dev, int cap_offset,
|
||||
uint32_t bus_reserve, uint64_t io_reserve,
|
||||
uint64_t mem_non_pref_reserve,
|
||||
uint64_t mem_pref_32_reserve,
|
||||
uint64_t mem_pref_64_reserve,
|
||||
Error **errp);
|
||||
PCIResReserve res_reserve, Error **errp);
|
||||
|
||||
#endif /* QEMU_PCI_BRIDGE_H */
|
||||
|
||||
Reference in New Issue
Block a user