[Qemu-devel] [RFC PATCH v3 00/49] Deterministic replay and reverse execution

2014-07-31 Thread Pavel Dovgalyuk
cleaner * Minor changes and code cleanup were made --- Pavel Dovgalyuk (49): acpi: accurate overflow check integratorcp: adding vmstate for save/restore pcspk: adding vmstate for save/restore fdc: adding vmstate for save/restore parallel: adding vmstate for save/restore

[Qemu-devel] [RFC PATCH v3 01/49] acpi: accurate overflow check

2014-07-31 Thread Pavel Dovgalyuk
Compare clock in ns, because acpi_pm_tmr_update uses rounded to ns value instead of ticks. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/acpi/core.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/acpi/core.c b/hw/acpi/core.c index a7368fb

[Qemu-devel] [RFC PATCH v3 06/49] serial: fixing vmstate for save/restore

2014-07-31 Thread Pavel Dovgalyuk
Some fields were added to VMState by this patch to preserve correct loading of the serial port controller state. Updating FCR value while loading was also modified to disable generating an interrupt by loadvm. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/char/serial.c | 264

[Qemu-devel] [RFC PATCH v3 02/49] integratorcp: adding vmstate for save/restore

2014-07-31 Thread Pavel Dovgalyuk
VMState added by this patch preserves correct loading of the integratorcp device state. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/arm/integratorcp.c | 38 +- 1 files changed, 37 insertions(+), 1 deletions(-) diff --git a/hw/arm

[Qemu-devel] [RFC PATCH v3 03/49] pcspk: adding vmstate for save/restore

2014-07-31 Thread Pavel Dovgalyuk
VMState added by this patch preserves correct loading of the PC speaker device state. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/audio/pcspk.c | 18 -- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c index

[Qemu-devel] [RFC PATCH v3 08/49] hpet: fixing saving and loading process

2014-07-31 Thread Pavel Dovgalyuk
VM clock does not run while saving, so there is no need for saving the ticks in HPET. Also added saving of hpet_offset field. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/timer/hpet.c | 15 ++- 1 files changed, 2 insertions(+), 13 deletions(-) diff --git a/hw

[Qemu-devel] [RFC PATCH v3 09/49] pckbd: adding new fields to vmstate

2014-07-31 Thread Pavel Dovgalyuk
This patch adds outport to VMState to allow correct saving and restoring the state of PC keyboard controller. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/input/pckbd.c | 53 - 1 files changed, 52 insertions(+), 1 deletions

[Qemu-devel] [RFC PATCH v3 19/49] block: add suffix parameter to bdrv_open functions

2014-07-31 Thread Pavel Dovgalyuk
This patch adds parameter with suffix for overlay filenames. This parameter will be used by replay to automatically create overlay files based on drive images supplied to VM. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- block.c | 49

[Qemu-devel] [RFC PATCH v3 04/49] fdc: adding vmstate for save/restore

2014-07-31 Thread Pavel Dovgalyuk
VMState added by this patch preserves correct loading of the FDC device state. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/block/fdc.c | 85 +++- 1 files changed, 83 insertions(+), 2 deletions(-) diff --git a/hw/block

[Qemu-devel] [RFC PATCH v3 16/49] target-i386: update fp status fix

2014-07-31 Thread Pavel Dovgalyuk
This patch adds calls to update_fp_status() function from several places where FPU state is changed. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- target-i386/cpu.c|1 + target-i386/cpu.h|1 + target-i386/fpu_helper.c |5 - target-i386/machine.c

[Qemu-devel] [RFC PATCH v3 05/49] parallel: adding vmstate for save/restore

2014-07-31 Thread Pavel Dovgalyuk
VMState added by this patch preserves correct loading of the parallel port controller state. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/char/parallel.c | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/hw/char/parallel.c b/hw/char

[Qemu-devel] [RFC PATCH v3 11/49] piix: do not raise irq while loading vmstate

2014-07-31 Thread Pavel Dovgalyuk
This patch disables raising an irq while loading the state of PCI bridge. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/pci-host/piix.c | 22 -- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index

[Qemu-devel] [RFC PATCH v3 28/49] replay: recording and replaying clock ticks

