[Bug 1868116] Re: QEMU monitor no longer works

2020-03-27 Thread Christian Ehrhardt 
As Vte-upstream long term would want to get rid of this implementation style Christian Persch provided a qemu patch [1]. That is too much UI for me to really have an in-depth opinion, but I can say that it builds and input works fine with it. I suggested on [2] to send it to qemu-devel, but in cas

Re: [PATCH v2 0/3] Fix some AIO context locking in jobs

2020-03-27 Thread Dietmar Maurer
Wait - maybe this was a bug in my test setup - I am unable to reproduce now.. @Stefan Reiter: Are you able to trigger this? > > I *think* the second patch also fixes the hangs on backup abort that I and > > Dietmar noticed in v1, but I'm not sure, they we're somewhat intermittent > > before too.

[PATCH] monitor/hmp-cmds: add units for mirate_parameters.

2020-03-27 Thread Mao Zhongyi
When running: (qemu) info migrate_parameters announce-initial: 50 ms announce-max: 550 ms announce-step: 100 ms compress-wait-thread: on ... max-bandwidth: 33554432 bytes/second downtime-limit: 300 milliseconds x-checkpoint-delay: 2 ... xbzrle-cache-size: 67108864 add units for the parameters

Re: [PATCH 0/3] Fix Skylake, Cascadelake and Icelake Server CPU models

2020-03-27 Thread Chenyi Qiang
Hi Paolo and Eduardo, It seems I need to put the missing feature bits in the new version of CPU model. I'll resend this patch set. BTW, what about the missing vmx feature bits? Also put in in new version CPU model? Thanks, Chenyi On 3/18/2020 4:02 PM, Chenyi Qiang wrote: Ping. On 2/27/2020

[Bug 1868116] Re: QEMU monitor no longer works

2020-03-27 Thread Sebastien Bacher
THe update should be part of GNOME 3.36.1 which is due this weekend -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1868116 Title: QEMU monitor no longer works Status in QEMU: New Status in qemu p

[PATCH] migration: fix bad indentation in error_report()

2020-03-27 Thread Mao Zhongyi
bad indentation conflicts with CODING_STYLE doc. Signed-off-by: Mao Zhongyi --- migration/migration.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index c4c9aee15e..aa43137bd2 100644 --- a/migration/migra

Re: [EXT] Re: [PATCH v9 2/9] memory: Add interface to set iommu page size mask

2020-03-27 Thread Auger Eric
Hi Bharat, On 3/27/20 6:33 AM, Bharat Bhushan wrote: > Hi Eric, > >> -Original Message- >> From: Auger Eric >> Sent: Thursday, March 26, 2020 9:36 PM >> To: Bharat Bhushan ; peter.mayd...@linaro.org; >> pet...@redhat.com; eric.auger@gmail.com; alex.william...@redhat.com; >> kevin.t..

Re: [EXT] Re: [PATCH v9 4/9] virtio-iommu: set supported page size mask

2020-03-27 Thread Auger Eric
Hi Bharat, On 3/27/20 6:13 AM, Bharat Bhushan wrote: > Hi Eric, > >> -Original Message- >> From: Auger Eric >> Sent: Thursday, March 26, 2020 9:22 PM >> To: Bharat Bhushan ; peter.mayd...@linaro.org; >> pet...@redhat.com; eric.auger@gmail.com; alex.william...@redhat.com; >> kevin.t...

Re: [EXT] Re: [PATCH v9 8/9] virtio-iommu: Implement probe request

2020-03-27 Thread Auger Eric
Hi Bharat, On 3/27/20 6:40 AM, Bharat Bhushan wrote: > Hi Eric, > >> -Original Message- >> From: Auger Eric >> Sent: Thursday, March 26, 2020 9:18 PM >> To: Bharat Bhushan ; peter.mayd...@linaro.org; >> pet...@redhat.com; eric.auger@gmail.com; alex.william...@redhat.com; >> kevin.t..

Re: [PATCH 1/2] virtio-blk: delete vqs on the error path in realize()

2020-03-27 Thread Stefano Garzarella
On Fri, Mar 27, 2020 at 11:56:49AM +0800, Pan Nengyuan wrote: > virtio_vqs forgot to free on the error path in realize(). Fix that. > > The asan stack: > Direct leak of 14336 byte(s) in 1 object(s) allocated from: > #0 0x7f58b93fd970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970) >

Re: [PATCH v9 3/4] qcow2: add zstd cluster compression

2020-03-27 Thread Vladimir Sementsov-Ogievskiy
Should we note somehow in qcow2 spec that we use streamed version of zstd with specific end byte? 23.03.2020 17:25, Denis Plotnikov wrote: zstd significantly reduces cluster compression time. It provides better compression performance maintaining the same level of the compression ratio in compa

Re: [PATCH v6 5/8] gpiolib: Introduce gpiod_set_config()

2020-03-27 Thread Geert Uytterhoeven
o_do_set_config()" > makes none of them apply :/ /me confused. That commit was reverted later, so it shouldn't matter. I have just verified, and both my full series and just this single patch, do apply fine to all of current gpio/for-next, linus/master, and

Re: [PATCH 1/2] virtio-blk: delete vqs on the error path in realize()

