mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-18 05:28:36 -07: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
|
|
@ -55,7 +55,7 @@ struct FWCfgEntry {
|
|||
bool allow_write;
|
||||
uint8_t *data;
|
||||
void *callback_opaque;
|
||||
FWCfgReadCallback read_callback;
|
||||
FWCfgCallback select_cb;
|
||||
};
|
||||
|
||||
#define JPG_FILE 0
|
||||
|
|
@ -236,8 +236,8 @@ static int fw_cfg_select(FWCfgState *s, uint16_t key)
|
|||
/* entry successfully selected, now run callback if present */
|
||||
arch = !!(key & FW_CFG_ARCH_LOCAL);
|
||||
e = &s->entries[arch][key & FW_CFG_ENTRY_MASK];
|
||||
if (e->read_callback) {
|
||||
e->read_callback(e->callback_opaque);
|
||||
if (e->select_cb) {
|
||||
e->select_cb(e->callback_opaque);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -568,11 +568,11 @@ static const VMStateDescription vmstate_fw_cfg = {
|
|||
}
|
||||
};
|
||||
|
||||
static void fw_cfg_add_bytes_read_callback(FWCfgState *s, uint16_t key,
|
||||
FWCfgReadCallback callback,
|
||||
void *callback_opaque,
|
||||
void *data, size_t len,
|
||||
bool read_only)
|
||||
static void fw_cfg_add_bytes_callback(FWCfgState *s, uint16_t key,
|
||||
FWCfgCallback select_cb,
|
||||
void *callback_opaque,
|
||||
void *data, size_t len,
|
||||
bool read_only)
|
||||
{
|
||||
int arch = !!(key & FW_CFG_ARCH_LOCAL);
|
||||
|
||||
|
|
@ -583,7 +583,7 @@ static void fw_cfg_add_bytes_read_callback(FWCfgState *s, uint16_t key,
|
|||
|
||||
s->entries[arch][key].data = data;
|
||||
s->entries[arch][key].len = (uint32_t)len;
|
||||
s->entries[arch][key].read_callback = callback;
|
||||
s->entries[arch][key].select_cb = select_cb;
|
||||
s->entries[arch][key].callback_opaque = callback_opaque;
|
||||
s->entries[arch][key].allow_write = !read_only;
|
||||
}
|
||||
|
|
@ -610,7 +610,7 @@ static void *fw_cfg_modify_bytes_read(FWCfgState *s, uint16_t key,
|
|||
|
||||
void fw_cfg_add_bytes(FWCfgState *s, uint16_t key, void *data, size_t len)
|
||||
{
|
||||
fw_cfg_add_bytes_read_callback(s, key, NULL, NULL, data, len, true);
|
||||
fw_cfg_add_bytes_callback(s, key, NULL, NULL, data, len, true);
|
||||
}
|
||||
|
||||
void fw_cfg_add_string(FWCfgState *s, uint16_t key, const char *value)
|
||||
|
|
@ -736,7 +736,8 @@ static int get_fw_cfg_order(FWCfgState *s, const char *name)
|
|||
}
|
||||
|
||||
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)
|
||||
{
|
||||
int i, index, count;
|
||||
|
|
@ -798,9 +799,10 @@ void fw_cfg_add_file_callback(FWCfgState *s, const char *filename,
|
|||
}
|
||||
}
|
||||
|
||||
fw_cfg_add_bytes_read_callback(s, FW_CFG_FILE_FIRST + index,
|
||||
callback, callback_opaque, data, len,
|
||||
read_only);
|
||||
fw_cfg_add_bytes_callback(s, FW_CFG_FILE_FIRST + index,
|
||||
select_cb,
|
||||
callback_opaque, data, len,
|
||||
read_only);
|
||||
|
||||
s->files->f[index].size = cpu_to_be32(len);
|
||||
s->files->f[index].select = cpu_to_be16(FW_CFG_FILE_FIRST + index);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue