xen_platform: convert PIO to new memory api read/write
Signed-off-by: Alexander Graf <agraf@suse.de>
PPC: e500: Map PIO space into core memory region
On PPC, we don't have PIO. So usually PIO space behind a PCI bridge isaccessible via MMIO. Do this mapping explicitly by mapping the PIO spaceof our PCI bus into a memory region that lives in memory space....
es1370: convert PIO to new memory api read/write
i8254: convert PIO to new memory api read/write
m48t59: convert PIO to new memory api read/write
mc146818rtc: convert PIO to new memory api read/write
pc port92: convert PIO to new memory api read/write
pckbd: convert PIO to new memory api read/write
rtl8139: convert PIO to new memory api read/write
serial: convert PIO to new memory api read/write
vmport: convert PIO to new memory api read/write
PPC: Bamboo: Fix memory size DT property
Device tree properties need to be specified in big endian. Fix thebamboo memory size property accordingly.
Signed-off-by: Alexander Graf <agraf@suse.de>CC: qemu-stable@nongnu.org
e500: Fix serial initialization
it was wrongly using serial_hds0 instead of serial_hds1
Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Alexander Graf <agraf@suse.de>
Add USB option in machine options
When -usb option is used, global varible usb_enabled is set.And all the plaform will create one USB controller accordingto this variable. In fact, global varibles make code hardto read.
So this patch is to remove global variable usb_enabled and...
pseries: Don't allow duplicate registration of hcalls or RTAS calls
Currently the pseries machine code allows a callback to be registeredfor a hypercall number twice, as long as it's the same callback the secondtime. We don't test for duplicate registrations of RTAS callbacks at all...
target-ppc: Rework storage of VPA registration state
With PAPR guests, hypercalls allow registration of the Virtual ProcessorArea (VPA), SLB shadow and dispatch trace log (DTL), each of which allowfor certain communication between the guest and hypervisor. Currently, we...
pseries: Implement qemu initiated shutdowns using EPOW events
At present, using 'system_powerdown' from the monitor or otherwiseinstructing qemu to (cleanly) shut down a pseries guest will not work,because we did not have a method of signalling the shutdown request to the...
ac97: convert PIO to new memory api read/write
virtio-pci: convert PIO to new memory api read/write
hw/xtensa_sim: get rid of intermediate xtensa_sim_init
Remove xtensa_sim_init that only explodes machine init args, renamesim_init to xtensa_sim_init.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/xtensa_lx60: don't prematurely explode QEMUMachineInitArgs
Don't explode QEMUMachineInitArgs before passing it to lx_init.
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,...
Merge remote-tracking branch 'qemu-kvm/memory/urgent' into staging
Merge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20121017.0' into staging
serial: split serial.c
Split serial.c into serial.c, serial.h and serial-isa.c. While being atcreating a serial.h header file move the serial prototypes from pc.h tothe new serial.h. The latter leads to s/pc.h/serial.h/ in tons ofboards which just want the serial bits from pc.h...
serial: add pci variant
So we get a hot-pluggable 16550 uart.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
serial: add 2x + 4x pci variant
Add multiport serial card implementation, with two variants, onefeaturing two and one featuring four ports.
serial: add pci-serial documentation
usb-serial: don't magically zap chardev on umplug
usb-serial: only expose device in guest when the chardev is open
Merge remote-tracking branch 'quintela/migration-next-20121017' into staging
Merge remote-tracking branch 'qemu-kvm/memory/dma' into staging
dma: make dma access its own address space
Instead of accessing the cpu address space, use an address spaceconfigured by the caller.
Eventually all dma functionality will be folded into AddressSpace,but we have to start from something.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>...
pci: give each device its own address space
Accesses from different devices can resolve differently(depending on bridge settings, iommus, and PCI_COMMAND_MASTER), soset up an address space for each device.
Currently iommus are expressed outside the memory API, so this doesn't...
pci: honor PCI_COMMAND_MASTER
Currently we ignore PCI_COMMAND_MASTER completely: DMA succeeds even whenthe bit is clear.
Honor PCI_COMMAND_MASTER by inserting a memory region into the device'sbus master address space, and tying its enable status to PCI_COMMAND_MASTER....
memory: use AddressSpace for MemoryListener filtering
Using the AddressSpace type reduces confusion, as you can't accidentallysupply the MemoryRegion you're interested in.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Avi Kivity <avi@redhat.com>
hw/hw.h: Add include of qemu-log.h
Add an include of qemu-log.h to hw.h, so that device modelcode has access to these logging functions without the needto directly include qemu-log.h.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/pl181: Use LOG_UNIMP and LOG_GUEST_ERROR
Rather than a mix of direct printing to stderr and abortingvia hw_error(), use LOG_UNIMP and LOG_GUEST_ERROR.
hw/pl041: Use LOG_UNIMP
Use the new LOG_UNIMP tracing to report unimplementedfeatures.
hw/pl190: Use LOG_GUEST_ERROR
If the guest attempts an offset to a nonexistent register, justlog this via LOG_GUEST_ERROR rather than killing QEMU with a hw_error.
hw/pl011: Use LOG_UNIMP and LOG_GUEST_ERROR
Use the new LOG_UNIMP and LOG_GUEST_ERROR logging types ratherthan hw_error().
hw/pl022: Use LOG_UNIMP and LOG_GUEST_ERROR
Use LOG_UNIMP and LOG_GUEST_ERROR where appropriate ratherthan hw_error().
hw/pl031: Use LOG_GUEST_ERROR
Use LOG_GUEST_ERROR rather than hw_error or direct fprintf.
create struct for machine initialization arguments
This should help us to:- More easily add or remove machine initialization arguments without having to change every single machine init function;- More easily make mechanical changes involving the machine init...
vga: fix indention
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
vga: add mmio bar to standard vga
This patch adds a mmio bar to the qemu standard vga which allows toaccess the standard vga registers and bochs dispi interface registersvia mmio.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
vga: add specs for standard vga
vga: remove CONFIG_BOCHS_VBE
vfio-pci: Mark non-migratable
We haven't magically fixed this yet. Toss in a description too.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
vfio-pci: Fix debug build
Stray variable from before MSI-X rework
virtio-net: use qemu_get_buffer() in a temp buffer
qemu_fseek() is known to be wrong. Would be removed on the nextcommit. This code should never been used (value has beenMAC_TABLE_ENTRIES since 2009).
Signed-off-by: Juan Quintela <quintela@redhat.com>...
i440fx: avoid destroying memory regions within a transaction
Calling memory_region_destroy() within a transaction is illegal, sincethe memory API is allowed to continue to dispatch to a region until thetransaction commits. 440fx does that however when managing PAM registers....
vfio: drop no-op MemoryListener callbacks
Removes quite a bit of useless code.
Signed-off-by: Avi Kivity <avi@redhat.com>
xen_pt: drop no-op MemoryListener callbacks
vhost: use MemoryListener filtering to only monitor RAM address space
Instead of checking manually, let the listener filter for us. This preparesus for DMA address spaces.
xen_pt: use separate MemoryListeners for memory and I/O
Using an unfiltered memory listener will cause regions to be reportedfails multiple times if we have more than two address spaces. Use a separatelistener for memory and I/O, and utilize MemoryListener's address space...
sun4m: Pass SPARCCPU to cpu_set_irq()
Needed for changing cpu_kick_irq() argument type to SPARCCPU.
Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
sun4m: Pass SPARCCPU to cpu_kick_irq()
Needed for changing qemu_cpu_kick() argument type to CPUState.
sun4u: Pass SPARCCPU to {,s,hs}tick_irq() and cpu_timer_create()
sun4u: Pass SPARCCPU to cpu_kick_irq()
sun4u: Pass SPARCCPU to cpu_set_ivec_irq()
Needed for moving halted field to CPUState.
Merge remote-tracking branch 'pmaydell/arm-devs.for-upstream' into staging
Merge remote-tracking branch 'kraxel/usb.67' into staging
Merge remote-tracking branch 'awilliam/tags/vfio-pci-for-qemu-20121008.0' into staging
Merge remote-tracking branch 'stefanha/net' into staging
Merge remote-tracking branch 'spice/spice.v61' into staging
versatilepb: add gpio pl061 support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
zynq_slcr: Fixed ResetValues enum
There is a gap in the reset region of the address space at offset 0x208. Thisthrows out all these enum values by one when translating them to address offsets.Fixed by putting the corresponding gap in the enum as well....
arm_gic: Rename gic_state to GICState
Rename the gic_state struct to match QEMU's coding style conventionsfor structure names, since the impending KVM-for-ARM patches willcreate another subclass of it. This patch was created using: sed -i 's/gic_state/GICState/g' hw/arm_gic.c hw/arm_gic_common.c \...
hw/ds1338: Fix mishandling of register pointer
Correct several deficiencies in the handling of the register pointer: * it should wrap around after 0x3f, not 0xff * guard against the caller handing us an out of range pointer (on h/w this can never happen, because only a 7 bit value is...
hw/ds1338: Recapture current time when register pointer wraps around
The DS1338 datasheet documents that the current time is captured intothe secondary registers when the register pointer wraps round to zeroas well as at a START condition. Implement this....
hw/ds1338: Remove 'now' field from state struct
The 'struct tm now' field in the state structure is in fact onlyever used as a temporary (the actual RTC state is held in 'offset').Remove it from the state structure in favour of using local variablesto avoid confusion about whether it needs to be saved on migration....
hw/ds1338: Implement state save/restore
Implement state save/restore for the DS1338. This requiresthe usual minor adjustment of types in the state struct toget fixed-width ones with vmstate macros.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
cadence_ttc: Fix 'clear on read' behavior
A missing call to qemu_set_irq() when reading the IRQ registerrequired SW to write to the IRQ register to acknowledge aninterrupt. With this patch the behavior is fixed: - Reading the interrupt register clears it and updates the timers...
hw/arm_gic.c: Fix improper DPRINTF output.
s->cpu_enabled is an array, so s->cpu_enabled ? "En" : "Dis" returns"En" always. We should use s->cpu_enabled[cpu] here.
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
uhci: Raise interrupt when requested even for non active tds
According to the spec we must raise an interrupt when one is requestedeven for non active tds.
Linux depends on this, for bulk transfers it runs an inactivity timerto work around a bug in early uhci revisions, when we take longer then...
usb-redir: Change usbredir_open_chardev into usbredir_create_parser
As we need to create the parser at more places.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-redir: Don't make migration fail in none seamless case
Instead simple disconnect the device like host redirection does onmigration.
qdev: allow multiple qdev_init_gpio_in() calls
Allow multiple qdev_init_gpio_in() calls for the one device. The first call willdefine GPIOs 0-N-1, the next GPIOs N- ... . Allows different GPIOs to be handledwith different handlers. Needed when two levels of the QOM class heirachy both...
stellaris: Removed SSI mux
Removed the explicit SSI mux and wired the CS line directly up to the SSIdevices.
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>
hw: Added generic FIFO API.
Added a FIFO API that can be used to create and operate byte FIFOs.
m25p80: Initial implementation of SPI flash device
Added device model for m25p80 style SPI flash family.
xilinx_spi: Initial impl. of Xilinx SPI controller
Device model for xilinx XPS SPI controller (v2.0)
petalogix-ml605: added SPI controller with n25q128
Added SPI controller to the reference design, with two n25q128 spi-flashesconnected.
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>Acked-by: Peter Maydell <peter.maydell@linaro.org>
xilinx_spips: Xilinx Zynq SPI cntrlr device model
Added device model for the Xilinx Zynq SPI controller (SPIPS).
xilinx_zynq: Added SPI controllers + flashes
Added the two SPI controllers to the zynq machine model. Attached two SPI flashdevices to each controller.
ssi: Add slave autoconnect helper
Added helper function to automatically connect SPI slaves based on the QOM childnodes of a device. A SSI master device can call this routine to automaticallyhook-up all child nodes to its SPI bus.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
ssi: Support for multiple attached devices
Removed assertion that only one device is attached to the SSI bus.
When multiple devices are attached, all slaves have their transfer functioncalled for transfers. Each device is responsible for knowing whether or not its...
ssi: Implemented CS behaviour
Added default CS behaviour for SSI slaves. SSI devices can set a propertyto enable CS behaviour which will create a GPIO on the device which is theCS. Tristating of the bus on SSI transfers is implemented.
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com>...
ssi: Added create_slave_no_init()
Slave creation function that can be used to create an SSI slave withoutqdev_init() being called. This give machine models a chance to set properties.
vfio-pci: Clang cleanup
Blue Swirl reports that Clang doesn't like the structure we define toavoid dynamic allocation for a number of calls to VFIO_DEVICE_SET_IRQS.Adding an element after a variable sized type is a GNU extension.Switch back to dynamic allocation, which really isn't a problem since...
vfio-pci: Fix BAR->VFIODevice translation in
DO_UPCAST is supposed to translate from the first member of a struct tothat struct, not from arbitrary ones. And it (usually) breaks the buildwhen neglecting this rule. Use container_of to fix the build breakage...
vfio-pci: Roll the header into the .c file
It's only ~100 lines and nobody else should be using this.Suggested by Michael Tsirkin.
vfio-pci: Don't peak at msi_supported
Let the init function fail, just don't warn for -ENOTSUP.
vfio-pci: Use uintptr_t for void* cast
We don't seem to run into any sign extension problems, butunsigned looks more correct.
Signed-off-by: Alex williamson <alex.williamson@redhat.com>
vfio-pci: Remove setting of MSI qsize
This was a misinterpretation of the spec, hardware doesn't get tospecify how many were actually enabled through this field.
vfio-pci: Extend reset
Take what we've learned from pci-assign and apply it to vfio-pci.On reset, disable previous interrupt config, perform a devicereset if available, re-enable INTx, and disable memory regions onthe device to prevent continuing DMA....
vfio-pci: Cleanup on INTx setup failure
Missing some unwind code.
vfio-pci: Rework MSIX setup/teardown
We try to do lazy initialization of MSIX since we don't actually needto setup anything until MSIX vectors start getting used. This leadsto problems if MSIX is enabled, but never used (we can end up tryingto re-enable INTx while it's still enabled). We also run into...
vfio-pci: No spurious MSIs
FreeBSD doesn't like these spurious MSIs, remove them as they'remostly paranoia anyway.