[Qemu-devel] [Bug 1790460] [NEW] -icount, sleep=off mode is broken (target slows down or hangs)

2018-09-03 Thread Artem Pisarenko
Public bug reported: QEMU running with options "-icount,sleep=off -rtc clock=vm" doesn't execute emulation at maximum possible speed. Target virtual clock may run faster or slower than realtime clock by N times, where N value depends on various unrelated conditions (i.e. random from the user po

[Qemu-devel] [Bug 1790460] Re: -icount, sleep=off mode is broken (target slows down or hangs)

2018-09-04 Thread Artem Pisarenko
This modification also fixes issue: https://git.greensocs.com/qemu/qbox/commit/a8ed106032e375e715a531d6e93e4d9ec295dbdb Although I tested it only on v2.12.0 and didn't noticed performance improvement. -- You received this bug notification because you are a member of qemu- devel-ml, which is subsc

[Qemu-devel] backend for blk or fs with guaranteed blocking/synchronous I/O

2018-09-06 Thread Artem Pisarenko
is always same. Actually, what I'm trying to achieve have direct contradiction with most people trying to avoid, because synchronous I/O degradates performance in vast majority of usage scenarios. Does anyone have any thoughts on this? Best regards, Artem Pisarenko -- С уважением, Артем Писаренко

Re: [Qemu-devel] backend for blk or fs with guaranteed blocking/synchronous I/O

2018-09-07 Thread Artem Pisarenko
7;t required to be persistent and stay on host during execution of containers. They may be transferred to guest RAM before execution. They're just source images of rootfs. чт, 6 сент. 2018 г. в 21:08, Michael S. Tsirkin : > On Thu, Sep 06, 2018 at 04:24:12PM +0600, Artem Pisarenko wrote: &

Re: [Qemu-devel] backend for blk or fs with guaranteed blocking/synchronous I/O

2018-09-10 Thread Artem Pisarenko
MB/s 55,9 MB/s 54,1 MB/s 56,0 MB/s Example runs on my tiny linux x86_64 guest (strange results): root@guest:~# ./test.sh 1 17.5 MB/s root@guest:~# ./test.sh 10 3.2 MB/s 2.7 MB/s 2.6 MB/s 2.0 MB/s 2.0 MB/s 1.9 MB/s 1.8 MB/s 1.8 MB/s 1.8 MB/s 1.8 MB/s Please, explain

[Qemu-devel] [PATCH] chardev: fix mess in OPENED/CLOSED events when muxed

2018-11-01 Thread Artem Pisarenko
en it does with mux=off). Fix that. Signed-off-by: Artem Pisarenko --- Notes: This issue actually more complex. Idea of generating events from inside function called '*_set_handlers' isn't good, at least its implicit nature, and especially a fact, that function decides a

[Qemu-devel] [PATCH] virtserialport/virtconsole: fix messy opening/closing port

2018-11-01 Thread Artem Pisarenko
This fixes wrong interfacing between virtio serial port and bus models, and corresponding chardev backends, caused extra and incorrect activity during guest boot process (when virtserialport device used). Signed-off-by: Artem Pisarenko --- Notes: Although this doesn't trigger any issu

Re: [Qemu-devel] [PATCH] chardev: fix mess in OPENED/CLOSED events when muxed

2018-11-04 Thread Artem Pisarenko
Sorry, I forgot to check unit tests. Although, it's very strange that this specific test failed while things work functionally... > I am a bit reluctant to take patches that don't actually "fix" things. > > Could you add some tests to demonstrate the problems? Ok >> @@ -257,6 +257,7 @@ void qemu

[Qemu-devel] [PATCH v2 0/2] chardev: fix mess in OPENED/CLOSED events when muxed

2018-11-05 Thread Artem Pisarenko
optimization of emulation performance by avoiding extra activity. Added testing demonstrates issue and prevents potential bugs in future. v2 changes: - fix failed unit test - 'mux_chr_set_handlers()' hack rewritten (as supposed by Marc-André Lureau) - added testing of issue to unit tes

[Qemu-devel] [PATCH v2 1/2] chardev: fix mess in OPENED/CLOSED events when muxed

2018-11-05 Thread Artem Pisarenko
en it does with mux=off). Fix that. Signed-off-by: Artem Pisarenko --- chardev/char-fe.c | 33 - chardev/char-mux.c| 16 include/chardev/char-fe.h | 18 +- 3 files changed, 49 insertions(+), 18 deletions(-) diff --

[Qemu-devel] [PATCH v2 2/2] tests/test-char: add muxed chardev testing for open/close

2018-11-05 Thread Artem Pisarenko
Validate that frontend callbacks for CHR_EVENT_OPENED/CHR_EVENT_CLOSED events are being issued when expected and in strictly pairing order. Signed-off-by: Artem Pisarenko --- tests/test-char.c | 80 +-- 1 file changed, 78 insertions(+), 2

