Commit Graph

7 Commits

Author SHA1 Message Date
Richard Henderson 7f3bf92fad qtest: Fix tv_usec != long
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-24 09:50:31 -05:00
Stefan Weil 3f97fd851c qtest: Add missing GCC_FMT_ATTR
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-03 09:34:34 +01:00
Anthony Liguori 6e92466a7c qtest: use qemu_gettimeofday()
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-04-02 09:43:16 -05:00
Anthony Liguori 6b7cff76e0 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>
2012-03-30 12:56:10 -05:00
Paolo Bonzini 8156be5610 qtest: add clock management
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-30 08:14:11 -05:00
Paolo Bonzini 2028834574 qtest: IRQ interception infrastructure
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-30 08:14:11 -05:00
Anthony Liguori c7f0f3b1c8 qtest: add test framework
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>
2012-03-30 08:14:11 -05:00