trace-events: Rename 'next' argument
'next' is a systemtap keyword, so it's a bad idea to use it as anargument name.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tracetool: Forbid argument name 'next'
It has happened more than once that patches that look perfectly saneand work with simpletrace broke systemtap because they use 'next' as anargument name for a tracing function. However, 'next' is a keyword forsystemtap, so we shouldn't use it....
qcow2: Remove unused parameter in get_cluster_table()
Since everything goes through the cache, callers don't use the L2 tableoffset any more.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
qemu-io: add option to enable tracing
It can be useful to enable QEMU tracing when trying out block layerinterfaces via qemu-io. Tracing can be enabled using the new -T FILEoption where the given file contains a list of trace events to enable(just like the qemu --trace events=FILE option)....
block: push recursive flushing up from drivers
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
aio: move BlockDriverAIOCB to qemu-aio.h
And remove several block_int.h inclusions that should not be there.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ide: IDENTIFY word 86 bit 14 is reserved
Reserved bits should be cleared to zero.
ide: Add "model=s" qdev option
Allow the user to override the default disk model name "QEMU HARDDISK".
Some Linux distributions use the /dev/disk/by-id/scsi-SATA_name-of-disk-model_serial addressing scheme when refering to partitions in /etc/fstaband elsewhere. This causes problems when starting a disk image taken from...
Merge branch 's390-for-upstream' of git://repo.or.cz/qemu/agraf
Improve interrupt handling priority
The vector interrupt has higher priority than interrupt_level_n.Also check only interrupt_level_n concurency when TL > 0, the traps ofother types may be nested.
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix vector interrupt handling
Don't produce stray irq 5, don't overwrite ivec_data if still busy withprocessing of the previous interrupt.
target-s390x: Update s390x_{tod,cpu}_timer() to use S390CPU
In place of CPUS390XState pass S390CPU as opaque from the new initfn.cpu_interrupt() is anticipated to take a CPUState in the future.
Signed-off-by: Andreas Färber <afaerber@suse.de>Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
target-s390x: QOM'ify CPU init
Move code from cpu_s390x_init() into an initfn.
target-s390x: QOM'ify CPU reset
Move code from cpu_state_reset() to s390_cpu_reset().
target-s390x: QOM'ify CPU
Embed CPUS390XState as first member of S390CPU.Since -cpu is being ignored, make TYPE_S390_CPU non-abstract.
qom: add container_get
This is QOM "mkdir -p". It is useful when referring tocontainer objects such as "/machine".
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: add children before qdev_init
We want the composition tree to to be in order by the time we callqdev_init, so that a single set of the toplevel realize property canpropagate all the way down the composition tree.
This is not the case so far. Unfortunately, this is incompatible...
qdev: give all devices a canonical path
A strong limitation of QOM right now is that unconverted ports(e.g. all...) do not give a canonical path to devices that arepart of the board. This in turn makes it impossible to replacePROP_PTR with a QOM link for example....
qdev: put all devices under /machine
Avoid cluttering too much the QOM root.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Merge remote-tracking branch 'kiszka/queues/slirp' into staging
Merge remote-tracking branch 'stefanha/tracing' into staging
serial: clear LSR.TEMT when populating the TSR
We never actually clear the TEMT (transmit sending register empty) flag whenpopulating the TSR. We set the flag, but since it's never cleared, setting itis sort of pointless..
I found this with a unit test case....
qtest: use qemu_gettimeofday()
On linux, qemu_timeval will always be two long ints. On windows, we use ourown struct definition. This should fix win64.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
serial: fix retry logic
I'm not sure if the retry logic has ever worked when not using FIFO mode. Ifound this while writing a test case although code inspection confirms it isdefinitely broken.
The TSR retry logic will never actually happen because it is guarded by an...
milkymist-vgafb: add missing register
This bug existed since the first commit. Fortunately, the affectedregisters have no functionality in qemu. This will only prevent thefollowing warning: milkymist_vgafb: write access to unknown register 0x00000034...
target-lm32: add simple disassembler
Because binutils disassembler is based on libopcode, this is a rewrite fromscratch.
Signed-off-by: Michael Walle <michael@walle.cc>
milkymist-sysctl: support for new core version
The new version introduces the following new registers: - SoC clock frequency: read-only of system clock used on the SoC - debug scratchpad: 8 bit scratchpad register - debug write lock: write once register, without any function on QEMU...
tests: fix out-of-tree building for lm32 target
target-lm32: init tcg only if available
Once qtest support for target-lm32 arrives, tcg may be disabled.
Merge branch 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm
Merge branch 'qom-cpu-unicore32.v3' of git://github.com/afaerber/qemu-cpu
Merge branch 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm
buildfix: check for old pod2man versions
Older pod2man don't have a --utf8 switch, check for this in conffigureand use it only when present. Fixes build on RHEL-5.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix conversion from lower to upper case with Turkish locale
Some locale settings let make fail or create wrong resultsbecause tr '[:lower:]' '[:upper:]' which is used to convertfrom lower to upper case depends on the locale.
With locale tr_TR.UTF-8, lower case 'i' is not converted to 'I'....
qtest: avoid a warning with RTC test
Avoid this warning on OpenBSD: CC tests/rtc-test.o/src/qemu/tests/rtc-test.c: In function 'check_time':/src/qemu/tests/rtc-test.c:171: warning: format '%ld' expects type 'long int', but argument 2 has type 'time_t'...
qtest: fix 32-bit build
time_t appears to be an unsigned long so use %ld.
Reported-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
slirp: Signal free input buffer space to io-thread
This massively accelerates slirp reception speed: If data arrivesfaster than the guest can read it from the input buffer, the filedescriptor for the corresponding socket was taken out of the fdset forselect. However, the event of the guest reading enough data from the...
qtest: fix out of tree build
Trace objects are also needed if tracing is enabled.
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
rtc: split out macros into a header file and use in test case
qtest: add rtc-test test-case
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
test makefile overhaul
This introduces new test reporting infrastructure based ongtester and gtester-report.
Also, all existing tests are moved to tests/, and tests/Makefileis reorganized to factor out the commonalities in the rules.
Signed-off-by: Anthony Liguori <aliguori@linux.vnet.ibm.com>...
qtest: add test framework
The idea behind qtest is pretty simple. Instead of executing a CPU via TCG orKVM, rely on an external process to send events to the device model that the CPUwould normally generate.
qtest presents itself as an accelerator. In addition, a new option is added to...
qtest: IRQ interception infrastructure
Since /i440fx/piix3 is being removed from the composition tree, theIO-APIC is placed under /i440fx. This is wrong and should be changedas soon as the /i440fx/piix3 path is put back.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
qtest: add clock management
This patch combines qtest and -icount together to turn the vm_clockinto a source that can be fully managed by the client. To this end newcommands clock_step and clock_set are added. Hooking them with libqtestis left as an exercise to the reader....
qtest: add C version of test infrastructure
This also includes a qtest wrapper script to make it easier to launch qtesttests directly.
Makefile.target: code stp dependency on trace-events
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
tracetool: dtrace disabled-events fix
If there are "disabled" entries in the trace-events file thenlinetod_nop() is called if the backend is dtrace, it's currentlynot present. Also equivalent fix for stap.
Signed-off-by: Lee Essen <lee.essen@nowonline.co.uk>...
tracetool: dtrace: handle in and next reserved words
pl031: switch clock base to rtc_clock
This lets the user specify the desired semantics. By default, the RTCwill follow adjustments from the host's NTP client, and will remain insync when the virtual machine is stopped. The previous behavior, whichprovides determinism with both icount and qtest, remains available with...
omap: switch omap_lpg to vm_clock
The output of the pulse generator needs to be deterministic whenrunning in -icount mode, and to remain constant whenever the VM isstopped. So the right clock to use is vm_clock.
arm: switch real-time clocks to rtc_clock
This lets the user specify the desired semantics. By default, the RTCwill follow adjustments from the host's NTP client. "-rtc clock=vm" willimprove determinism with both icount and qtest. Finally, the previous...
pl031: rearm alarm timer upon load
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
rtc: add -rtc clock=rt
This will let people use backwards-compatible semantics for devices thatwill be affected by the following patches.
ARM: Permit any ARMv6K CPU to read the MVFR0 and MVFR1 VFP registers.
This patch replaces the ARM_FEATURE_VFP3 test when reading MVFR registerswith a test for a new feature flag ARM_FEATURE_MVFR, and sets this featurefor all ARMv6K cores (ARM1156 is not a v6K core, yet supports MVFR; qemu...
target-unicore32: Move CPU-dependent init into initfn
Instead of setting values in a CPUID switch, do so in initfn functions.
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
MAINTAINERS: Add entry for UniCore32
target-unicore32: Relicense to GPLv2+
Adopt the license text suggested by Guan Xue-tao (with a minorsimplification) for all target-unicore/ files except helper.c.
To helper.c Anthony Liguori contributed a qemu_malloc() -> g_malloc()conversion, still pending IBM relicensing approval, so that remains...
target-unicore32: License future contributions under GPLv2+
This is to limit relicensing obstacles to the pending IBM investigation.
target-unicore32: QOM'ify CPU
Embed CPUUniCore32State as first member of UniCore32CPU.
Contributed under GPLv2+.
Merge remote-tracking branch 'origin/master' into staging
target-arm: Minimalistic CPU QOM'ification
Introduce only one non-abstract type TYPE_ARM_CPU and do not touchcp15 registers to not interfere with Peter's ongoing remodelling.Embed CPUARMState as first (additional) field of ARMCPU.
Let CPUClass::reset() call cpu_state_reset() for now....
target-arm: Drop cpu_arm_close()
It's unused, so no need to QOM'ify it later.
Signed-off-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
qemu tcg: Remove one entry of INDEX_op_ld_i64 from ppc_op_defs
There two entries of INDEX_op_ld_i64 in the ppc_op_defs. That causes anassertion failure in tcg_add_target_add_op_defs() when --enable-debug isused on a ppc64 backend (that's ppc64 host, not target)....
w32/slirp: Undefine error constants before their redefinition
Less warnings for your console.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
slirp: use socket_set_nonblock
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
slirp: clean up conflicts with system headers
Right now, slirp/slirp.h cannot include some system headers and,indirectly, qemu_socket.h. Clean this up, and remove a duplicateprototype that was introduced because of that.
Merge remote-tracking branch 'sstabellini/disk_io' into staging
Merge remote-tracking branch 'sstabellini/xen-fixes' into staging
Merge remote-tracking branch 'qmp/queue/qmp' into staging
Merge remote-tracking branch 'alon/libcacard' into staging
sparc: pass page aligned addresses to tlb_set_page
Mask incoming page address early so that resolved addressesare page aligned. Remove further address masking.
Tested-by: Artyom Tarasenko <atar4qemu@gmail.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
xen_disk: detach the blkdev before bdrv_delete
We need to detach the blkdev from the BlockDriverState before callingbdrv_delete.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen_console: ignore console disconnect events from console/0
The first console has a different location compared to other PV devices(console, rather than device/console/0) and doesn't obey the xenstorestate protocol. We already special case the first console in con_init...
qmp: document strict parsing
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qmp: parse commands in strict mode
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-off-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qmp: add and use q type specifier
"O" is being used by the transaction and qom-set commands to mean "anyQObject", but it really means "do not validate the argument list".Add a new specifier with the correct meaning.
qapi: add strict mode to input visitor
While QMP in general is designed so that it is possible to ignoreunknown arguments, in the case of the QMP server it is better toreject them to detect bad clients. In fact, we're already doingthis at the top level in the argument checker. To extend this to...
qapi: place outermost object on qiv stack
This is a slight change in the implementation of QMPInputVisitorthat helps when adding strict mode.
Const QObjects cannot be inc/decref-ed, and that's why QMPInputVisitorrelies heavily on weak references to inner objects. I'm not removing...
qapi: untangle next_list
Right now, the semantics of next_list are complicated. The caller must:
qapi: allow freeing partially-allocated objects
Objects going through the dealloc visitor can be only partially allocated.Detect the situation and avoid a segfault. This also helps with theinput visitor, when there are errors.
qapi: shortcut visits on errors
We can exit very soon if we enter a visitor with a preexisting error.This simplifies some cases because we will not have to deal withobj being non-NULL while *obj is NULL.
qapi: fix memory leak on error
QmpInputVisitor would leak the malloced struct if the stack wasoverflowed. This can be easily fixed using error_propagate.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>...
qapi: fail hard on stack imbalance
QmpOutputVisitor will segfault if an imbalanced end function iscalled. So we can abort in QmpInputVisitor too.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi: add a test case for type errors
There is no test case for parse errors, add one.
qapi: fix double free in qmp_output_visitor_cleanup()
Stack entries in QmpOutputVisitor are navigation links (weak references),except the bottom (ie. least recently added) entry, which owns the rootQObject [1]. Make qmp_output_visitor_cleanup() drop the stack entries,...
qapi: add struct-errors test case to test-qmp-output-visitor
This test case verifies that invalid native enums are caught, and causesqapi to tear down the QObject tree under construction, exercising theprevious patch.
Merge remote-tracking branch 'mdroth/qga-pull-3-26-12' into staging
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Merge remote-tracking branch 'spice/spice.v51' into staging
Man page: Add -global description
There's only TODO information in qemu man page for -global option. This is a basic description of this option with simple example.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
v4: - break long line
v3: - add use case description...
test: remove qemu-ga reference
This was added by mistake a while back.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qapi: add c_fun to escape function names
Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
libcacard/vcard_emul_nss: don't stop thread when there are no slots
Signed-off-by: Alon Levy <alevy@redhat.com>
libcacard/vcard_emul_nss: handle no readers at startup
When starting with no readers, coolkey should show no slots (withRHBZ 806038 fixed). Fix initialization to launch the event handlingthread for each module that isn't the internal module regardless of the...
libcacard/vcard_emul_nss: add warning for old coolkey
Older coolkey versions (before the future fix of RHBZ 802435) havea fake card reader created if no reader is detected during moduleinitialization. Warn libcacard users if the faulty coolkey is detected...
trace-events: Fix broken build caused by wrong format specifier
mem is an uint64_t value, so %lx was wrong.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
qapi: remove print statements from test-qmp-commands
This is necessary for nicer make check integration.
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
test: add test-qmp-commands to make check
All the deps are here but the test was never added to the list of testsfor make check
vl.c: fix '-cpu ?' segfault
Fix stupid copy&paste mistake at commitecf40beae7dcbb057d4f115207f9d8276832a774: I moved code around but kept"optarg" on the cpu_list() call.
Reported-by: Jiri Denemark <jdenemar@redhat.com>Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>...