2014-07-31 Thread Pavel Dovgalyuk
to the module, which wants to read the values. Such a design required the clock polling to be synchronized. Sometimes it is not true - e.g. when timeouts for timer lists are checked. In this case we use a cached value of the clock, passing it to the client code. Signed-off-by: Pavel Dovgalyuk

[Qemu-devel] [RFC PATCH v3 17/49] migration: add vmstate for int8 and char arrays

2014-07-31 Thread Pavel Dovgalyuk
This patch adds macros for vmstate int8 and char arrays. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- include/migration/vmstate.h | 13 + vmstate.c |6 ++ 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/include/migration

[Qemu-devel] [RFC PATCH v3 29/49] replay: recording and replaying different timers

2014-07-31 Thread Pavel Dovgalyuk
lead to non-determinism. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/timer/mc146818rtc.c |3 + hw/timer/pl031.c | 10 include/qemu-common.h|1 replay/replay-internal.h |4 ++ replay/replay-time.c | 108

[Qemu-devel] [RFC PATCH v3 12/49] mc146818rtc: add missed field to vmstate

2014-07-31 Thread Pavel Dovgalyuk
This patch adds irq_reinject_on_ack_count field to VMState to allow correct saving/loading the state of MC146818 RTC. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/timer/mc146818rtc.c | 34 +- 1 files changed, 33 insertions(+), 1 deletions

[Qemu-devel] [RFC PATCH v3 07/49] kvmapic: fixing loading vmstate

2014-07-31 Thread Pavel Dovgalyuk
vapic state should not be synchronized with APIC while loading, because APIC state could be not loaded yet at that moment. We just save vapic_paddr in APIC VMState instead of synchronization. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/i386/kvmvapic.c | 22

[Qemu-devel] [RFC PATCH v3 18/49] replay: global variables and function stubs

2014-07-31 Thread Pavel Dovgalyuk
This patch adds global variables, defines, functions declarations, and function stubs for deterministic VM replay used by external modules. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- Makefile.target |1 + qapi-schema.json | 32

[Qemu-devel] [RFC PATCH v3 10/49] rtl8139: adding new fields to vmstate

2014-07-31 Thread Pavel Dovgalyuk
This patch adds virtual clock-dependent timers to VMState to allow correct saving and restoring the state of RTL8139 network controller. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/net/rtl8139.c | 50 -- 1 files changed, 48

[Qemu-devel] [RFC PATCH v3 13/49] pl031: add missed field to vmstate

2014-07-31 Thread Pavel Dovgalyuk
This patch adds timer which uses virtual clock to the VMState. Such timers are required for saving because virtual clock is the part of the virtual machine state. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/timer/pl031.c |3 ++- 1 files changed, 2 insertions(+), 1

[Qemu-devel] [RFC PATCH v3 34/49] replay: replay aio requests

2014-07-31 Thread Pavel Dovgalyuk
This patch adds identifier to aio requests. ID is used for creating bottom halves and identifying them while replaying. The patch also introduces several functions that make possible replaying of the aio requests. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- block.c

[Qemu-devel] [RFC PATCH v3 25/49] replay: interrupts and exceptions

2014-07-31 Thread Pavel Dovgalyuk
This patch includes modifications of common cpu files. All interrupts and exceptions occured during recording are written into the replay log. These events allow correct replaying the execution by kicking cpu thread when one of these events is found in the log. Signed-off-by: Pavel Dovgalyuk

[Qemu-devel] [RFC PATCH v3 14/49] ide pci: reset status field before loading the vmstate

2014-07-31 Thread Pavel Dovgalyuk
This patch resets status field before loading the state of IDE BMDMA device. Resetting status is needed for replay, because it does not reset whole virtual machine before loading state of the VM. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/ide/pci.c | 11 +++ 1 files

[Qemu-devel] [RFC PATCH v3 15/49] softmmu: fixing usage of cpu_st/ld* from helpers

2014-07-31 Thread Pavel Dovgalyuk
, the return address will point to that helper. That is why CPU state cannot be restored in the case of MMU fault. This patch introduces several inline helpers to load return address which points to the right place. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- include/exec

[Qemu-devel] [RFC PATCH v3 36/49] pl031: vmstate in replay mode

2014-07-31 Thread Pavel Dovgalyuk
clocks cache in replay module could not be loaded yet. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/timer/pl031.c | 25 ++--- 1 files changed, 18 insertions(+), 7 deletions(-) diff --git a/hw/timer/pl031.c b/hw/timer/pl031.c index 40e1700..600fa49 100644

[Qemu-devel] [RFC PATCH v3 32/49] vmclock: add virtual clock based on replay icount

2014-07-31 Thread Pavel Dovgalyuk
This patch introduces virtual clock which values are calculated using number of executed instructions. Instruction counter is taken from replay module. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- cpus.c | 22 ++-- qemu-timer.c |4 + replay

[Qemu-devel] [RFC PATCH v3 22/49] cpu: invent instruction count for accurate replay

2014-07-31 Thread Pavel Dovgalyuk
This patch adds instructions count fields to cpu structure and invents several functions for increasing this counter while executing translation blocks. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- cpu-exec.c | 14 - cpus.c |5 ++ exec.c

[Qemu-devel] [RFC PATCH v3 20/49] sysemu: system functions for replay

2014-07-31 Thread Pavel Dovgalyuk
This patch removes static specifier from several qemu function to make them visible to the replay module. It also invents several system functions that will be used by replay. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- arch_init.c |8 cpu-exec.c

[Qemu-devel] [RFC PATCH v3 40/49] replay: recording of the user input

2014-07-31 Thread Pavel Dovgalyuk
This records user input (keyboard and mouse events) in record mode and replays these input events in replay mode. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- include/ui/input.h |2 + replay/Makefile.objs |1 replay/replay-events.c | 48

[Qemu-devel] [RFC PATCH v3 33/49] replay: bottom halves

2014-07-31 Thread Pavel Dovgalyuk
This patch introduces bottom half event for replay queue. It saves the events into the queue and process them at the checkpoints and instructions execution. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- async.c | 46

[Qemu-devel] [RFC PATCH v3 23/49] target-arm: instructions counting code for replay

2014-07-31 Thread Pavel Dovgalyuk
This patch adds instructions counting into the target-specific part of arm simulator. In record/replay mode it inserts replay functions calls and instructions counter increment into the translated code. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- target-arm/Makefile.objs |1

[Qemu-devel] [RFC PATCH v3 21/49] replay: internal functions for replay log

2014-07-31 Thread Pavel Dovgalyuk
This patch adds functions to perform read and write operations with replay log. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- replay/Makefile.objs |1 replay/replay-internal.c | 141 ++ replay/replay-internal.h | 50

[Qemu-devel] [RFC PATCH v3 46/49] replay: replay_info command

2014-07-31 Thread Pavel Dovgalyuk
This patch adds support for replay_info monitor command. This command returns the information about replay execution (replay mode and current step). Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hmp-commands.hx | 13 + monitor.c| 20

[Qemu-devel] [RFC PATCH v3 38/49] replay: command line options

2014-07-31 Thread Pavel Dovgalyuk
This patch introduces command line options for enabling recording or replaying virtual machine behavior. -record option starts recording of the execution and saves it into the log, specified with fname parameter. -replay option is intended for replaying previously saved log. Signed-off-by: Pavel

[Qemu-devel] [RFC PATCH v3 24/49] target-i386: instructions counting code for replay

2014-07-31 Thread Pavel Dovgalyuk
This patch adds instructions counting into the target-specific part of i386/x86_64 simulator. In record/replay mode it inserts replay functions calls and instructions counter increment into the translated code. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- target-i386/Makefile.objs

[Qemu-devel] [RFC PATCH v3 48/49] replay: replay_seek_step command

2014-07-31 Thread Pavel Dovgalyuk
This patch adds support for replay_seek_step monitor command. This command loads one of the snapshots and replays the execution until the specified step is met. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hmp-commands.hx | 14 ++ monitor.c

[Qemu-devel] [RFC PATCH v3 43/49] replay: audio data record/replay

2014-07-31 Thread Pavel Dovgalyuk
This patch adds deterministic replay for audio adapter. Replay module saves data from the microphone and end-of-playback events. Support of audio record and replay is implemented only for Win32 hosts. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- audio/audio.c| 14

[Qemu-devel] [RFC PATCH v3 30/49] replay: shutdown event

2014-07-31 Thread Pavel Dovgalyuk
This patch records and replays simulator shutdown event. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- include/sysemu/sysemu.h |1 + replay/replay-internal.h |2 ++ replay/replay.c | 11 +++ replay/replay.h |5 + vl.c

