History | View | Annotate | Download (10.5 kB)
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...
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.
ppce500_pci: remove sysbus_init_mmio_cb2 usage
Expose only one container MemoryRegion to sysbus.(Peter Maydell's idea)
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Benoît Canet <benoit.canet@gmail.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ppce500_pci: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
ppc/e500_pci: Fix code style
Put trailing statements on next line.
Signed-off-by: Liu Yu <yu.liu@freescale.com>Reviewed-by: Andreas Färber <andreas.faerber@web.de>Signed-off-by: Alexander Graf <agraf@suse.de>
ppc/e500_pci: Fix an array overflow issue
When access PPCE500_PCI_IW1 the previous index get overflow.The patch fix the issue and update all to keep consistent style.
Signed-off-by: Liu Yu <yu.liu@freescale.com>Signed-off-by: Alexander Graf <agraf@suse.de>
pci_host: convert conf index and data ports to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>
Revert "Merge remote-tracking branch 'qemu-kvm/memory/batch' into staging"
This reverts commit 8ef9ea85a2cc1007eaefa53e6871f1f83bcef22d, reversingchanges made to 444dc48298c480e42e15a8fe676be737d8a6b2a1.
From Avi:
Please revert the entire pull (git revert 8ef9ea85a2cc1) while I work this...
ppce500_pci: convert to sysbus_init_mmio_cb2()
Not a huge step forward, but at least we now have a 1:1 relationshipbetween registration and unregistration.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: pass I/O address space to new PCI bus
This lets us register BARs in the I/O address space.
Reviewed-by: Richard Henderson <rth@twiddle.net>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: pass address space to pci bus when created
This is now done sloppily, via get_system_memory(). Eventually callerswill be converted to stop using that.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ppce500: move device/vendor/class id to qdev
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
PPC: Qdev'ify e500 pci
The e500 PCI controller isn't qdev'ified yet. This leads to severe issueswhen running with -drive.
To be able to use a virtio disk with an e500 VM, let's convert the PCIcontroller over to qdev.
Reviewed-by: Paul Brook <paul@codesourcery.com>...
vmstate: port ppce500_pci
Signed-off-by: Juan Quintela <quintela@redhat.com>
mpc85xx_pci_map_irq: change "unknow" to "unknown"
Signed-off-by: Scott Wood <scottwood@freescale.com>Acked-by: Alexander Graf <agraf@suse.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Add endianness as io mem parameter
As stated before, devices can be little, big or native endian. Thetarget endianness is not of their concern, so we need to push thingsdown a level.
This patch adds a parameter to cpu_register_io_memory that allows adevice to choose its endianness. For now, all devices simply choose...
pci-host: Delegate bswap to mmio layer
The only reason we have bswap versions of the pci host code is thatmost pci host devices are little endian. The ppc e500 is the onlyodd one here, being big endian.
So let's directly pass the endianness down to the mmio layer and not...
Revert "PPC: Qdev'ify e500 pci"
This reverts commit 13b7fdeffa68e3382231a70308593ae6a75d96c3.
Revert "PPC: Make e500 pci byte swap config data"
This reverts commit cfb207e643d94e3e96d456b1df14c5e36f6aa9e5.
Signed-off-by: Alexander Graf <agraf@suse.de>
PPC: Make e500 pci byte swap config data
The config data field on the e500 pci controller is in little endian, so we needto enable byte swap there.
pci: use PCI_DEVFN() where appropriate.
Use PCI_DEVFN() and PCI_FUNC_MAX where appropriate.This patch make it clear that func = 0.
test:The following object files with/without this patch are stripped and compared.They remains same. arm-softmmu/versatile_pci.o...
savevm: Add DeviceState param
When available, we'd like to be able to access the DeviceStatewhen registering a savevm. For buses with a get_dev_path()function, this will allow us to create more unique savevmid strings.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>...
Compile most PPC devices only once
Make byte swapping unconditional since PPC is big endian.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Compile pci_host only once
Convert pci_host_conf_register_mmio_noswap(x) topci_host_conf_register_mmio(x, 0).
Convert pci_host_conf_register_mmio(x) topci_host_conf_register_mmio(x, 1) for big endian hosts, all caseshappen to be BE.
pci: shorten pci_host_{conf, data}_register_xxx function a bit.
pci_host_data_register_io_memory and its variants are too long a bit.So shorten them. Now they arepci_host_{conf, data}_register_{mmio, mmio_noswap, ioport}()
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
pci_host: consolidate pci config address access.
consolidate pci_config address access into pci_host.c
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci_host.h: move functions in pci_host.h into .c file.
split static functions in pci_host.h into pci_host.c andpci_host_template.h.Later a structures declared in pci_host.h, PCIHostState, will be used.However pci_host.h doesn't allow to include itself easily. This patches...
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
We want the argument pass to set_irq to be opaque
piix_pci want to pass more things that the pic
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Make CPURead/WriteFunc structure 'const'
Fix build with DEBUG_PCI in pci_host.h enabled
Remove io_index argument from cpu_register_io_memory()
The parameter is always zero except when registering the three internalio regions (ROM, unassigned, notdirty). Remove the parameter to reducethe API's power, thus facilitating future change.
Signed-off-by: Avi Kivity <avi@redhat.com>...
Add common BusState
Implement and use a common device bus state. The main side-effect isthat creating a bus and attaching it to a parent device are no longerseparate operations. For legacy code we allow a NULL parent, but thatshould go away eventually....
Replace gcc variadic macro extension with C99 version
Add and use remaining #defines for PCI device IDs (Stuart Brady)
This patch adds and uses #defines for the remaining hardcoded PCIdevice IDs. It also moves definitions taken from linux/pci_ids.hinto a separate header (hw/pci_ids.h), removes the 'RTL' from...
kvm/powerpc: Add freescale pci controller's support
This patch add the emulation of freescale's pci controller for MPC85xx platform.
Signed-off-by: Liu Yu <yu.liu@freescale.com>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6661 c046a42c-6fe2-441c-8c8c-71466251a162