Re: [Qemu-devel] [PULL 03/48] qemu-timer: introduce timer attributes

2018-11-05 Thread Artem Pisarenko
> hw/core/ptimer.o: In function `timer_new_tl': > /home/eblake/qemu/include/qemu/timer.h:536: undefined reference to > `timer_init_tl' > collect2: error: ld returned 1 exit status > make: *** [/home/eblake/qemu/rules.mak:124: tests/ptimer-test] Error 1 > make: *** Waiting for unfinished jobs I

[Qemu-devel] [PATCH v3 0/2] chardev: fix mess in OPENED/CLOSED events when muxed

2018-11-06 Thread Artem Pisarenko
; hack rewritten (as supposed by Marc-André Lureau) - added testing of issue to unit test (new patch) Artem Pisarenko (2): chardev: fix mess in OPENED/CLOSED events when muxed tests/test-char: add muxed chardev testing for open/close chardev/char-fe.c | 33 +--

Re: [Qemu-devel] [PATCH v2 2/2] tests/test-char: add muxed chardev testing for open/close

2018-11-06 Thread Artem Pisarenko
> this is unnecessary change, I can drop on commit Oops, didn't noticed your message before sent v3.

[Qemu-devel] [PATCH v3 1/2] chardev: fix mess in OPENED/CLOSED events when muxed

2018-11-06 Thread Artem Pisarenko
version of this function with added argument for disabling side effect and keep original function for compatibility with lots of frontends already using this interface and being "tolerant" to its side effects. One more source of event duplication is just line of code in char-mux.c, which does

[Qemu-devel] [PATCH v3 2/2] tests/test-char: add muxed chardev testing for open/close

2018-11-06 Thread Artem Pisarenko
Validate that frontend callbacks for CHR_EVENT_OPENED/CHR_EVENT_CLOSED events are being issued when expected and in strictly pairing order. Signed-off-by: Artem Pisarenko --- tests/test-char.c | 80 +-- 1 file changed, 78 insertions(+), 2

[Qemu-devel] [PATCH] netdev: fix socket backend implementation and docs

2018-11-06 Thread Artem Pisarenko
ases where "host" part is documented as required but isn't provided); - some error messages improved; - other small fixes and refactoring in code. Signed-off-by: Artem Pisarenko --- Notes: (Since these changes are closely related, I've combined them in one patch.) This

Re: [Qemu-devel] [PATCH] netdev: fix socket backend implementation and docs

2018-11-13 Thread Artem Pisarenko
g hardly broken and given new fresh look and view. If you still insist on patch series, I'll do it, but later, much later (didn't planned such large efforts on this). пн, 12 нояб. 2018 г. в 21:31, Daniel P. Berrangé : > On Wed, Nov 07, 2018 at 12:57:30PM +0600, Artem Pisarenko wrote:

[Qemu-devel] [PATCH v6 00/25] Fixing record/replay and adding reverse debugging

