summaryrefslogtreecommitdiff
path: root/qtest.c
AgeCommit message (Collapse)AuthorFilesLines
2013-04-22qtest: Handle addresses and values for {in, out}[bwl] as unsignedPeter Maydell1-3/+3
Handle the addresses and values for {in,out}[bwl] as unsigned (ie with strtoul), as per the protocol specification comment. This fixes a test failure in test_i440fx_defaults on 32-bit hosts where the test tries to write 0x80000000 and qtest was instead writing 0x7fffffff. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1366551003-16649-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-04-15sysemu: avoid proliferation of include/ subdirectoriesPaolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-03-26qtest: use synchronous I/O for char deviceAnthony Liguori1-1/+1
Peter reported that rtc-test would periodically hang. It turns out this was due to an EAGAIN occurring on qemu_chr_fe_write. Instead of heavily refactoring qtest, just use a synchronous version of the write operation for qemu_chr_fe_write to address this problem. Reported-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-02-18qtest: Add MMIO supportAndreas Färber1-0/+81
Introduce [qtest_]{read,write}[bwlq]() libqtest functions and corresponding QTest protocol commands to replace local versions in libi2c-omap.c. Also convert m48t59-test's cmos_{read,write}_mmio() to {read,write}b(). Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Message-id: 1361051043-27944-4-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-02-11qtest: Use strtoull() for uint64_tAndreas Färber1-4/+4
On 32-bit hosts, unsigned long may be uint32_t and uint64_t may be unsigned long long. Account for this by always using strtoull(). We were already using strtoll() for int64_t. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Message-id: 1360600914-5448-2-git-send-email-afaerber@suse.de Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-02-01accel: change {xen, kvm, tcg, qtest}_allowed from int to boolliguang1-1/+1
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-12-19softmmu: move remaining include files to include/ subdirectoriesPaolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19softmmu: move include files to include/sysemu/Paolo Bonzini1-3/+3
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19exec: move include files to include/exec/Paolo Bonzini1-2/+2
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-04-24qtest: Fix tv_usec != longRichard Henderson1-4/+4
Sparc Debian 5.0.8 does not define __suseconds_t as long, but FMT_timeval expects %ld. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net> Cc: Anthony Liguori <aliguori@us.ibm.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-04-03qtest: Add missing GCC_FMT_ATTRStefan Weil1-1/+2
gcc reports an error when the code is compiled with -Wmissing-format-attribute. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-04-02qtest: use qemu_gettimeofday()Anthony Liguori1-7/+7
On linux, qemu_timeval will always be two long ints. On windows, we use our own struct definition. This should fix win64. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-30qtest: fix 32-bit buildAnthony Liguori1-1/+1
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>
2012-03-30qtest: add clock managementPaolo Bonzini1-0/+45
This patch combines qtest and -icount together to turn the vm_clock into a source that can be fully managed by the client. To this end new commands clock_step and clock_set are added. Hooking them with libqtest is left as an exercise to the reader. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-30qtest: IRQ interception infrastructurePaolo Bonzini1-24/+68
Since /i440fx/piix3 is being removed from the composition tree, the IO-APIC is placed under /i440fx. This is wrong and should be changed as soon as the /i440fx/piix3 path is put back. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-30qtest: add test frameworkAnthony Liguori1-0/+354
The idea behind qtest is pretty simple. Instead of executing a CPU via TCG or KVM, rely on an external process to send events to the device model that the CPU would normally generate. qtest presents itself as an accelerator. In addition, a new option is added to establish a qtest server (-qtest) that takes a character device. This is what allows the external process to send CPU events to the device model. qtest uses a simple line based protocol to send the events. Documentation of that protocol is in qtest.c. I considered reusing the monitor for this job. Adding interrupts would be a bit difficult. In addition, logging would also be difficult. qtest has extensive logging support. All protocol commands are logged with time stamps using a new command line option (-qtest-log). Logging is important since ultimately, this is a feature for debugging. 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>