[Qemu-devel] [RFC PATCH v3 26/49] vga: do not use virtual clock for blinking cursor

2014-07-31 Thread Pavel Dovgalyuk
-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/display/vga.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/display/vga.c b/hw/display/vga.c index 4b089a3..0439586 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -1304,7 +1304,7 @@ static void

[Qemu-devel] [RFC PATCH v3 49/49] gdbstub: reverse debugging

2014-07-31 Thread Pavel Dovgalyuk
This patch introduces support of reverse debugging through the gdb remote protocol. Patch adds reverse-stepi and reverse-continue commands support to qemu. Other reverse commands should also work, because they reuse these ones. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- exec.c

[Qemu-devel] [RFC PATCH v3 31/49] replay: checkpoints

2014-07-31 Thread Pavel Dovgalyuk
This patch introduces checkpoints that synchronize cpu thread and iothread. When checkpoint is met in the code all asynchronous events from the queue are executed. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- block.c | 11 +++ cpus.c

[Qemu-devel] [RFC PATCH v3 44/49] replay: serial port

2014-07-31 Thread Pavel Dovgalyuk
-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- include/sysemu/char.h| 25 qemu-char.c | 56 +++--- replay/Makefile.objs |1 replay/replay-char.c | 100 ++ replay/replay-events.c | 18

[Qemu-devel] [RFC PATCH v3 27/49] replay: asynchronous events infrastructure

2014-07-31 Thread Pavel Dovgalyuk
, or checkpoint in the iothread. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- replay/replay-events.c | 200 ++ replay/replay-internal.h | 17 replay/replay.h |4 + 3 files changed, 220 insertions(+), 1 deletions

[Qemu-devel] [RFC PATCH v3 35/49] replay: thread pool

2014-07-31 Thread Pavel Dovgalyuk
This patch modifies thread pool to allow replaying asynchronous thread tasks synchronously in replay mode. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- block/raw-posix.c |6 +++-- block/raw-win32.c |4 ++- include/block/thread-pool.h |4 ++- replay

[Qemu-devel] [RFC PATCH v3 41/49] tap-win32: destroy the thread at exit

2014-07-31 Thread Pavel Dovgalyuk
This patch fixes resource leak caused by created thread which is not destroyed at exit. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- net/tap-win32.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/net/tap-win32.c b/net/tap-win32.c index 8aee611

[Qemu-devel] [RFC PATCH v3 37/49] replay: initialization and deinitialization

2014-07-31 Thread Pavel Dovgalyuk
This patch introduces the functions for enabling the record/replay and for freeing the resources when simulator closes. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- exec.c |1 replay/replay-internal.h |2 + replay/replay.c | 128

[Qemu-devel] [RFC PATCH v3 39/49] replay: snapshotting the virtual machine

2014-07-31 Thread Pavel Dovgalyuk
. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- cpus.c | 46 - qemu-options.hx |5 + qemu-timer.c |4 + replay/replay-internal.h | 18 replay/replay.c | 226 ++ vl.c

[Qemu-devel] [RFC PATCH v3 42/49] replay: network packets record/replay

2014-07-31 Thread Pavel Dovgalyuk
This patch implements passing network packets to replay module in record mode. New virtual network adapter is implemented to replay the packets when they are read from the log file. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- net/Makefile.objs|1 net/clients.h

[Qemu-devel] [RFC PATCH v3 45/49] replay: USB passthrough

2014-07-31 Thread Pavel Dovgalyuk
could be not connected to the host machine. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/usb/host-libusb.c | 551 ++ include/hw/host-libusb.h | 105 + replay/Makefile.objs |1 replay/replay-events.c | 48

[Qemu-devel] [RFC PATCH v3 47/49] replay: replay_break command

2014-07-31 Thread Pavel Dovgalyuk
This patch adds support for replay_break monitor command. This command sets the step (measured in executed instructions) where replay should be stopped. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hmp-commands.hx | 14 ++ monitor.c | 20

Re: [Qemu-devel] [RFC PATCH v3 07/49] kvmapic: fixing loading vmstate

