mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 21:03:54 -06:00
pc, pci, virtio: patches queued before 2.10
A bunch of stuff that was posted before the 2.10 timeframe, mostly fixes/cleanups. New PCI bridges. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> -----BEGIN PGP SIGNATURE----- iQEcBAABAgAGBQJZspf2AAoJECgfDbjSjVRpggMIAJ7QZ0nex97iAC0MSss8meLb Rs/p9+d2DnpW/eO3sZZTuEl3bryopW1pT/0761UkHbMB5dnNKCCSXcQdeNgPECK3 TzddK8+9qI5weHv9qBJihc4cVynvFAB0sRFr1QIAanUes7XXEvPn0NOMeeXltbgU rA52sc9ksqD8QoUW377/HeXkeM/F8M/bJSR6wxMFfaMMlRUqfxkSTmeYAjk7RDT7 SMElwg2acsaZ7uP388m9nuXs7nEuYIXRaiwGet9ltXK2E8nheckm0QYVgd7jmrTa 836iWnXhik1jFmDkMkZpGfBUyfzAVgD4eofO5DLXd17JWU/sZjD3ufP9P3ng63A= =5cNH -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging pc, pci, virtio: patches queued before 2.10 A bunch of stuff that was posted before the 2.10 timeframe, mostly fixes/cleanups. New PCI bridges. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Fri 08 Sep 2017 14:15:34 BST # gpg: using RSA key 0x281F0DB8D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: fw_cfg: rename read callback pci: add reserved slot check to do_pci_register_device() pci: move check for existing devfn into new pci_bus_devfn_available() helper vmgenid: replace x-write-pointer-available hack vhost-user-bridge: fix resume regression (since 2.9) libvhost-user: support resuming vq->last_avail_idx based on used_idx acpi/vmgenid: change device category to misc intel_iommu: fix missing BQL in pt fast path docs: update documentation considering PCIE-PCI bridge hw/pci: add QEMU-specific PCI capability to the Generic PCI Express Root Port hw/pci: introduce bridge-only vendor-specific capability to provide some hints to firmware hw/pci: introduce pcie-pci-bridge device Revert "ACPI: don't call acpi_pcihp_device_plug_cb on xen" hw/acpi: Move acpi_set_pci_info to pcihp hw/acpi: Limit hotplug to root bus on legacy mode pc: add 2.11 machine types vhost: Release memory references on cleanup Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
fcea73709b
33 changed files with 622 additions and 106 deletions
|
@ -7,6 +7,8 @@ typedef struct BIOSLinker {
|
|||
GArray *file_list;
|
||||
} BIOSLinker;
|
||||
|
||||
bool bios_linker_loader_can_write_pointer(void);
|
||||
|
||||
BIOSLinker *bios_linker_loader_init(void);
|
||||
|
||||
void bios_linker_loader_alloc(BIOSLinker *linker,
|
||||
|
|
|
@ -21,7 +21,6 @@ typedef struct VmGenIdState {
|
|||
DeviceClass parent_obj;
|
||||
QemuUUID guid; /* The 128-bit GUID seen by the guest */
|
||||
uint8_t vmgenid_addr_le[8]; /* Address of the GUID (little-endian) */
|
||||
bool write_pointer_available;
|
||||
} VmGenIdState;
|
||||
|
||||
/* returns NULL unless there is exactly one device */
|
||||
|
|
|
@ -153,10 +153,6 @@
|
|||
.driver = "fw_cfg_io",\
|
||||
.property = "dma_enabled",\
|
||||
.value = "off",\
|
||||
},{\
|
||||
.driver = "vmgenid",\
|
||||
.property = "x-write-pointer-available",\
|
||||
.value = "off",\
|
||||
},
|
||||
|
||||
#define HW_COMPAT_2_3 \
|
||||
|
|
|
@ -369,6 +369,9 @@ int e820_add_entry(uint64_t, uint64_t, uint32_t);
|
|||
int e820_get_num_entries(void);
|
||||
bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
|
||||
|
||||
#define PC_COMPAT_2_10 \
|
||||
HW_COMPAT_2_10 \
|
||||
|
||||
#define PC_COMPAT_2_9 \
|
||||
HW_COMPAT_2_9 \
|
||||
{\
|
||||
|
|
|
@ -192,7 +192,7 @@ int rom_add_file(const char *file, const char *fw_dir,
|
|||
MemoryRegion *rom_add_blob(const char *name, const void *blob, size_t len,
|
||||
size_t max_len, hwaddr addr,
|
||||
const char *fw_file_name,
|
||||
FWCfgReadCallback fw_callback,
|
||||
FWCfgCallback fw_callback,
|
||||
void *callback_opaque, AddressSpace *as,
|
||||
bool read_only);
|
||||
int rom_add_elf_program(const char *name, void *data, size_t datasize,
|
||||
|
|
|
@ -44,7 +44,7 @@ typedef struct FWCfgDmaAccess {
|
|||
uint64_t address;
|
||||
} QEMU_PACKED FWCfgDmaAccess;
|
||||
|
||||
typedef void (*FWCfgReadCallback)(void *opaque);
|
||||
typedef void (*FWCfgCallback)(void *opaque);
|
||||
|
||||
struct FWCfgState {
|
||||
/*< private >*/
|
||||
|
@ -182,7 +182,7 @@ void fw_cfg_add_file(FWCfgState *s, const char *filename, void *data,
|
|||
* fw_cfg_add_file_callback:
|
||||
* @s: fw_cfg device being modified
|
||||
* @filename: name of new fw_cfg file item
|
||||
* @callback: callback function
|
||||
* @select_cb: callback function when selecting
|
||||
* @callback_opaque: argument to be passed into callback function
|
||||
* @data: pointer to start of item data
|
||||
* @len: size of item data
|
||||
|
@ -201,7 +201,8 @@ void fw_cfg_add_file(FWCfgState *s, const char *filename, void *data,
|
|||
* with FW_CFG_DMA_CTL_SELECT).
|
||||
*/
|
||||
void fw_cfg_add_file_callback(FWCfgState *s, const char *filename,
|
||||
FWCfgReadCallback callback, void *callback_opaque,
|
||||
FWCfgCallback select_cb,
|
||||
void *callback_opaque,
|
||||
void *data, size_t len, bool read_only);
|
||||
|
||||
/**
|
||||
|
|
|
@ -100,6 +100,7 @@ extern bool pci_available;
|
|||
#define PCI_DEVICE_ID_REDHAT_PXB_PCIE 0x000b
|
||||
#define PCI_DEVICE_ID_REDHAT_PCIE_RP 0x000c
|
||||
#define PCI_DEVICE_ID_REDHAT_XHCI 0x000d
|
||||
#define PCI_DEVICE_ID_REDHAT_PCIE_BRIDGE 0x000e
|
||||
#define PCI_DEVICE_ID_REDHAT_QXL 0x0100
|
||||
|
||||
#define FMT_PCIBUS PRIx64
|
||||
|
|
|
@ -67,4 +67,29 @@ void pci_bridge_map_irq(PCIBridge *br, const char* bus_name,
|
|||
#define PCI_BRIDGE_CTL_DISCARD_STATUS 0x400 /* Discard timer status */
|
||||
#define PCI_BRIDGE_CTL_DISCARD_SERR 0x800 /* Discard timer SERR# enable */
|
||||
|
||||
typedef struct PCIBridgeQemuCap {
|
||||
uint8_t id; /* Standard PCI capability header field */
|
||||
uint8_t next; /* Standard PCI capability header field */
|
||||
uint8_t len; /* Standard PCI vendor-specific capability header field */
|
||||
uint8_t type; /* Red Hat vendor-specific capability type.
|
||||
Types are defined with REDHAT_PCI_CAP_ prefix */
|
||||
|
||||
uint32_t bus_res; /* Minimum number of buses to reserve */
|
||||
uint64_t io; /* IO space to reserve */
|
||||
uint32_t mem; /* Non-prefetchable memory to reserve */
|
||||
/* At most one of the following two fields may be set to a value
|
||||
* different from -1 */
|
||||
uint32_t mem_pref_32; /* Prefetchable memory to reserve (32-bit MMIO) */
|
||||
uint64_t mem_pref_64; /* Prefetchable memory to reserve (64-bit MMIO) */
|
||||
} PCIBridgeQemuCap;
|
||||
|
||||
#define REDHAT_PCI_CAP_RESOURCE_RESERVE 1
|
||||
|
||||
int pci_bridge_qemu_reserve_cap_init(PCIDevice *dev, int cap_offset,
|
||||
uint32_t bus_reserve, uint64_t io_reserve,
|
||||
uint32_t mem_non_pref_reserve,
|
||||
uint32_t mem_pref_32_reserve,
|
||||
uint64_t mem_pref_64_reserve,
|
||||
Error **errp);
|
||||
|
||||
#endif /* QEMU_PCI_BRIDGE_H */
|
||||
|
|
|
@ -23,6 +23,7 @@ struct PCIBus {
|
|||
PCIIOMMUFunc iommu_fn;
|
||||
void *iommu_opaque;
|
||||
uint8_t devfn_min;
|
||||
uint32_t slot_reserved_mask;
|
||||
pci_set_irq_fn set_irq;
|
||||
pci_map_irq_fn map_irq;
|
||||
pci_route_irq_fn route_intx_to_irq;
|
||||
|
|
|
@ -65,6 +65,7 @@ void pcie_chassis_del_slot(PCIESlot *s);
|
|||
|
||||
typedef struct PCIERootPortClass {
|
||||
PCIDeviceClass parent_class;
|
||||
DeviceRealize parent_realize;
|
||||
|
||||
uint8_t (*aer_vector)(const PCIDevice *dev);
|
||||
int (*interrupts_init)(PCIDevice *dev, Error **errp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue