milkymist-uart: fix receive buffering
Inform qemu-char when more input data can be received.
Signed-off-by: Michael Walle <michael@walle.cc>
lm32_uart: fix receive buffering
spice: stop using DisplayState
Rework DisplayStateListener callbacks to not use the DisplayStateany more.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
console: zap displaystate from dcl callbacks
Now that nobody depends on DisplayState in DisplayChangeListenercallbacks any more we can remove the parameter from all callbacks.
console: stop using DisplayState in gfx hardware emulation
Use QemuConsole instead. Updates interfaces in console.[ch] and adaptsgfx hardware emulation code.
console: fix displaychangelisteners interface
Split callbacks into separate Ops struct. Pass DisplayChangeListenerpointer as first argument to all callbacks. Uninline a bunch ofdisplay functions and move them from console.h to console.c
qxl: zap qxl0 global
DisplayChangeListener is passed now to all DisplayChangeListenerOpscallbacks, so we can use that to access the qxl state and kill theqxl0 global variable.
qxl: better vga init in enter_vga_mode
Ask the vga core to update the display. Will trigger dpy_gfx_resizeif needed. More complete than just calling dpy_gfx_resize.
console: rework DisplaySurface handling [vga emu side]
Decouple DisplaySurface allocation & deallocation from DisplayState.Replace dpy_gfx_resize + dpy_gfx_setdata with a dpy_gfx_replace_surfacefunction.
This handles the graphic hardware emulation.
console: rework DisplaySurface handling [dcl/ui side]
Replace the dpy_gfx_resize and dpy_gfx_setdata DisplayChangeListenercallbacks with a dpy_gfx_switch callback which notifies the ui codewhen the framebuffer backing storage changes.
xilinx_spips: Fix bus setup conditional check
The R_LQPSI_CFG register has the LQSPI_CFG_SEP_BUS and LQSPI_CFG_TWO_MEM bits.
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Message-id: d76c8e364c80a42352ae4f0661aff2cd17ad32a4.1362373359.git.peter.crosthwaite@xilinx.com...
xilinx_spips: Add missing dual-bus snoop commands
Added additional commands to the switch to check for when snooping commands indual bus mode setups. Cleaned up code to use an enum.
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
xilinx_spips: QOM styling fixes
Few fixes for the latest QOM styling guides.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Message-id: de9daeee6c142e8b57ad042fd680cedcdc94d2fc.1362373359.git.peter.crosthwaite@xilinx.comSigned-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/vexpress: Set reset values for daughterboard oscillators
Set the reset values for the VExpress daughterboard oscillatorsvia the new sysctl properties.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
pl330: Initial version
Device model for Primecell PL330 DMA controller.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru>Tested-by: Igor Mitsyanko <i.mitsyanko@samsung.com>Reviewed-by: Igor Mitsyanko <i.mitsyanko@samsung.com>...
xilinx_zynq: added pl330 to machine model
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Message-id: 5bc295bd2aa50dfe573f428574dbd7d8add7b3f8.1361853677.git.peter.crosthwaite@xilinx.com...
xilinx_spips: Set unused IRQs to NULL
Unused CS lines should init to 0 to avoid segfaulting when accessing anunattached QSPI controller.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Message-id: c1e45198032106e69e8fe9339fc2e6348d524fcd.1362373359.git.peter.crosthwaite@xilinx.com...
qdev: Implement (variable length) array properties
Add support for declaring array properties for qdev devices.These work by defining an initial static property 'len-arrayname'which the user of the device should set to the desired sizeof the array. When this property is set, memory is allocated...
hw/arm_sysctl: Implement SYS_CFG_VOLT
Implement the SYS_CFG_VOLT registers which return the voltageof various supplies on motherboard and daughterboard. SinceQEMU implements a perfectly stable power supply these registersalways return a constant value. The number and value of the...
hw/vexpress: Pass voltage sensor properties to sysctl device
Pass voltage sensor properties to the sysctl device. Sincethese are daughterboard specific, we specify them via theVEDBoardInfo structure.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
hw/arm_sysctl: Implement SYS_CFG_OSC function
Implement the SYS_CFG_OSC function. Since the idea ofprogrammable clock rates doesn't make much sense for QEMU,we simply allow the clock rate to be read back as written.The number and value of the daughterboard oscillators varies...
hw/vexpress: Pass proc_id via VEDBoardInfo
Pass the daughterboard-specific proc_id property to the code thatcreates the sysctl device via the VEDBoardInfo struct, rather thanby having the daughterboard init function write to a uint32_t*argument. This is a cleaner way to pass the info around, and...
hw/arm_sysctl: Handle SYS_CFGCTRL in a more structured way
The SYS_CFGCTRL register consists of separate fieldsfor DCC, function, site, position and device, as wellas a read/write bit. Refactor the code handling SYS_CFGCTRLwrites to make it easier to add support for functions...
hw/arm_sysctl: Implement SYS_CFG_MUXFPGA writes as a no-op
SYS_CFG_MUXFPGA allows the guest to select whether thevideo output should come from the motherboard's LCDcontroller or the daughterboard's one. Since QEMU doesn'tcurrently support selecting the video output like this,...
hw/arm_sysctl: Implement SYS_CFG_DVIMODE as a no-op
SYS_CFG_DVIMODE allows the guest to select whether theoutput DVI signal is VGA, SVGA, XGA, SGA or UXGA. Sincethis makes no difference to QEMU, implement writes as ano-op so Linux doesn't complain.
hw/arm_sysctl: Convert from qdev init to instance_init
Convert this device from old-style qdev init to an instance_initfunction. We don't need a realize function yet, though.
Merge remote-tracking branch 'stefanha/block' into staging
Merge remote-tracking branch 'cohuck/virtio-ccw-upstr' into staging
dataplane: fix hang introduced by AioContext transition
The bug is that the EventNotifiers do have a NULL io_flush callback.Because none of the callbacks on the dataplane AioContext have such acallback, aio_poll will simply do nothing. Fixed by adding the callbacks:...
block: Add options QDict to bdrv_open() prototype
It doesn't do anything yet except storing the options QDict in theBlockDriverState.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Eric Blake <eblake@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>...
virtio-ccw: remove qdev_unparent in unplug routing
This patch fixes unplugging a virtio-ccw device. We nolonger need to do that in virtio-ccw since common code does nowproper handling.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>...
virtio-ccw: Wire up virtio-rng.
Make virtio-rng devices available for s390-ccw-virtio machines.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
cpu: Move halted and interrupt_request fields to CPUState
Both fields are used in VMState, thus need to be moved together.Explicitly zero them on reset since they were located beforebreakpoints.
Pass PowerPCCPU to kvmppc_handle_halt().
Signed-off-by: Andreas Färber <afaerber@suse.de>
exec: Pass CPUState to cpu_reset_interrupt()
Move it to qom/cpu.c to avoid build failures depending on include orderof cpu-qom.h and exec/cpu-all.h.
Change opaques of various ..._irq_handler() functions to theappropriate CPU type to facilitate using cpu_reset_interrupt()....
cpu: Pass CPUState to cpu_interrupt()
Move it to qom/cpu.h to avoid issues with include order.
Change pc_acpi_smi_interrupt() opaque to X86CPU.
target-sh4: Move PVR/PRR/CVR into SuperHCPUClass
They are never changed once initialized, and moving them to the classwill allow to inspect them before instantiating.
arm: fix compilation with CONFIG_FDT
A conflict was resolved the wrong way when merging commit 320ba5f (build:always link device_tree.o into emulators if libfdt available, 2013-02-05).This causes a build failure for the arm-softmmu target due to multiply...
Merge remote-tracking branch 'origin/master' into staging
Merge remote-tracking branch 'bonzini/hw-dirs' into staging
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Merge remote-tracking branch 'bonzini/scsi-next' into staging
baum: fix build
08744c98115cfa144ed3493556024e400b2e2573 removed hw/baum.hbut did not adjust hw/baum.c, breaking build. Fix.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>Message-id: c50406bda98f8b277e8b9004a0012fa5e5c124d0.1362822910.git.blauwirbel@gmail.com...
Merge branch 's390-for-upstream' of git://github.com/agraf/qemu
Merge branch 'ppc-for-upstream' of git://github.com/agraf/qemu
Allow virtio-net features for legacy s390 virtio bus
Enable all virtio-net features for the legacy s390 virtio bus. This also fixeskernel BUG at /usr/src/packages/BUILD/kernel-default-3.0.58/linux-3.0/drivers/s390/kvm/kvm_virtio.c:121!
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>...
s390/css: Fix subchannel detection
We have to consider the m bit to find the real channel subsystem whendetermining the last subchannel.
If we fail to take this into account, removal of a subchannel inthe middle of a big list of devices will stop device detection after...
s390/virtio-ccw: remove redundant call to blockdev_mark_auto_del
blockdev_mark_auto_del is already called in virtio-blk-exit.Remove the redundant call.
PPC: Fix dma interrupt
In openbios (drivers/ide.c) they are set to
0000000d 00000000 00000002 000000000000000e 00000000 00000003 000000000000000f 00000000 00000004 00000000(The last one seems to be not implemented in qemu)
It follows convention of how they are set on real machines,...
PPC: xnu kernel expects FLUSH to be cleared on STOP
otherwise it gets stuck in a loopso clear it when unsetting run when flush is set
voidIODBDMAStop( volatile IODBDMAChannelRegisters *registers) {
IOSetDBDMAChannelControl( registers, IOClearDBDMAChannelControlBits( kdbdmaRun )...
pseries: Add compatible property to root of device tree
Currently, for the pseries machine the device tree supplied by qemu to SLOFand from there to the guest does not include a 'compatible property' at theroot level. Usually that works fine, since in this case the compatible...
pseries: Implement h_read hcall
This h_call is useful for DLPAR in future amongst other things. Given an indexit fetches the corresponding PTE stored in the htab.
Signed-off-by: Erlon Cruz <erlon.cruz@br.flextronics.com>Acked-by: David Gibson <david@gibson.dropbear.id.au>...
Save memory allocation in the elf loader
The current elf loader uses too much memory. For example, I have aexecutable with a bss section of 400 MB and I set the ram size to 512MB. Qemu uses about 780MB of RAM (which is fine), but there's a peak at1.6 GB during initialization (this is not fine)....
pseries: Add cleanup hook for PAPR virtual LAN device
Currently the spapr-vlan device does not supply a cleanup call for itsNetClientInfo structure. With current qemu versions, that leads to a SEGVon exit, when net_cleanup() attempts to call the cleanup handlers on all...
serial: add flow control to transmit
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Amit Shah <amit.shah@redhat.com>Message-id: 2976f10d4e66ed4a34011f6f0d6937026d22be5f.1362505276.git.amit.shah@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio: console: add flow control
The virtio-serial-bus already has the logic to make flow control workproperly. Hook into the char layer's new ability to signal a backend iswritable again.
Signed-off-by: Amit Shah <amit.shah@redhat.com>Message-id: abffa02235d55ca6e2489068c58971c8897e976c.1362505276.git.amit.shah@redhat.com...
virtio-serial: make flow control explicit in virtio-console
virtio-console.c used to return a value less than the number of bytesasked to be written out to a chardev backend in case the backend is notwritable. virtio-serial-bus.c then implicitly enabled flow control for...
qemu-char: move baum registration to baum.c
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Amit Shah <amit.shah@redhat.com>Message-id: 1b24baa1ec3a174d5cad31e079d829904b53077b.1362505276.git.amit.shah@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu-char: move msmouse registeration to msmouse.c
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Amit Shah <amit.shah@redhat.com>Message-id: b47d1153b0d7669743c9a6bb98ce30f4cf7f876b.1362505276.git.amit.shah@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci_host: Drop write-only address_space field
The address_space field of PCIHostState was only ever written, never used.Drop it completely.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
lm32: remove unused function
The milkymist-minimac device in fact does not exist at all.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Acked-by: Michael Walle <michael@walle.cc>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/nand.c: correct the sense of the BUSY/READY status bit
The BIT6 of Status Register(SR):
SR6 behaves the same as R/B# pin SR6 = 0 indicates the device is busy; SR6 = 1 means the device is ready
Some NAND flash controller (i.e. ftnandc021) relies on the SR6...
scsi: do not call scsi_read_data/scsi_write_data for a canceled request
Cc: qemu-stable@nongnu.orgSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>
scsi-disk: do not complete canceled UNMAP requests
Canceled requests should never be completed, and doing that could causeaccesses to a NULL hba_private field.
Cc: qemu-stable@nongnu.orgReported-by: Stefan Priebe <s.priebe@profihost.ag>Tested-by: Stefan Priebe <s.priebe@profihost.ag>...
scsi-disk: handle io_canceled uniformly and correctly
Always check it immediately after calling bdrv_acct_done, andalways do a "goto done" in case the "done" label has to freesome memory---as is the case for scsi_unmap_complete in theprevious patch.
This patch could fix problems that happen when a request is...
hw/kvm/arm_gic: Implement support for KVM in-kernel ARM GIC
Implement support for using the KVM in-kernel GIC for ARM.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Andreas Färber <afaerber@suse.de>
hw/arm_gic: Convert ARM GIC classes to use init/realize
Convert the ARM GIC classes to use init/realize rather thanSysBusDevice::init. (We have to do them all in one patch toavoid unconverted subclasses calling a nonexistent SysBusDeviceinit function in the base class and crashing.)...
hw/arm_gic: Add presave/postload hooks
Add presave/postload hooks to the ARM GIC common base class.These will be used by the KVM in-kernel GIC subclass to syncstate between kernel and userspace when migrating.
ARM: KVM: Add support for KVM on ARM architecture
Add basic support for KVM on ARM architecture.
Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu>[PMM: Minor tweaks and code cleanup, switch to ONE_REG]Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
virtio,vhost,pci,e1000
Mostly bugfixes, but also some ICH work by Laszlo.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Merge remote-tracking branch 'stefanha/net' into staging
dataplane: remove EventPoll in favor of AioContext
During the review of the dataplane code, the EventPoll API morphed itself(not concidentially) into something very very similar to an AioContext.Thus, it is trivial to convert virtio-blk-dataplane to use AioContext,...
ide/macio: Fix macio DMA initialisation.
Commit 07a7484e5d713f1eb7c1c37b18a8ab0d56d88875 accidentally introduced a bugin the initialisation of the second macio DMA device which could cause someDMA operations to segfault QEMU.
CC: Andreas Färber <afaerber@suse.de>...
virtio-blk: fix unplug + virsh reboot
virtio-blk registers a vmstate change handler. Unfortunately thishandler is not unregistered on unplug, leading to some randomcrashes if the system is restarted, e.g. via virsh reboot.Lets unregister the vmstate change handler if the device is removed....
sh: move files referencing CPU to hw/sh4/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
build: always link device_tree.o into emulators if libfdt available
ppc: express FDT dependency of pSeries and e500 boards via default-configs/
hw: move boards and other isolated files to hw/ARCH
arm: move files referencing CPU to hw/arm/
i386: move files referencing CPU to hw/i386/
m68k: move files referencing CPU to hw/m68k/
ppc: move files referencing CPU to hw/ppc/
ppc: move more files to hw/ppc
These sPAPR files do not implement devices, move them over.Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw: include hw header files with full paths
Done with this script:
cd hwfor i in `find . -name '*.h' | sed 's/^..//'`; do echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'done | sed -i -f - `find . -type f`
This is so that paths remain valid as files are moved....
virtio-9p: use CONFIG_VIRTFS, not CONFIG_LINUX
virtio-9p: remove PCI dependencies from hw/9pfs/
Also move the 9p.h file to 9pfs/virtio-9p-device.h, for consistencywith the corresponding .c file.
vt82c686: vt82c686 is not a PCI host bridge
ppc: do not use ../ in include files
This simplifies the scripted execution of the next patch.
hw: move device-hotplug.o to toplevel, compile it once
The situation with device-hotplug.c is similar to qdev-monitor.c.Add a stub for pci_drive_hot_add, so that it can be compiled once,and move it out of hw/.
hw: move qdev-monitor.o to toplevel directory
qdev-monitor.c is the only "core qdev" file that is not used inuser-mode emulation, and it does not define anything that is usedby hardware models. Remove it from the hw/ directory andremove hw/qdev-monitor.h from hw/qdev.h too; this requires...
hw: move fifo.[ch] to libqemuutil
fifo.c is generic code that can be easily unit tested. So itbelongs in libqemuutil.
hw: move char backends to backends/
Braille and msmouse support is in hw/, but it is not hardware.Move it to the backends/ directory.
m25p80.c: Use QOM classes for part differentiation
Currently, M25P80 uses an object property to differentiate between flash parts.Changed this over to use QOM sub-classes - the actual names of the different partsare used to create a set of dynamic classes which passes the part info as class...
cadence_gem: Flush queued packets
The device needs to check for queued RX packets when the RX path is re-enabled.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Message-id: 1fa8c88a3b7c654886d0a7484c2463cd4c2a2781.1360901435.git.peter.crosthwaite@xilinx.com...
cadence_gem: factor out can_rx() logic replication
The gem_receive() function replicates the logic for whether or not the devicecan rx. Just call the actual gem_can_receive() function in place.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
cadence_gem: fix interrupt events
Bits in the ISR were continually mirroring their corresponding TX/RX SR bits.This is incorrect. The ISR bits are only ever set at the time theircorresponding event occurs.
cadence_gem: Don't reset rx desc pointer on rx_en
This doesn't happen in the real hardware. The Zynq TRM explicitly states thatthis bit has no effect on the rx descriptor pointer ("The receive queuepointer register is unaffected").
cadence_gem: Add debug msgs for rx desc movement
Add some helpful messages that show the rx descriptor pointer moving as packetsare rxed.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Message-id: 1ef2eb34dade64d589a69a2bcfd5aaddb7d50164.1360901435.git.peter.crosthwaite@xilinx.com...
xilinx_zynq: Added SD controllers
The Xilinx Zynq device has two SDHCI controllers. Added to the machine model.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/sdhci: introduce standard SD host controller
Device model for standard SD Host Controller Interface (SDHCI) compliant withversion 2.00 of SD association specification.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com>...