openpic: make register names correspond better with hw docs
The base openpic specification doesn't provide abbreviated registernames, so it's somewhat understandable that the QEMU code made upits own, except that most of the names that QEMU used didn't correspond...
openpic: rework critical interrupt support
Critical interrupts on FSL MPIC are not supposed to payattention to priority, IACK, EOI, etc. On the currently modeledversion it's not supposed to pay attention to the mask bit either.
Also reorganize to make it easier to implement newer FSL MPIC models,...
openpic: s/opp->nb_irqs 1/opp>nb_cpus - 1/
"opp->nb_irqs-1" would have been a minor coding style error,but putting in one space but not the other makes it lookconfusingly like a numeric literal "-1".
Signed-off-by: Scott Wood <scottwood@freescale.com>...
openpic: don't crash on a register access without a CPU context
If we access a register via the QEMU memory inspection commands (e.g."xp") rather than from guest code, we won't have a CPU context.Gracefully fail to access the register in that case, rather than...
openpic: fix coding style issues
This patch fixes the following coding style violations:
- structs have to be typedef and be CamelCase - if()s are always surrounded by curly braces
Signed-off-by: Alexander Graf <agraf@suse.de>
PPC: Reset qemu timers when guest reset
This patch install the timer reset handler. This will be called whenthe guest is reset.
Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>[agraf: adjust for QOM'ification]Signed-off-by: Alexander Graf <agraf@suse.de>
openpic: fix debug prints
Fix various format errors when debug prints are enabled. Alsocause error checking to happen even when debug prints are notenabled, and consistently use 0x for hex output.
Signed-off-by: Scott Wood <scottwood@freescale.com>[agraf: adjust for more recent code base, prettify DPRINTF macro]...
openpic: lower interrupt when reading the MSI register
This will stop things from breaking once it's properly treated as alevel-triggered interrupt. Note that it's the MPIC's MSI cascadeinterrupts that are level-triggered; the individual MSIs areedge-triggered....
openpic: symbolicize some magic numbers
Deefine symbolic names for some register bits, and use some thathave already been defined.
Also convert some register values from hex to decimal when it improvesreadability.
IPVP_PRIORITY_MASK is corrected from (0x1F << 16) to (0xF << 16), in...
openpic: remove pcsr (CPU sensitivity register)
I could not find this register in any spec (FSL, IBM, or OpenPIC)and the code doesn't do anything with it but initialize, save,or restore it.
Signed-off-by: Scott Wood <scottwood@freescale.com>Signed-off-by: Alexander Graf <agraf@suse.de>
openpic: support large vectors on FSL mpic
Previously only the spurious vector was sized appropriatelyto the openpic model.
Also, instances of "IPVP_VECTOR(opp->spve)" were replace withjust "opp->spve", as opp->spve is already just a vector and notan IVPR....
openpic: BRR1 is not a CPU-specific register.
It's in the address range that normally contains a magic redirectionto the CPU-specific region of the curretn CPU, but it isn't actuallya per-CPU register. On real hardware BRR1 shows up only at 0x40000,not at 0x60000 or other non-magic per-CPU areas. Plus, this makes...
Revert "virtio-pci: replace byte swap hack"
This reverts commit 9807caccd605d09a72495637959568d690e10175.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
virtio-pci: replace byte swap hack
Remove byte swaps by declaring the config spaceas native endian.
hw/i386: Fix broken build for non POSIX hosts
pc-testdev.c cannot be compiled with MinGW (and other non POSIX hosts):
CC i386-softmmu/hw/i386/../pc-testdev.oqemu/hw/i386/../pc-testdev.c:38:22: warning: sys/mman.h: file not foundqemu/hw/i386/../pc-testdev.c: In function ‘test_flush_page’:...
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Merge remote-tracking branch 'kraxel/testdev.1' into staging
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/mcf5206: Reduce size of lookup table
This typically reduces the size from 512 bytes to 128 bytes.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
pc_sysfw: Check for qemu_find_file() failure
pc_fw_add_pflash_drv() ignores qemu_find_file() failure, and happilycreates a drive without a medium.
When pc_system_flash_init() asks for its size, bdrv_getlength() failswith -ENOMEDIUM, which isn't checked either. It fails relatively...
pseries: Remove unneeded include statement (fixes MinGW builds)
sys/mman.h is not needed (tested on Linux) and unavailable for MinGW,so remove it.
pc: remove bochs bios debug ports
Prehistoric leftover, zap it. We poweroff via acpi these days.
And having a port (0x501,0x502) where any random guest write will makeqemu exit -- with no way to turn it off -- is a bad joke anyway.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw: Add test device for unittests execution
Add a test device which supports the kvmctl ioports,so one can run the KVM unittest suite.
Intended Usage:
qemu-system-x86_64 -nographic \ -device pc-testdev \ -device isa-debug-exit,iobase=0xf4,iosize=0x04 \...
switch debugcon to memory api
Also some QOM glue while being at it.
add isa-debug-exit device.
When present it makes qemu exit on any write.Mapped to port 0x501 by default.
Without this patch Anthony doesn't allow me toremove the bochs bios debug ports because histest suite uses this.
acpi: autoload dsdt
apci: assign memory regions to piix4 acpi device
Get rid of get_system_io() usage.
apci: assign memory regions to ich9 lpc device
dataplane: use linux-headers/ for virtio includes
The hw/dataplane/vring.c code includes linux/virtio_ring.h. Ensure thatwe use linux-headers/ instead of the system-wide headers, which may beout-of-date on older distros.
This resolves the following build error on Debian 6:...
Merge remote-tracking branch 'stefanha/block' into staging
virtio-blk: Return UNSUPP for unknown request types
Currently, all unknown requests are treated as VIRTIO_BLK_T_IN
Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
virtio-blk: add x-data-plane=on|off performance feature
The virtio-blk-data-plane feature is easy to integrate intohw/virtio-blk.c. The data plane can be started and stopped similar tovhost-net.
Users can take advantage of the virtio-blk-data-plane feature using the...
dataplane: add virtio-blk data plane code
virtio-blk-data-plane is a subset implementation of virtio-blk. It onlyhandles read, write, and flush requests. It does this using a dedicatedthread that executes an epoll(2)-based event loop and processes I/O...
virtio-blk: restore VirtIOBlkConf->config_wce flag
Two slightly different versions of a patch to conditionally setVIRTIO_BLK_F_CONFIG_WCE through the "config-wce" qdev property have beenapplied (ea776abca and eec7f96c2). David Gibson<david@gibson.dropbear.id.au> noticed that the "config-wce"...
dataplane: add Linux AIO request queue
The IOQueue has a pool of iocb structs and a function to add newread/write requests. Multiple requests can be added before calling thesubmit function to actually tell the host kernel to begin I/O. Thisallows callers to batch requests and submit them in one go....
dataplane: add event loop
Outside the safety of the global mutex we need to poll on filedescriptors. I found epoll(2) is a convenient way to do that, althoughother options could replace this module in the future (such as anAioContext-based loop or glib's GMainLoop)....
dataplane: add virtqueue vring code
The virtio-blk-data-plane cannot access memory using the usual QEMUfunctions since it executes outside the global mutex and the memory APIsare this time are not thread-safe.
This patch introduces a virtqueue module based on the kernel's vhost...
dataplane: add host memory mapping code
The data plane thread needs to map guest physical addresses to hostpointers. Normally this is done with cpu_physical_memory_map() but thefunction assumes the global mutex is held. The data plane thread doesnot touch the global mutex and therefore needs a thread-safe memory...
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
pci,virtio
This optimizes MSIX handling in virtio-pci.Also included is pci express capability bugfix.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
pflash_cfi01: Suppress warning when Linux probes for AMD flash
There are several ARM and MIPS boards which are manufactured witheither Intel (pflash_cfi01.c) or AMD (pflash_cfi02.c) flash memory.
The Linux kernel supports both and first probes for AMD flash which...
usb/redirect.c: unbreak compilation due to include/char/char.h
Broken since:
commit 927d4878b0ff319ed87fed9363f314613b0a5ed9Author: Paolo Bonzini <pbonzini@redhat.com>Date: Mon Dec 17 18:20:05 2012 +0100
softmmu: move remaining include files to include/ subdirectories...
Merge branch 'qom-cpu' of git://repo.or.cz/qemu/afaerber
msix: expose access to masked/pending state
For use by poll handler.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
virtio-pci: don't poll masked vectors
At the moment, when irqfd is in use but a vector is masked,qemu will poll it and handle vector masks in userspace.Since almost no one ever looks at the pending bits,it is better to defer this until pending bitsare actually read....
pcie: Fix bug in pcie_ext_cap_set_next
Upper 16 bits of the PCIe Extended Capability Header was truncated during update,also breaking pcie_add_capability.
Signed-off-by: Knut Omang <knut.omang@oracle.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
msi: add API to get notified about pending bit poll
Update all users.
qemu-kvm/pci-assign: 64 bits bar emulation
Enable 64 bits bar emulation.
Test pass with the current seabios which already support 64bit pci bars.
Signed-off-by: Xudong Hao <xudong.hao@intel.com>Reviewed-by: Alex Williamson <alex.williamson@redhat.com>...
tmp105: Create API for TMP105 temperature sensor.
Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Alex Horn <alex.horn@cs.ox.ac.uk>...
Merge branch 'master' of git://git.qemu.org/qemu into qom-cpu
Adapt header include paths.
Signed-off-by: Andreas Färber <afaerber@suse.de>
virtio: make bindings typesafe
Move bindings from opaque to DeviceState.This gives us better type safety with no performance cost.Add macros to make future QOM work easier.
Merge remote-tracking branch 'bonzini/header-dirs' into staging
ppc_booke: Pass PowerPCCPU to {decr,fit,wdt} timer callbacks
Cleans up after passing PowerPCCPU to booke_update_irq().
ppc4xx_devs: Return PowerPCCPU from ppc4xx_init()
Prepares for passing PowerPCCPU to ppc_booke_timers_init().
ppc_booke: Pass PowerPCCPU to ppc_booke_timers_init()
Cleans up after passing PowerPCCPU to timer callbacks.
qdev: Coding style fixes
Add missing braces and break lines larger than 80 chars.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
qdev-properties.c: Separate core from the code used only by qemu-system-*
This separates the qdev properties code in two parts: - qdev-properties.c, that contains most of the qdev properties code; - qdev-properties-system.c for code specific for qemu-system-*,...
kvm: Pass CPUState to kvm_vcpu_ioctl()
Adapt helper functions to pass X86CPU / PowerPCCPU / S390CPU.
ppc: Pass PowerPCCPU to ppc_set_irq()
Adapt static caller functions.
This cleans up after passing PowerPCCPU to kvmppc_set_interrupt().
ppc: Pass PowerPCCPU to [h]decr callbacks
Cleans up after passing PowerPCCPU to ppc_set_irq().
ppc: Pass PowerPCCPU to [h]decr timer callbacks
Cleans up after passing PowerPCCPU to [h]decr exception callbacks.
softmmu: move remaining include files to include/ subdirectories
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw: move executable format header files to hw/
Or delete a.out.h which is unused.
softmmu: move include files to include/sysemu/
misc: move include files to include/qemu/
monitor: move include files to include/monitor/
migration: move include files to include/migration/
qom: move include files to include/qom/
janitor: add guards to headers
qapi: move include files to include/qobject/
block: move include files to include/block/
exec: move include files to include/exec/
ui: move files to ui/ and include/ui/
net: reorganize headers
Move public headers to include/net, and leave private headers in net/.Put the virtio headers in include/net/tap.h, removing the multiple copiesthat existed. Leave include/net/tap.h as the interface for NICs, andnet/tap_int.h as the interface for OS-specific parts of the tap backend....
janitor: do not include qemu-char everywhere
Touching char/char.h basically causes the whole of QEMU tobe rebuilt. Avoid this, it is usually unnecessary.
net: move Bluetooth stuff out of net.h
net: do not include net.h everywhere
janitor: do not rely on indirect inclusions of or from qemu-char.h
Various header files rely on qemu-char.h including qemu-config.h ormain-loop.h, but they really do not need qemu-char.h at all (particularlyinteresting is the case of the block layer!). Clean this up, and also...
build: move rules from Makefile to */Makefile.objs
build: kill libdis, move disassemblers to disas/
alpha: Pass AlphaCPU array to Typhoon
Also store it in TyphoonCchip.
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Richard Henderson <rth@twiddle.net>
target-alpha: Avoid leaking the alarm timer over reset
Move the timer from CPUAlphaState to AlphaCPU to avoid the pointer beingzero'ed once we implement reset. Would cause a segfault insys_helper.c:helper_set_alarm().
This also simplifies timer initialization in Typhoon....
Merge remote-tracking branch 'amit/master' into staging
Merge remote-tracking branch 'spice/spice.v66' into staging
vmmouse_reset(): remove minimal code duplication
Commit 069ab0eb added a vmmouse_disable() call to vmmouse_reset().vmmouse_disable() resets the status already.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
arm_gic: Add cpu nr to Raised IRQ message
Add the relevant CPU nr to this debug message to make IRQ debugging moreinformative.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
pflash_cfi01: qemu_log_mask "unimplemented" msg
This printf is informing the user of unimplemented functionality. It should bere-directed to qemu_log(LOG_UNIMP, ...) accordingly.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
pflash_cfi0x: Send debug messages to stderr
These debug info messages should go to stderr rather than stdout.
zynq_slcr: Compile time warning fixes.
Few warnings when compiled with debug printfs enabled. Fixed all.
virtio-serial-bus: assert port is non-null in remove_port()
remove_port() is called from qdev's unplug callback, and we're certainthe port will be found in our list of ports. Adding an assert()documents this.
This was flagged by Coverity, fix suggested by Markus....
virtio-serial-bus: send_control_msg() should not deal with cpkts
Stuff the cpkt before calling send_control_msg(). This function shouldnot be concerned about contents of the buffer it receives.
A few code refactorings recently have made making this change easier...
Merge commit '1dd3a74d2ee2d873cde0b390b536e45420b3fe05' into HEAD
qxl: save qemu_create_displaysurface_from result
Spotted by Coverity.
https://bugzilla.redhat.com/show_bug.cgi?id=885644
Cc: qemu-stable@nongnu.orgReported-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Fix compile errors when enabling Xen debug logging.
Signed-off-by: Sander Eikelenboom <linux@eikelenboom.it>Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen: fix trivial PCI passthrough MSI-X bug
We are currently passing entry->data as address parameter. Passentry->addr instead.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Tested-by: Sander Eikelenboom <linux@eikelenboom.it>Xen-devel: http://marc.info/?l=xen-devel&m=135515462613715
xen: implement support for secondary consoles in the console backend
This patch corresponds to commit840184a106bc24e745beda5c77e392f6cecd2bc9 fromgit://xenbits.xensource.com/qemu-xen-unstable.git.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
pci_bus: update comment
Don't ask everyone to desist from including this header,simply recommend using accessors.
pci_bus.h: tweak include guards
Now that header has been renamed, tweak include guardsto match.
Revert "pci: prepare makefiles for pci code reorganization"
This reverts commit 475d67c3bcd6ba9fef917b6e59d96ae69eb1a9b4.
Now that all users have been updated, we don't need themakefile hack or the softlink anymore.
pci: rename pci_internals.h pci_bus.h
There are lots of external users of pci_internals.h,apparently making it an internal interface only didn'twork out. Let's stop pretending it's an internal header.