History | View | Annotate | Download (23.8 kB)
PPC: pseries: Remove hack for PIO window
Now that all users of old_portio are gone, we can remove the hackthat enabled us to support them.
Signed-off-by: Alexander Graf <agraf@suse.de>
Rename target_phys_addr_t to hwaddr
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes arereserved) and its purpose doesn't match the name (most target_phys_addr_taddresses are not target specific). Replace it with a finger-friendly,...
pseries: Remove XICS irq type enum type
Currently the XICS interrupt controller emulation uses a custom enum tospecify whether a given interrupt is level-sensitive or message-triggered.This enum makes life awkward for saving the state, and isn't particularly...
pseries: Reset emulated PCI TCE tables on system reset
The emulated PCI host bridge on the pseries machine incorporates an IOMMU(PAPR TCE table). Currently the mappings in this IOMMU are not clearedwhen we reset the system. This patch fixes this bug. To do this it adds...
spapr_pci: QOM'ify sPAPR PCI host bridge
Introduce type constant. Introduce cast macro to drop bogus busdev fieldthat would've broken SYS_BUS_DEVICE(). Avoid accessing parent fieldsdirectly.
Free the identifier phb as acronym for PCI_HOST_BRIDGE.
Updated against conflicting merge from branch 'agraf/ppc-for-upstream'...
pci: Derive PCI host bridges from TYPE_PCI_HOST_BRIDGE
Use PCIHostState and PCI_HOST_BRIDGE() where appropriate.
Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: Make host bridge TypeInfos const
During the QOM migration they were amended with further info but this isno longer the case. All static TypeInfos can be const these days.
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Michael S. Tsirkin <mst@redhat.com>...
pseries: Rework irq assignment to avoid carrying qemu_irqs around
Currently, the interfaces in the pseries machine code for assignmentand setup of interrupts pass around qemu_irq objects. That was donein an attempt not to be too closely linked to the specific XICS...
pseries: Separate PCI RTAS setup from common from emulation specific PCI setup
Currently the RTAS functions for handling PCI are registered from theclass init code for the PCI host bridge. That sort of makes sensenow, but will break in the future when vfio gives us multiple types of...
pseries: Export find_phb() utility function for PCI code
The pseries PCI code makes use of an internal find_dev() function whichlocates a PCIDevice * given a (platform specific) bus ID and deviceaddress. Internally this needs to first locate the host bridge on which...
pseries: Add trace event for PCI irqs
This adds a trace event in the pseries PCI specific set_irq() function toassist in debugging.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>Signed-off-by: David Gibson <david@gibson.dropbear.id.au>[agraf: add trace.h include]...
pseries: Add PCI MSI/MSI-X support
This patch implements MSI and MSI-X support for the pseries PCI hostbridge. To do this it adds:
pseries dma: DMA window params added to PHB and DT population changed
Previously the only PCI bus supported was the emulated PCI bus withfixed DMA window with start at 0 and size 1GB. As we are going to supportPCI pass through which DMA window properties are set by the host...
pseries pci: removed redundant busdev
The PCIHostState struct already contains SysBusDevice sothe one in sPAPRPHBState has to go.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>Signed-off-by: Alexander Graf <agraf@suse.de>
pseries pci: spapr_populate_pci_devices renamed to spapr_populate_pci_dt
spapr_populate_pci_devices() populates the device tree only with busproperties and has nothing to do with the devices on it as PCI BARallocation is done by the system firmware (SLOF)....
powerpc pci: fixed packing of ranges[]
By default mingw-gcc is trying to pack structures the way topreserve binary compatibility with MS Visual C what leads toincorrect and unexpected padding in the PCI bus ranges property ofthe sPAPR PHB.
The patch replaces attribute((packed)) with more strict QEMU_PACKED...
pseries: Implement IOMMU and DMA for PAPR PCI devices
Currently the pseries machine emulation does not support DMA for emulatedPCI devices, because the PAPR spec always requires a (guest visible,paravirtualized) IOMMU which was not implemented. Now that we have...
qbus: Make child devices links
Make qbus children show up as link<> properties. There is no stableaddressing for qbus children so we use an unstable naming convention.
This is okay in QOM though because the composition name is expected tobe what's stable....
pseries: Use the same interrupt swizzling for host bridges as p2p bridges
Currently the pseries PCI code uses a somewhat strange scheme of PCI irqallocation - one per slot up to a maximum that's greater than the usual 4.This scheme more or less worked, because we were able to tell the guest the...
pseries: Fix RTAS based config access
On the pseries platform, access to PCI config space is via RTAS calls(which go to the hypervisor) rather than MMIO. This means we don't usethe same code path as nearly everyone else which goes through pci_host.cand we're missing some of the parameter checking along the way....
pseries: Add support for level interrupts to XICS
The pseries "xics" interrupt controller, like most interruptcontrollers can support both message (i.e. edge sensitive) interruptsand level sensitive interrupts, but it needs to know which are which.
When I implemented the xics emulation for qemu, the only devices we...
pseries: Configure PCI bridge using properties
Currently, the function spapr_create_phb() uses its parameters toinitialize the correct memory windows for the new PCI Host Bridge(PHB). This is not the way things are supposed to be done with qdevs,and means you can't create extra PHBs easily using -device....
pseries: Remove unused constant from PCI code
The 'bars' constant array was used in experimental device allocation codewhich is no longer necessary now that we always run the SLOF firmware.This patch removes the now redundant variable.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>...
pseries: Remove PCI device from PCI host bridge code
The sPAPR PCI code defines a PCI device "spapr-pci-host-bridge-pci" whichis never used. This came over from the earlier bridge driver we used asa template. Some other bridges appear on their own PCI bus as a device,...
Add missing const attributes for MemoryRegionOps
Most MemoryRegionOps already had the const attribute.This patch adds it to the remaining ones.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qom: Unify type registration
Replace device_init() with generalized type_init().
While at it, unify naming convention: type_init([$prefix_]register_types)Also, type_init() is a function, so add preceding blank line wherenecessary and don't put a semicolon after the closing brace....
qdev: register all types natively through QEMU Object Model
This was done in a mostly automated fashion. I did it in three steps and thenrebased it into a single step which avoids repeatedly touching every file inthe tree.
The first step was a sed-based addition of the parent type to the subclass...
qdev: change ambiguous qdev names
Reported-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
sysbus: apic: ioapic: convert to QEMU Object Model
This converts three devices because apic and ioapic are subclasses of sysbus.Converting subclasses independently of their base class is prohibitively hard.
pseries: Support PCI extended config space in RTAS calls
On the pseries machine (which expexts a paravirtualized guest), guestaccess to PCI config space is via host-provided RTAS functions. Thispatch extends these RTAS functions to permit access to PCI extended...
pseries: Use correct dispatcher for PCI config space accesses
The pseries machine expects a para-virtualized guest and so supplies RTASfunctions (via a hypercall) for performing PCI config space access.Currently the implementation of these calls intopci_default_{read,write}_config(). However this would be incorrect for...
pseries: SLOF PCI flag day
Currently on the pseries machine the SLOF firmware is used normally,but we bypass it when -kernel is specified. Having these two
different boot paths can cause some confusion.
In particular at present we need to "probe" the (emulated) PCI bus and...
PPC: Pseries: Check for PCI boundaries
We call pci_host_config_{read,write}_common() which perform PCI configaccesses. However they don't do all limit checking the way we expectit to.
So let's introduce a small wrapper around them, making them behave the...
pseries: Fix array overrun bug in PCI code
spapr_populate_pci_devices() containd a loop with PCI_NUM_REGIONS (7)iterations. However this overruns the 'bars' global array, which only has6 elements. In fact we only want to run this loop for things listed in the...
spapr: fix build
pseries: Add partial support for PCI
This patch adds a PCI bus to the pseries machine. This instantiatesthe qemu generic PCI bus code, advertises a PCI host bridge in theguest's device tree and implements the RTAS methods specified by PAPRto access PCI config space. It also sets up the memory regions we...