2018-09-30 Thread Artem Pisarenko
Feature still broken :( Brief description of my tests. Guest image is Linux, which just powers off after kernel boots (instead of proceeding to user-space /init or /sbin/init). Base cmdline: qemu-system-x86_64 -nodefaults -machine pc,accel=tcg -m 2048 -cpu qemu64 -rtc clock=vm,base=2000-01-01T00:

[Qemu-devel] [Bug 1795369] [NEW] Record/replay (icount rr) causes emulation hang or exit with error about missing events in log

2018-10-01 Thread Artem Pisarenko
Public bug reported: Test case description: Guest image is Linux, which just powers off after kernel boots (instead of proceeding to user-space /init or /sbin/init). Base cmdline: qemu-system-x86_64 \ -nodefaults -nographic -machine pc,accel=tcg -m 2048 -cpu qemu64 \ -kernel bzImage -i

[Qemu-devel] [Bug 1795369] Re: Record/replay (icount rr) causes emulation hang or exit with error about missing events in log

2018-10-01 Thread Artem Pisarenko
Applying recent patches from http://lists.nongnu.org/archive/html/qemu- devel/2018-09/msg04038.html doesn't fix any of issues. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1795369 Title: Record/re

Re: [Qemu-devel] [PATCH v6 00/25] Fixing record/replay and adding reverse debugging

2018-10-01 Thread Artem Pisarenko
#x27;ll be able to reproduce issue again. Speaking about '-nographic' and SDL... I've noted that UI greatly minimizes possibility of hanging (but not avoids it completely) when using icount in general, so this effect isn't rr-specific. I've already reported this bug too. пн, 1 о

Re: [Qemu-devel] [PATCH v6 00/25] Fixing record/replay and adding reverse debugging

2018-10-02 Thread Artem Pisarenko
ep = 607069789 ... Some notes on value of step it stucks on: - mostly it's same (even across different record-replay pairs); - stressing host during replay may cause it to change even for same record-replay pair (i.e. different replay executions for same file recorded). This specific ca

Re: [Qemu-devel] [PATCH v6 00/25] Fixing record/replay and adding reverse debugging

2018-10-04 Thread Artem Pisarenko
e.com/qemu-devel@nongnu.org/msg563798.html > > I also encountered the problems with x86_64 replaying and found the > misprint in > the code which was fixed later, than sending the series to the mailing > list. > > Pavel Dovgalyuk > > > Artem Pisarenko писал 2018-10-02 10:02: >

Re: [Qemu-devel] [PATCH v6 00/25] Fixing record/replay and adding reverse debugging

2018-10-09 Thread Artem Pisarenko
,6 +3907,9 @@ int main(int argc, char **argv, char **envp) > > loc_set_none(); > > replay_configure(icount_opts); > > +if (rtc_opts) { > > +configure_rtc(rtc_opts); > > +} > > if (incoming && !preconfig_exit_requested) { > > error_r

Re: [Qemu-devel] [PATCH v6 00/25] Fixing record/replay and adding reverse debugging

2018-10-09 Thread Artem Pisarenko
nu.org/msg560780.html > > > > Pavel Dovgalyuk > > > > *From:* Artem Pisarenko [mailto:artem.k.pisare...@gmail.com] > *Sent:* Tuesday, October 09, 2018 2:24 PM > *To:* Pavel Dovgalyuk > > > *Cc:* pavel.dovga...@ispras.ru; qemu-devel@nongnu.org > *Subject:

[Qemu-devel] [Bug 1797033] [NEW] Running with -rtc clock=vm, base= introduces arbitrary base shift at guest startup

2018-10-09 Thread Artem Pisarenko
Public bug reported: When specifying 'base' for RTC to start with, it has incorrect implementation in combination with clock=vm. I inspected source code. This is because it uses host clock (qemu_time() function return value) as reference with 'rtc_date_offset' operations across several places in

[Qemu-devel] [Bug 1797033] Re: Running with -rtc clock=vm, base= introduces arbitrary base shift at guest startup

2018-10-09 Thread Artem Pisarenko
Why I didn't posted patch to qemu-devel ? I have no idea how to patch it correctly, because it isn't clear how these things are expected to work when referenced across all qemu code and different use cases. Should vl.c/qemu_get_timedate() just be fixed ? Does each caller expect same behavior fro

[Qemu-devel] [PATCH 0/4] Fix and improve core RTC function and documentation

2018-10-11 Thread Artem Pisarenko
ch have unreasonable duplications of actions performed by vl.c. I'm sure such kind of rework will reveal more hidden bugs/features, but so far I've had enough (it's a long story how muсh effort and pain cost me to find that tricky bug above). I suppose just to draw attention of relevant hw

[Qemu-devel] [PATCH 1/4] vl: improve/fix documentation related to RTC function

2018-10-11 Thread Artem Pisarenko
Documentation describing -rtc option updated to better match current implementation and highlight some important specifics. Signed-off-by: Artem Pisarenko --- qemu-options.hx | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx

[Qemu-devel] [PATCH 2/4] vl: refactor -rtc option references

2018-10-11 Thread Artem Pisarenko
Improve code readability and prepare for fixing bug #1797033 Signed-off-by: Artem Pisarenko --- vl.c | 82 +--- 1 file changed, 49 insertions(+), 33 deletions(-) diff --git a/vl.c b/vl.c index 4e25c78..3a1346f 100644 --- a/vl.c

[Qemu-devel] [PATCH 3/4] Fixes RTC bug with base datetime shifts in clock=vm

2018-10-11 Thread Artem Pisarenko
ug/1797033 Signed-off-by: Artem Pisarenko --- vl.c | 54 +- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/vl.c b/vl.c index 3a1346f..d60018f 100644 --- a/vl.c +++ b/vl.c @@ -152,8 +152,10 @@ static enum { RTC_BASE

[Qemu-devel] [PATCH 4/4] vl, qapi: offset value calculation in RTC_CHANGE event reverted to match behavior before #1797033 bugfix and documented

2018-10-11 Thread Artem Pisarenko
to highlight established implementation specifics. Signed-off-by: Artem Pisarenko --- qapi/misc.json | 3 ++- vl.c | 10 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/qapi/misc.json b/qapi/misc.json index ada9af5..ed866f2 100644 --- a/qapi/misc.json +++ b/qapi/mis

Re: [Qemu-devel] [PATCH v7 18/19] replay: init rtc after enabling the replay

2018-10-11 Thread Artem Pisarenko
I guess 'configure_rtc' function is not the only one which call should be postponed. Since record/replay uses its 'hooks' at very low levels of qemu core, any option processing is subject to potential indirect dependence on effects of 'replay_configure' call. The most apparent example would be 'qem

Re: [Qemu-devel] [PATCH v7 19/19] replay: document development rules

2018-10-11 Thread Artem Pisarenko
Great! I'm voting with all my fingers up for such rules. But I would suggest even more generic rules which prevent breaking determinism in a more wide sense. At least, where such breakage is trivial to avoid. Currently I'm working on modification, which extends conditions where guest execution is

[Qemu-devel] [Bug 1790460] Re: -icount, sleep=off mode is broken (target slows down or hangs)

2018-10-12 Thread Artem Pisarenko
Long-term testing showed that my trivial adaptation didn't fixed issue and I sticked to modification from QBox. It didn't failed yet. And yes, issue still relevant to current master branch. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to Q

[Qemu-devel] [PATCH 1/3] Revert some patches from recent series [PATCH v6] "Fixing record/replay and adding reverse debugging", which introduced new virtual clock type for use in external subsystems.

2018-10-14 Thread Artem Pisarenko
This reverts commit 87f4fe7653baf55b5c2f2753fe6003f473c07342. This reverts commit 775a412bf83f6bc0c5c02091ee06cf649b34c593. This reverts commit 9888091404a702d7ec79d51b088d994b9fc121bd. Signed-off-by: Artem Pisarenko --- include/qemu/timer.h | 9 - slirp/ip6_icmp.c | 7 +++ ui

[Qemu-devel] [PATCH 0/3] Introduce attributes for timers subsystem and remove QEMU_CLOCK_VIRTUAL_EXT clock type

2018-10-14 Thread Artem Pisarenko
hat performance degradation expected to be very small and appear only in record/replay mode. P.S. I've tried to test record/replay with slirp, but in replay mode qemu stucks at guest linux boot after "Configuring network interfaces..." message, where DHCP communication takes place.

[Qemu-devel] [PATCH 2/3] Introduce attributes to qemu timer subsystem

2018-10-14 Thread Artem Pisarenko
variants of functions, which create/initialize timers. Signed-off-by: Artem Pisarenko --- Notes: Conversion and association between QEMUTimerAttrBit and accessor macro are dumb. Maybe better alternatives exist (like QFlags in Qt framework) or existing qemu code may be reused, if any

[Qemu-devel] [PATCH 3/3] Restores record/replay behavior related to special virtual clock processing for timers used in external subsystems.

2018-10-14 Thread Artem Pisarenko
: 775a412bf83f6bc0c5c02091ee06cf649b34c593 Fixes: 9888091404a702d7ec79d51b088d994b9fc121bd Signed-off-by: Artem Pisarenko --- include/qemu/timer.h | 10 ++-- slirp/ip6_icmp.c | 4 +++- ui/input.c | 5 ++-- util/qemu-timer.c| 67 4 files changed

Re: [Qemu-devel] [PATCH 3/3] Restores record/replay behavior related to special virtual clock processing for timers used in external subsystems.

2018-10-14 Thread Artem Pisarenko
be processed but no checkpoint will be preceeded. I didn't figured out how to workaround it yet... вс, 14 окт. 2018 г. в 20:57, Artem Pisarenko : > Adds EXTERNAL attribute definition to qemu timers subsystem and assigns it > to virtual clock timers, used in slirp (ICMP IPv6) and ui (key que

[Qemu-devel] [PATCH v2] Restores record/replay behavior related to special virtual clock processing for timers used in external subsystems.

2018-10-15 Thread Artem Pisarenko
: 775a412bf83f6bc0c5c02091ee06cf649b34c593 Fixes: 9888091404a702d7ec79d51b088d994b9fc121bd Signed-off-by: Artem Pisarenko --- Notes: v2: fixes race condition and reimplements synchronization between checkpointing and timers processing in qemu-timer.c qemu-timer.c: It has one more difference from original

[Qemu-devel] [PATCH v2] Restores record/replay behavior related to special virtual clock processing for timers used in external subsystems.

2018-10-16 Thread Artem Pisarenko
: 775a412bf83f6bc0c5c02091ee06cf649b34c593 Fixes: 9888091404a702d7ec79d51b088d994b9fc121bd Signed-off-by: Artem Pisarenko --- Notes: v2: fixes race condition and reimplements synchronization between checkpointing and timers processing in qemu-timer.c qemu-timer.c: It has one more difference from original

[Qemu-devel] "socket" host network backend: suggested improvements and fixes

2018-05-30 Thread Artem Pisarenko
Hi to all. I'm working on integrating QEMU networking to simulation environment and found socket backend very convenient: it's simple, easy to use (i.e no intermediate things required, such as tap/tun adapter, vde switch, etc.) and transparent to host environment (i.e. it doesn't pollutes system w

[Qemu-devel] virtio-vsock feature has no TCG (non-KVM) support

2018-06-01 Thread Artem Pisarenko
Please, add important note to https://wiki.qemu.org/Features/VirtioVsock page, that this feature only supported in KVM accelerated mode. It's not obvious. Furthermore, it isn't checked by qemu when invoking with "-device vhost-vsock-pci,..." and user encounters this only when communicating (via AF_

Re: [Qemu-devel] [PATCH v8 20/20] replay: document development rules

2018-12-18 Thread Artem Pisarenko
> +Virtual devices can also use realtime clock for the events that do not change > +the guest state directly. When the clock ticking should depend on VM execution > +speed, use virtual ext clock. It is not deterministic, but its speed depends > +on the guest execution. This clock is used by the vir

[Qemu-devel] [PATCH v2] Introduce attributes to qemu timer subsystem

2018-10-16 Thread Artem Pisarenko
improved to avoid info duplication. Also existing aio interface extended with attribute-enabled variants of functions, which create/initialize timers. Signed-off-by: Artem Pisarenko --- Notes: v2: - timer creation/initialize functions reworked and and their unnecessary variants removed (as

[Qemu-devel] [PATCH v2 0/4] Introduce attributes for timers subsystem and remove QEMU_CLOCK_VIRTUAL_EXT clock type

2018-10-17 Thread Artem Pisarenko
n takes place. It's broken in a same way both in master and master with reverted commits being fixed. P.S.2. I wasn't able to test these patches on purely clean master branch because of bugs https://bugs.launchpad.net/qemu/+bug/1790460 and https://bugs.launchpad.net/qemu/+bug/179536

[Qemu-devel] [PATCH v2 1/4] Revert some patches from recent [PATCH v6] "Fixing record/replay and adding reverse debugging"

2018-10-17 Thread Artem Pisarenko
9888091404a702d7ec79d51b088d994b9fc121bd. Signed-off-by: Artem Pisarenko --- include/qemu/timer.h | 9 - slirp/ip6_icmp.c | 7 +++ ui/input.c | 8 util/qemu-timer.c| 2 -- 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/include/qemu/timer.h b

[Qemu-devel] [PATCH v2 2/4] Introduce attributes to qemu timer subsystem

2018-10-17 Thread Artem Pisarenko
'attribute' argument added, timer_list replaced with timer_list_group+type combinations, comments improved to avoid info duplication). Also existing aio interface extended with attribute-enabled variants of functions, which create/initialize timers. Signed-off-by: Artem Pisarenko --- Not

[Qemu-devel] [PATCH v2 4/4] Optimize record/replay checkpointing for all clocks it applies to

2018-10-17 Thread Artem Pisarenko
Removes redundant checkpoints in replay log when there are no expired timers in timers list, associated with corresponding clock (i.e. no rr events associated with current clock value). This also improves performance in rr mode. Signed-off-by: Artem Pisarenko --- include/qemu/timer.h | 2

[Qemu-devel] [PATCH v2 3/4] Restores record/replay behavior related to special virtual clock processing for timers used in external subsystems.

2018-10-17 Thread Artem Pisarenko
: 775a412bf83f6bc0c5c02091ee06cf649b34c593 Fixes: 9888091404a702d7ec79d51b088d994b9fc121bd Signed-off-by: Artem Pisarenko --- Notes: v2: fixes race condition and reimplements synchronization between checkpointing and timers processing in qemu-timer.c include/qemu/timer.h | 12 +--- slirp/ip6_icmp.c | 4

Re: [Qemu-devel] [PATCH] Revert "icount: remove obsolete warp call"

2018-10-17 Thread Artem Pisarenko
See my last comment in bug report. This kind of modification, even adapted to changed function name, doesn't solve issue. I thought long time that it does, but once I catched qemu with a hang. And of course, I wasn't able to reproduce it. So it just better hides issue. Take a look at alternative so

Re: [Qemu-devel] [Qemu-block] [PATCH v2 2/4] Introduce attributes to qemu timer subsystem

2018-10-17 Thread Artem Pisarenko
> Further down in this patch the notation is QEMU_TIMER_ATTR_, which I > think is clearer because QEMU_TIMER_ATTR(id) looks like a (non-existent) > macro. Please use the QEMU_TIMER_ATTR_ notation consistently. Yes, I've just forgot to update comments after previous patch version, where it actuall

Re: [Qemu-devel] [PATCH 0/4] Fix and improve core RTC function and documentation

2018-10-17 Thread Artem Pisarenko
I checked it with ./configure --enable-debug and didn't imagined that in non-debug build (with -O2) compiler will complain: "vl.c:847:12: error: ‘seconds’ may be used uninitialized in this function [-Werror=maybe-uninitialized]" int qemu_timedate_diff(struct tm *tm) { time_t sec

[Qemu-devel] [PATCH v2 0/4] Fix and improve core RTC function and documentation

2018-10-17 Thread Artem Pisarenko
vant hw/* maintainers. v2 changes: - fixed compiler warning caused non-debug build fail Artem Pisarenko (4): vl: improve/fix documentation related to RTC function vl: refactor -rtc option references Fixes RTC bug with base datetime shifts in clock=vm vl,qapi: offset value calculation in RTC

[Qemu-devel] [PATCH v2 1/4] vl: improve/fix documentation related to RTC function

2018-10-17 Thread Artem Pisarenko
Documentation describing -rtc option updated to better match current implementation and highlight some important specifics. Signed-off-by: Artem Pisarenko --- qemu-options.hx | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx

[Qemu-devel] [PATCH v2 3/4] Fixes RTC bug with base datetime shifts in clock=vm

2018-10-17 Thread Artem Pisarenko
ug/1797033 Signed-off-by: Artem Pisarenko --- vl.c | 58 +++--- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/vl.c b/vl.c index 10c4275..78a8a68 100644 --- a/vl.c +++ b/vl.c @@ -152,8 +152,10 @@ static enum { RTC_BASE

[Qemu-devel] [PATCH v2 2/4] vl: refactor -rtc option references

2018-10-17 Thread Artem Pisarenko
Improve code readability and prepare for fixing bug #1797033 Signed-off-by: Artem Pisarenko --- Notes: v2: fixed compiler warning vl.c | 85 ++-- 1 file changed, 53 insertions(+), 32 deletions(-) diff --git a/vl.c b/vl.c

[Qemu-devel] [PATCH v2 4/4] vl, qapi: offset value calculation in RTC_CHANGE event reverted to match behavior before #1797033 bugfix and documented

2018-10-17 Thread Artem Pisarenko
to highlight established implementation specifics. Signed-off-by: Artem Pisarenko --- qapi/misc.json | 3 ++- vl.c | 10 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/qapi/misc.json b/qapi/misc.json index ada9af5..ed866f2 100644 --- a/qapi/misc.json +++ b/qapi/mis

Re: [Qemu-devel] [Qemu-block] [PATCH v2 2/4] Introduce attributes to qemu timer subsystem

2018-10-17 Thread Artem Pisarenko
Yes, but without words ..."when they fire" in attributes comments. ср, 17 окт. 2018 г. в 17:24, Paolo Bonzini : > On 17/10/2018 12:57, Artem Pisarenko wrote: > >> Further down in this patch the notation is QEMU_TIMER_ATTR_, which I > >> think is clearer because Q

Re: [Qemu-devel] [PATCH] Revert "icount: remove obsolete warp call"

2018-10-17 Thread Artem Pisarenko
> I found the source of the bug. As QEMU becomes more multi-threaded and non-> synchronized, > checkpoints move from thread to thread. > And the event queue that processed at checkpoints should belong to the same thread > in both record and replay executions. > > Current problem was with the checkp

Re: [Qemu-devel] [PATCH v2 4/4] vl, qapi: offset value calculation in RTC_CHANGE event reverted to match behavior before #1797033 bugfix and documented

2018-10-17 Thread Artem Pisarenko
I fixed them and ready to submit v3. Anything else ? ср, 17 окт. 2018 г. в 20:01, Eric Blake : > On 10/17/18 7:23 AM, Artem Pisarenko wrote: > > Return value of qemu_timedate_diff(), used for calculation offset in > QAPI 'RTC_CHANGE' event restored to keep compatibil

Re: [Qemu-devel] [Qemu-block] [PATCH v2 2/4] Introduce attributes to qemu timer subsystem

2018-10-17 Thread Artem Pisarenko
>ср, 17 окт. 2018 г. в 20:43, Paolo Bonzini: >On 17/10/2018 15:07, Artem Pisarenko wrote: >> Yes, but without words ..."when they fire" in attributes comments. > > For now the only attribute applies when timers fire; that sentence was a > way to clarify the inte

[Qemu-devel] [PATCH v3 1/4] vl: improve/fix documentation related to RTC function

2018-10-18 Thread Artem Pisarenko
Documentation describing -rtc option updated to better match current implementation and highlight some important specifics. Signed-off-by: Artem Pisarenko --- qemu-options.hx | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/qemu-options.hx b/qemu-options.hx

[Qemu-devel] [PATCH v3 0/4] Fix and improve core RTC function and documentation

2018-10-18 Thread Artem Pisarenko
vant hw/* maintainers. v3 changes: - commit messages rewritten/shortened/wrapped to match patch requirements - fixed minor typo v2 changes: - fixed compiler warning caused non-debug build fail Artem Pisarenko (4): vl: improve/fix documentation related to RTC function vl: refactor -rtc option r

[Qemu-devel] [PATCH v3 2/4] vl: refactor -rtc option references

2018-10-18 Thread Artem Pisarenko
Improve code readability and prepare for fixing bug #1797033 Signed-off-by: Artem Pisarenko --- Notes: v2: fixed compiler warning vl.c | 85 ++-- 1 file changed, 53 insertions(+), 32 deletions(-) diff --git a/vl.c b/vl.c

[Qemu-devel] [PATCH v3 3/4] Fixes RTC bug with base datetime shifts in clock=vm

2018-10-18 Thread Artem Pisarenko
ug/1797033 Signed-off-by: Artem Pisarenko --- vl.c | 58 +++--- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/vl.c b/vl.c index 10c4275..78a8a68 100644 --- a/vl.c +++ b/vl.c @@ -152,8 +152,10 @@ static enum { RTC_BASE

[Qemu-devel] [PATCH v3 4/4] vl, qapi: offset calculation in RTC_CHANGE event reverted

2018-10-18 Thread Artem Pisarenko
description to highlight established implementation specifics. Signed-off-by: Artem Pisarenko --- qapi/misc.json | 3 ++- vl.c | 10 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/qapi/misc.json b/qapi/misc.json index ada9af5..d0f5381 100644 --- a/qapi/misc.

[Qemu-devel] [PATCH v3 2/4] Introduce attributes to qemu timer subsystem

2018-10-18 Thread Artem Pisarenko
(new 'attribute' argument added, timer_list replaced with timer_list_group+type combinations, comments improved to avoid info duplication). Also existing aio interface extended with attribute-enabled variants of functions, which create/initialize timers. Signed-off-by: Artem Pisarenko

[Qemu-devel] [PATCH v3 4/4] Optimize record/replay checkpointing for all clocks it applies to

2018-10-18 Thread Artem Pisarenko
Removes redundant checkpoints in replay log when there are no expired timers in timers list, associated with corresponding clock (i.e. no rr events associated with current clock value). This also improves performance in rr mode. Signed-off-by: Artem Pisarenko --- Notes: v3: - fixed

[Qemu-devel] [PATCH v3 3/4] Restores record/replay behavior related to special virtual clock processing for timers used in external subsystems.

2018-10-18 Thread Artem Pisarenko
: 775a412bf83f6bc0c5c02091ee06cf649b34c593 Fixes: 9888091404a702d7ec79d51b088d994b9fc121bd Signed-off-by: Artem Pisarenko --- include/qemu/timer.h | 11 ++- slirp/ip6_icmp.c | 4 +++- ui/input.c | 5 +++-- util/qemu-timer.c| 50 +++--- 4 files changed

[Qemu-devel] [PATCH v3 0/4] Introduce attributes for timers subsystem and remove QEMU_CLOCK_VIRTUAL_EXT clock type

2018-10-18 Thread Artem Pisarenko
to test these patches on purely clean master branch because of bugs https://bugs.launchpad.net/qemu/+bug/1790460 and https://bugs.launchpad.net/qemu/+bug/1795369, which workarounded by several not-accepted (yet?) modifications. Artem Pisarenko (4): Revert some patches from recent [PATCH v

[Qemu-devel] [PATCH v3 1/4] Revert some patches from recent [PATCH v6] "Fixing record/replay and adding reverse debugging"

2018-10-18 Thread Artem Pisarenko
9888091404a702d7ec79d51b088d994b9fc121bd. Signed-off-by: Artem Pisarenko --- include/qemu/timer.h | 9 - slirp/ip6_icmp.c | 7 +++ ui/input.c | 8 util/qemu-timer.c| 2 -- 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/include/qemu/timer.h b

[Qemu-devel] [PATCH v3] Optimize record/replay checkpointing for all clocks it applies to

2018-10-18 Thread Artem Pisarenko
Removes redundant checkpoints in replay log when there are no expired timers in timers list, associated with corresponding clock (i.e. no rr events associated with current clock value). This also improves performance in rr mode. Signed-off-by: Artem Pisarenko --- Oops, forgot to commit this

Re: [Qemu-devel] [PATCH v3 0/4] Introduce attributes for timers subsystem and remove QEMU_CLOCK_VIRTUAL_EXT clock type

2018-10-18 Thread Artem Pisarenko
Sorry, I forgot to fix long lines in commit messages. Do I need to submit v4 ? -- С уважением, Артем Писаренко

[Qemu-devel] [PATCH v3 4/4] Optimize record/replay checkpointing for all clocks it applies to

2018-10-18 Thread Artem Pisarenko
Removes redundant checkpoints in replay log when there are no expired timers in timers list, associated with corresponding clock (i.e. no rr events associated with current clock value). This also improves performance in rr mode. Signed-off-by: Artem Pisarenko --- Oops and again oops. Now it

Re: [Qemu-devel] [PATCH v3] Optimize record/replay checkpointing for all clocks it applies to

2018-10-18 Thread Artem Pisarenko
> We can also move the switch statement to a separate function, it > simplifies the code: > ... When I prepared this patch my intuition said me to add note in advance: "Paolo, please, don't try to move this to a separate function. I've tried it already. It cannot be done correct, look nice and not

Re: [Qemu-devel] [PATCH v3] Optimize record/replay checkpointing for all clocks it applies to

2018-10-18 Thread Artem Pisarenko
> чт, 18 окт. 2018 г., 20:31 Paolo Bonzini: >On 18/10/2018 15:23, Artem Pisarenko wrote: >>> We can also move the switch statement to a separate function, it >>> simplifies the code: >>> ... >> >> When I prepared this patch my intuition said me to add

Re: [Qemu-devel] [PATCH v3] Optimize record/replay checkpointing for all clocks it applies to

2018-10-18 Thread Artem Pisarenko
>чт, 18 окт. 2018 г., 23:25 Paolo Bonzini: >On 18/10/2018 19:10, Artem Pisarenko wrote: >> >>> No, you're right. The if should remain in the caller, or >>> need_replay_checkpoint must be initialized with replay_mode. >> >> If initialize 'need

Re: [Qemu-devel] [PATCH v3 0/4] Fix and improve core RTC function and documentation

2018-10-18 Thread Artem Pisarenko
> As a start of future refactoring, would you mind moving all this code to > hw/timer/rtc.c or rtc.c? It was somewaht generic before, but now it's > very tied to -rtc. Yes, sure.

Re: [Qemu-devel] [PATCH v3 4/4] Optimize record/replay checkpointing for all clocks it applies to

2018-10-18 Thread Artem Pisarenko
> … > This is wrong at least for QEMU_CLOCK_HOST. > … > Reading the host clock here is not protected by the checkpoint. > Therefore it may incur the inconsistency when replaying the execution. That's why I didn't like idea of this patch and asked for any possible side effects beforehand. So, here

Re: [Qemu-devel] [PULL 05/48] qemu-timer: optimize record/replay checkpointing for all clocks

2018-10-19 Thread Artem Pisarenko
> Signed-off-by: Artem Pisarenko > Message-Id: < 549dbf4ebfa4c82051d01a264c27f88929fc277b.1539764043.git.artem.k.pisare...@gmail.com > Actually this version has nothing common with my person. Neither original idea, nor content. Except maybe of my involvement in its discussion, commit

[Qemu-devel] Features/HelperNetworking wiki page: setup description misses root ownership

2018-10-24 Thread Artem Pisarenko
'Setup' section of https://wiki.qemu.org/Features/HelperNetworking says that setuid attribute needs to be turned on for 'qemu-bridge-helper' binary, but it forgets to mention that owner of this file must be root user. Otherwise, setuid bit makes no sense. Looks like in most scenarios this binary al

Re: [Qemu-devel] [PATCH v3 0/4] Introduce attributes for timers subsystem and remove QEMU_CLOCK_VIRTUAL_EXT clock type

2019-01-11 Thread Artem Pisarenko
> It seems, that this approach is not always correct. > Now timerlist_deadline_ns uses all virtual timers for deadline calculation > (including external > ones). > qemu_start_warp_timer uses the deadline for setting warp timer (which should > be deterministic). > Therefore warp timer may become n

Re: [Qemu-devel] [PATCH v3 0/4] Introduce attributes for timers subsystem and remove QEMU_CLOCK_VIRTUAL_EXT clock type

2019-01-16 Thread Artem Pisarenko
ср, 16 янв. 2019 г. в 12:15, Pavel Dovgalyuk : > > > From: Artem Pisarenko [mailto:artem.k.pisare...@gmail.com] > > > It seems, that this approach is not always correct. > > > Now timerlist_deadline_ns uses all virtual timers for deadline > > > calculatio

Re: [Qemu-devel] [PATCH v3 0/4] Introduce attributes for timers subsystem and remove QEMU_CLOCK_VIRTUAL_EXT clock type

2019-01-17 Thread Artem Pisarenko
> The source is the external timers, that depend on "outer world", e.g., slirp. > These timers are not recorded/replayed, but may affect the icount warping > (which should remain deterministic). I thought we agreed earlier in this discussion that external timers are deterministic by design, becaus