2014-07-31 Thread Pavel Dovgalyuk
:31.07.2014 17:01 (GMT+04:00) Кому: Pavel Dovgalyuk pavel.dovga...@ispras.ru,qemu-devel@nongnu.org Копия: peter.mayd...@linaro.org,peter.crosthwa...@xilinx.com,mark.bur...@greensocs.com,r...@ispras.ru,batuz...@ispras.ru,maria.klimushenk...@ispras.ru,ebl...@redhat.com,afaer...@suse.de,fred.kon

Re: [Qemu-devel] [RFC PATCH v3 10/49] rtl8139: adding new fields to vmstate

2014-07-31 Thread Pavel Dovgalyuk
:00) Кому: Pavel Dovgalyuk pavel.dovga...@ispras.ru,qemu-devel@nongnu.org Копия: peter.mayd...@linaro.org,peter.crosthwa...@xilinx.com,mark.bur...@greensocs.com,r...@ispras.ru,batuz...@ispras.ru,maria.klimushenk...@ispras.ru,ebl...@redhat.com,afaer...@suse.de,fred.kon...@greensocs.com Тема: Re

[Qemu-devel] [RFC PATCH v2 03/49] pcspk: adding vmstate for save/restore

2014-07-17 Thread Pavel Dovgalyuk
VMState added by this patch preserves correct loading of the PC speaker device state. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/audio/pcspk.c | 19 +-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c index

[Qemu-devel] [RFC PATCH v2 04/49] fdc: adding vmstate for save/restore

2014-07-17 Thread Pavel Dovgalyuk
VMState added by this patch preserves correct loading of the FDC device state. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/block/fdc.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index 490d127..132310a

[Qemu-devel] [RFC PATCH v2 06/49] serial: fixing vmstate for save/restore

2014-07-17 Thread Pavel Dovgalyuk
Some fields were added to VMState by this patch to preserve correct loading of the serial port controller state. Updating FCR value while loading was also modified to disable generating an interrupt by loadvm. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/char/serial.c | 115

[Qemu-devel] [RFC PATCH v2 07/49] kvmapic: fixing loading vmstate

2014-07-17 Thread Pavel Dovgalyuk
vapic state should not be synchronized with APIC while loading, because APIC state could be not loaded yet at that moment. We just save vapic_paddr in APIC VMState instead of synchronization. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/i386/kvmvapic.c| 22

[Qemu-devel] [RFC PATCH v2 02/49] integratorcp: adding vmstate for save/restore

2014-07-17 Thread Pavel Dovgalyuk
VMState added by this patch preserves correct loading of the integratorcp device state. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/arm/integratorcp.c | 38 +- 1 files changed, 37 insertions(+), 1 deletions(-) diff --git a/hw/arm

[Qemu-devel] [RFC PATCH v2 45/49] replay: USB passthrough

2014-07-17 Thread Pavel Dovgalyuk
could be not connected to the host machine. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/usb/host-libusb.c | 525 ++ include/hw/host-libusb.h | 105 + replay/Makefile.objs |1 replay/replay-events.c | 49

[Qemu-devel] [RFC PATCH v2 42/49] replay: network packets record/replay

2014-07-17 Thread Pavel Dovgalyuk
This patch implements passing network packets to replay module in record mode. New virtual network adapter is implemented to replay the packets when they are read from the log file. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- net/Makefile.objs|1 net/clients.h

[Qemu-devel] [RFC PATCH v2 05/49] parallel: adding vmstate for save/restore

2014-07-17 Thread Pavel Dovgalyuk
VMState added by this patch preserves correct loading of the parallel port controller state. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/char/parallel.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/hw/char/parallel.c b/hw/char

[Qemu-devel] [RFC PATCH v2 44/49] replay: serial port

2014-07-17 Thread Pavel Dovgalyuk
-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- include/sysemu/char.h| 25 qemu-char.c | 55 +++--- replay/Makefile.objs |1 replay/replay-char.c | 99 ++ replay/replay-events.c | 18

[Qemu-devel] [RFC PATCH v2 15/49] softmmu: fixing usage of cpu_st/ld* from helpers

2014-07-17 Thread Pavel Dovgalyuk
, the return address will point to that helper. That is why CPU state cannot be restored in the case of MMU fault. This patch introduces several inline helpers to load return address which points to the right place. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- include/exec

[Qemu-devel] [RFC PATCH v2 46/49] replay: replay_info command

