Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/1] spapr: Check SMT based on KVM_CAP_PPC_SMT_POSSIBLE

2018-01-11 Thread Laurent Vivier
On 11/01/2018 12:29, Laurent Vivier wrote: > On 06/01/2018 01:47, Jose Ricardo Ziviani wrote: >> Power9 supports 4 HW threads/core but it's possible to emulate >> doorbells to implement virtual SMT. KVM has the KVM_CAP_PPC_SMT_POSSIBLE >> which returns a bitmap with all SMT modes supported by the h

Re: [Qemu-devel] [PATCH v5 0/4] vhost: two fixes and used_memslots refactoring

2018-01-11 Thread Igor Mammedov
On Wed, 10 Jan 2018 00:39:02 +0800 Jay Zhou wrote: Jay, considering how non trivial touched code is, would you mind first adding 'make check' testcases for success/failure paths that you are touching? It would help with merging and ensure that future changes to vhost won't break memslots handling

Re: [Qemu-devel] [PATCH 1/2] Add save-snapshot, load-snapshot and delete-snapshot to QAPI

2018-01-11 Thread Daniel P. Berrange
On Thu, Jan 11, 2018 at 01:46:38PM +0100, Max Reitz wrote: > On 2018-01-08 14:52, Eric Blake wrote: > > On 01/07/2018 06:23 AM, Richard Palethorpe wrote: > >> Add QAPI wrapper functions for the existing snapshot functionality. These > >> functions behave the same way as the HMP savevm, loadvm and d

Re: [Qemu-devel] [PATCH v4 0/5] Add a valid_cpu_types property

2018-01-11 Thread Eduardo Habkost
On Thu, Jan 11, 2018 at 11:25:08AM +0100, Igor Mammedov wrote: > On Wed, 10 Jan 2018 19:48:00 -0200 > Eduardo Habkost wrote: > > > On Wed, Jan 10, 2018 at 01:30:29PM -0800, Alistair Francis wrote: > > > On Thu, Dec 28, 2017 at 6:59 AM, Eduardo Habkost > > > wrote: > > > > On Thu, Dec 28, 2017

Re: [Qemu-devel] [RFC PATCH v3 00/30] replay additions

2018-01-11 Thread Paolo Bonzini
On 11/01/2018 09:24, Pavel Dovgalyuk wrote: > Accidentally sent draft version of patches to the mailing list. > Please consider this one as the correct one. > > This set of patches includex fixes from Alex Bennée for fixing > BQL and replay locks after inventing the MTTCG. It also includes some >

Re: [Qemu-devel] [RFC PATCH v3 29/30] replay: improve replay performance

2018-01-11 Thread Paolo Bonzini
On 11/01/2018 09:27, Pavel Dovgalyuk wrote: > +} else { > +qemu_notify_event(); > +} Before this patch, what would do the qemu_notify_event? Thanks, Paolo > /* Does not need atomic_mb_set because a spurious wakeup is okay. */

[Qemu-devel] [PATCH] cpus: unify qemu_*_wait_io_event

2018-01-11 Thread Paolo Bonzini
Except for round-robin TCG, every other accelerator is using more or less the same code around qemu_wait_io_event_common. The exception is HAX, which also has to eat the dummy APC that is queued by qemu_cpu_kick_thread. We can add the SleepEx call to qemu_wait_io_event under "if (!tcg_enabled())"

Re: [Qemu-devel] [RFC PATCH v3 15/30] cpus: push BQL lock to qemu_*_wait_io_event

