Re: [Qemu-devel] [RfC PATCH] Add udmabuf misc device

2018-04-11 Thread Oleksandr Andrushchenko
On 04/10/2018 08:26 PM, Dongwon Kim wrote: On Tue, Apr 10, 2018 at 09:37:53AM +0300, Oleksandr Andrushchenko wrote: On 04/06/2018 09:57 PM, Dongwon Kim wrote: On Fri, Apr 06, 2018 at 03:36:03PM +0300, Oleksandr Andrushchenko wrote: On 04/06/2018 02:57 PM, Gerd Hoffmann wrote: Hi, I fail

Re: [Qemu-devel] [PATCH] qmp: add pmemload command

2018-04-11 Thread Simon Ruderich
On Tue, Apr 10, 2018 at 04:33:03PM -0500, Eric Blake wrote: >> +void qmp_pmemload(int64_t addr, int64_t size, const char *filename, >> + Error **errp) >> +{ >> +FILE *f; >> +size_t l; >> +uint8_t buf[1024]; >> + >> +f = fopen(filename, "rb"); > > Use qemu_fopen()

Re: [Qemu-devel] [PATCH] iotests: fix 169

2018-04-11 Thread Vladimir Sementsov-Ogievskiy
03.04.2018 23:13, John Snow wrote: On 04/03/2018 12:23 PM, Max Reitz wrote: On 2018-03-30 18:10, Vladimir Sementsov-Ogievskiy wrote: Use MIGRATION events instead of RESUME. Also, make a TODO: enable dirty-bitmaps capability for offline case. This (likely) fixes racy faults at least of the

Re: [Qemu-devel] [PATCH 09/10] target/s390x: avoid integer overflow in next_page PC check

2018-04-11 Thread David Hildenbrand
On 10.04.2018 18:19, Emilio G. Cota wrote: > If the PC is in the last page of the address space, next_page_start > overflows to 0. Fix it. > > Cc: Cornelia Huck > Cc: Alexander Graf > Cc: David Hildenbrand > Cc: qemu-s3...@nongnu.org >

Re: [Qemu-devel] [Qemu-block] [PATCH] iotests: Split 214 off of 122

2018-04-11 Thread Max Reitz
On 2018-04-09 11:28, Alberto Garcia wrote: > On Fri 06 Apr 2018 06:41:08 PM CEST, Max Reitz wrote: >> Commit abd3622cc03cf41ed542126a540385f30a4c0175 added a case to 122 >> regarding how the qcow2 driver handles an incorrect compressed data >> length value. This does not

Re: [Qemu-devel] [PATCH v1 20/24] tests/tcg: enable building for s390x

2018-04-11 Thread Cornelia Huck
On Tue, 10 Apr 2018 20:39:15 +0100 Alex Bennée wrote: > This doesn't add any additional tests but enables building the > multiarch tests for s390x. > > Signed-off-by: Alex Bennée > --- > tests/tcg/s390x/Makefile.include | 2 ++ > 1 file changed,

Re: [Qemu-devel] [PATCH v1 01/24] configure: add test for docker availability

2018-04-11 Thread Fam Zheng
On Tue, 04/10 20:38, Alex Bennée wrote: > This tests for a working docker installation without sudo and sets up > config-host.mak accordingly. This will be useful from cross compiling > things in the future. > > Signed-off-by: Alex Bennée > --- > configure | 23

Re: [Qemu-devel] [Bug 1759264] Re: fpu/softfloat: round_to_int_and_pack refactor broke TriCore ftoi insns

2018-04-11 Thread Bastian Koppelmann
On 04/10/2018 10:07 PM, Alex Bennée wrote: > Yeah it looks like it was missed, the round_to_uint code does it. > > Do you have a test case I can verify? > For the NaN input 0x the expected result for the flags is that flag_invalid is raised. I can provide you with some TriCore asm, but

[Qemu-devel] [Bug 1762558] Re: Many crashes with "memslot_get_virt: slot_id 170 too big"-type errors in 2.12.0 rc2

2018-04-11 Thread Dr. David Alan Gilbert
IMHO it's best to keep this open until we find out what's going on; it's not impossible it's something that's changed in qemu, and even if it isn't qemu's fault then you won't be the only person who ends up reporting it here, so it'll be good to get the answer. -- You received this bug

[Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Tiwei Bie
This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB feature for vhost-user. By default, vhost-user backend needs to query the IOTLBs from QEMU after meeting unknown IOVAs. With this protocol feature negotiated, QEMU will provide all the IOTLBs to vhost-user backend without waiting for the

[Qemu-devel] [PATCH v2] timer: remove replay clock probe in deadline calculation

2018-04-11 Thread Pavel Dovgalyuk
Ciro Santilli reported that commit a5ed352596a8b7eb2f9acce34371b944ac3056c4 breaks the execution replay. It happens due to the probing the clock for the new instances of iothread. However, this probing was made in replay mode for the timer lists that are empty. This patch removes clock probing in

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Tiwei Bie
On Wed, Apr 11, 2018 at 04:01:19PM +0800, Jason Wang wrote: > On 2018年04月11日 15:20, Tiwei Bie wrote: > > This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB > > feature for vhost-user. By default, vhost-user backend needs > > to query the IOTLBs from QEMU after meeting unknown IOVAs. > >

Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread

2018-04-11 Thread Paolo Bonzini
On 11/04/2018 11:35, Peter Xu wrote: > Yeah, the inheritance will only make sure cur_mon be initialized > always with correct value just like when we are without Out-Of-Band. > For example, it's still possible a thread is created within a QMP > handler. If without current change, the cur_mon in

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Peter Xu
On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: [...] > This is just a RFC for now. It seems that, it doesn't work > as expected when guest is using kernel driver (To handle > this case, it seems that some RAM regions' events also need > to be listened). Any comments would be

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Jason Wang
On 2018年04月11日 15:20, Tiwei Bie wrote: This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB feature for vhost-user. By default, vhost-user backend needs to query the IOTLBs from QEMU after meeting unknown IOVAs. With this protocol feature negotiated, QEMU will provide all the IOTLBs to

Re: [Qemu-devel] [PULL 0/7] Block layer patches for 2.12.0-rc3

2018-04-11 Thread Peter Maydell
On 10 April 2018 at 16:37, Kevin Wolf wrote: > The following changes since commit df6378eb0e6cfd58a22a1c3ff8fa4a9039f1eaa8: > > Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180410-pull-request' > into staging (2018-04-10 14:04:27 +0100) > > are available in the git

Re: [Qemu-devel] [PATCH v1 12/24] tests/tcg/i386: Build fix for hello-i386

2018-04-11 Thread Thomas Huth
On 10.04.2018 21:39, Alex Bennée wrote: > From: Fam Zheng > > We have -Werror=missing-prototype, add a dummy prototype to avoid that > warning. > > Signed-off-by: Fam Zheng > --- > tests/tcg/i386/hello-i386.c | 1 + > 1 file changed, 1 insertion(+) > > diff

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Tiwei Bie
Hi Peter, On Wed, Apr 11, 2018 at 04:00:36PM +0800, Peter Xu wrote: > On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: > > [...] > > > This is just a RFC for now. It seems that, it doesn't work > > as expected when guest is using kernel driver (To handle > > this case, it seems that

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Peter Xu
On Wed, Apr 11, 2018 at 04:25:56PM +0800, Tiwei Bie wrote: > Hi Peter, > > On Wed, Apr 11, 2018 at 04:00:36PM +0800, Peter Xu wrote: > > On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: > > > > [...] > > > > > This is just a RFC for now. It seems that, it doesn't work > > > as

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Peter Xu
On Wed, Apr 11, 2018 at 04:55:25PM +0800, Tiwei Bie wrote: > On Wed, Apr 11, 2018 at 04:37:16PM +0800, Peter Xu wrote: > > On Wed, Apr 11, 2018 at 04:25:56PM +0800, Tiwei Bie wrote: > > > On Wed, Apr 11, 2018 at 04:00:36PM +0800, Peter Xu wrote: > > > > On Wed, Apr 11, 2018 at 03:20:27PM +0800,

Re: [Qemu-devel] [Bug 1759264] Re: fpu/softfloat: round_to_int_and_pack refactor broke TriCore ftoi insns

2018-04-11 Thread Alex Bennée
Bastian Koppelmann writes: > On 04/10/2018 10:07 PM, Alex Bennée wrote: >> Yeah it looks like it was missed, the round_to_uint code does it. >> >> Do you have a test case I can verify? >> > > For the NaN input 0x the expected result for the flags is that

Re: [Qemu-devel] [Qemu-arm] Crash when running hello-world unikernel for ARM

2018-04-11 Thread Ajay Garg
Hi All. Just wondering if there is something specific that needs to changed at https://github.com/rumpkernel/rumprun/tree/master/platform/hw/arch/arm/integrator in order to get a hello-world app run on "virt" machine? If so, I would request the rumprun-guys to kindly throw in some light, on what

Re: [Qemu-devel] [Qemu-ppc] [PATCH for 2.13 v2 1/2] spapr: Add ibm, max-associativity-domains property

2018-04-11 Thread Greg Kurz
On Wed, 11 Apr 2018 10:03:48 +1000 David Gibson wrote: > On Tue, Apr 10, 2018 at 02:12:25PM -0400, Serhii Popovych wrote: > > Now recent kernels (i.e. since linux-stable commit a346137e9142 > > ("powerpc/numa: Use ibm,max-associativity-domains to discover possible >

Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread

2018-04-11 Thread Peter Xu
On Wed, Apr 11, 2018 at 11:23:57AM +0200, Paolo Bonzini wrote: > On 11/04/2018 05:49, Peter Xu wrote: > > On Wed, Apr 11, 2018 at 09:45:32AM +0800, Stefan Hajnoczi wrote: > >> On Tue, Apr 10, 2018 at 08:49:13PM +0800, Peter Xu wrote: > >>> cur_mon was only used in main loop so we don't really need

Re: [Qemu-devel] [PATCH] iotests: fix 169

2018-04-11 Thread Vladimir Sementsov-Ogievskiy
11.04.2018 12:02, Vladimir Sementsov-Ogievskiy wrote: 03.04.2018 23:13, John Snow wrote: On 04/03/2018 12:23 PM, Max Reitz wrote: On 2018-03-30 18:10, Vladimir Sementsov-Ogievskiy wrote: Use MIGRATION events instead of RESUME. Also, make a TODO: enable dirty-bitmaps capability for offline

Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread

2018-04-11 Thread Peter Xu
On Wed, Apr 11, 2018 at 11:38:58AM +0200, Paolo Bonzini wrote: > On 11/04/2018 11:35, Peter Xu wrote: > > Yeah, the inheritance will only make sure cur_mon be initialized > > always with correct value just like when we are without Out-Of-Band. > > For example, it's still possible a thread is

Re: [Qemu-devel] [PATCH] migration: Don't activate block devices if using -S

2018-04-11 Thread Jiri Denemark
On Tue, Apr 10, 2018 at 16:47:56 +0200, Kevin Wolf wrote: > Am 10.04.2018 um 16:22 hat Dr. David Alan Gilbert geschrieben: > > * Kevin Wolf (kw...@redhat.com) wrote: > > > Am 10.04.2018 um 12:40 hat Dr. David Alan Gilbert geschrieben: > > > > Hmm; having chatted to Jiri I'm OK with reverting it,

Re: [Qemu-devel] [PATCH v1 10/24] tests/tcg/multiarch: Build fix for linux-test

2018-04-11 Thread Thomas Huth
On 10.04.2018 21:39, Alex Bennée wrote: > From: Fam Zheng > > To keep the compiler happy, and to fit in our buildsys flags: > > - Make local functions "static" > - #ifdef out unused functions > - drop cutils/osdep dependencies > > Signed-off-by: Fam Zheng >

Re: [Qemu-devel] [PATCH v1 11/24] tests/tcg: move i386 specific tests into subdir

2018-04-11 Thread Thomas Huth
On 10.04.2018 21:39, Alex Bennée wrote: > These only need to be built for i386 guests. This includes a stub > tests/tcg/i386/Makfile.target which absorbs some of what was in > tests/tcg/Makefile. > > Signed-off-by: Alex Bennée > --- > tests/tcg/README

[Qemu-devel] [PATCH] cpu: skip unpluged cpu when querying cpus

2018-04-11 Thread linzhecheng
From: XuYandong After vcpu1 thread exiting, vcpu0 thread (received notification) is still waiting for holding qemu_global_mutex in cpu_remove_sync, at this moment, vcpu1 is still in global cpus list. If main thread grab qemu_global_mutex in order to handle qmp command

Re: [Qemu-devel] [Bug 1759264] Re: fpu/softfloat: round_to_int_and_pack refactor broke TriCore ftoi insns

2018-04-11 Thread Bastian Koppelmann
On 04/11/2018 01:01 PM, Alex Bennée wrote: > > Bastian Koppelmann writes: > >> On 04/10/2018 10:07 PM, Alex Bennée wrote: >>> Yeah it looks like it was missed, the round_to_uint code does it. >>> >>> Do you have a test case I can verify? >>> >> >> For the NaN

Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread

2018-04-11 Thread Paolo Bonzini
On 11/04/2018 05:49, Peter Xu wrote: > On Wed, Apr 11, 2018 at 09:45:32AM +0800, Stefan Hajnoczi wrote: >> On Tue, Apr 10, 2018 at 08:49:13PM +0800, Peter Xu wrote: >>> cur_mon was only used in main loop so we don't really need that to be >>> per-thread variable. Now it's possible that we have

[Qemu-devel] [Bug 1762179] Re: Record and replay replay fails with: "ERROR:replay/replay-time.c:49:replay_read_clock: assertion failed"

2018-04-11 Thread Ciro Santilli 六四事件 法轮功
** Description changed: QEMU master at 915d34c5f99b0ab91517c69f54272bfdb6ca2b32 Ubuntu 17.10 host. QEMU commands: ``` #!/usr/bin/env bash cmd="\ time \ ./x86_64-softmmu/qemu-system-x86_64 \ -append 'root=/dev/sda console=ttyS0 nokaslr printk.time=y -

Re: [Qemu-devel] [PATCH v1 01/24] configure: add test for docker availability

2018-04-11 Thread Alex Bennée
Fam Zheng writes: > On Tue, 04/10 20:38, Alex Bennée wrote: >> This tests for a working docker installation without sudo and sets up >> config-host.mak accordingly. This will be useful from cross compiling >> things in the future. >> >> Signed-off-by: Alex Bennée

Re: [Qemu-devel] [PULL 0/1] migration queue

2018-04-11 Thread Peter Maydell
On 10 April 2018 at 16:03, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The following changes since commit df6378eb0e6cfd58a22a1c3ff8fa4a9039f1eaa8: > > Merge remote-tracking branch

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Tiwei Bie
On Wed, Apr 11, 2018 at 04:37:16PM +0800, Peter Xu wrote: > On Wed, Apr 11, 2018 at 04:25:56PM +0800, Tiwei Bie wrote: > > On Wed, Apr 11, 2018 at 04:00:36PM +0800, Peter Xu wrote: > > > On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: > > > > > > [...] > > > > > > > This is just a RFC

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Tiwei Bie
On Wed, Apr 11, 2018 at 05:16:47PM +0800, Peter Xu wrote: > On Wed, Apr 11, 2018 at 04:55:25PM +0800, Tiwei Bie wrote: > > On Wed, Apr 11, 2018 at 04:37:16PM +0800, Peter Xu wrote: > > > On Wed, Apr 11, 2018 at 04:25:56PM +0800, Tiwei Bie wrote: > > > > On Wed, Apr 11, 2018 at 04:00:36PM +0800,

Re: [Qemu-devel] [PATCH v1 09/24] tests/tcg: move architecture independent tests into subdir

2018-04-11 Thread Thomas Huth
On 10.04.2018 21:39, Alex Bennée wrote: > We will want to build these for all supported guest architectures so > lets move them all into one place. We also drop test_path at this > point because it needs qemu utils and glib bits which is hard to > support for cross compiling. > > Signed-off-by:

Re: [Qemu-devel] [PATCH for-2.12 v2] qemu-iotests: update 185 output

2018-04-11 Thread Max Reitz
On 2018-04-10 10:11, Stefan Hajnoczi wrote: > On Wed, Apr 04, 2018 at 06:16:12PM +0200, Max Reitz wrote: >> On 2018-04-04 17:01, Stefan Hajnoczi wrote: >> === Start mirror job and exit qemu === >> >> This seems to be independent of whether there is actually data on >> TEST_IMG (the commit

[Qemu-devel] [PATCH v5 0/1] i386/kvm: TSC page clocksource for Hyper-V-on-KVM fixes

2018-04-11 Thread Vitaly Kuznetsov
Changes since v4: - Rebase on top of Roman's patches. - Drop PATCH2 as it is no longer needed (after adding explicit hv_frequencies). Previously, Ladi was working on enabling TSC page clocksource for nested Hyper-V-on-KVM workloads. He found out that if Hyper-V frequency MSRs are exposed to L1

[Qemu-devel] [PATCH v5 1/1] i386/kvm: add support for Hyper-V reenlightenment MSRs

2018-04-11 Thread Vitaly Kuznetsov
KVM recently gained support for Hyper-V Reenlightenment MSRs which are required to make KVM-on-Hyper-V enable TSC page clocksource to its guests when INVTSC is not passed to it (and it is not passed by default in Qemu as it effectively blocks migration). Signed-off-by: Vitaly Kuznetsov

Re: [Qemu-devel] [PATCH v5 1/1] i386/kvm: add support for Hyper-V reenlightenment MSRs

2018-04-11 Thread Roman Kagan
On Wed, Apr 11, 2018 at 01:50:36PM +0200, Vitaly Kuznetsov wrote: > KVM recently gained support for Hyper-V Reenlightenment MSRs which are > required to make KVM-on-Hyper-V enable TSC page clocksource to its guests > when INVTSC is not passed to it (and it is not passed by default in Qemu > as it

Re: [Qemu-devel] [PATCH 0/5] Enable postcopy RDMA live migration

2018-04-11 Thread Dr. David Alan Gilbert
* Lidong Chen (jemmy858...@gmail.com) wrote: > Current Qemu RDMA communication does not support send and receive > data at the same time, so when RDMA live migration with postcopy > enabled, the source qemu return path thread get qemu file error. > > Those patch add the postcopy support for RDMA

Re: [Qemu-devel] [Bug 1759264] Re: fpu/softfloat: round_to_int_and_pack refactor broke TriCore ftoi insns

2018-04-11 Thread Bastian Koppelmann
On 04/11/2018 01:01 PM, Alex Bennée wrote: > Bastian Koppelmann writes: > >> On 04/10/2018 10:07 PM, Alex Bennée wrote: >>> Yeah it looks like it was missed, the round_to_uint code does it. >>> >>> Do you have a test case I can verify? >>> >> >> For the NaN input

Re: [Qemu-devel] [PATCH v3 6/7] s390x/kvm: handle AP instruction interception

2018-04-11 Thread Tony Krowiak
On 04/09/2018 06:51 AM, Cornelia Huck wrote: On Mon, 9 Apr 2018 12:37:42 +0200 Halil Pasic wrote: On 04/09/2018 11:32 AM, Cornelia Huck wrote: We can kind of (i.e. modulo EECA.28) ensure this in a different fashion I think. How about proclaiming a 'has ap

Re: [Qemu-devel] [PATCH v1 01/24] configure: add test for docker availability

2018-04-11 Thread Fam Zheng
On Wed, 04/11 11:58, Alex Bennée wrote: > > Fam Zheng writes: > > > On Tue, 04/10 20:38, Alex Bennée wrote: > >> This tests for a working docker installation without sudo and sets up > >> config-host.mak accordingly. This will be useful from cross compiling > >> things in the

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Jason Wang
On 2018年04月11日 21:22, Michael S. Tsirkin wrote: On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB feature for vhost-user. By default, vhost-user backend needs to query the IOTLBs from QEMU after meeting unknown IOVAs. With

[Qemu-devel] [PATCH v2 0/2] bitmaps persistent and migration fixes

2018-04-11 Thread Vladimir Sementsov-Ogievskiy
v2: 01: new, proposed by Max 02: fix leaving cat processes Vladimir Sementsov-Ogievskiy (2): qcow2: try load bitmaps only once iotests: fix 169 block/qcow2.h | 1 + block/qcow2.c | 16 tests/qemu-iotests/169 | 48

[Qemu-devel] [PATCH v2 2/2] iotests: fix 169

2018-04-11 Thread Vladimir Sementsov-Ogievskiy
Improve and fix 169: - use MIGRATION events instead of RESUME - make a TODO: enable dirty-bitmaps capability for offline case - recreate vm_b without -incoming near test end This (likely) fixes racy faults at least of the following types: - timeout on waiting for RESUME event

[Qemu-devel] [PATCH v2 1/2] qcow2: try load bitmaps only once

2018-04-11 Thread Vladimir Sementsov-Ogievskiy
Checking reopen by existence of some bitmaps is wrong, as it may be some other bitmaps, or on the other hand, user may remove bitmaps. This criteria is bad. To simplify things and make behavior more predictable let's just add a flag to remember, that we've already tried to load bitmaps on open and

Re: [Qemu-devel] [PATCH] qmp: add pmemload command

2018-04-11 Thread Eric Blake
On 04/11/2018 02:36 AM, Simon Ruderich wrote: > On Tue, Apr 10, 2018 at 04:33:03PM -0500, Eric Blake wrote: >>> +void qmp_pmemload(int64_t addr, int64_t size, const char *filename, >>> + Error **errp) >>> +{ >>> +FILE *f; >>> +size_t l; >>> +uint8_t buf[1024]; >>> +

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Jason Wang
On 2018年04月11日 16:38, Tiwei Bie wrote: On Wed, Apr 11, 2018 at 04:01:19PM +0800, Jason Wang wrote: On 2018年04月11日 15:20, Tiwei Bie wrote: This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB feature for vhost-user. By default, vhost-user backend needs to query the IOTLBs from QEMU

Re: [Qemu-devel] [PATCH] cpu: skip unpluged cpu when querying cpus

2018-04-11 Thread Igor Mammedov
On Wed, 11 Apr 2018 19:16:02 +0800 linzhecheng wrote: > From: XuYandong > > After vcpu1 thread exiting, vcpu0 thread (received notification) is still > waiting for > holding qemu_global_mutex in cpu_remove_sync, at this moment, vcpu1 is still >

Re: [Qemu-devel] [PATCH] migration: Don't activate block devices if using -S

2018-04-11 Thread Dr. David Alan Gilbert
* Kevin Wolf (kw...@redhat.com) wrote: > Am 11.04.2018 um 12:01 hat Jiri Denemark geschrieben: > > On Tue, Apr 10, 2018 at 16:47:56 +0200, Kevin Wolf wrote: > > > Am 10.04.2018 um 16:22 hat Dr. David Alan Gilbert geschrieben: > > > > * Kevin Wolf (kw...@redhat.com) wrote: > > > > > Am 10.04.2018

Re: [Qemu-devel] [RFC] vhost-user: introduce F_NEED_ALL_IOTLB protocol feature

2018-04-11 Thread Michael S. Tsirkin
On Wed, Apr 11, 2018 at 03:20:27PM +0800, Tiwei Bie wrote: > This patch introduces VHOST_USER_PROTOCOL_F_NEED_ALL_IOTLB > feature for vhost-user. By default, vhost-user backend needs > to query the IOTLBs from QEMU after meeting unknown IOVAs. > With this protocol feature negotiated, QEMU will

Re: [Qemu-devel] [PATCH v2 1/2] qcow2: try load bitmaps only once

2018-04-11 Thread Eric Blake
On 04/11/2018 07:26 AM, Vladimir Sementsov-Ogievskiy wrote: > Checking reopen by existence of some bitmaps is wrong, as it may be > some other bitmaps, or on the other hand, user may remove bitmaps. This > criteria is bad. To simplify things and make behavior more predictable > let's just add a

Re: [Qemu-devel] [PATCH] iotests: fix 169

2018-04-11 Thread Vladimir Sementsov-Ogievskiy
11.04.2018 16:05, Vladimir Sementsov-Ogievskiy wrote: 11.04.2018 12:36, Vladimir Sementsov-Ogievskiy wrote: 11.04.2018 12:02, Vladimir Sementsov-Ogievskiy wrote: 03.04.2018 23:13, John Snow wrote: On 04/03/2018 12:23 PM, Max Reitz wrote: On 2018-03-30 18:10, Vladimir Sementsov-Ogievskiy

Re: [Qemu-devel] [PATCH] iotests: fix 169

2018-04-11 Thread Max Reitz
On 2018-04-11 11:02, Vladimir Sementsov-Ogievskiy wrote: > 03.04.2018 23:13, John Snow wrote: >> >> On 04/03/2018 12:23 PM, Max Reitz wrote: >>> On 2018-03-30 18:10, Vladimir Sementsov-Ogievskiy wrote: Use MIGRATION events instead of RESUME. Also, make a TODO: enable dirty-bitmaps

Re: [Qemu-devel] [PATCH] migration: Don't activate block devices if using -S

2018-04-11 Thread Kevin Wolf
Am 11.04.2018 um 12:01 hat Jiri Denemark geschrieben: > On Tue, Apr 10, 2018 at 16:47:56 +0200, Kevin Wolf wrote: > > Am 10.04.2018 um 16:22 hat Dr. David Alan Gilbert geschrieben: > > > * Kevin Wolf (kw...@redhat.com) wrote: > > > > Am 10.04.2018 um 12:40 hat Dr. David Alan Gilbert geschrieben: >

Re: [Qemu-devel] [PATCH] iotests: fix 169

2018-04-11 Thread Vladimir Sementsov-Ogievskiy
11.04.2018 12:36, Vladimir Sementsov-Ogievskiy wrote: 11.04.2018 12:02, Vladimir Sementsov-Ogievskiy wrote: 03.04.2018 23:13, John Snow wrote: On 04/03/2018 12:23 PM, Max Reitz wrote: On 2018-03-30 18:10, Vladimir Sementsov-Ogievskiy wrote: Use MIGRATION events instead of RESUME. Also, make

Re: [Qemu-devel] [PATCH 2/2] qemu-thread: let cur_mon be per-thread

2018-04-11 Thread Eric Blake
On 04/11/2018 04:48 AM, Peter Xu wrote: > Okay. :) Thanks for confirming. Then let me repost this patch without > touching the qemu-threads. > > Btw, do you want me to repost the first patch separately too, or keep > the code as is? I believe it depends on whether you treat that one as > a

Re: [Qemu-devel] [PATCH] iotests: Split 214 off of 122

2018-04-11 Thread Max Reitz
On 2018-04-06 18:41, Max Reitz wrote: > Commit abd3622cc03cf41ed542126a540385f30a4c0175 added a case to 122 > regarding how the qcow2 driver handles an incorrect compressed data > length value. This does not really fit into 122, as that file is > supposed to contain qemu-img convert test cases,

Re: [Qemu-devel] [PATCH v2 1/2] qcow2: try load bitmaps only once

2018-04-11 Thread Vladimir Sementsov-Ogievskiy
11.04.2018 16:22, Eric Blake wrote: On 04/11/2018 07:26 AM, Vladimir Sementsov-Ogievskiy wrote: Checking reopen by existence of some bitmaps is wrong, as it may be some other bitmaps, or on the other hand, user may remove bitmaps. This criteria is bad. To simplify things and make behavior more

Re: [Qemu-devel] [PATCHv3 for-2.13 0/2] Helpers to obtain host page sizes for guest RAM

2018-04-11 Thread Paolo Bonzini
On 11/04/2018 09:04, David Gibson wrote: > This series makes some small changes to make it easier to obtain the > host page size backing given portions of guest RAM. We use this in a > couple of places currently, and I have one or two more to add in some > upcoming code. > > Assuming there are

Re: [Qemu-devel] [PULL v2 0/3] linux-user fixes for -rc3

2018-04-11 Thread Peter Maydell
On 10 April 2018 at 17:01, Laurent Vivier wrote: > The following changes since commit df6378eb0e6cfd58a22a1c3ff8fa4a9039f1eaa8: > > Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180410-pull-request' > into staging (2018-04-10 14:04:27 +0100) > > are available in the

Re: [Qemu-devel] [PATCH v3 6/7] s390x/kvm: handle AP instruction interception

2018-04-11 Thread Halil Pasic
On 04/11/2018 03:20 PM, Tony Krowiak wrote: I may be all wrong, though... can we at least have a translation of ECA.28 and EECA.28 (the "ap is there" bit and the "ap instructions are interpreted" bit?)    >>> I think we have a misunderstanding here. I will wait for Tony. 

Re: [Qemu-devel] [PATCH] iotests: fix 169

2018-04-11 Thread Max Reitz
On 2018-04-11 15:05, Vladimir Sementsov-Ogievskiy wrote: [...] > Hmm, first type? I'm now not sure about, did I really see sha256 > mismatch, or something like this (should be error, but found bitmap): > > --- /work/src/qemu/up-169/tests/qemu-iotests/169.out    2018-04-11 > 15:35:10.055027392

[Qemu-devel] [PATCH 11/19] test-bdrv-drain: Test node deletion in subtree recursion

2018-04-11 Thread Kevin Wolf
If bdrv_do_drained_begin() polls during its subtree recursion, the graph can change and mess up the bs->children iteration. Test that this doesn't happen. Signed-off-by: Kevin Wolf --- tests/test-bdrv-drain.c | 38 +- 1 file changed, 29

[Qemu-devel] [PATCH 16/19] block: Allow AIO_WAIT_WHILE with NULL ctx

2018-04-11 Thread Kevin Wolf
bdrv_drain_all() wants to have a single polling loop for draining the in-flight requests of all nodes. This means that the AIO_WAIT_WHILE() condition relies on activity in multiple AioContexts, which is polled from the mainloop context. We must therefore call AIO_WAIT_WHILE() from the mainloop

Re: [Qemu-devel] [PATCH 00/10] Avoid integer overflow in next_page_start

2018-04-11 Thread Emilio G. Cota
On Wed, Apr 11, 2018 at 10:08:58 +1000, Richard Henderson wrote: > On 04/11/2018 02:19 AM, Emilio G. Cota wrote: > > Richard pointed out in another thread that when computing > > next_page_start we can break checks for the last page in the > > address space due to integer overflow. This affects

Re: [Qemu-devel] [PATCH v1 15/24] tests/tcg/i368: fix hello-i386

2018-04-11 Thread Thomas Huth
On 10.04.2018 21:39, Alex Bennée wrote: > This is a direct syscall test so needs additional CFLAGS and LDFLAGS. > > Signed-off-by: Alex Bennée > --- > tests/tcg/i386/Makefile.target | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git

[Qemu-devel] [Bug 1762558] Re: Many crashes with "memslot_get_virt: slot_id 170 too big"-type errors in 2.12.0 rc2

2018-04-11 Thread Adam Williamson
Up to you, of course. Just realized I didn't mention here that I also reported this downstream, and since it turns out to be not triggered by a qemu change I've been doing most of the investigation there: https://bugzilla.redhat.com/show_bug.cgi?id=1565354 So far it's looking like the change

Re: [Qemu-devel] [PATCH 09/10] target/s390x: avoid integer overflow in next_page PC check

2018-04-11 Thread Cornelia Huck
On Tue, 10 Apr 2018 12:19:45 -0400 "Emilio G. Cota" wrote: > If the PC is in the last page of the address space, next_page_start > overflows to 0. Fix it. > > Cc: Cornelia Huck > Cc: Alexander Graf > Cc: David Hildenbrand >

Re: [Qemu-devel] [PATCH v2 1/2] qcow2: try load bitmaps only once

2018-04-11 Thread Max Reitz
On 2018-04-11 14:26, Vladimir Sementsov-Ogievskiy wrote: > Checking reopen by existence of some bitmaps is wrong, as it may be > some other bitmaps, or on the other hand, user may remove bitmaps. This > criteria is bad. To simplify things and make behavior more predictable > let's just add a flag

[Qemu-devel] [PATCH 01/19] test-bdrv-drain: bdrv_drain() works with cross-AioContext events

2018-04-11 Thread Kevin Wolf
As long as nobody keeps the other I/O thread from working, there is no reason why bdrv_drain() wouldn't work with cross-AioContext events. The key is that the root request we're waiting for is in the AioContext we're polling (which it always is for bdrv_drain()) so that aio_poll() is woken up in

[Qemu-devel] [PATCH 07/19] block: Really pause block jobs on drain

2018-04-11 Thread Kevin Wolf
We already requested that block jobs be paused in .bdrv_drained_begin, but no guarantee was made that the job was actually inactive at the point where bdrv_drained_begin() returned. This introduces a new callback BdrvChildRole.bdrv_drained_poll() and uses it to make bdrv_drain_poll() consider

[Qemu-devel] [PATCH 00/19] Drain fixes and cleanups, part 3

2018-04-11 Thread Kevin Wolf
This is the third and hopefully for now last part of my work to fix drain. The main goal of this series is to make drain robust against graph changes that happen in any callbacks of in-flight requests while we drain a block node. The individual patches describe the details, but the rough plan is

[Qemu-devel] [PATCH 05/19] tests/test-bdrv-drain: bdrv_drain_all() works in coroutines now

2018-04-11 Thread Kevin Wolf
Since we use bdrv_do_drained_begin/end() for bdrv_drain_all_begin/end(), coroutine context is automatically left with a BH, preventing the deadlocks that made bdrv_drain_all*() unsafe in coroutine context. We can consider it compatible now the latest, after having removed the old polling code as

[Qemu-devel] [PATCH 19/19] test-bdrv-drain: Test graph changes in drain_all section

2018-04-11 Thread Kevin Wolf
This tests both adding and remove a node between bdrv_drain_all_begin() and bdrv_drain_all_end(), and enabled the existing detach test for drain_all. Signed-off-by: Kevin Wolf --- tests/test-bdrv-drain.c | 75 +++-- 1 file changed,

[Qemu-devel] [PATCH 14/19] block: Defer .bdrv_drain_begin callback to polling phase

2018-04-11 Thread Kevin Wolf
We cannot allow aio_poll() in bdrv_drain_invoke(begin=true) until we're done with propagating the drain through the graph and are doing the single final BDRV_POLL_WHILE(). Just schedule the coroutine with the callback and increase bs->in_flight to make sure that the polling phase will wait for

Re: [Qemu-devel] [PATCH 00/10] Avoid integer overflow in next_page_start

2018-04-11 Thread Cornelia Huck
On Wed, 11 Apr 2018 11:29:42 -0400 "Emilio G. Cota" wrote: > On Wed, Apr 11, 2018 at 10:08:58 +1000, Richard Henderson wrote: > > On 04/11/2018 02:19 AM, Emilio G. Cota wrote: > > > Richard pointed out in another thread that when computing > > > next_page_start we can break

Re: [Qemu-devel] [Qemu-arm] [PATCH for-2.12] hw/char/cmsdk-apb-uart.c: Correctly clear INTSTATUS bits on writes

2018-04-11 Thread Philippe Mathieu-Daudé
On 04/10/2018 10:42 AM, Peter Maydell wrote: > The CMSDK APB UART INTSTATUS register bits are all write-one-to-clear. > We were getting this correct for the TXO and RXO bits (which need > special casing because their state lives in the STATE register), > but had forgotten to handle the normal bits

Re: [Qemu-devel] [PATCH v1 13/24] tests/tcg/i386: move test-i386-sse.c to tests/tcg/x86_64/test-sse.c

2018-04-11 Thread Alex Bennée
Thomas Huth writes: > On 10.04.2018 21:39, Alex Bennée wrote: >> The test mixes up 32bit and 64 bit code. It should probably be split >> into two distinct test cases. However for now just move it out of the >> way of the i386 build. >> >> Signed-off-by: Alex Bennée

[Qemu-devel] [PATCH 02/19] block: Use bdrv_do_drain_begin/end in bdrv_drain_all()

2018-04-11 Thread Kevin Wolf
bdrv_do_drain_begin/end() implement already everything that bdrv_drain_all_begin/end() need and currently still do manually: Disable external events, call parent drain callbacks, call block driver callbacks. It also does two more things: The first is incrementing bs->quiesce_counter.

[Qemu-devel] [PATCH 08/19] block: Remove bdrv_drain_recurse()

2018-04-11 Thread Kevin Wolf
For bdrv_drain(), recursively waiting for child node requests is pointless because we didn't quiesce their parents, so new requests could come in anyway. Letting the function work only on a single node makes it more consistent. For subtree drains and drain_all, we already have the recursion in

[Qemu-devel] [PATCH 04/19] block: Don't manually poll in bdrv_drain_all()

2018-04-11 Thread Kevin Wolf
All involved nodes are already idle, we called bdrv_do_draine_begin() on them. The comment in the code suggested that this were not correct because the completion of a request on one node could spawn a new request on a different node (which might have been drained before, so we wouldn't drain the

[Qemu-devel] [PATCH 03/19] block: Remove 'recursive' parameter from bdrv_drain_invoke()

2018-04-11 Thread Kevin Wolf
All callers pass false for the 'recursive' parameter now. Remove it. Signed-off-by: Kevin Wolf --- block/io.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/block/io.c b/block/io.c index cad59db2f4..d2bd89c3bb 100644 --- a/block/io.c +++

[Qemu-devel] [PATCH 06/19] block: Avoid unnecessary aio_poll() in AIO_WAIT_WHILE()

2018-04-11 Thread Kevin Wolf
Commit 91af091f923 added an additional aio_poll() to BDRV_POLL_WHILE() in order to make sure that all pending BHs are executed on drain. This was the wrong place to make the fix, as it is useless overhead for all other users of the macro and unnecessarily complicates the mechanism. This patch

Re: [Qemu-devel] [PATCH v1 08/24] docker: Makefile.include introduce DOCKER_SCRIPT

2018-04-11 Thread Philippe Mathieu-Daudé
On 04/10/2018 04:39 PM, Alex Bennée wrote: > Define this in one place to make it easy to re-use. > > Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé > --- > tests/docker/Makefile.include | 10 ++ > 1 file changed, 6

Re: [Qemu-devel] [PATCH v2 0/2] bitmaps persistent and migration fixes

2018-04-11 Thread Max Reitz
On 2018-04-11 14:26, Vladimir Sementsov-Ogievskiy wrote: > v2: > > 01: new, proposed by Max > 02: fix leaving cat processes > > Vladimir Sementsov-Ogievskiy (2): > qcow2: try load bitmaps only once > iotests: fix 169 > > block/qcow2.h | 1 + > block/qcow2.c | 16

[Qemu-devel] [PATCH 17/19] block: Move bdrv_drain_all_begin() out of coroutine context

2018-04-11 Thread Kevin Wolf
Before we can introduce a single polling loop for all nodes in bdrv_drain_all_begin(), we must make sure to run it outside of coroutine context like we already do for bdrv_do_drained_begin(). Signed-off-by: Kevin Wolf --- block/io.c | 22 +- 1 file changed,

Re: [Qemu-devel] [PATCH v1 13/24] tests/tcg/i386: move test-i386-sse.c to tests/tcg/x86_64/test-sse.c

2018-04-11 Thread Thomas Huth
On 10.04.2018 21:39, Alex Bennée wrote: > The test mixes up 32bit and 64 bit code. It should probably be split > into two distinct test cases. However for now just move it out of the > way of the i386 build. > > Signed-off-by: Alex Bennée > --- >

Re: [Qemu-devel] [PATCH v2 06/17] target/mips: convert to DisasJumpType

2018-04-11 Thread Emilio G. Cota
On Wed, Apr 11, 2018 at 09:27:57 +1000, Richard Henderson wrote: > On 04/11/2018 12:23 AM, Emilio G. Cota wrote: > > case DISAS_STOP: > > -gen_goto_tb(, 0, ctx.pc); > > +tcg_gen_lookup_and_goto_ptr(); > > You need to write ctx.pc back to the pc first, e.g. > >

[Qemu-devel] [PATCH 15/19] test-bdrv-drain: Test that bdrv_drain_invoke() doesn't poll

2018-04-11 Thread Kevin Wolf
This adds a test case that goes wrong if bdrv_drain_invoke() calls aio_poll(). Signed-off-by: Kevin Wolf --- tests/test-bdrv-drain.c | 102 +--- 1 file changed, 88 insertions(+), 14 deletions(-) diff --git a/tests/test-bdrv-drain.c

Re: [Qemu-devel] [PATCH 4/5] migration: fix qemu carsh when RDMA live migration

2018-04-11 Thread Dr. David Alan Gilbert
* Lidong Chen (jemmy858...@gmail.com) wrote: > After postcopy, the destination qemu work in the dedicated > thread, so only invoke yield_until_fd_readable before postcopy > migration. The subject line needs to be more discriptive: migration: Stop rdma yielding during incoming postcopy I

Re: [Qemu-devel] [PATCH v2 2/2] iotests: fix 169

2018-04-11 Thread Max Reitz
On 2018-04-11 14:26, Vladimir Sementsov-Ogievskiy wrote: > Improve and fix 169: > - use MIGRATION events instead of RESUME > - make a TODO: enable dirty-bitmaps capability for offline case > - recreate vm_b without -incoming near test end > > This (likely) fixes racy faults at least

Re: [Qemu-devel] [PATCH v1 16/24] tests/tcg/i386: fix test-i386-fprem

2018-04-11 Thread Philippe Mathieu-Daudé
On 04/10/2018 04:39 PM, Alex Bennée wrote: > Remove dependencies on QEMU's source tree and build directly. > > Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé > --- > tests/tcg/i386/test-i386-fprem.c | 9 ++--- > 1 file changed, 6

Re: [Qemu-devel] [PULL for-2.12 0/1] tcg patch queue

2018-04-11 Thread Peter Maydell
-10 22:16:19 +0100) > > are available in the Git repository at: > > git://github.com/rth7680/qemu.git tags/pull-tcg-20180411 > > for you to fetch changes up to afd46fcad2dceffda35c0586f5723c127b6e09d8: > > icount: fix cpu_restore_state_from_tb for non-t

Re: [Qemu-devel] [PATCH v1 17/24] tests/tcg: move ARM specific tests into subdir

2018-04-11 Thread Thomas Huth
On 10.04.2018 21:39, Alex Bennée wrote: > These only need to be built for ARM guests. > > Signed-off-by: Alex Bennée > --- > tests/tcg/README | 9 - > tests/tcg/arm/README | 11 +++ > tests/tcg/{ => arm}/hello-arm.c

Re: [Qemu-devel] [PATCH 5/5] migration: disable RDMA WRITR after postcopy started.

2018-04-11 Thread Dr. David Alan Gilbert
* Lidong Chen (jemmy858...@gmail.com) wrote: > RDMA write operations are performed with no notification to the destination > qemu, then the destination qemu can not wakeup. So disable RDMA WRITE after > postcopy started. > > Signed-off-by: Lidong Chen This patch needs to

  1   2   3   >