2014-07-17 Thread Pavel Dovgalyuk
This patch adds support for replay_info monitor command. This command returns the information about replay execution (replay mode and current step). Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hmp-commands.hx | 13 + monitor.c| 17

[Qemu-devel] [RFC PATCH v2 48/49] replay: replay_seek_step command

2014-07-17 Thread Pavel Dovgalyuk
This patch adds support for replay_seek_step monitor command. This command loads one of the snapshots and replays the execution until the specified step is met. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hmp-commands.hx | 14 ++ monitor.c

[Qemu-devel] [RFC PATCH v2 08/49] hpet: fixing saving and loading process

2014-07-17 Thread Pavel Dovgalyuk
VM clock does not run while saving, so there is no need for saving the ticks in HPET. Also added saving of hpet_offset field. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/timer/hpet.c | 13 + 1 files changed, 1 insertions(+), 12 deletions(-) diff --git a/hw/timer

[Qemu-devel] [RFC PATCH v2 10/49] rtl8139: adding new fields to vmstate

2014-07-17 Thread Pavel Dovgalyuk
This patch adds virtual clock-dependent timers to VMState to allow correct saving and restoring the state of RTL8139 network controller. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/net/rtl8139.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw

[Qemu-devel] [RFC PATCH v2 47/49] replay: replay_break command

2014-07-17 Thread Pavel Dovgalyuk
This patch adds support for replay_break monitor command. This command sets the step (measured in executed instructions) where replay should be stopped. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hmp-commands.hx | 14 ++ monitor.c | 15

[Qemu-devel] [RFC PATCH v2 49/49] gdbstub: reverse debugging

2014-07-17 Thread Pavel Dovgalyuk
This patch introduces support of reverse debugging through the gdb remote protocol. Patch adds reverse-stepi and reverse-continue commands support to qemu. Other reverse commands should also work, because they reuse these ones. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- exec.c

[Qemu-devel] [RFC PATCH v2 26/49] replay: interrupts and exceptions

2014-07-17 Thread Pavel Dovgalyuk
This patch includes modifications of common cpu files. All interrupts and exceptions occured during recording are written into the replay log. These events allow correct replaying the execution by kicking cpu thread when one of these events is found in the log. Signed-off-by: Pavel Dovgalyuk

[Qemu-devel] [RFC PATCH v2 41/49] tap-win32: destroy the thread at exit

2014-07-17 Thread Pavel Dovgalyuk
This patch fixes resource leak caused by created thread which is not destroyed at exit. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- net/tap-win32.c | 11 ++- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/net/tap-win32.c b/net/tap-win32.c index 8aee611

[Qemu-devel] [RFC PATCH v2 17/49] target-i386: update fp status fix

2014-07-17 Thread Pavel Dovgalyuk
This patch adds calls to update_fp_status() function from several places where FPU state is changed. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- target-i386/cpu.c|1 + target-i386/cpu.h|1 + target-i386/fpu_helper.c |5 - target-i386/machine.c

[Qemu-devel] [RFC PATCH v2 43/49] replay: audio data record/replay

2014-07-17 Thread Pavel Dovgalyuk
This patch adds deterministic replay for audio adapter. Replay module saves data from the microphone and end-of-playback events. Support of audio record and replay is implemented only for Win32 hosts. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- audio/audio.c| 14

[Qemu-devel] [RFC PATCH v2 27/49] vga: do not use virtual clock for blinking cursor

2014-07-17 Thread Pavel Dovgalyuk
-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/display/vga.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/display/vga.c b/hw/display/vga.c index 4b089a3..02d3be3 100644 --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -1304,7 +1304,7 @@ static void

[Qemu-devel] [RFC PATCH v2 14/49] ide pci: reset status field before loading the vmstate

2014-07-17 Thread Pavel Dovgalyuk
This patch resets status field before loading the state of IDE BMDMA device. Resetting status is needed for replay, because it does not reset whole virtual machine before loading state of the VM. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/ide/pci.c | 10 ++ 1 files

[Qemu-devel] [RFC PATCH v2 36/49] pl031: vmstate in replay mode

2014-07-17 Thread Pavel Dovgalyuk
clocks cache in replay module could not be loaded yet. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/timer/pl031.c | 22 +++--- 1 files changed, 15 insertions(+), 7 deletions(-) diff --git a/hw/timer/pl031.c b/hw/timer/pl031.c index 02c814f..017b1ce 100644 --- a/hw