2018-01-11 Thread Paolo Bonzini
On 11/01/2018 09:26, Pavel Dovgalyuk wrote: > From: Alex Bennée > > We only really need to grab the lock for initial setup (so we don't > race with the thread-spawning thread). After that we can drop the lock > for the whole main loop and only grab it for waiting for IO events. > > There is a sl

Re: [Qemu-devel] [PATCH v4 01/11] tests: Remove deprecated migration tests commands

2018-01-11 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We move to use migration_set_parameter() for everything. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > tests/migration-test.c | 33 - > 1 file changed, 8 insertions(+), 25 deletions(-

Re: [Qemu-devel] [PATCH 1/2] Add save-snapshot, load-snapshot and delete-snapshot to QAPI

2018-01-11 Thread Max Reitz
On 2018-01-08 14:52, Eric Blake wrote: > On 01/07/2018 06:23 AM, Richard Palethorpe wrote: >> Add QAPI wrapper functions for the existing snapshot functionality. These >> functions behave the same way as the HMP savevm, loadvm and delvm >> commands. This will allow applications, such as OpenQA, to

Re: [Qemu-devel] [RFC PATCH v3 30/30] replay: don't process async events when warping the clock

2018-01-11 Thread Paolo Bonzini
On 11/01/2018 09:27, Pavel Dovgalyuk wrote: > Virtual clock is wapred from iothread and vcpu thread. When the hardware > events associated with warp checkpoint, then interrupt delivering may be > non-deterministic if checkpoint is processed in different threads in record > and replay. > This patch

Re: [Qemu-devel] [PATCH] LEON3 IRQMP: Fix IRQ software ack

2018-01-11 Thread Jean-Christophe Dubois
Thanks Fabien, Now, as a side question, could you tell me which reference LEON3 platform is implemented by Qemu in leon3_generic? It doesn't seem to match the one emulated by tsim. Thanks. JC Le 2018-01-11 12:48, Fabien Chouteau a écrit : On 10/01/2018 21:43, Jean-Christophe Dubois wrote:

Re: [Qemu-devel] [PATCH v5 2/4][RFC] tap: do not close fd if only vhost failed to initialize

2018-01-11 Thread Zhoujian (jay)
> -Original Message- > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Thursday, January 11, 2018 6:30 PM > To: Zhoujian (jay) ; qemu-devel@nongnu.org > Cc: Huangweidong (C) ; m...@redhat.com; wangxin (U) > ; Gonglei (Arei) ; > imamm...@redhat.com; Liuzhe (Ahriy, Euler) > Subject: Re

Re: [Qemu-devel] [PATCH] spapr: Correct compatibility mode setting for hotplugged CPUs

2018-01-11 Thread Greg Kurz
On Fri, 5 Jan 2018 14:07:29 +1100 David Gibson wrote: > On Thu, Jan 04, 2018 at 06:47:18PM +0100, Greg Kurz wrote: > > On Thu, 4 Jan 2018 15:24:05 +1100 > > David Gibson wrote: > > > > > Currently the pseries machine sets the compatibility mode for the > > > guest's cpus in two places: 1) at

[Qemu-devel] [Bug 1156632] Re: not receiving RESET event after system_reset command causes QMP connection to die

2018-01-11 Thread Bram Klein Gunnewiek
I'm not sure, the current implementation is multi-threaded so I won't hit this bug if its still present. If I can find the time I will make a proof of concept and test if the bug is still present. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribe

Re: [Qemu-devel] [PATCH v1 1/3] xlnx-zynqmp-rtc: Initial commit

2018-01-11 Thread Peter Maydell
On 9 January 2018 at 18:50, Alistair Francis wrote: > Initial commit of the ZynqMP RTC device. > > Signed-off-by: Alistair Francis Hi -- did you forget to send the cover letter for this series, or did the mailing list server drop it? I only see the 3 patch mails... thanks -- PMM

Re: [Qemu-devel] [PULL 00/14] Migration pull request

2018-01-11 Thread Peter Maydell
On 3 January 2018 at 09:38, Juan Quintela wrote: > Hi > > This are the changes for migration that are already reviewed. > > Please, apply. > > Later, Juan. > > > The following changes since commit 281f327487c9c9b1599f93c589a408bbf4a651b8: > > Merge remote-tracking branch > 'remotes/vivier/tags/

Re: [Qemu-devel] [PATCH] LEON3 IRQMP: Fix IRQ software ack

2018-01-11 Thread Fabien Chouteau
On 10/01/2018 21:43, Jean-Christophe Dubois wrote: > With the LEON3 IRQ controller IRQs can be acknoledged 2 ways: > * Explicitely by software writing to the CLEAR_OFFSET register > * Implicitely when the procesor is done running the trap handler attached > to the IRQ. > Thanks Jean-Christophe,

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/1] spapr: Check SMT based on KVM_CAP_PPC_SMT_POSSIBLE

2018-01-11 Thread Laurent Vivier
On 06/01/2018 01:47, Jose Ricardo Ziviani wrote: > Power9 supports 4 HW threads/core but it's possible to emulate > doorbells to implement virtual SMT. KVM has the KVM_CAP_PPC_SMT_POSSIBLE > which returns a bitmap with all SMT modes supported by the host. > > Today, QEMU forces the SMT mode based

Re: [Qemu-devel] [PATCH v21 2/5 RESEND] virtio-balloon: VIRTIO_BALLOON_F_SG

2018-01-11 Thread Tetsuo Handa
Wei Wang wrote: > Michael, could we merge patch 3-5 first? No! I'm repeatedly asking you to propose only VIRTIO_BALLOON_F_SG changes. Please don't ignore me. Patch 4 depends on patch 2. Thus, back to patch 2. Your patch is trying to switch tell_host_sgs() and tell_host() based on VIRTIO_BALLOO

Re: [Qemu-devel] [PULL] qemu-sparc updates

2018-01-11 Thread Peter Maydell
On 9 January 2018 at 22:18, Mark Cave-Ayland wrote: > Thanks for the hint - while it didn't crash locally, I was certainly able to > reproduce the above trace in valgrind. > > Turns out the issue was that thought I could move pci_register_bus() from > realize to init in patch 10, but evidently not

Re: [Qemu-devel] vhost-pci and virtio-vhost-user

2018-01-11 Thread Jason Wang
On 2018年01月11日 00:14, Stefan Hajnoczi wrote: Hi Wei, I wanted to summarize the differences between the vhost-pci and virtio-vhost-user approaches because previous discussions may have been confusing. vhost-pci defines a new virtio device type for each vhost device type (net, scsi, blk). It th

Re: [Qemu-devel] [PATCH v4 10/11] tests: Adjust sleeps for migration test

2018-01-11 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Also reorder code to not sleep when event already happened. > > Signed-off-by: Juan Quintela > --- > tests/migration-test.c | 29 ++--- > 1 file changed, 14 insertions(+), 15 deletions(-) > > diff --git a/tests/migration-tes

Re: [Qemu-devel] [RFC PATCH 0/3] vfio: ccw: basic channel path event handling

2018-01-11 Thread Cornelia Huck
On Thu, 11 Jan 2018 04:04:18 +0100 Dong Jia Shi wrote: > Hi Folks, > > Background > == > > Some days ago, we had a discussion on the topic of channel path > virtualization. > Ref: > Subject: [PATCH 0/3] Channel Path realted CRW generation > Message-Id: <20170727015418.85407-1-bjsdj...@

Re: [Qemu-devel] [PATCH] vga: check the validation of memory addr when draw text

2018-01-11 Thread P J P
+-- On Mon, 25 Dec 2017, linzhecheng wrote --+ | --- a/hw/display/vga.c | +++ b/hw/display/vga.c | @@ -1279,6 +1279,10 @@ static void vga_draw_text(VGACommonState *s, int full_update) | cx_min = width; | cx_max = -1; | for(cx = 0; cx < width; cx++) { | +if (s

Re: [Qemu-devel] [RFC PATCH v3 00/30] replay additions

2018-01-11 Thread no-reply
Hi, This series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Message-id: 20180111082452.27295.85707.stgit@pasha-VirtualBox Subject: [Qemu-devel] [RFC PATCH v3 00/30] replay a

Re: [Qemu-devel] [RFC PATCH v3 00/30] replay additions

2018-01-11 Thread no-reply
Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20180111082452.27295.85707.stgit@pasha-VirtualBox Subject: [Qemu-devel] [RFC PATCH v3 00/30] replay additions === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git

Re: [Qemu-devel] [Qemu-arm] [PATCH v14 5/9] target-arm: kvm64: inject synchronous External Abort

2018-01-11 Thread gengdongjiu
On 2018/1/11 17:53, Peter Maydell wrote: >> we only support AArch64 kernel, not support AArch32 >> kernel or AArch32 user space. > Nope, you must handle AArch32 EL1 correctly in some way, even if that > is only "this guest CPU doesn't support RAS notification and we > will not notify it". And you

Re: [Qemu-devel] [PATCH v4 09/11] tests: Create migrate-start-postcopy command

2018-01-11 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > This way, it is like the rest of commands > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > tests/migration-test.c | 14 ++ > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/tests/migratio

Re: [Qemu-devel] [PATCH v5 2/4][RFC] tap: do not close fd if only vhost failed to initialize

2018-01-11 Thread Jason Wang
On 2018年01月11日 11:54, Zhoujian (jay) wrote: Hi Jason, -Original Message- From: Jason Wang [mailto:jasow...@redhat.com] Sent: Thursday, January 11, 2018 11:35 AM To: Zhoujian (jay) ; qemu-devel@nongnu.org Cc: Huangweidong (C) ; m...@redhat.com; wangxin (U) ; Gonglei (Arei) ; imamm...@r

Re: [Qemu-devel] [PATCH v4 0/5] Add a valid_cpu_types property

2018-01-11 Thread Igor Mammedov
On Wed, 10 Jan 2018 19:48:00 -0200 Eduardo Habkost wrote: > On Wed, Jan 10, 2018 at 01:30:29PM -0800, Alistair Francis wrote: > > On Thu, Dec 28, 2017 at 6:59 AM, Eduardo Habkost > > wrote: > > > On Thu, Dec 28, 2017 at 02:39:31PM +0100, Igor Mammedov wrote: > > >> On Fri, 22 Dec 2017 11:47

Re: [Qemu-devel] [PATCH] cpu: flush TB cache when loading VMState

2018-01-11 Thread Peter Maydell
On 11 January 2018 at 10:15, Paolo Bonzini wrote: > RAM contents are memcpy'd blindly during loadvm. I think that's what > requires a tb_flush. Ah, that makes sense. Could we have a comment documenting the rationale, please? Something like: /* vmload has just updated the content of RAM, bypassi

[Qemu-devel] [PATCH] virtio: improve virtio devices initialization time

2018-01-11 Thread Gal Hammer
The loading time of a VM is quite significant when its virtio devices uses a large amount of virt-queues (e.g. a virtio-serial device with max_ports=511). Most of the time is spend in the creation of all the required event notifiers (ioeventfd and memory regions). This patch pack all the changes t

Re: [Qemu-devel] [PATCH] cpu: flush TB cache when loading VMState

2018-01-11 Thread Paolo Bonzini
On 10/01/2018 19:32, Peter Maydell wrote: > On 10 January 2018 at 17:49, Richard Henderson > wrote: >> On 01/10/2018 05:48 AM, Pavel Dovgalyuk wrote: >>> Flushing TB cache is required because TBs key in the cache may match >>> different code which existed in the previous state. >>> >>> Signed-off-

Re: [Qemu-devel] vhost-pci and virtio-vhost-user

2018-01-11 Thread Stefan Hajnoczi
On Thu, Jan 11, 2018 at 6:31 AM, Wei Wang wrote: > On 01/11/2018 12:14 AM, Stefan Hajnoczi wrote: >> >> Hi Wei, >> I wanted to summarize the differences between the vhost-pci and >> virtio-vhost-user approaches because previous discussions may have been >> confusing. >> >> vhost-pci defines a new

Re: [Qemu-devel] [PULL v3] target/xtensa updates

2018-01-11 Thread Peter Maydell
On 9 January 2018 at 18:17, Max Filippov wrote: > Hi Peter, > > please pull the following batch of updates for the target/xtensa. > Changes v2->v3: > - Don't use g_malloc_n, use g_new instead. > Changes v1->v2: > - Drop no longer used function option_bits_enabled. > > The following changes since c

Re: [Qemu-devel] [Qemu-arm] [PATCH v14 5/9] target-arm: kvm64: inject synchronous External Abort

2018-01-11 Thread Peter Maydell
On 11 January 2018 at 05:59, gengdongjiu wrote: > Hi Peter. > > On 2018/1/10 1:30, Peter Maydell wrote: >> On 28 December 2017 at 05:54, Dongjiu Geng wrote: >>> + >>> +/* This exception comes from lower or current exception level. */ >>> +if ((cpsr & 0xf) == PSTATE_MODE_EL0t) { >> >> Thi

Re: [Qemu-devel] [PATCH qemu] target/ppc: Yet another fix for KVM-HV HPTE accessors

2018-01-11 Thread David Gibson
On Thu, Jan 11, 2018 at 08:06:13AM +, Mark Cave-Ayland wrote: > On 11/01/18 04:08, Alexey Kardashevskiy wrote: > > > As stated in the 1ad9f0a464fe commit log, the returned entries are not > > a while PTEG. It was not a problem before 1ad9f0a464fe as it would read > > s/while/whole/? I alread

Re: [Qemu-devel] [PATCH v2 0/1] input-linux: provide hotkeys for evdev toggle

2018-01-11 Thread Gerd Hoffmann
Hi, > I wonder if it is reasonable for ui/input-linux.c to honour the same > global '-ungrab' configuration option ? No. Problem here is that input-linux is basically sniffing keyboard input when the host owns the keyboard, so it can't prevent the hotkey being seen by the host. Therefore I pi

Re: [Qemu-devel] [Qemu-block] [PATCH 0/2] qemu-img: Let "info" warn and go ahead without -U

2018-01-11 Thread Kashyap Chamarthy
On Wed, Jan 10, 2018 at 04:43:22PM +, Nir Soffer wrote: > On Wed, Jan 10, 2018 at 4:04 PM Kashyap Chamarthy > wrote: [...] > > Yes, for completness' sake, Nova upstream is already patched to use the > > `qemu-img` '--force-share' flag that comes with QEMU >= 2.10. > > > > What abut users ru

Re: [Qemu-devel] [PATCH v3 14/21] SiFive RISC-V PLIC Block

2018-01-11 Thread Antony Pavlov
On Wed, 10 Jan 2018 18:21:57 -0800 Michael Clark wrote: > The PLIC (Platform Level Interrupt Controller) device provides a > parameterizable interrupt controller based on SiFive's PLIC specification. > > Signed-off-by: Michael Clark > --- > hw/riscv/sifive_plic.c | 554 > +

[Qemu-devel] [RFC PATCH v3 23/30] replay: avoid recursive call of checkpoints

2018-01-11 Thread Pavel Dovgalyuk
This patch adds a flag which denies recursive call of replay_checkpoint function. Checkpoints may be accompanied by the hardware events. When event is processed, virtual device may invoke timer modification functions that also invoke the checkpoint function. This leads to infinite loop. Signed-off

[Qemu-devel] [RFC PATCH v3 30/30] replay: don't process async events when warping the clock

2018-01-11 Thread Pavel Dovgalyuk
Virtual clock is wapred from iothread and vcpu thread. When the hardware events associated with warp checkpoint, then interrupt delivering may be non-deterministic if checkpoint is processed in different threads in record and replay. This patch disables event processing for clock warp checkpoint an

[Qemu-devel] [RFC PATCH v3 22/30] replay: check return values of fwrite

2018-01-11 Thread Pavel Dovgalyuk
This patch adds error reporting when fwrite cannot completely save the buffer to the file. Signed-off-by: Pavel Dovgalyuk -- v3: also check putc() return value --- replay/replay-internal.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/replay/replay-in

[Qemu-devel] [RFC PATCH v3 26/30] scripts/analyse-locks-simpletrace.py: script to analyse lock times

2018-01-11 Thread Pavel Dovgalyuk
From: Alex Bennée This script allows analysis of mutex acquisition and hold times based on a trace file. Given a trace control file of: qemu_mutex_lock qemu_mutex_locked qemu_mutex_unlock And running with: $QEMU $QEMU_ARGS -trace events=./lock-trace You can analyse the results with:

[Qemu-devel] [RFC PATCH v3 29/30] replay: improve replay performance

2018-01-11 Thread Pavel Dovgalyuk
This patch skips cpu_exec when there is no CPU code to execute in replay mode. Signed-off-by: Pavel Dovgalyuk Signed-off-by: Maria Klimushenkova --- cpus.c | 50 +-- include/sysemu/replay.h |3 +++ replay/replay.c | 13

[Qemu-devel] [RFC PATCH v3 19/30] replay: make locking visible outside replay code

2018-01-11 Thread Pavel Dovgalyuk
From: Alex Bennée The replay_mutex_lock/unlock/locked functions are now going to be used for ensuring lock-step behaviour between the two threads. Make them public API functions and also provide stubs for non-QEMU builds on common paths. Signed-off-by: Alex Bennée Tested-by: Pavel Dovgalyuk --

[Qemu-devel] [RFC PATCH v3 28/30] scripts/qemu-gdb/timers.py: new helper to dump timer state

2018-01-11 Thread Pavel Dovgalyuk
From: Alex Bennée This introduces the qemu-gdb command "qemu timers" which will dump the state of the main timers in the system. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- scripts/qemu-gdb.py |3 ++- scripts/qemugdb/timers.py | 54 ++

[Qemu-devel] [RFC PATCH v3 20/30] replay: push replay_mutex_lock up the call tree

2018-01-11 Thread Pavel Dovgalyuk
From: Alex Bennée Now instead of using the replay_lock to guard the output of the log we now use it to protect the whole execution section. This replaces what the BQL used to do when it was held during TCG execution. We also introduce some rules for locking order - mainly that you cannot take th

[Qemu-devel] [RFC PATCH v3 27/30] scripts/replay-dump.py: replay log dumper

2018-01-11 Thread Pavel Dovgalyuk
From: Alex Bennée This script is a debugging tool for looking through the contents of a replay log file. It is incomplete but should fail gracefully at events it doesn't understand. It currently understands two different log formats as the audio record/replay support was merged during since MTTC

[Qemu-devel] [RFC PATCH v3 15/30] cpus: push BQL lock to qemu_*_wait_io_event

2018-01-11 Thread Pavel Dovgalyuk
From: Alex Bennée We only really need to grab the lock for initial setup (so we don't race with the thread-spawning thread). After that we can drop the lock for the whole main loop and only grab it for waiting for IO events. There is a slight wrinkle for the round-robin TCG thread as we also exp

[Qemu-devel] [RFC PATCH v3 24/30] scripts/qemu-gdb: add simple tcg lock status helper

2018-01-11 Thread Pavel Dovgalyuk
From: Alex Bennée Add a simple helper to dump lock state. Signed-off-by: Alex Bennée --- scripts/qemu-gdb.py|3 ++- scripts/qemugdb/tcg.py | 46 ++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 scripts/qemugdb/tcg.py

[Qemu-devel] [RFC PATCH v3 16/30] cpus: only take BQL for sleeping threads

2018-01-11 Thread Pavel Dovgalyuk
From: Alex Bennée Now the only real need to hold the BQL is for when we sleep on the cpu->halt conditional. The lock is actually dropped while the thread sleeps so the actual window for contention is pretty small. This also means we can remove the special case hack for exclusive work and simply d

[Qemu-devel] [RFC PATCH v3 25/30] util/qemu-thread-*: add qemu_lock, locked and unlock trace events

2018-01-11 Thread Pavel Dovgalyuk
From: Alex Bennée Signed-off-by: Alex Bennée --- v1 - fix merge conflicts with existing tracing - add trylock/cond_wait traces --- include/qemu/thread.h| 19 +++ util/qemu-thread-posix.c | 21 - util/trace-events|7 --- 3 files ch

[Qemu-devel] [RFC PATCH v3 17/30] replay/replay.c: bump REPLAY_VERSION again

2018-01-11 Thread Pavel Dovgalyuk
From: Alex Bennée This time commit 802f045a5f61b781df55e4492d896b4d20503ba7 broke the replay file format. Also add a comment about this to replay-internal.h. Signed-off-by: Alex Bennée Reviewed-off-by: Pavel Dovgalyuk Acked-by: Paolo Bonzini --- replay/replay-internal.h |2 +- replay/rep

[Qemu-devel] [RFC PATCH v3 11/30] replay: make safe vmstop at record/replay

2018-01-11 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch disables bdrv flush/drain in record/replay mode. When block request is in the replay queue it cannot be processed with drain/flush until it is found in the log. Therefore vm should just stop leaving unfinished operations in the queue. Signed-off-by: Pavel Dovgaly

[Qemu-devel] [RFC PATCH v3 14/30] target/arm/arm-powertctl: drop BQL assertions

2018-01-11 Thread Pavel Dovgalyuk
From: Alex Bennée The powerctl code is run in the context of the vCPU changing power state. It does not need the BQL to protect its changes. Signed-off-by: Alex Bennée --- target/arm/arm-powerctl.c |8 1 file changed, 8 deletions(-) diff --git a/target/arm/arm-powerctl.c b/target

[Qemu-devel] [RFC PATCH v3 21/30] replay: don't destroy mutex at exit

2018-01-11 Thread Pavel Dovgalyuk
Replay mutex is held by vCPU thread and destroy function is called from atexit of the main thread. Therefore we cannot destroy it safely. Signed-off-by: Pavel Dovgalyuk Acked-by: Paolo Bonzini --- replay/replay.c |1 - 1 file changed, 1 deletion(-) diff --git a/replay/replay.c b/replay/rep

[Qemu-devel] [RFC PATCH v3 12/30] replay: save prior value of the host clock

2018-01-11 Thread Pavel Dovgalyuk
This patch adds saving/restoring of the host clock field 'last'. It is used in host clock calculation and therefore clock may become incorrect when using restored vmstate. Signed-off-by: Pavel Dovgalyuk Acked-by: Paolo Bonzini --- include/qemu/timer.h | 14 ++ replay/replay-in

[Qemu-devel] [RFC PATCH v3 10/30] replay: added replay log format description

2018-01-11 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch adds description of the replay log file format into the docs/replay.txt. Signed-off-by: Pavel Dovgalyuk Acked-by: Paolo Bonzini --- docs/replay.txt | 69 +++ 1 file changed, 69 insertions(+) diff --git a/d

[Qemu-devel] [RFC PATCH v3 18/30] replay/replay-internal.c: track holding of replay_lock

2018-01-11 Thread Pavel Dovgalyuk
From: Alex Bennée This is modelled after the iothread mutex lock. We keep a TLS flag to indicate when that thread has acquired the lock and assert we don't double-lock or release when we shouldn't have. Signed-off-by: Alex Bennée Tested-by: Pavel Dovgalyuk --- replay/replay-internal.c | 11

[Qemu-devel] [RFC PATCH v3 09/30] replay: fix save/load vm for non-empty queue

2018-01-11 Thread Pavel Dovgalyuk
This patch does not allows saving/loading vmstate when replay events queue is not empty. There is no reliable way to save events queue, because it describes internal coroutine state. Therefore saving and loading operations should be deferred to another record/replay step. Signed-off-by: Pavel Dovg

[Qemu-devel] [RFC PATCH v3 08/30] replay: fixed replay_enable_events

2018-01-11 Thread Pavel Dovgalyuk
This patch fixes assignment to internal events_enabled variable. Now it is set only in record/replay mode. This affects the behavior of the external functions that check this flag. Signed-off-by: Pavel Dovgalyuk Acked-by: Paolo Bonzini --- replay/replay-events.c |8 +--- 1 file changed,

[Qemu-devel] [RFC PATCH v3 06/30] replay: disable default snapshot for record/replay

2018-01-11 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch disables setting '-snapshot' option on by default in record/replay mode. This is needed for creating vmstates in record and replay modes. Signed-off-by: Pavel Dovgalyuk --- vl.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vl.c

[Qemu-devel] [RFC PATCH v3 13/30] icount: fixed saving/restoring of icount warp timers

2018-01-11 Thread Pavel Dovgalyuk
This patch adds saving and restoring of the icount warp timers in the vmstate. It is needed because there timers affect the virtual clock value. Therefore determinism of the execution in icount record/replay mode depends on determinism of the timers. Signed-off-by: Pavel Dovgalyuk Acked-by: Paolo

[Qemu-devel] [RFC PATCH v3 04/30] block: implement bdrv_snapshot_goto for blkreplay

2018-01-11 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch enables making snapshots with blkreplay used in block devices. This function is required to make bdrv_snapshot_goto without calling .bdrv_open which is not implemented. Signed-off-by: Pavel Dovgalyuk --- block/blkreplay.c |8 1 file changed, 8 inse

[Qemu-devel] [RFC PATCH v3 05/30] blkreplay: create temporary overlay for underlaying devices

2018-01-11 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk This patch allows using '-snapshot' behavior in record/replay mode. blkreplay layer creates temporary overlays on top of underlaying disk images. It is needed, because creating an overlay over blkreplay breaks the determinism. This patch creates similar temporary overlay (wh

[Qemu-devel] [RFC PATCH v3 02/30] cpu: flush TB cache when loading VMState

2018-01-11 Thread Pavel Dovgalyuk
Flushing TB cache is required because TBs key in the cache may match different code which existed in the previous state. Signed-off-by: Pavel Dovgalyuk Signed-off-by: Maria Klimushenkova --- exec.c |1 + 1 file changed, 1 insertion(+) diff --git a/exec.c b/exec.c index 4722e52..ff31e71 100

[Qemu-devel] [RFC PATCH v3 07/30] replay: fix processing async events

2018-01-11 Thread Pavel Dovgalyuk
Asynchronous events saved at checkpoints may invoke callbacks when processed. These callbacks may also generate/read new events (e.g. clock reads). Therefore event processing flag must be reset before callback invocation. Signed-off-by: Pavel Dovgalyuk Acked-by: Paolo Bonzini --- replay/replay-

[Qemu-devel] [RFC PATCH v3 01/30] hpet: recover timer offset correctly

2018-01-11 Thread Pavel Dovgalyuk
HPET saves its state by calculating the current time and recovers timer offset using this calculated value. But these calculations include divisions and multiplications. Therefore the timer state cannot be recovered precise enough. This patch introduces saving of the original value of the offset to

[Qemu-devel] [RFC PATCH v3 03/30] This patch adds a condition before overwriting exception_index fields.

2018-01-11 Thread Pavel Dovgalyuk
It is needed when exception_index is already set to some meaningful value. Signed-off-by: Pavel Dovgalyuk Signed-off-by: Paolo Bonzini --- accel/tcg/cpu-exec.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 280200f..9

[Qemu-devel] [RFC PATCH v3 00/30] replay additions

2018-01-11 Thread Pavel Dovgalyuk
Accidentally sent draft version of patches to the mailing list. Please consider this one as the correct one. This set of patches includex fixes from Alex Bennée for fixing BQL and replay locks after inventing the MTTCG. It also includes some additional replay patches that makes this set of fixes w

Re: [Qemu-devel] [PATCHv2] linux-user: Add getcpu() support

2018-01-11 Thread Laurent Vivier
Le 11/01/2018 à 01:17, Samuel Thibault a écrit : > Signed-off-by: Samuel Thibault > > --- > Difference from v1: handle failure of put_user_u32 with goto efault; > --- > linux-user/syscall.c | 16 > 1 file changed, 16 insertions(+) > > diff --git a/linux-user/syscall.c b/linux-u

Re: [Qemu-devel] [RFC v6 07/27] monitor: unify global init

2018-01-11 Thread Peter Xu
On Wed, Jan 10, 2018 at 06:54:45AM -0600, Eric Blake wrote: > On 01/10/2018 02:26 AM, Peter Xu wrote: > > >> The later initialization of the monitor_lock mutex is a potential > >> semantic change. Please beef up the commit message to document why it > >> is safe. In fact, I requested this back o

Re: [Qemu-devel] [RFC v6 04/27] qobject: let object_property_get_str() use new API

2018-01-11 Thread Peter Xu
On Wed, Jan 10, 2018 at 06:59:13AM -0600, Eric Blake wrote: > On 01/10/2018 01:57 AM, Peter Xu wrote: > > On Tue, Jan 09, 2018 at 04:53:40PM -0600, Eric Blake wrote: > >> On 12/19/2017 02:45 AM, Peter Xu wrote: > >>> We can simplify object_property_get_str() using the new > >>> qobject_get_try_str(

Re: [Qemu-devel] [PATCH v2 05/21] RISC-V CPU Helpers

2018-01-11 Thread Christoph Hellwig
#ifdef CONFIG_USER_ONLY int riscv_cpu_mmu_index(CPURISCVState *env, bool ifetch) { return 0; } bool riscv_cpu_exec_interrupt(CPUState *cs, int interrupt_request) { return false; } int riscv_cpu_handle_mmu_fault(CPUState *cs, vaddr address, int access_type, int mmu_idx) { cs->e

Re: [Qemu-devel] [PATCH qemu] target/ppc: Yet another fix for KVM-HV HPTE accessors

2018-01-11 Thread Mark Cave-Ayland
On 11/01/18 04:08, Alexey Kardashevskiy wrote: As stated in the 1ad9f0a464fe commit log, the returned entries are not a while PTEG. It was not a problem before 1ad9f0a464fe as it would read s/while/whole/? a single record assuming it contains a whole PTEG but now the code tries reading the e

<    1   2   3   4