Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging
QOM CPUState refactorings / X86CPU
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.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
cpu: Use QTAILQ for CPU list
Introduce CPU_FOREACH(), CPU_FOREACH_SAFE() and CPU_NEXT() shorthandmacros.
Signed-off-by: Andreas Färber <afaerber@suse.de>
hw: Clean up bogus default boot order
We set default boot order "cad" in every single machine definitionexcept "pseries" and "moxiesim", even though very few boards actuallycare for boot order, and "cad" makes sense for even fewer.
Machines that care:...
aio / timers: Convert rtc_clock to be a QEMUClockType
Convert rtc_clock to be a QEMUClockType
Move rtc_clock users to use the new API
Signed-off-by: Alex Bligh <alex@alex.org.uk>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
aio / timers: Switch entire codebase to the new timer API
This is an autogenerated patch using scripts/switch-timer-api.
Switch the entire code base to using the new timer API.
Note this patch may introduce some line length issues.
Signed-off-by: Alex Bligh <alex@alex.org.uk>...
hw/arm/pic_cpu: Remove the now-unneeded arm_pic_init_cpu()
Now all the boards have been converted arm_pic_init_cpu()is unused and can just be deleted.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-15-git-send-email-peter.maydell@linaro.org
hw/arm/realview: Don't use arm_pic_init_cpu()
Drop the now-deprecated arm_pic_init_cpu() in favour of directlygetting the IRQ line from the ARMCPU object.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-10-git-send-email-peter.maydell@linaro.org
hw/arm/strongarm: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-11-git-send-email-peter.maydell@linaro.org
hw/arm/versatilepb: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-12-git-send-email-peter.maydell@linaro.org
hw/arm/vexpress: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-13-git-send-email-peter.maydell@linaro.org
hw/arm/xilinx_zynq: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-14-git-send-email-peter.maydell@linaro.org
hw/arm/highbank: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-5-git-send-email-peter.maydell@linaro.org
hw/arm/integratorcp: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-6-git-send-email-peter.maydell@linaro.org
hw/arm/kzm: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-7-git-send-email-peter.maydell@linaro.org
hw/arm/musicpal: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-8-git-send-email-peter.maydell@linaro.org
hw/arm/omap*: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-9-git-send-email-peter.maydell@linaro.org
target-arm: Make IRQ and FIQ gpio lines on the CPU object
Now that ARMCPU is a subclass of DeviceState, we can make theCPU's inbound IRQ and FIQ lines be simply gpio lines, whichmeans we can remove the odd arm_pic shim.
We retain the arm_pic_init_cpu() function as a backwards...
hw/arm/armv7m: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-3-git-send-email-peter.maydell@linaro.org
hw/arm/exynos4210: Don't use arm_pic_init_cpu()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1375977856-25046-4-git-send-email-peter.maydell@linaro.org
pxa2xx: Avoid object_get_link_property() assertion for "parent_bus"
pxa2xx_i2c_init() creates a pxa2xx-i2c-slave device on a second i2c-bus,which has a NULL parent device. This causes an assertion inobject_get_canonical_path() when accessing pxa2xx-i2c-slave's...
stellaris: QOM cast cleanup for stellaris_i2c_state
Introduce a type constant, use QOM casts, rename the parent field andprepare for QOM realize.
stellaris: QOM cast cleanup for stellaris_adc_state
strongarm: QOM cast cleanup for StrongARMPICState
strongarm: QOM cast cleanup for StrongARMRTCState
Introduce a type constant, use QOM casts and rename the parent field.
strongarm: QOM cast cleanup for StrongARMGPIOInfo
strongarm: QOM cast cleanup for StrongARMPPCInfo
strongarm: QOM cast cleanup for StrongARMUARTState
strongarm: QOM cast cleanup for StrongARMSSPState
versatilepb: QOM cast cleanup for vpb_sic_state
musicpal: QOM cast cleanup for mv88w8618_pit_state
musicpal: QOM cast cleanup for mv88w8618_flashcfg
musicpal: QOM cast cleanup for musicpal_gpio_state
musicpal: QOM cast cleanup for musicpal_key_state
pxa2xx: QOM cast cleanup for PXA2xxSSPState
pxa2xx: QOM cast cleanup for PXA2xxRTCState
pxa2xx: QOM cast cleanup for PXA2xxI2CState
pxa2xx_gpio: QOM cast cleanup for PXA2xxGPIOInfo
pxa2xx_pic: QOM cast cleanup for PXA2xxPICState
spitz: QOM cast cleanup for SLNANDState
spitz: QOM cast cleanup for SpitzKeyboardState
stellaris: QOM cast cleanup for gptm_state
musicpal: QOM cast cleanup mv88w8618_pic_state
highbank: QOM cast cleanup for HighbankRegsState
Add type constant and use QOM casts.
integratorcp: QOM cast cleanup for integratorcm_state
Rename to IntegratorCMState, introduce type constant and use QOM cast.
integratorcp: QOM cast cleanup for icp_pic_state
Introduce type constant and use QOM cast.Fix indentation.
musicpal: Fix typo in name of local function
The misspelling was spotted by Andreas Färber.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Reviewed-by: Jan Kiszka <jan.kiszka@web.de>Signed-off-by: Andreas Färber <afaerber@suse.de>
musicpal: QOM cast cleanup for mv88w8618_eth_state
Introduce type constant and use QOM casts.
musicpal: QOM cast cleanup for musicpal_lcd_state
armv7m: QOM cast cleanup for BitBandState
Introduce TYPE_* constant and use QOM cast.
hw/arm: Use 'load_ramdisk()' for loading ramdisks w/ U-Boot header
The load_ramdisk function is used to load ramdisk featuring a U-Bootheader.
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
arm/boot: Allow boards to modify the FDT blob
Add a callback hook in arm_boot_info to allow board models tomodify the device tree blob if they need to. (The major expecteduse case is to add virtio-mmio nodes for virtio-mmio transportsthat exist in QEMU but not in the hardware.)...
vexpress: Make VEDBoardInfo extend arm_boot_info
Make the VEDBoardInfo struct extend arm_boot_info; this willallow us to get at the VEDBoardInfo information inside callbacksfrom arm/boot code.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 1373977512-28932-8-git-send-email-peter.maydell@linaro.org
vexpress: Add virtio-mmio transports
Add some virtio-mmio transports to the vexpress board model,together with a modify_dtb hook which adds them to the devicetree so that the kernel will probe for them. We put themin a reserved area of the address map....
arm/boot: Use qemu_devtree_setprop_sized_cells()
Replace the opencoded assembly of the reg property array for the/memory node with a call to qemu_devtree_setprop_sized_cells().
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
ARM/highbank: add support for Calxeda ECX-2000 / Midway
The Calxeda ECX-2000 chip (aka. Midway) is model-wise quite similarto the Highbank. The most prominent difference is the Cortex-A15 CPUcore in it, together with the associated core peripherals.
Add a new ARM machine type called "midway"....
ARM/highbank: prepare for adding similar machines
To allow the modelling of machines similar to Calxeda Highbank,introduce a parameter to the init function and call it from awrapper. This allows to tweak the definition for individual machineslater on....
hw/arm/vexpress: Add alias for flash at address 0 on A15 board
The A15 Versatile Express board can remap a variety of things at address0. We don't currently emulate the Serial Configuration Controller whichis how the guest can control this remapping, but we can provide the...
QOM CPUState refactorings
cpu: Make first_cpu and next_cpu CPUState
Move next_cpu from CPU_COMMON to CPUState.Move first_cpu variable to qom/cpu.h.
gdbstub needs to use CPUState::env_ptr for now.cpu_copy() no longer needs to save and restore cpu_next.
Acked-by: Paolo Bonzini <pbonzini@redhat.com>...
cpu: Replace cpu_single_env with CPUState current_cpu
Move it to qom/cpu.h.
Simplify -machine option queries with qemu_get_machine_opts()
The previous two commits fixed bugs in -machine option queries. Ican't find fault with the remaining queries, but let's useqemu_get_machine_opts() everywhere, for consistency, simplicity and...
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: 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...
hw/a*: pass owner to memory_region_init* functions
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
memory: add owner argument to initialization functions
ARM: Allow dumping of device tree
By calling qemu_devtree_dumpdtb near the end of load_dtb.
Signed-off-by: John Rigby <john.rigby@linaro.org>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
arm/boot: Free dtb blob memory after use
The dtb blob returned by load_device_tree() is in memory allocatedwith g_malloc(). Free it accordingly once we have copied itscontents into the guest memory. To make this easy, we need also toclean up the error handling in load_dtb() so that we consistently...
arm: Remove CONFIG_FDT conditionals
Now that we know we're compiling with libfdt, we can remove theCONFIG_FDT conditionals.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
hw/arm/exynos4210.c: convert chipid_and_omr to an mmio region
Exynos SoC was misusing memory_region_init_ram_ptr(): this interface can safelybe used only for memory regions which size is a multiple of target page size.Change chipid_and_omr memory to an mmio region to fix this....
exynos4210.c: register rom_mem for memory migration
Even if we do not register newly created RAM MemoryRegion for migration withvmstate_register_ram_global() function, ram_save_setup() still saves this regionto snapshot file with empty idstr=="". Consequently this results in error during...
xilinx_spips: seperate SPI and QSPI as two classes
Make SPI and QSPI different classes. QSPIPS is setup as a child of SPIPS.Only QSPI has the LQSPI functionality, so move all that to the child class.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
remove some double-includes
Some source files #include the same header more thanonce for no good reason. Remove second #includes insuch cases.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
spitz: fix compilation failure due to pty.h namespace pollution
pty.h is polluting the global namespace with a CTRL macro. spitzthus fails compilation with the patch athttp://article.gmane.org/gmane.comp.emulators.qemu/211337 andthis patch fixes it....
console: add device link to QemuConsoles
So it is possible to figure which qemu console displays which device.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Merge branch 'arm-devs.next' of git://git.linaro.org/people/pmaydell/qemu-arm
versatile_pci: Implement the PCI controller's control registers
The versatile_pci PCI controller has a set of control registers whichhandle the mapping between PCI and system address spaces. Implementthese registers (though for now they have no effect since we don't...
arm/realview: Fix mapping of PCI regions
Fix the mapping of the PCI regions for the realview board, which wereall incorrect. (This was never noticed because the Linux kerneldoesn't actually include a PCI driver for the realview boards.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
versatile_pci: Expose PCI memory space to system
The VersatilePB's PCI controller exposes the PCI memory space to thesystem via three regions controlled by the mapping control registers.Implement this so that guests can actually use MMIO-BAR PCI cards....
versatile_pci: Expose PCI I/O region on Versatile PB
Comments in the QEMU source code claim that the version of the PCIcontroller on the VersatilePB board doesn't support the PCI I/Oregion, but this is incorrect; expose that region, map it in thecorrect location, and drop the misleading comments....
Remove unneeded type casts
cpu_physical_memory_read, cpu_physical_memory_write take any pointeras 2nd argument without needing a type cast.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
console: add GraphicHwOps
Pass a single GraphicHwOps struct pointer to graphic_console_init,instead of a bunch of function pointers.
console: simplify screendump
Screendumps are alot simpler as we can update non-activeQemuConsoles now. So we only need to update the QemuConsolewe want write out, then dump the DisplaySurface content intoa ppm file. Done.
No console switching needed. No special support code in the...
sysemu: avoid proliferation of include/ subdirectories
arm: fix location of some include files
The recent rearrangement of include files had some minor errors: devices.h is not ARM specific and should not be in arm/ arm.h should be in arm/
Move these two headers to correct this.
hw: move interrupt controllers to hw/intc/, configure with default-configs/
hw: move GPIO interfaces to hw/gpio/, configure with default-configs/
hw: move other devices to hw/misc/, configure with default-configs/
hw: move ARM CPU cores to hw/cpu/, configure with default-configs/
hw: move last file to hw/arm/
hw: move private headers to hw/ subdirectories.
Many headers are used only in a single directory. These can bekept in hw/.
hw: move char devices to hw/char/, configure via default-configs/
hw: move timer devices to hw/timer/, configure with default-configs/
hw: move SD/MMC devices to hw/sd/, configure with default-configs/
hw: move DMA controllers to hw/dma/, configure with default-configs/
hw: move block devices to hw/block/, configure via default-configs/
hw: move audio devices to hw/audio/, configure via default-configs/
hw: move display devices to hw/display/, configure via default-configs/
hw: move I2C controllers to hw/i2c/, configure via default-configs/
hw: move SSI controllers to hw/ssi/, configure via default-configs/