[Qemu-devel] [RFC PATCH v2 25/49] target-i386: instructions counting code for replay

2014-07-17 Thread Pavel Dovgalyuk
This patch adds instructions counting into the target-specific part of i386/x86_64 simulator. In record/replay mode it inserts replay functions calls and instructions counter increment into the translated code. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- target-i386/Makefile.objs

[Qemu-devel] [RFC PATCH v2 28/49] replay: asynchronous events infrastructure

2014-07-17 Thread Pavel Dovgalyuk
, or checkpoint in the iothread. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- replay/replay-events.c | 198 ++ replay/replay-internal.h | 17 replay/replay.h |4 + 3 files changed, 218 insertions(+), 1 deletions

[Qemu-devel] [RFC PATCH v2 40/49] replay: recording of the user input

2014-07-17 Thread Pavel Dovgalyuk
This records user input (keyboard and mouse events) in record mode and replays these input events in replay mode. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- include/ui/input.h |2 + replay/Makefile.objs |1 replay/replay-events.c | 48

[Qemu-devel] [RFC PATCH v2 35/49] replay: thread pool

2014-07-17 Thread Pavel Dovgalyuk
This patch modifies thread pool to allow replaying asynchronous thread tasks synchronously in replay mode. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- block/raw-posix.c |6 +++-- block/raw-win32.c |4 ++- include/block/thread-pool.h |4 ++- replay

[Qemu-devel] [RFC PATCH v2 11/49] piix: do not raise irq while loading vmstate

2014-07-17 Thread Pavel Dovgalyuk
This patch disables raising an irq while loading the state of PCI bridge. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/pci-host/piix.c | 22 -- 1 files changed, 20 insertions(+), 2 deletions(-) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index

[Qemu-devel] [RFC PATCH v2 32/49] replay: checkpoints

2014-07-17 Thread Pavel Dovgalyuk
This patch introduces checkpoints that synchronize cpu thread and iothread. When checkpoint is met in the code all asynchronous events from the queue are executed. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- block.c | 11 +++ cpus.c

[Qemu-devel] [RFC PATCH v2 33/49] replay: bottom halves

2014-07-17 Thread Pavel Dovgalyuk
This patch introduces bottom half event for replay queue. It saves the events into the queue and process them at the checkpoints and instructions execution. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- async.c | 45

[Qemu-devel] [RFC PATCH v2 37/49] replay: initialization and deinitialization

2014-07-17 Thread Pavel Dovgalyuk
This patch introduces the functions for enabling the record/replay and for freeing the resources when simulator closes. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- exec.c |1 replay/replay-internal.h |2 + replay/replay.c | 127

[Qemu-devel] [RFC PATCH v2 19/49] replay: global variables and function stubs

2014-07-17 Thread Pavel Dovgalyuk
This patch adds global variables, defines, functions declarations, and function stubs for deterministic VM replay used by external modules. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- Makefile.target |1 + replay/Makefile.objs |1 + replay/replay.c | 19

[Qemu-devel] [RFC PATCH v2 16/49] target: save cpu state fields

2014-07-17 Thread Pavel Dovgalyuk
This patch adds interrupt fields to VMState for correct saving the CPU state. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- target-arm/machine.c |5 - target-i386/machine.c |5 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/target-arm/machine.c b

[Qemu-devel] [RFC PATCH v2 12/49] mc146818rtc: add missed field to vmstate

2014-07-17 Thread Pavel Dovgalyuk
This patch adds irq_reinject_on_ack_count field to VMState to allow correct saving/loading the state of MC146818 RTC. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/timer/mc146818rtc.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/timer

[Qemu-devel] [RFC PATCH v2 34/49] replay: replay aio requests

2014-07-17 Thread Pavel Dovgalyuk
This patch adds identifier to aio requests. ID is used for creating bottom halves and identifying them while replaying. The patch also introduces several functions that make possible replaying of the aio requests. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- block.c

[Qemu-devel] [RFC PATCH v2 38/49] replay: command line options

2014-07-17 Thread Pavel Dovgalyuk
This patch introduces command line options for enabling recording or replaying virtual machine behavior. -record option starts recording of the execution and saves it into the log, specified with fname parameter. -replay option is intended for replaying previously saved log. Signed-off-by: Pavel

