[Qemu-devel] [PATCHv3 for-2.13 2/2] Add host_memory_backend_pagesize() helper

2018-04-11 Thread David Gibson
There are a couple places (one generic, one target specific) where we need to get the host page size associated with a particular memory backend. I have some upcoming code which will add another place which wants this. So, for convenience, add a helper function to calculate this. host_memory_bac

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

2018-04-11 Thread David Gibson
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 no objections, what should be the procedure for staging

[Qemu-devel] [PATCHv3 for-2.13 1/2] Make qemu_mempath_getpagesize() accept NULL

2018-04-11 Thread David Gibson
qemu_mempath_getpagesize() gets the effective (host side) page size for a block of memory backed by an mmap()ed file on the host. It requires the mem_path parameter to be non-NULL. This ends up meaning all the callers need a different case for handling anonymous memory (for memory-backend-ram or

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

[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 qu

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() he

[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 r

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 appreciat

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 vh

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 so

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, 2 insertions(+) > create mode 100644 tests/tcg/

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 expected

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. > > Wit

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 'remotes/kraxel/tags/ui-20180410-pull-request' > into staging (2018-04-10 14:04:27 +

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 +++ > 1 file

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] [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 fol

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 > > nodes") > > support this pr

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, Tiw

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

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 mor

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, Pet

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 > Signed-off-by: Emilio G. Cota > --- > target/s390x/transl

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 cas

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 th

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 create

[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 - lkmc_eval=\"/rand_chec

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, on

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 repository at: > >

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: Al

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 > [AJB: drop cutils/osdep dependencies

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 really fit into 122, as t

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 --git a/tests/tcg/i386/hello-i386.c

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 source),

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| 39 >

[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 notificati

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 >> --- >> configure | 23 +

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 > flag_invalid is raised. > > I c

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 0x the expected result

[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 "info cpus", qmp_query_cp

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 > in global cpus list. > If main thread grab qemu_

[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 --- Change

[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 a

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 capabil

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 e

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, wh

[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

[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

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 l

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 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 future. > >> > >> S

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 0x the expected result fo

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] [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 clea

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 um

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 instructions, but nothing to see her

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 prov

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 fla

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 Git repository at:

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 wrot

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 after

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 thi

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 p

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. Mayb

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 no

[Qemu-devel] [PATCH for-2.13] spapr: drop useless dynamic sysbus device sanity check

2018-04-11 Thread Greg Kurz
Since commit 7da79a167aa11, the machine class init function registers dynamic sysbus device types it supports. Passing an unsupported device type on the command line causes QEMU to exit with an error message just after machine init. It is hence not needed to do the same sanity check at machine res

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 insertions(+), 4 deletions(-) > > diff --git a/tests/

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

2018-04-11 Thread Peter Maydell
ble 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 n

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 insertions(+), 3 deletions(-) > > diff --g

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 sev

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 > --- > tests/tcg/{i386/test-i386-ssse3.c => x86_64/test-

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

2018-04-11 Thread Thomas Huth
On 10.04.2018 21:39, Alex Bennée wrote: > The test-i386 test case is a little special as it includes assembler > files. Add the additional compile magic to assemble these bits and > link them to the final binary. > > Signed-off-by: Alex Bennée > --- > tests/tcg/i386/Makefile.target | 19

Re: [Qemu-devel] [PATCH 1/1] mach-virt: Change default cpu and gic-version setting to "max"

2018-04-11 Thread Andrea Bolognani
On Tue, 2018-04-10 at 09:52 +0100, Daniel P. Berrangé wrote: > On Tue, Apr 10, 2018 at 09:41:33AM +0200, Andrea Bolognani wrote: > > I figure the people not explicitly specifying a CPU model on the > > command line will probably also use '-M virt' instead of versioned > > machine types, which means

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 a/tests/tcg/i386/Makefile.target b/tests/tcg/i386/Ma

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 checks for the last

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 | 0 > tests/tcg/{

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 > Cc: qemu-s3...@nongnu.org > Signed-off-by: Emilio G. Cota > --- > t

[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 that

Re: [Qemu-devel] [PATCH v1 18/24] tests/tcg/arm: fix hello-arm

2018-04-11 Thread Thomas Huth
On 10.04.2018 21:39, Alex Bennée wrote: > As hello-arm is a bare bones syscall test it needs specific compiler > flags so it doesn't try and link against glibc. > > Signed-off-by: Alex Bennée > --- > tests/tcg/arm/Makefile.target | 6 ++ > 1 file changed, 6 insertions(+) > create mode 10064

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

2018-04-11 Thread Bastian Koppelmann
On 04/10/2018 06:19 PM, Emilio G. Cota wrote: > If the PC is in the last page of the address space, next_page_start > overflows to 0. Fix it. > > Reported-by: Richard Henderson > Suggested-by: Richard Henderson > Cc: Michael Clark > Cc: Palmer Dabbelt > Cc: Sagar Karandikar > Cc: Bastian Kopp

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 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 be near the beginning of

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 +0

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 >> --- >> tests/tcg/{i386/te

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(&ctx, 0, ctx.pc); > > +tcg_gen_lookup_and_goto_ptr(); > > You need to write ctx.pc back to the pc first, e.g. > >

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 t

[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 +++ b/block/io.c @@ -167,9

[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. bdrv_drain_a

[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 bdr

[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 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 bloc

[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 t

[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 de

[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 th

[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 effe

[Qemu-devel] [PATCH 10/19] block: Drain recursively with a single BDRV_POLL_WHILE()

2018-04-11 Thread Kevin Wolf
Anything can happen inside BDRV_POLL_WHILE(), including graph changes that may interfere with its callers (e.g. child list iteration in recursive callers of bdrv_do_drained_begin). Switch to a single BDRV_POLL_WHILE() call for the whole subtree at the end of bdrv_do_drained_begin() to avoid such e

[Qemu-devel] [PATCH 12/19] block: Don't poll in parent drain callbacks

2018-04-11 Thread Kevin Wolf
bdrv_do_drained_begin() is only safe if we have a single BDRV_POLL_WHILE() after quiescing all affected nodes. We cannot allow that parent callbacks introduce a nested polling loop that could cause graph changes while we're traversing the graph. Split off bdrv_do_drained_begin_quiesce(), which onl

  1   2   3   >