2020-03-27 Thread Pan Nengyuan
On 3/27/2020 4:41 PM, Stefano Garzarella wrote: > On Fri, Mar 27, 2020 at 11:56:49AM +0800, Pan Nengyuan wrote: >> virtio_vqs forgot to free on the error path in realize(). Fix that. >> >> The asan stack: >> Direct leak of 14336 byte(s) in 1 object(s) allocated from: >> #0 0x7f58b93fd970 in

Re: [PATCH 2/2] virtio-iommu: delete vqs in unrealize to fix memleaks

2020-03-27 Thread Auger Eric
Hi Pan, On 3/27/20 4:56 AM, Pan Nengyuan wrote: > req_vq/event_vq forgot to free in unrealize(). Fix that. > > Signed-off-by: Pan Nengyuan > --- > Cc: Eric Auger > --- > hw/virtio/virtio-iommu.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/vi

Re: [PATCH 2/2] virtio-iommu: delete vqs in unrealize to fix memleaks

2020-03-27 Thread Stefano Garzarella
On Fri, Mar 27, 2020 at 11:56:50AM +0800, Pan Nengyuan wrote: > req_vq/event_vq forgot to free in unrealize(). Fix that. > > Signed-off-by: Pan Nengyuan > --- > Cc: Eric Auger > --- > hw/virtio/virtio-iommu.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/virtio/virtio-iommu.c b

Re: [PATCH v2 1/2] virtio-blk: delete vqs on the error path in realize()

2020-03-27 Thread Stefano Garzarella
On Fri, Mar 27, 2020 at 12:56:19PM +0800, Pan Nengyuan wrote: > virtio_vqs forgot to free on the error path in realize(). Fix that. > > The asan stack: > Direct leak of 14336 byte(s) in 1 object(s) allocated from: > #0 0x7f58b93fd970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970) >

Re: [PATCH v2 2/2] virtio-iommu: delete vqs in unrealize to fix memleak

2020-03-27 Thread Stefano Garzarella
On Fri, Mar 27, 2020 at 12:56:20PM +0800, Pan Nengyuan wrote: > req_vq/event_vq forgot to free in unrealize. Fix that. > > Signed-off-by: Pan Nengyuan > --- > Cc: Eric Auger > --- > hw/virtio/virtio-iommu.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/virtio/virtio-iommu.c b/h

Re: [PATCH 2/2] virtio-iommu: delete vqs in unrealize to fix memleaks

2020-03-27 Thread Pan Nengyuan
On 3/27/2020 4:53 PM, Stefano Garzarella wrote: > On Fri, Mar 27, 2020 at 11:56:50AM +0800, Pan Nengyuan wrote: >> req_vq/event_vq forgot to free in unrealize(). Fix that. >> >> Signed-off-by: Pan Nengyuan >> --- >> Cc: Eric Auger >> --- >> hw/virtio/virtio-iommu.c | 2 ++ >> 1 file changed,

Re: [PATCH] gdbstub: fix compiler complaining

2020-03-27 Thread Alex Bennée
Denis Plotnikov writes: > ./gdbstub.c: In function ‘handle_query_thread_extra’: > /usr/include/glib-2.0/glib/glib-autocleanups.h:28:10: > error: ‘cpu_name’ may be used uninitialized in this function > [-Werror=maybe-uninitialized] > g_free (*pp); >^ >

Re: [PATCH 1/3] gdbstub: prevent uninitialized warning

2020-03-27 Thread Alex Bennée
Chen Qun writes: > According to the glib function requirements, we need initialise > the variable. Otherwise there will be compilation warnings: > > qemu/gdbstub.c: In function ‘handle_query_thread_extra’: > /usr/include/glib-2.0/glib/glib-autocleanups.h:28:3: warning: > ‘cpu_name’ may be

Re: [PATCH] s390x: protvirt: Fix stray error_report_err in s390_machine_protect

2020-03-27 Thread David Hildenbrand
On 26.03.20 15:05, Janosch Frank wrote: > In case the protection of the machine fails at s390_pv_vm_enable(), > we'll currently report the local_error variable. Problem is that > there's no migration blocker error that we can report at this point so > the pointer is always NULL which leads to a SEG

Re: [PATCH 1/1] s390/ipl: fix off-by-one in update_machine_ipl_properties()

2020-03-27 Thread David Hildenbrand
On 20.03.20 15:31, Halil Pasic wrote: > In update_machine_ipl_properties() the array ascii_loadparm needs to > hold the 8 char lodparm and a string terminating zero char. > > Let's increase the size of ascii_loadparm accordingly. > > Signed-off-by: Halil Pasic > Fixes: 0a01e082a4 ("s390/ipl: syn

Re: [PATCH] monitor/hmp-cmds: add units for mirate_parameters.

2020-03-27 Thread Stefano Garzarella
Hi Mao, On Fri, Mar 27, 2020 at 03:32:10PM +0800, Mao Zhongyi wrote: > When running: > (qemu) info migrate_parameters > announce-initial: 50 ms > announce-max: 550 ms > announce-step: 100 ms > compress-wait-thread: on > ... > max-bandwidth: 33554432 bytes/second > downtime-limit: 300 milliseconds

Re: [PATCH v9 3/4] qcow2: add zstd cluster compression

2020-03-27 Thread Denis Plotnikov
On 27.03.2020 11:43, Vladimir Sementsov-Ogievskiy wrote: Should we note somehow in qcow2 spec that we use streamed version of zstd with specific end byte? We didn't do it for zlib. zstd does it the same way as zlib, saves the compression output to some buffer. 23.03.2020 17:25, Denis Plot

