History | View | Annotate | Download (68.9 kB)
pci: remove explicit check to 64K ioport size
This check is useless, as bigger addresses will be ignored whenadded to 'io' MemoryRegion, which has a size of 64K.
However, some architectures don't use the 'io' MemoryRegion, likethe alpha and versatile platforms. They create a PCI I/O region...
pci: add helper to retrieve the 64-bit range
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Add c++ keywords to QAPI helper script
Add c++ keywords to avoid errors in compiling with c++ compiler.This also renames class member of PciDeviceInfo to q_class.
Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>...
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
pc,pci,virtio fixes and cleanups
This includes pc and pci cleanups and enhancements,and a virtio bugfix for level interrupts.
qdev: Pass size to qbus_create_inplace()
To be passed to object_initialize().
Since commit 39355c3826f5d9a2eb1ce3dc9b4cdd68893769d6 the argument isvoid*, so drop some superfluous (BusState *) casts or direct parentfield usages.
Signed-off-by: Andreas Färber <afaerber@suse.de>
pci: Pass size to pci_bus_new_inplace()
To be passed to qbus_create_inplace().
Reviewed-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
pci: Introduce helper to retrieve a PCI device's DMA address space
A PCI device's DMA address space (possibly an IOMMU) is returned by amethod on the PCIBus. At the moment that only has one caller, so themethod is simply open coded. We'll need another caller for VFIO, so...
pci-bridge: Turn PCIBridge into abstract QOM type
Introduce TYPE_PCI_BRIDGE as base type and use PCI_BRIDGE() casts.
Reviewed-by: Don Koch <dkoch@verizon.com>Acked-by: Michael S. Tsirkin <mst@redhat.com>[AF: Updated pbm-bridge parent to TYPE_PCI_BRIDGE]...
pci,net,pc enhancements
This includes some fixes and enhancements that accumulated in my tree:pci fixes by dkoch, virtio-net enhancements by akong and mst,and a fix for xen pc by mst.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>...
pci-bridge: update mappings for migration/restore
Fix for LP#1187529: Devices on PCI bridge stop working whenlive-migrated. Update bridge mappings for all PCI bridgedevices in get_pci_config_device().
Signed-off-by: Don Koch <dkoch@verizon.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pci,misc enhancements
This includes some pci enhancements:
Better support for systems with multiple PCI root busesFW cfg interface for more robust pci programming in BIOSMinor fixes/cleanups for fw cfg and cross-version migration -...
pci: Use helper to find device's root bus in pci_find_domain()
Currently pci_find_domain() performs two functions - it locates the PCIroot bus above the given bus, then looks up that root bus's domain number.This patch adds a helper function to perform the first task, finding the...
pci: Replace pci_find_domain() with more general pci_root_bus_path()
pci_find_domain() is used in a number of places where we want an id for awhole PCI domain (i.e. the subtree under a PCI root bus). The trouble isthat many platforms may support multiple independent host bridges with no...
pci: Add root bus argument to pci_get_bus_devfn()
pci_get_bus_devfn() interprets a full PCI address string to give a PCIBus *and device/function number within that bus. Currently it assumes it isworking on an address under the primary PCI root bus. This patch extends...
pci: Add root bus parameter to pci_nic_init()
At present, pci_nic_init() and pci_nic_init_nofail() assume that they willonly create a NIC under the primary PCI root. As we add support formultiple PCI roots, that may no longer be the case. This patch adds a root...
pci: Simpler implementation of primary PCI bus
Currently pci_find_primary_bus() searches the list of root buses for onewith domain 0. But since host buses are always registered with domain 0,this just amounts to finding the only PCI host bus. The only remaining...
pci: Remove domain from PCIHostBus
There are now no users of the domain field of PCIHostBus, so remove itfrom the structure, and as a parameter from the pci_host_bus_register()function which sets it.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>...
pci: Fold host_buses list into PCIHostState functionality
The host_buses list is an odd structure - a list of pointers to PCI rootbuses existing in parallel to the normal qdev tree structure. This patchremoves it, instead putting the link pointers into the PCIHostState...
pci: Abolish pci_find_root_bus()
pci_find_root_bus() takes a domain parameter. Currently PCI root buseswith domain other than 0 can't be created, so this is more or less a longwinded way of retrieving the main PCI root bus. Numbered domains don'tactually properly cover the (non x86) possibilities for multiple PCI root...
hw/p*: pass owner to memory_region_init* functions
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
memory: add owner argument to initialization functions
pci: Move pci_read_devaddr to pci-hotplug-old.c
pci_read_devaddr() is only used by the legacy functions for the old PCIhotplug interface in pci-hotplug-old.c. So we move the function there,and make it static.
dma: eliminate DMAContext
The DMAContext is a simple pointer to an AddressSpace that is now alwaysalready available. Make everyone hold the address space directly,and clean up the DMA API to use the AddressSpace directly.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
memory: give name to every AddressSpace
The "info mtree" command in QEMU console prints only "memory" and "I/O" address spaces while there are actually a lot more other AddressSpacestructs created by PCI and VIO devices. Those devices do not normallyhave names and therefore not present in "info mtree" output....
dma: eliminate old-style IOMMU support
The translate function in the DMAContext is now always NULL.Remove every reference to it.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
pci: use memory core for iommu support
Use the new iommu support in the memory core for iommu support. The onlyuser, spapr, is also converted, but it still provides a DMAContextinterface until the non-PCI bits switch to AddressSpace.
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>...
qdev: Drop FROM_QBUS() macro
Use QOM cast macros I2C_BUS(), SSI_BUS(), PCI_BUS() instead.
exec: eliminate qemu_put_ram_ptr
pci: Create and register a new PCI Express TypeInfo
This will allow us to differentiate Express and Legacy buses.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pci: Allow PCI bus creation interfaces to specify the type of bus
No change to any types.
pci: Create pci_bus_is_express helper
For testing the bus type.
pci: Create and use API to determine root buses
pci: Teach PCI Bridges about VGA routing
Each PCI Bridge has a set of implied VGA regions that are enabled whenthe VGA bit is set in the bridge control register. This allows VGAdevices behind bridges. Unfortunately with VGA Enable, which weformerly allowed but didn't back, comes along some required VGA...
pci_bridge: factor out common code
Reuse common code in pcie_port, override the hardwired-to-0bits per PCI Express spec.No functional change but makes the code easier to follow.
pci: Fix INTx routing notifier recursion
For some reason we recurse to fire the INTx routing notifier for eachchild of a bus, for each possible device of a bus. That means that ifwe add a root port, the notifier gets called for that bridge 256times. If we add an upstream switch behind that root port, 256^2. But...
pci: refuse empty ROM files
A zero size ROM file is invalid and should produce a warning.Attempting to use a zero size file ends up hitting an assertionqemu_ram_set_idstr() because RAMBlocks with duplicate addresses areallocated - due to zero size the allocator doesn't increment the next...
pci: Add PCI VGA helpers
Allow devices to register VGA memory regions for handling PCI specdefined VGA I/O port and MMIO areas. PCI will attach these to thebus address spaces and enable them according to the device commandregister value.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>...
error: Strip trailing '\n' from error string arguments (again)
Commit 6daf194d and be62a2eb got rid of a bunch, but they keep comingback. Tracked down with this Coccinelle semantic patch:
r expression err, eno, cls, fmt; position p; @@ (...
r
pci: use qbus_create in pci_bus_new
Remove knowledge of QOM innards. The common part of pci_bus_new andpci_bus_new_inplace is moved to a new function pci_bus_init.
Acked-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
Make all static TypeInfos const
Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register alltypes natively through QEMU Object Model), TypeInfo as used inthe common, non-iterative pattern is no longer amended with informationand should therefore be const....
softmmu: move include files to include/sysemu/
misc: move include files to include/qemu/
monitor: move include files to include/monitor/
exec: move include files to include/exec/
net: reorganize headers
Move public headers to include/net, and leave private headers in net/.Put the virtio headers in include/net/tap.h, removing the multiple copiesthat existed. Leave include/net/tap.h as the interface for NICs, andnet/tap_int.h as the interface for OS-specific parts of the tap backend....
pci: fix path for local includes
Include dependencies from pci core using the correct path.This is required now that it's in the separate directory.Need to check whether they can be minimized, for now,keep the code as is.
pci: rename pci_internals.h pci_bus.h
There are lots of external users of pci_internals.h,apparently making it an internal interface only didn'twork out. Let's stop pretending it's an internal header.
pci: move pci core code to hw/pci
Move files and modify makefiles to pick them at thenew location.