[Qemu-devel] [RFC PATCH v2 30/49] replay: recording and replaying different timers

2014-07-17 Thread Pavel Dovgalyuk
lead to non-determinism. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/timer/mc146818rtc.c |2 - hw/timer/pl031.c | 10 include/qemu-common.h|1 replay/replay-internal.h |7 +++ replay/replay-time.c | 106

[Qemu-devel] [RFC PATCH v2 31/49] replay: shutdown event

2014-07-17 Thread Pavel Dovgalyuk
This patch records and replays simulator shutdown event. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- include/sysemu/sysemu.h |1 + replay/replay-internal.h | 13 ++--- replay/replay.c | 11 +++ replay/replay.h |5 + vl.c

[Qemu-devel] [RFC PATCH v2 21/49] sysemu: system functions for replay

2014-07-17 Thread Pavel Dovgalyuk
This patch removes static specifier from several qemu function to make them visible to the replay module. It also invents several system functions that will be used by replay. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- arch_init.c |8 cpu-exec.c

[Qemu-devel] [RFC PATCH v2 20/49] block: add suffix parameter to bdrv_open functions

2014-07-17 Thread Pavel Dovgalyuk
This patch adds parameter with suffix for overlay filenames. This parameter will be used by replay to automatically create overlay files based on drive images supplied to VM. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- block.c | 44

[Qemu-devel] [RFC PATCH v2 22/49] replay: internal functions for replay log

2014-07-17 Thread Pavel Dovgalyuk
This patch adds functions to perform read and write operations with replay log. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- replay/Makefile.objs |1 replay/replay-internal.c | 141 ++ replay/replay-internal.h | 50

[Qemu-devel] [RFC PATCH v2 39/49] replay: snapshotting the virtual machine

2014-07-17 Thread Pavel Dovgalyuk
. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- cpus.c | 46 - qemu-options.hx |3 - qemu-timer.c |4 + replay/replay-internal.h | 18 replay/replay.c | 223 ++ 5

[Qemu-devel] [RFC PATCH v2 23/49] cpu: invent instruction count for accurate replay

2014-07-17 Thread Pavel Dovgalyuk
This patch adds instructions count fields to cpu structure and invents several functions for increasing this counter while executing translation blocks. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- cpu-exec.c | 14 - cpus.c |5 ++ exec.c

[Qemu-devel] [RFC PATCH v2 18/49] migration: add vmstate for int8 and char arrays

2014-07-17 Thread Pavel Dovgalyuk
This patch adds macros for vmstate int8 and char arrays. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- include/migration/vmstate.h | 13 + vmstate.c |6 ++ 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/include/migration

[Qemu-devel] [RFC PATCH v2 29/49] replay: recording and replaying clock ticks

2014-07-17 Thread Pavel Dovgalyuk
to the module, which wants to read the values. Such a design required the clock polling to be synchronized. Sometimes it is not true - e.g. when timeouts for timer lists are checked. In this case we use a cached value of the clock, passing it to the client code. Signed-off-by: Pavel Dovgalyuk

[Qemu-devel] [RFC PATCH v2 24/49] target-arm: instructions counting code for replay

2014-07-17 Thread Pavel Dovgalyuk
This patch adds instructions counting into the target-specific part of arm simulator. In record/replay mode it inserts replay functions calls and instructions counter increment into the translated code. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- target-arm/Makefile.objs |1

[Qemu-devel] [RFC PATCH v2 13/49] pl031: add missed field to vmstate

2014-07-17 Thread Pavel Dovgalyuk
This patch adds timer which uses virtual clock to the VMState. Such timers are required for saving because virtual clock is the part of the virtual machine state. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/timer/pl031.c |3 ++- 1 files changed, 2 insertions(+), 1

[Qemu-devel] [PATCH 02/12] pcspk: adding vmstate for save/restore

2014-08-26 Thread Pavel Dovgalyuk
VMState added by this patch preserves correct loading of the PC speaker device state. Signed-off-by: Pavel Dovgalyuk pavel.dovga...@ispras.ru --- hw/audio/pcspk.c | 18 -- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/hw/audio/pcspk.c b/hw/audio/pcspk.c index

  1   2   3   4   5   6   7   8   9   10   >