Re: [PATCH v8 00/74] per-CPU locks

2020-03-27 Thread Alex Bennée
Aleksandar Markovic writes: > 21:37 Čet, 26.03.2020. Robert Foley је написао/ла: >> >> V7: https://lists.gnu.org/archive/html/qemu-devel/2019-03/msg00786.html >> >> This is a continuation of the series created by Emilio Cota. >> We are picking up this patch set with the goal to apply >> any fi

[PATCH v3 2/2] virtio-iommu: delete vqs in unrealize to fix memleak

2020-03-27 Thread Pan Nengyuan
req_vq/event_vq forgot to free in unrealize. Fix that. And aslo do clean 's->as_by_busptr' hash table in unrealize to fix another leak. Signed-off-by: Pan Nengyuan Acked-by: Eric Auger --- Cc: Eric Auger --- v3->v1/v2: - Aslo clean 's->as_by_busptr' hash table in unrealize.(Suggested by Stefano

[PATCH v3 0/2] fix two virtio queues memleak

2020-03-27 Thread Pan Nengyuan
This series fix two vqs leak: 1. Do delete vqs on the error path in virtio_blk_device_realize(). 2. Do delete vqs in virtio_iommu_device_unrealize() to fix another leaks. v2->v1: - Fix incorrect free in virtio_blk_device_realize, it will cause a uaf. v3->v2: - Aslo clean 's->as_by_busptr' hash ta

[PATCH v3 1/2] virtio-blk: delete vqs on the error path in realize()

2020-03-27 Thread Pan Nengyuan
virtio_vqs forgot to free on the error path in realize(). Fix that. The asan stack: Direct leak of 14336 byte(s) in 1 object(s) allocated from: #0 0x7f58b93fd970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970) #1 0x7f58b858249d in g_malloc0 (/lib64/libglib-2.0.so.0+0x5249d) #2 0x

RE: [PATCH 1/3] gdbstub: prevent uninitialized warning

2020-03-27 Thread Chenqun (kuhn)
>-Original Message- >From: Alex Bennée [mailto:alex.ben...@linaro.org] >Sent: Friday, March 27, 2020 5:13 PM >To: Chenqun (kuhn) >Cc: qemu-devel@nongnu.org; qemu-triv...@nongnu.org; Zhanghailiang >; laur...@vivier.eu; Euler Robot >; Philippe Mathieu-Daudé >Subject: Re: [PATCH 1/3] gdbstub

[PATCH] s390x/pv: Retry ioctls on -EINTR

2020-03-27 Thread Christian Borntraeger
PV_ENABLE (and maybe others) might return -EINTR when a signal is pending. Let us retry the ioctl in that case. Fixes: 4d226deafc44 ("s390x: protvirt: Support unpack facility") Reported-by: Marc Hartmayer Tested-by: Marc Hartmayer Signed-off-by: Christian Borntraeger --- hw/s390x/pv.c | 6

Re: [PATCH] s390x/pv: Retry ioctls on -EINTR

2020-03-27 Thread David Hildenbrand
On 27.03.20 10:43, Christian Borntraeger wrote: > PV_ENABLE (and maybe others) might return -EINTR when a signal is > pending. Let us retry the ioctl in that case. > > Fixes: 4d226deafc44 ("s390x: protvirt: Support unpack facility") > Reported-by: Marc Hartmayer > Tested-by: Marc Hartmayer > Sig

Re: [PATCH] s390x/pv: Retry ioctls on -EINTR

2020-03-27 Thread Janosch Frank
On 3/27/20 10:43 AM, Christian Borntraeger wrote: > PV_ENABLE (and maybe others) might return -EINTR when a signal is > pending. Let us retry the ioctl in that case. > > Fixes: 4d226deafc44 ("s390x: protvirt: Support unpack facility") > Reported-by: Marc Hartmayer > Tested-by: Marc Hartmayer > S

[PATCH for 5.0 v1 0/7] A selection of sanitiser fixes

2020-03-27 Thread Alex Bennée
Hi, I gave the rc0 a spin on the clang sanitiser and found a number of small issues. One issue is that init_guest_space doesn't play nice with the sanitiser for some guests but that is going to be a more involved fix. For now I've just enhanced the debug output a little. I also didn't attempt to f

[PATCH v1 1/7] elf-ops: bail out if we have no function symbols

2020-03-27 Thread Alex Bennée
It's perfectly possible to have no function symbols in your elf file and if we do the undefined behaviour sanitizer rightly complains about us passing NULL to qsort. Check nsyms before we go ahead. Signed-off-by: Alex Bennée --- include/hw/elf_ops.h | 7 ++- 1 file changed, 6 insertions(+),

[PATCH v1 3/7] tests/tcg: remove extraneous pasting macros

2020-03-27 Thread Alex Bennée
We are not using them and they just get in the way. Signed-off-by: Alex Bennée --- tests/tcg/x86_64/system/boot.S | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/tcg/x86_64/system/boot.S b/tests/tcg/x86_64/system/boot.S index 205cfbd3982..73b19a2bda6 100644 --- a/te

[PATCH v1 2/7] linux-user: protect fcntl64 with an #ifdef

2020-03-27 Thread Alex Bennée
Checking TARGET_ABI_BITS is sketchy - we should check for the presence of the define to be sure. Also clean up the white space while we are there. Signed-off-by: Alex Bennée --- linux-user/syscall.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linux-user/syscall.c

[PATCH v1 4/7] linux-user: more debug for init_guest_space

2020-03-27 Thread Alex Bennée
Searching for memory space can cause problems so lets extend the CPU_LOG_PAGE output so you can watch init_guest_space fail to allocate memory. A more involved fix is actually required to make this function play nicely with the large guard pages the sanitiser likes to use. Signed-off-by: Alex Benn

[PATCH v1 5/7] fpu/softfloat: avoid undefined behaviour when normalising empty sigs

2020-03-27 Thread Alex Bennée
The undefined behaviour checker pointed out that a shift of 64 would lead to undefined behaviour. Signed-off-by: Alex Bennée --- fpu/softfloat.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/fpu/softfloat.c b/fpu/softfloat.c index 301ce3b537b..444d35920dd 100644

[PATCH v1 6/7] target/xtensa: add FIXME for translation memory leak

2020-03-27 Thread Alex Bennée
Dynamically allocating a new structure within the DisasContext can potentially leak as we can longjmp out of the translation loop (see test_phys_mem). The proper fix would be to use static allocation within the DisasContext but as the Xtensa translator imports it's code from elsewhere I leave that

Re: [PATCH] qemu/atomic.h: add #ifdef guards for stdatomic.h

2020-03-27 Thread Alex Bennée
Peter Maydell writes: > On Thu, 26 Mar 2020 at 18:05, Paolo Bonzini wrote: >> >> On 26/03/20 18:14, Peter Maydell wrote: >> >> +#ifndef atomic_fetch_add >> >> #define atomic_fetch_add(ptr, n) __atomic_fetch_add(ptr, n, >> >> __ATOMIC_SEQ_CST) >> >> #define atomic_fetch_sub(ptr, n) __atomic_

[PATCH v1 7/7] gdbstub: fix compiler complaining

2020-03-27 Thread Alex Bennée
From: Denis Plotnikov ./gdbstub.c: In function ‘handle_query_thread_extra’: /usr/include/glib-2.0/glib/glib-autocleanups.h:28:10: error: ‘cpu_name’ may be used uninitialized in this function [-Werror=maybe-uninitialized] g_free (*pp); ^ ./gdbstub.c:2

Re: [PATCH] s390x/pv: Retry ioctls on -EINTR

2020-03-27 Thread Christian Borntraeger
On 27.03.20 10:49, David Hildenbrand wrote: > On 27.03.20 10:43, Christian Borntraeger wrote: >> PV_ENABLE (and maybe others) might return -EINTR when a signal is >> pending. Let us retry the ioctl in that case. >> >> Fixes: 4d226deafc44 ("s390x: protvirt: Support unpack facility") >> Reported-b

Re: [PATCH v8 00/74] per-CPU locks

2020-03-27 Thread Aleksandar Markovic
петак, 27. март 2020., Alex Bennée је написао/ла: > > Aleksandar Markovic writes: > > > 21:37 Čet, 26.03.2020. Robert Foley је > написао/ла: > >> > >> V7: https://lists.gnu.org/archive/html/qemu-devel/2019-03/msg00786.html > >> > >> This is a continuation of the series created by Emilio Cota. >

Re: [PATCH] s390x/pv: Retry ioctls on -EINTR

2020-03-27 Thread David Hildenbrand
On 27.03.20 10:54, Christian Borntraeger wrote: > > > On 27.03.20 10:49, David Hildenbrand wrote: >> On 27.03.20 10:43, Christian Borntraeger wrote: >>> PV_ENABLE (and maybe others) might return -EINTR when a signal is >>> pending. Let us retry the ioctl in that case. >>> >>> Fixes: 4d226deafc44

Re: [PATCH] s390x/pv: Retry ioctls on -EINTR

2020-03-27 Thread Christian Borntraeger
>> I fail to see where that is triggered in the kernel. >> >> t480s: ~/git/linux/arch/s390/kvm (HEAD losgelöst bei next/master) $ git >> grep "EINTR" >> kvm-s390.c: if (exit_reason == -EINTR) { >> kvm-s390.c: return -EINTR; >> kvm-s390.c: rc = -EINTR; >> vsie.c: if (rc =

Re: [PATCH v2 0/3] Fix some AIO context locking in jobs

2020-03-27 Thread Dietmar Maurer
> I *think* the second patch also fixes the hangs on backup abort that I and > Dietmar noticed in v1, but I'm not sure, they we're somewhat intermittent > before too. After more test, I am 100% sure the bug (or another one) is still there. Here is how to trigger: 1. use latest qemu sources from

Re: [PATCH] s390x/pv: Retry ioctls on -EINTR

2020-03-27 Thread David Hildenbrand
On 27.03.20 10:58, Christian Borntraeger wrote: >>> I fail to see where that is triggered in the kernel. >>> >>> t480s: ~/git/linux/arch/s390/kvm (HEAD losgelöst bei next/master) $ git >>> grep "EINTR" >>> kvm-s390.c: if (exit_reason == -EINTR) { >>> kvm-s390.c: return -EINTR; >>> k

Re: [PATCH v1 5/7] fpu/softfloat: avoid undefined behaviour when normalising empty sigs

2020-03-27 Thread Peter Maydell
On Fri, 27 Mar 2020 at 09:49, Alex Bennée wrote: > > The undefined behaviour checker pointed out that a shift of 64 would > lead to undefined behaviour. > > Signed-off-by: Alex Bennée > --- > fpu/softfloat.c | 11 --- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/fpu

Re: [PATCH v1 5/7] fpu/softfloat: avoid undefined behaviour when normalising empty sigs

2020-03-27 Thread Aleksandar Markovic
11:53 Pet, 27.03.2020. Alex Bennée је написао/ла: > > The undefined behaviour checker Alex, what exactly is "undefined behaviour checker"? If this is a test, can you give us a link? Sincerely, Aleksandar > pointed out that a shift of 64 would > lead to undefined behaviour. > > Signed-off-by: Al

Re: [PATCH] qemu-user: fix build with LLVM lld 10

2020-03-27 Thread Roger Pau Monné
On Thu, Mar 26, 2020 at 09:56:38AM -0700, Richard Henderson wrote: > On 3/26/20 6:43 AM, Roger Pau Monne wrote: > > lld 10.0.0 introduced a new linker option --image-base equivalent to > > the GNU -Ttext-segment one, hence use it when available. > > > > This fixes the build of QEMU on systems usin

Re: [PATCH 1/8] pc-bios: s390x: Consolidate timing functions into time.h

2020-03-27 Thread David Hildenbrand
On 24.03.20 16:08, Janosch Frank wrote: > Let's consolidate timing related functions into one header. > > Signed-off-by: Janosch Frank > --- > pc-bios/s390-ccw/menu.c| 1 + > pc-bios/s390-ccw/netmain.c | 15 +++-- > pc-bios/s390-ccw/s390-ccw.h| 18 > pc-

Re: [PATCH v8 00/74] per-CPU locks

2020-03-27 Thread Aleksandar Markovic
11:50 Pet, 27.03.2020. Aleksandar Markovic је написао/ла: > > > > петак, 27. март 2020., Alex Bennée је написао/ла: >> >> >> Aleksandar Markovic writes: >> >> > 21:37 Čet, 26.03.2020. Robert Foley је написао/ла: >> >> >> >> V7: https://lists.gnu.org/archive/html/qemu-devel/2019-03/msg00786.html

Re: [PATCH 2/8] pc-bios: s390x: Get rid of magic offsets into the lowcore

2020-03-27 Thread David Hildenbrand
On 24.03.20 16:08, Janosch Frank wrote: > If we have a lowcore struct that has members for offsets that we want > to touch, why not use it? > > Signed-off-by: Janosch Frank > --- > pc-bios/s390-ccw/cio.h | 17 +++-- > pc-bios/s390-ccw/main.c | 8 +++- > 2 files changed, 14 inse

Re: [PATCH v1 5/7] fpu/softfloat: avoid undefined behaviour when normalising empty sigs

2020-03-27 Thread Alex Bennée
Aleksandar Markovic writes: > 11:53 Pet, 27.03.2020. Alex Bennée је написао/ла: >> >> The undefined behaviour checker > > Alex, what exactly is "undefined behaviour checker"? If this is a test, can > you give us a link? It's enabled by our sanitizers build: ../../configure --cc=clang-8 --c

Re: [PATCH 2/8] pc-bios: s390x: Get rid of magic offsets into the lowcore

2020-03-27 Thread Janosch Frank
On 3/27/20 11:25 AM, David Hildenbrand wrote: > On 24.03.20 16:08, Janosch Frank wrote: >> If we have a lowcore struct that has members for offsets that we want >> to touch, why not use it? >> >> Signed-off-by: Janosch Frank >> --- >> pc-bios/s390-ccw/cio.h | 17 +++-- >> pc-bios/s39

RE: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-03-27 Thread Thanos Makatos
> > Next I explain how to test the PoC. > > Build MUSER with vfio-over-socket: > > git clone --single-branch --branch vfio-over-socket > g...@github.com:tmakatos/muser.git > cd muser/ > git submodule update --init > make Yesterday's version had a bug where it di

Re: [PATCH v1 2/7] linux-user: protect fcntl64 with an #ifdef

2020-03-27 Thread Laurent Vivier
Le 27/03/2020 à 10:49, Alex Bennée a écrit : > Checking TARGET_ABI_BITS is sketchy - we should check for the presence > of the define to be sure. Also clean up the white space while we are > there. > > Signed-off-by: Alex Bennée > --- > linux-user/syscall.c | 8 > 1 file changed, 4 inse

Re: [PATCH v2] hw/arm/collie: Put StrongARMState* into a CollieMachineState struct

2020-03-27 Thread Philippe Mathieu-Daudé
On 3/26/20 9:49 PM, Peter Maydell wrote: Coverity complains that the collie_init() function leaks the memory allocated in sa1110_init(). This is true but not significant since the function is called only once on machine init and the memory must remain in existence until QEMU exits anyway. Still

[PATCH for-5.0] xen: fixup RAM memory region initialization

2020-03-27 Thread Igor Mammedov
Since bd457782b3b0 ("x86/pc: use memdev for RAM") Xen machine fails to start with: qemu-system-i386: xen: failed to populate ram at 0 The reason is that xen_ram_alloc() which is called by memory_region_init_ram(), compares memory region with statically allocated 'global' ram_memory memory regio

Re: [PATCH v1 4/7] linux-user: more debug for init_guest_space

2020-03-27 Thread Laurent Vivier
Le 27/03/2020 à 10:49, Alex Bennée a écrit : > Searching for memory space can cause problems so lets extend the > CPU_LOG_PAGE output so you can watch init_guest_space fail to > allocate memory. A more involved fix is actually required to make this > function play nicely with the large guard pages

Re: [PATCH v5 07/18] s390x: protvirt: Inhibit balloon when switching to protected mode

2020-03-27 Thread David Hildenbrand
>> So, AFAIU, *any* virtio device (hypervisor side) has to present this >> flag when PV is enabled. > > Yes, and balloon says bye bye when running in PV mode is only a secondary > objective. I've compiled some references: Thanks! > > "To summarize, the necessary conditions for a hack along the

Re: [PATCH] qemu-user: fix build with LLVM lld 10

2020-03-27 Thread Laurent Vivier
Le 26/03/2020 à 17:56, Richard Henderson a écrit : > On 3/26/20 6:43 AM, Roger Pau Monne wrote: >> lld 10.0.0 introduced a new linker option --image-base equivalent to >> the GNU -Ttext-segment one, hence use it when available. >> >> This fixes the build of QEMU on systems using lld 10 or greater.

Re: [PATCH] hw/vfio: let readonly flag take effect for mmaped regions

2020-03-27 Thread Philippe Mathieu-Daudé
Hi Yan, On 3/27/20 12:19 PM, yan.y.z...@intel.com wrote: From: Yan Zhao currently, vfio regions without VFIO_REGION_INFO_FLAG_WRITE are only read-only when VFIO_REGION_INFO_FLAG_MMAP is not set. regions with flag VFIO_REGION_INFO_FLAG_READ | VFIO_REGION_INFO_FLAG_MMAP are only read-only in ho

Re: [PATCH for 5.0 v1 0/7] A selection of sanitiser fixes

2020-03-27 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200327094945.23768-1-alex.ben...@linaro.org/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/bin/bash

Re: [PATCH v1 3/7] tests/tcg: remove extraneous pasting macros

2020-03-27 Thread Philippe Mathieu-Daudé
On 3/27/20 10:49 AM, Alex Bennée wrote: We are not using them and they just get in the way. Signed-off-by: Alex Bennée --- tests/tcg/x86_64/system/boot.S | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/tcg/x86_64/system/boot.S b/tests/tcg/x86_64/system/boot.S in

Re: [PATCH v1 1/7] elf-ops: bail out if we have no function symbols

2020-03-27 Thread Philippe Mathieu-Daudé
On 3/27/20 10:49 AM, Alex Bennée wrote: It's perfectly possible to have no function symbols in your elf file and if we do the undefined behaviour sanitizer rightly complains about us passing NULL to qsort. Check nsyms before we go ahead. Signed-off-by: Alex Bennée --- include/hw/elf_ops.h | 7

Re: [PATCH for-5.0] xen: fixup RAM memory region initialization

2020-03-27 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200327104828.12647-1-imamm...@redhat.com/ Hi, This series failed build test on FreeBSD host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit th

Re: [PATCH v1 7/7] gdbstub: fix compiler complaining

2020-03-27 Thread Philippe Mathieu-Daudé
On 3/27/20 10:49 AM, Alex Bennée wrote: From: Denis Plotnikov ./gdbstub.c: In function ‘handle_query_thread_extra’: /usr/include/glib-2.0/glib/glib-autocleanups.h:28:10: error: ‘cpu_name’ may be used uninitialized in this function [-Werror=maybe-uninitialized] g

Re: [PATCH v8 00/74] per-CPU locks

2020-03-27 Thread Philippe Mathieu-Daudé
On 3/27/20 6:14 AM, Emilio G. Cota wrote: (Apologies if I missed some Cc's; I was not Cc'ed in patch 0 so I'm blindly crafting a reply.) On Thu, Mar 26, 2020 at 15:30:43 -0400, Robert Foley wrote: This is a continuation of the series created by Emilio Cota. We are picking up this patch set wi

Re: [PATCH v1 1/7] elf-ops: bail out if we have no function symbols

2020-03-27 Thread Philippe Mathieu-Daudé
On 3/27/20 11:53 AM, Philippe Mathieu-Daudé wrote: On 3/27/20 10:49 AM, Alex Bennée wrote: It's perfectly possible to have no function symbols in your elf file and if we do the undefined behaviour sanitizer rightly complains about us passing NULL to qsort. Check nsyms before we go ahead. Signed

[PULL 00/13] Net patches

2020-03-27 Thread Jason Wang
The following changes since commit cfe68ae025f704f336d7dd3d1903ce37b445831d: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-5.0-pull-request' into staging (2020-03-26 20:55:54 +) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pu

[PULL 01/13] hw/net/i82596: Correct command bitmask (CID 1419392)

2020-03-27 Thread Jason Wang
From: Philippe Mathieu-Daudé The command is 32-bit, but we are loading the 16 upper bits with the 'get_uint16(s->scb + 2)' call. Once shifted by 16, the command bits match the status bits: - Command Bit 31 ACK-CX Acknowledges that the CU completed an Action Command. Bit 30 ACK-FR Acknow

[PULL 02/13] hw/net/i82596.c: Avoid reading off end of buffer in i82596_receive()

2020-03-27 Thread Jason Wang
From: Peter Maydell The i82596_receive() function attempts to pass the guest a buffer which is effectively the concatenation of the data it is passed and a 4 byte CRC value. However, rather than implementing this as "write the data; then write the CRC" it instead bumps the length value of the da

[PULL 06/13] hw/net/rtl8139: Simplify if/else statement

2020-03-27 Thread Jason Wang
From: Philippe Mathieu-Daudé Rewrite: if (E) { return A; } else { return B; } /* EOF */ } as: if (E) { return A; } return B; } Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Cédric

[PULL 10/13] net/colo-compare.c: Expose "compare_timeout" to users

2020-03-27 Thread Jason Wang
From: Zhang Chen The "compare_timeout" determines the maximum time to hold the primary net packet. This patch expose the "compare_timeout", make user have ability to adjest the value according to application scenarios. QMP command demo: { "execute": "qom-get", "arguments": { "path"

[PULL 04/13] hw/net/e1000e_core: Let e1000e_can_receive() return a boolean

2020-03-27 Thread Jason Wang
From: Philippe Mathieu-Daudé The e1000e_can_receive() function simply returns a boolean value. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Paolo Bonzini Signed-off-by: Jason Wang --- hw/net/e1000e_core.c | 2 +- hw/net/e1000e_core.h | 2 +- 2 files chang

[PULL 03/13] Fixed integer overflow in e1000e

2020-03-27 Thread Jason Wang
From: Andrew Melnychenko Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1737400 Fixed setting max_queue_num if there are no peers in NICConf. qemu_new_nic() creates NICState with 1 NetClientState(index 0) without peers, set max_queue_num to 0 - It prevents undefined behavior and possible cr

[PULL 08/13] hw/net: Make NetCanReceive() return a boolean

2020-03-27 Thread Jason Wang
From: Philippe Mathieu-Daudé The NetCanReceive handler return whether the device can or can not receive new packets. Make it obvious by returning a boolean type. Signed-off-by: Philippe Mathieu-Daudé Acked-by: David Gibson Reviewed-by: Alistair Francis Reviewed-by: Cédric Le Goater Signed-of

[PULL 05/13] hw/net/smc91c111: Let smc91c111_can_receive() return a boolean

2020-03-27 Thread Jason Wang
From: Philippe Mathieu-Daudé The smc91c111_can_receive() function simply returns a boolean value. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Cédric Le Goater Signed-off-by: Jason Wang --- hw/net/smc91c111.c | 8 1 file changed, 4 insertions(+),

[PULL 12/13] net: tulip: check frame size and r/w data length

2020-03-27 Thread Jason Wang
From: Prasad J Pandit Tulip network driver while copying tx/rx buffers does not check frame size against r/w data length. This may lead to OOB buffer access. Add check to avoid it. Limit iterations over descriptors to avoid potential infinite loop issue in tulip_xmit_list_update. Reported-by: L

[PULL 07/13] hw/net/rtl8139: Update coding style to make checkpatch.pl happy

2020-03-27 Thread Jason Wang
From: Philippe Mathieu-Daudé We will modify this code in the next commit. Clean it up first to avoid checkpatch.pl errors. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Cédric Le Goater Signed-off-by: Jason Wang --- hw/net/rtl8139.c | 10 ++ 1 file

[PULL 09/13] hw/net/can: Make CanBusClientInfo::can_receive() return a boolean

2020-03-27 Thread Jason Wang
From: Philippe Mathieu-Daudé The CanBusClientInfo::can_receive handler return whether the device can or can not receive new frames. Make it obvious by returning a boolean type. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Reviewed-by: Cédric Le Goater Signed-off-by: Jas

[PULL 11/13] net/colo-compare.c: Expose "expired_scan_cycle" to users

2020-03-27 Thread Jason Wang
From: Zhang Chen The "expired_scan_cycle" determines period of scanning expired primary node net packets. Signed-off-by: Zhang Chen Signed-off-by: Jason Wang --- net/colo-compare.c | 48 +--- qemu-options.hx| 4 +++- 2 files changed, 48 inserti

[PULL 13/13] hw/net/allwinner-sun8i-emac.c: Fix REG_ADDR_HIGH/LOW reads

2020-03-27 Thread Jason Wang
From: Peter Maydell Coverity points out (CID 1421926) that the read code for REG_ADDR_HIGH reads off the end of the buffer, because it does a 32-bit read from byte 4 of a 6-byte buffer. The code also has an endianness issue for both REG_ADDR_HIGH and REG_ADDR_LOW, because it will do the wrong th

Re: [PATCH] monitor/hmp-cmds: don't silently output when running 'migrate_set_downtime' fails

2020-03-27 Thread Dr. David Alan Gilbert
* Mao Zhongyi (maozhon...@cmss.chinamobile.com) wrote: > Although 'migrate_set_downtime' has been deprecated and replaced > with 'migrate_set_parameter downtime_limit', it has not been > completely eliminated, possibly due to compatibility with older > versions. I think as long as this old paramete

Re: [PATCH v4 15/15] exec: Ram blocks with resizeable anonymous allocations under POSIX

2020-03-27 Thread David Hildenbrand
On 25.03.20 16:34, Murilo Opsfelder Araújo wrote: > On Thursday, March 5, 2020 11:29:45 AM -03 David Hildenbrand wrote: >> We can now make use of resizeable anonymous allocations to implement >> actually resizeable ram blocks. Resizeable anonymous allocations are >> not implemented under WIN32 yet

Re: [PATCH] qemu-user: fix build with LLVM lld 10

2020-03-27 Thread Alex Bennée
Roger Pau Monné writes: > On Thu, Mar 26, 2020 at 09:56:38AM -0700, Richard Henderson wrote: >> On 3/26/20 6:43 AM, Roger Pau Monne wrote: >> > lld 10.0.0 introduced a new linker option --image-base equivalent to >> > the GNU -Ttext-segment one, hence use it when available. >> > >> > This fixe

Re: [PATCH] monitor/hmp-cmds: add units for mirate_parameters.

2020-03-27 Thread Dr. David Alan Gilbert
* Stefano Garzarella (sgarz...@redhat.com) wrote: > Hi Mao, > > On Fri, Mar 27, 2020 at 03:32:10PM +0800, Mao Zhongyi wrote: > > When running: > > (qemu) info migrate_parameters > > announce-initial: 50 ms > > announce-max: 550 ms > > announce-step: 100 ms > > compress-wait-thread: on > > ... > >

Re: [PULL 00/13] Net patches

2020-03-27 Thread Peter Maydell
On Fri, 27 Mar 2020 at 11:14, Jason Wang wrote: > > The following changes since commit cfe68ae025f704f336d7dd3d1903ce37b445831d: > > Merge remote-tracking branch > 'remotes/vivier2/tags/linux-user-for-5.0-pull-request' into staging > (2020-03-26 20:55:54 +) > > are available in the git rep

Re: [PATCH v9 3/4] qcow2: add zstd cluster compression

2020-03-27 Thread Vladimir Sementsov-Ogievskiy
27.03.2020 12:40, Denis Plotnikov wrote: On 27.03.2020 11:43, Vladimir Sementsov-Ogievskiy wrote: Should we note somehow in qcow2 spec that we use streamed version of zstd with specific end byte? We didn't do it for zlib. zstd does it the same way as zlib, saves the compression output to so

Re: [PATCH] migration: fix bad indentation in error_report()

2020-03-27 Thread Dr. David Alan Gilbert
* Mao Zhongyi (maozhon...@cmss.chinamobile.com) wrote: > bad indentation conflicts with CODING_STYLE doc. > > Signed-off-by: Mao Zhongyi > --- > migration/migration.c | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/migration/migration.c b/migratio

Re: [PATCH v1 1/7] elf-ops: bail out if we have no function symbols

2020-03-27 Thread Peter Maydell
On Fri, 27 Mar 2020 at 09:50, Alex Bennée wrote: > > It's perfectly possible to have no function symbols in your elf file > and if we do the undefined behaviour sanitizer rightly complains about > us passing NULL to qsort. Check nsyms before we go ahead. > > Signed-off-by: Alex Bennée > --- > in

Re: [PATCH v16 Kernel 4/7] vfio iommu: Implementation of ioctl for dirty pages tracking.

2020-03-27 Thread Dr. David Alan Gilbert
* Kirti Wankhede (kwankh...@nvidia.com) wrote: > VFIO_IOMMU_DIRTY_PAGES ioctl performs three operations: > - Start dirty pages tracking while migration is active > - Stop dirty pages tracking. > - Get dirty pages bitmap. Its user space application's responsibility to > copy content of dirty pages

Re: [PULL 00/13] Net patches

2020-03-27 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1585307647-24456-1-git-send-email-jasow...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRI

Re: [PULL 00/13] Net patches

2020-03-27 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1585307647-24456-1-git-send-email-jasow...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIP

Re: [PATCH 00/13] microvm: add acpi support

2020-03-27 Thread Gerd Hoffmann
Hi, > I just quickly hacked hw-reduced acpi (using arm/virt as model) Can you send the patch or push a branch nevertheless? thanks, Gerd

[PATCH 4/6] acpi: drop pointless _STA method

2020-03-27 Thread Gerd Hoffmann
When returning a constant there is no point in having a method in the first place, _STA can be a simple integer instead. Signed-off-by: Gerd Hoffmann --- hw/i386/acpi-build-pc.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/hw/i386/acpi-build-pc.c b/hw/i386/

[PATCH 0/6] acpi: i386 tweaks

2020-03-27 Thread Gerd Hoffmann
First batch of microvm patches, some generic acpi stuff. Split the acpi-build.c monster, specifically split the pc and q35 and pci bits into a separate file which we can skip building at some point in the future. Also some small refactorings and simplifications. take care, Gerd Gerd Hoffmann (

[PATCH 5/6] acpi: serial: don't use _STA method

2020-03-27 Thread Gerd Hoffmann
The _STA method dates back to the days where we had a static DSDT. The device is listed in the DSDT table unconditionally and the _STA method checks a bit in the isa bridge pci config space to figure whenever a given is isa device is present or not, then evaluates to 0x0f (present) or 0x00 (absent

[PATCH 3/6] acpi: factor out acpi_dsdt_add_fw_cfg()

2020-03-27 Thread Gerd Hoffmann
Add helper function to add fw_cfg device. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé --- hw/i386/acpi-build-pc.c | 51 ++--- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/hw/i386/acpi-build-pc.c b/hw/i386/acpi-build-pc.

  1   2   3   >