Re: [RFC 0/4] POC: Generating realistic block errors

2019-09-30 Thread Kevin Wolf
Am 20.09.2019 um 20:55 hat Tony Asleson geschrieben: > On 9/20/19 1:11 PM, Kevin Wolf wrote: > > Emitting a QMP event when blkdebug injects an error makes sense to me. > > > > I wouldn't use it for this case, though, because this would become racy. > > It could happen that the guest writes to the

Re: [PATCH 02/18] iotests: Replace IMGOPTS by _unsupported_imgopts

2019-09-30 Thread Max Reitz
On 30.09.19 16:47, Maxim Levitsky wrote: > On Mon, 2019-09-30 at 14:59 +0200, Max Reitz wrote: >> On 29.09.19 18:31, Maxim Levitsky wrote: >>> On Fri, 2019-09-27 at 11:42 +0200, Max Reitz wrote: Some tests require compat=1.1 and thus set IMGOPTS='compat=1.1' globally. That is not how it

Re: [PATCH 09/18] iotests: Drop IMGOPTS use in 267

2019-09-30 Thread Max Reitz
On 30.09.19 16:32, Maxim Levitsky wrote: > On Mon, 2019-09-30 at 15:01 +0200, Max Reitz wrote: >> On 29.09.19 18:33, Maxim Levitsky wrote: >>> On Fri, 2019-09-27 at 11:42 +0200, Max Reitz wrote: Overwriting IMGOPTS means ignoring all user-supplied options, which is not what we want. Repl

[PATCH] hw/isa: Introduce a CONFIG_ISA_SUPERIO switch for isa-superio.c

2019-09-30 Thread Thomas Huth
Currently, isa-superio.c is always compiled as soon as CONFIG_ISA_BUS is enabled. But there are also machines that have an ISA BUS without any of the superio chips attached to it, so we should not compile isa-superio.c in case we only compile a QEMU for such a machine. Thus add a proper CONFIG_ISA_

Re: [PATCH v3 02/18] target/s390x: Add ilen to unwind data

2019-09-30 Thread Richard Henderson
On 9/30/19 12:55 AM, David Hildenbrand wrote: >> What I think you should do instead is check env_neg(env)->icount_decr, >> exactly >> like we do at the start of every basic block, and use that as an indication >> that you should exit back to the main loop. > > The issue is that when we return to

Re: [PATCH 09/18] iotests: Drop IMGOPTS use in 267

2019-09-30 Thread Maxim Levitsky
On Mon, 2019-09-30 at 17:01 +0200, Max Reitz wrote: > On 30.09.19 16:32, Maxim Levitsky wrote: > > On Mon, 2019-09-30 at 15:01 +0200, Max Reitz wrote: > > > On 29.09.19 18:33, Maxim Levitsky wrote: > > > > On Fri, 2019-09-27 at 11:42 +0200, Max Reitz wrote: > > > > > Overwriting IMGOPTS means ignor

Re: [PATCH v3 04/25] error: auto propagated local_err

2019-09-30 Thread Kevin Wolf
Am 24.09.2019 um 22:08 hat Vladimir Sementsov-Ogievskiy geschrieben: > Here is introduced ERRP_FUNCTION_BEGIN macro, to be used at start of > functions with errp parameter. A bit of bike shedding, but FOO_BEGIN suggests to me that a FOO_END will follow. Can we find a different name, especially now

[PATCH 00/10] Further bitmaps improvements

2019-09-30 Thread Vladimir Sementsov-Ogievskiy
Hi! The main feature here is improvement of _next_dirty_area API, which I'm going to use then for backup / block-copy. Vladimir Sementsov-Ogievskiy (10): hbitmap: introduce HBITMAP_MAX_ORIG_SIZE hbitmap: move hbitmap_iter_next_word to hbitmap.c hbitmap: unpublish hbitmap_iter_skip_words h

[PATCH 02/10] hbitmap: move hbitmap_iter_next_word to hbitmap.c

2019-09-30 Thread Vladimir Sementsov-Ogievskiy
The function is definitely internal (it's not used by third party and it has complicated interface). Move it to .c file. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qemu/hbitmap.h | 30 -- util/hbitmap.c | 29 + 2 files

[PATCH 10/10] block/qcow2-bitmap: use bdrv_dirty_bitmap_next_dirty

2019-09-30 Thread Vladimir Sementsov-Ogievskiy
store_bitmap_data() loop does bdrv_set_dirty_iter() on each iteration, which means that we actually don't need iterator itself and we can use simpler bitmap API. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-bitmap.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-)

[PATCH 01/10] hbitmap: introduce HBITMAP_MAX_ORIG_SIZE

2019-09-30 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qemu/hbitmap.h | 7 +++ util/hbitmap.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/include/qemu/hbitmap.h b/include/qemu/hbitmap.h index 1bf944ca3d..82317c5364 100644 --- a/include/qemu/hbitmap.h +++ b/include/qemu/hbi

[PATCH 04/10] hbitmap: drop meta bitmaps as they are unused

2019-09-30 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qemu/hbitmap.h | 21 tests/test-hbitmap.c | 115 - util/hbitmap.c | 16 -- 3 files changed, 152 deletions(-) diff --git a/include/qemu/hbitmap.h b/include/qemu/hbitmap.h index

[PATCH 09/10] nbd/server: use bdrv_dirty_bitmap_next_dirty_area

2019-09-30 Thread Vladimir Sementsov-Ogievskiy
Use bdrv_dirty_bitmap_next_dirty_area for bitmap_to_extents. Since bdrv_dirty_bitmap_next_dirty_area is very accurate in its interface, we'll never exceed requested region with last chunk. So, we don't need dont_fragment, and bitmap_to_extents() interface becomes clean enough to not require any com

[PATCH 07/10] block/dirty-bitmap: improve _next_dirty_area API

2019-09-30 Thread Vladimir Sementsov-Ogievskiy
Firstly, _next_dirty_area is for scenarios when we may contiguously search for next dirty area inside some limited region, so it is more comfortable to specify "end" which should not be recalculated on each iteration. Secondly, mirror wants to limit resulting are, and for this thing it limits @cou

[PATCH 03/10] hbitmap: unpublish hbitmap_iter_skip_words

2019-09-30 Thread Vladimir Sementsov-Ogievskiy
Function is internal and even commented as internal. Drop its definition from .h file. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qemu/hbitmap.h | 7 --- util/hbitmap.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/include/qemu/hbitmap.h b/include

[PATCH 08/10] nbd/server: introduce NBDExtentArray

2019-09-30 Thread Vladimir Sementsov-Ogievskiy
Introduce NBDExtentArray class, to handle extents list creation in more controlled way and with less OUT parameters in functions. Signed-off-by: Vladimir Sementsov-Ogievskiy --- nbd/server.c | 184 +-- 1 file changed, 90 insertions(+), 94 deletions

[PATCH 05/10] block/dirty-bitmap: switch _next_dirty_area and _next_zero to int64_t

2019-09-30 Thread Vladimir Sementsov-Ogievskiy
We are going to introduce bdrv_dirty_bitmap_next_dirty so that same variable may be used to store its return value and to be its parameter, so it would int64_t. Similarly, we are going to refactor hbitmap_next_dirty_area to use hbitmap_next_dirty together with hbitmap_next_zero, therefore we want

Re: [PATCH v3 17/22] fuzz: add support for fork-based fuzzing.

2019-09-30 Thread Alexander Oleinik
On 9/18/19 7:19 PM, Oleinik, Alexander wrote: fork() is a simple way to ensure that state does not leak in between fuzzing runs. Unfortunately, the fuzzer mutation engine relies on bitmaps which contain coverage information for each fuzzing run, and these bitmaps should be copied from the child t

Re: [PATCH v3 04/25] error: auto propagated local_err

2019-09-30 Thread Vladimir Sementsov-Ogievskiy
30.09.2019 18:12, Kevin Wolf wrote: > Am 24.09.2019 um 22:08 hat Vladimir Sementsov-Ogievskiy geschrieben: >> Here is introduced ERRP_FUNCTION_BEGIN macro, to be used at start of >> functions with errp parameter. > > A bit of bike shedding, but FOO_BEGIN suggests to me that a FOO_END will > follow

[PATCH 06/10] block/dirty-bitmap: add _next_dirty API

2019-09-30 Thread Vladimir Sementsov-Ogievskiy
We have bdrv_dirty_bitmap_next_zero, let's add corresponding bdrv_dirty_bitmap_next_dirty, which is more comfortable to use than bitmap iterators in some cases. For test modify test_hbitmap_next_zero_check_range to check both next_zero and next_dirty and add some new checks. Signed-off-by: Vladim

Re: Lockup with --accel tcg,thread=single

2019-09-30 Thread Peter Maydell
On Mon, 30 Sep 2019 at 14:17, Doug Gale wrote: > > I found a lockup in single threaded TCG, with OVMF bios, 16 CPUs. > > qemu-system-x86_64 --accel tcg,thread=single -smp cpus=16 -bios > /usr/share/ovmf/OVMF.fd > > Using Ubuntu 18.04 LTS, default gnome desktop. There is no guest OS, > there is no

Re: [RFC] cpu_map: Remove pconfig from Icelake-Server CPU model

2019-09-30 Thread Paolo Bonzini
On 30/09/19 16:31, Hu, Robert wrote: >> This might be a problem if there are plans to eventually make KVM support >> pconfig, though. Paolo, Robert, are there plans to support pconfig in KVM >> in the >> future? > [Robert Hoo] > Thanks Eduardo for efforts in resolving this issue, introduced from

Re: [PATCH v3 02/18] target/s390x: Add ilen to unwind data

2019-09-30 Thread David Hildenbrand
On 30.09.19 17:03, Richard Henderson wrote: > On 9/30/19 12:55 AM, David Hildenbrand wrote: >>> What I think you should do instead is check env_neg(env)->icount_decr, >>> exactly >>> like we do at the start of every basic block, and use that as an indication >>> that you should exit back to the ma

Re: [PATCH v4 01/18] target/s390x: Add ilen to unwind data

2019-09-30 Thread David Hildenbrand
On 27.09.19 21:39, Richard Henderson wrote: > From: Richard Henderson > > Use ILEN_UNWIND to signal that we have in fact that cpu_restore_state > will have been called by the time we arrive in do_program_interrupt. > > Signed-off-by: Richard Henderson > --- > target/s390x/cpu.h | 4 +++-

Re: [PATCH v4 18/18] target/s390x: Remove ILEN_UNWIND

2019-09-30 Thread David Hildenbrand
On 27.09.19 21:39, Richard Henderson wrote: > This setting is no longer used. > > Signed-off-by: Richard Henderson > --- > target/s390x/cpu.h | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h > index 686cbe41e0..fe1bf746f3 100644 > --- a/target/s3

Re: [PATCH v4 09/18] target/s390x: Return exception from mmu_translate

2019-09-30 Thread David Hildenbrand
On 27.09.19 21:39, Richard Henderson wrote: > Do not raise the exception directly within mmu_translate, > but pass it back so that caller may do so. > > Signed-off-by: Richard Henderson > --- > target/s390x/internal.h| 2 +- > target/s390x/excp_helper.c | 4 ++-- > target/s390x/mem_helper.

Re: [PATCH v7 0/9] linux-user: strace improvements

2019-09-30 Thread Philippe Mathieu-Daudé
On 9/15/19 11:39 PM, Philippe Mathieu-Daudé wrote: > Hi Laurent, > > Few patches I'v been writting while trying to figure out this issue: > http://lists.nongnu.org/archive/html/qemu-arm/2018-01/msg00514.html > > As usual with linux-user files, this series will trigger some checkpatch > benign war

Re: Thoughts on VM fence infrastructure

2019-09-30 Thread Felipe Franciosi
Hi David, > On Sep 30, 2019, at 3:29 PM, Dr. David Alan Gilbert > wrote: > > * Felipe Franciosi (fel...@nutanix.com) wrote: >> Heyall, >> >> We have a use case where a host should self-fence (and all VMs should >> die) if it doesn't hear back from a heartbeat within a certain time >> period. L

gdbstub and gbd segfaults on different instructions in user space emulation

2019-09-30 Thread Libo Zhou
Hi all, I am encountering segmentation fault while porting my custom ISA to QEMU. My custom ISA is VERY VERY simple, it only changes the [31:26] opcode field of LW and SW instructions. The link has my very simple implementation: https://lists.gnu.org/archive/html/qemu-devel/2019-09/msg06976.htm

Re: Thoughts on VM fence infrastructure

2019-09-30 Thread Dr. David Alan Gilbert
* Felipe Franciosi (fel...@nutanix.com) wrote: > Hi David, > > > On Sep 30, 2019, at 3:29 PM, Dr. David Alan Gilbert > > wrote: > > > > * Felipe Franciosi (fel...@nutanix.com) wrote: > >> Heyall, > >> > >> We have a use case where a host should self-fence (and all VMs should > >> die) if it do

Re: [PATCH v3 04/25] error: auto propagated local_err

2019-09-30 Thread Kevin Wolf
Am 30.09.2019 um 17:19 hat Vladimir Sementsov-Ogievskiy geschrieben: > 30.09.2019 18:12, Kevin Wolf wrote: > > Am 24.09.2019 um 22:08 hat Vladimir Sementsov-Ogievskiy geschrieben: > >> Here is introduced ERRP_FUNCTION_BEGIN macro, to be used at start of > >> functions with errp parameter. > > > >

Re: [PATCH v3 02/18] target/s390x: Add ilen to unwind data

2019-09-30 Thread Richard Henderson
On 9/30/19 8:42 AM, David Hildenbrand wrote: >> Of course, but it's no different with this case than any other. If the >> interrupt has already been handled, then we will simply restart the next TB >> as >> per normal. > Yeah, I was mostly concerned that "the next TB" will be "the next > instruct

Re: [RFC] cpu_map: Remove pconfig from Icelake-Server CPU model

2019-09-30 Thread Jiri Denemark
On Mon, Sep 30, 2019 at 17:16:27 +0200, Paolo Bonzini wrote: > On 30/09/19 16:31, Hu, Robert wrote: > >> This might be a problem if there are plans to eventually make KVM support > >> pconfig, though. Paolo, Robert, are there plans to support pconfig in KVM > >> in the > >> future? > > [Robert Ho

Re: gdbstub and gbd segfaults on different instructions in user space emulation

2019-09-30 Thread Peter Maydell
On Mon, 30 Sep 2019 at 16:57, Libo Zhou wrote: > I am encountering segmentation fault while porting my custom ISA to QEMU. My > custom ISA is VERY VERY simple, it only changes the [31:26] opcode field of > LW and SW instructions. The link has my very simple implementation: > https://lists.gnu.o

Re: [PATCH v3 04/25] error: auto propagated local_err

2019-09-30 Thread Vladimir Sementsov-Ogievskiy
30.09.2019 19:00, Kevin Wolf wrote: > Am 30.09.2019 um 17:19 hat Vladimir Sementsov-Ogievskiy geschrieben: >> 30.09.2019 18:12, Kevin Wolf wrote: >>> Am 24.09.2019 um 22:08 hat Vladimir Sementsov-Ogievskiy geschrieben: Here is introduced ERRP_FUNCTION_BEGIN macro, to be used at start of f

Re: Lockup with --accel tcg,thread=single

2019-09-30 Thread Alex Bennée
Peter Maydell writes: > On Mon, 30 Sep 2019 at 14:17, Doug Gale wrote: >> >> I found a lockup in single threaded TCG, with OVMF bios, 16 CPUs. >> >> qemu-system-x86_64 --accel tcg,thread=single -smp cpus=16 -bios >> /usr/share/ovmf/OVMF.fd >> >> Using Ubuntu 18.04 LTS, default gnome desktop. T

Re: [PATCH v3 04/25] error: auto propagated local_err

2019-09-30 Thread Kevin Wolf
Am 30.09.2019 um 18:26 hat Vladimir Sementsov-Ogievskiy geschrieben: > 30.09.2019 19:00, Kevin Wolf wrote: > > Am 30.09.2019 um 17:19 hat Vladimir Sementsov-Ogievskiy geschrieben: > >> 30.09.2019 18:12, Kevin Wolf wrote: > >>> Am 24.09.2019 um 22:08 hat Vladimir Sementsov-Ogievskiy geschrieben: > >

Re: Thoughts on VM fence infrastructure

2019-09-30 Thread Felipe Franciosi
> On Sep 30, 2019, at 5:03 PM, Dr. David Alan Gilbert > wrote: > > * Felipe Franciosi (fel...@nutanix.com) wrote: >> Hi David, >> >>> On Sep 30, 2019, at 3:29 PM, Dr. David Alan Gilbert >>> wrote: >>> >>> * Felipe Franciosi (fel...@nutanix.com) wrote: Heyall, We have a use

Re: [PATCH 06/20] xics: Create sPAPR specific ICS subtype

2019-09-30 Thread Greg Kurz
On Mon, 30 Sep 2019 18:45:30 +1000 David Gibson wrote: > On Fri, Sep 27, 2019 at 06:05:56PM +0200, Greg Kurz wrote: > > On Thu, 26 Sep 2019 10:56:46 +1000 > > David Gibson wrote: > > > > > On Wed, Sep 25, 2019 at 10:55:35AM +0200, Cédric Le Goater wrote: > > > > On 25/09/2019 10:40, Greg Kurz w

[PATCH] target/sparc: Remove old TODO file

2019-09-30 Thread Thomas Huth
This file hasn't seen a real (non-trivial) update since 2008 anymore, so we can assume that it is pretty much out of date and nobody cares for it anymore. Let's simply remove it. Signed-off-by: Thomas Huth --- target/sparc/TODO | 88 --- 1 file changed

Re: [Qemu-devel] [PATCH v2 00/11] RFC crypto/luks: encryption key managment using amend interface

2019-09-30 Thread Maxim Levitsky
On Fri, 2019-09-20 at 17:14 -0400, John Snow wrote: > > On 9/12/19 6:30 PM, Maxim Levitsky wrote: > > This patch series is continuation of my work to add encryption > > key managment to luks/qcow2 with luks. > > > > This is second version of this patch set. > > The changes are mostly addressing t

Re: Thoughts on VM fence infrastructure

2019-09-30 Thread Dr. David Alan Gilbert
* Felipe Franciosi (fel...@nutanix.com) wrote: > > > > On Sep 30, 2019, at 5:03 PM, Dr. David Alan Gilbert > > wrote: > > > > * Felipe Franciosi (fel...@nutanix.com) wrote: > >> Hi David, > >> > >>> On Sep 30, 2019, at 3:29 PM, Dr. David Alan Gilbert > >>> wrote: > >>> > >>> * Felipe Franc

Re: [PATCH v3 02/18] target/s390x: Add ilen to unwind data

2019-09-30 Thread David Hildenbrand
On 30.09.19 18:15, Richard Henderson wrote: > On 9/30/19 8:42 AM, David Hildenbrand wrote: >>> Of course, but it's no different with this case than any other. If the >>> interrupt has already been handled, then we will simply restart the next TB >>> as >>> per normal. >> Yeah, I was mostly concer

Re: [PATCH] hw/isa: Introduce a CONFIG_ISA_SUPERIO switch for isa-superio.c

2019-09-30 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190930150436.18162-1-th...@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 SCRIPT BEGIN === #!

Re: Thoughts on VM fence infrastructure

2019-09-30 Thread Felipe Franciosi
> On Sep 30, 2019, at 6:11 PM, Dr. David Alan Gilbert > wrote: > > * Felipe Franciosi (fel...@nutanix.com) wrote: >> >> >>> On Sep 30, 2019, at 5:03 PM, Dr. David Alan Gilbert >>> wrote: >>> >>> * Felipe Franciosi (fel...@nutanix.com) wrote: Hi David, > On Sep 30, 2019, at

Re: Lockup with --accel tcg,thread=single

2019-09-30 Thread Paolo Bonzini
On 30/09/19 17:37, Peter Maydell wrote: > Not sure currently what the best fix is here. Since thread=single uses just one queued work list, could it be as simple as diff --git a/cpus.c b/cpus.c index d2c61ff..314f9aa 100644 --- a/cpus.c +++ b/cpus.c @@ -1539,7 +1539,7 @@ static void *qemu_tcg_rr_

Re: [PATCH] x86: Add CPUID KVM support for new instruction WBNOINVD

2019-09-30 Thread Eduardo Habkost
CCing qemu-devel. On Tue, Sep 24, 2019 at 01:30:04PM -0700, Jim Mattson wrote: > On Wed, Dec 19, 2018 at 1:02 PM Paolo Bonzini wrote: > > > > On 19/12/18 18:39, Jim Mattson wrote: > > > Is this an instruction that kvm has to be able to emulate before it > > > can enumerate its existence? > > > >

Re: Thoughts on VM fence infrastructure

2019-09-30 Thread Dr. David Alan Gilbert
* Felipe Franciosi (fel...@nutanix.com) wrote: > > > > On Sep 30, 2019, at 6:11 PM, Dr. David Alan Gilbert > > wrote: > > > > * Felipe Franciosi (fel...@nutanix.com) wrote: > >> > >> > >>> On Sep 30, 2019, at 5:03 PM, Dr. David Alan Gilbert > >>> wrote: > >>> > >>> * Felipe Franciosi (fel

Re: [PATCH v2 4/7] riscv/sifive_u: Add the start-in-flash property

2019-09-30 Thread Alistair Francis
On Fri, Sep 27, 2019 at 12:57 AM Bin Meng wrote: > > On Fri, Sep 27, 2019 at 8:55 AM Alistair Francis > wrote: > > > > Add a property that when set to true QEMU will jump from the ROM code to > > the start of flash memory instead of DRAM which is the default > > behaviour. > > > > Signed-off-by:

Re: Lockup with --accel tcg,thread=single

2019-09-30 Thread Alex Bennée
Paolo Bonzini writes: > On 30/09/19 17:37, Peter Maydell wrote: >> Not sure currently what the best fix is here. > > Since thread=single uses just one queued work list, could it be as > simple as Does it? I thought this was the case but: static void queue_work_on_cpu(CPUState *cpu, struct q

Re: [PATCH] x86: Add CPUID KVM support for new instruction WBNOINVD

2019-09-30 Thread Jim Mattson
On Mon, Sep 30, 2019 at 10:54 AM Eduardo Habkost wrote: > > CCing qemu-devel. > > On Tue, Sep 24, 2019 at 01:30:04PM -0700, Jim Mattson wrote: > > On Wed, Dec 19, 2018 at 1:02 PM Paolo Bonzini wrote: > > > > > > On 19/12/18 18:39, Jim Mattson wrote: > > > > Is this an instruction that kvm has to

Re: Thoughts on VM fence infrastructure

2019-09-30 Thread Felipe Franciosi
> On Sep 30, 2019, at 6:59 PM, Dr. David Alan Gilbert > wrote: > > * Felipe Franciosi (fel...@nutanix.com) wrote: >> >> >>> On Sep 30, 2019, at 6:11 PM, Dr. David Alan Gilbert >>> wrote: >>> >>> * Felipe Franciosi (fel...@nutanix.com) wrote: > On Sep 30, 2019, at 5:03 PM,

Qemu Dirty Bitmap backup to encrypted target

2019-09-30 Thread Craig Mull
How can have QEMU backup write the output to an encrypted target?   Blocks in the dirty bitmap are unencrypted, and as such when I write them with QEMU backup they are written to the target unencrypted.   I've experimented with providing a json string as the target but with no luck.   transaction='

[PATCH] user-exec: Do not filter the signal on si_code

2019-09-30 Thread Richard Henderson
This is a workaround for a ppc64le host kernel bug. For the test case linux-test, we have an instruction trace IN: sig_alarm ... IN: 0x400080ed28: 38ac li r0, 0xac 0x400080ed2c: 4402 sc IN: __libc_nanosleep 0x1003bb4c: 7c0802a6 mflr r0 0x1003bb50: f8010010 std r0,

Re: [PATCH v2 29/33] spapr, xics, xive: Move SpaprIrq::reset hook logic into activate/deactivate

2019-09-30 Thread Cédric Le Goater
On 30/09/2019 10:25, David Gibson wrote: > On Mon, Sep 30, 2019 at 08:11:56AM +0200, Cédric Le Goater wrote: >> On 27/09/2019 07:50, David Gibson wrote: >>> It turns out that all the logic in the SpaprIrq::reset hooks (and some in >>> the SpaprIrq::post_load hooks) isn't really related to resetting

Re: [PATCH] user-exec: Do not filter the signal on si_code

2019-09-30 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190930192931.20509-1-richard.hender...@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

Re: Thoughts on VM fence infrastructure

2019-09-30 Thread Rafael David Tinoco
>>> There are times when the main loop can get blocked even though the CPU >>> threads can be running and can in some configurations perform IO >>> even without the main loop (I think!). >> Ah, that's a very good point. Indeed, you can perform IO in those >> cases specially when using vhost devic

RE: [PATCH v5 4/4] colo: Update Documentation for continuous replication

2019-09-30 Thread Zhang, Chen
> -Original Message- > From: Lukas Straub > Sent: Saturday, September 28, 2019 9:25 PM > To: Zhang, Chen > Cc: qemu-devel ; Jason Wang > ; Wen Congyang ; > Xie Changlong ; kw...@redhat.com; > mre...@redhat.com > Subject: Re: [PATCH v5 4/4] colo: Update Documentation for continuous > repl

RE: [PATCH v5 2/4] tests/test-replication.c: Add test for ignoring requests after failover

2019-09-30 Thread Zhang, Chen
> -Original Message- > From: Lukas Straub > Sent: Saturday, September 28, 2019 7:07 PM > To: Zhang, Chen > Cc: qemu-devel ; Jason Wang > ; Wen Congyang ; > Xie Changlong ; kw...@redhat.com; > mre...@redhat.com > Subject: Re: [PATCH v5 2/4] tests/test-replication.c: Add test for ignoring

RE: [PATCH v5 3/4] net/filter.c: Add Options to insert filters anywhere in the filter list

2019-09-30 Thread Zhang, Chen
> -Original Message- > From: Lukas Straub > Sent: Saturday, September 28, 2019 6:45 PM > To: Zhang, Chen > Cc: qemu-devel ; Jason Wang > ; Wen Congyang ; > Xie Changlong ; kw...@redhat.com; > mre...@redhat.com > Subject: Re: [PATCH v5 3/4] net/filter.c: Add Options to insert filters > any

[PATCH v7 01/22] tcg/ppc: Introduce Altivec registers

2019-09-30 Thread Richard Henderson
Altivec supports 32 128-bit vector registers, whose names are by convention v0 through v31. Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic --- tcg/ppc/tcg-target.h | 11 - tcg/ppc/tcg-target.inc.c | 88 +--- 2 files changed, 65 in

[PATCH v7 06/22] tcg/ppc: Replace HAVE_ISEL macro with a variable

2019-09-30 Thread Richard Henderson
Previously we've been hard-coding knowledge that Power7 has ISEL, but it was an optional instruction before that. Use the AT_HWCAP2 bit, when present, to properly determine support. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.inc.c | 17 - 1 file changed, 12 insertio

[PATCH v7 00/22] tcg/ppc: Add vector opcodes

2019-09-30 Thread Richard Henderson
Changes since v6: * The have_foo tests have been split so that VSX is not combined with ISA revision. * The power{7,8,9} patches have been split by isa extension. * Force the [TABC]X bits on within the VSX instruction defines, making the usage of the VSX insns clearer, since we have n

[PATCH v7 02/22] tcg/ppc: Introduce macro VX4()

2019-09-30 Thread Richard Henderson
Introduce macro VX4() used for encoding Altivec instructions. Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic --- tcg/ppc/tcg-target.inc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.inc.c index 9d678c3bf1..8dc5455600 100

[PATCH v7 03/22] tcg/ppc: Introduce macros VRT(), VRA(), VRB(), VRC()

2019-09-30 Thread Richard Henderson
Introduce macros VRT(), VRA(), VRB(), VRC() used for encoding elements of Altivec instructions. Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic --- tcg/ppc/tcg-target.inc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target

[PATCH v7 19/22] tcg/ppc: Update vector support for v2.07 FP

2019-09-30 Thread Richard Henderson
These new instructions are conditional on MSR.FP when TX=0 and MSR.VEC when TX=1. Since we only care about the Altivec registers, and force TX=1, we can consider these to be Altivec instructions. Since Altivec is true for any use of vector types, we only need test have_isa_2_07. This includes mov

[PATCH v7 09/22] tcg/ppc: Add support for vector maximum/minimum

2019-09-30 Thread Richard Henderson
Add support for vector maximum/minimum using Altivec instructions VMAXSB, VMAXSH, VMAXSW, VMAXUB, VMAXUH, VMAXUW, and VMINSB, VMINSH, VMINSW, VMINUB, VMINUH, VMINUW. Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic --- tcg/ppc/tcg-target.h | 2 +- tcg/ppc/tcg-target.inc.

[PATCH v7 04/22] tcg/ppc: Create TCGPowerISA and have_isa

2019-09-30 Thread Richard Henderson
Introduce an enum to hold base < 2.06 < 3.00. Use macros to preserve the existing have_isa_2_06 and have_isa_3_00 predicates. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.h | 12 ++-- tcg/ppc/tcg-target.inc.c | 8 2 files changed, 14 insertions(+), 6 deletions(-

[PATCH v7 10/22] tcg/ppc: Add support for vector add/subtract

2019-09-30 Thread Richard Henderson
Add support for vector add/subtract using Altivec instructions: VADDUBM, VADDUHM, VADDUWM, VSUBUBM, VSUBUHM, VSUBUWM. Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic --- tcg/ppc/tcg-target.inc.c | 20 1 file changed, 20 insertions(+) diff --git a/tcg/pp

[PATCH v7 08/22] tcg/ppc: Add support for load/store/logic/comparison

2019-09-30 Thread Richard Henderson
Add various bits and peaces related mostly to load and store operations. In that context, logic, compare, and splat Altivec instructions are used, and, therefore, the support for emitting them is included in this patch too. Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic ---

[PATCH v7 20/22] tcg/ppc: Update vector support for v3.00 Altivec

2019-09-30 Thread Richard Henderson
These new instructions are conditional only on MSR.VEC and are thus part of the Altivec instruction set, and not VSX. This includes negation and compare not equal. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.h | 2 +- tcg/ppc/tcg-target.inc.c | 23 +++ 2 file

[PATCH v7 05/22] tcg/ppc: Replace HAVE_ISA_2_06

2019-09-30 Thread Richard Henderson
This is identical to have_isa_2_06, so replace it. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.inc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.inc.c index 0bfaef9418..7cb0002c14 100644 --- a/tcg/ppc/tcg-targ

[PATCH v7 12/22] tcg/ppc: Support vector shift by immediate

2019-09-30 Thread Richard Henderson
For Altivec, this is done via vector shift by vector, and loading the immediate into a register. Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic --- tcg/ppc/tcg-target.h | 2 +- tcg/ppc/tcg-target.inc.c | 58 ++-- 2 files changed, 57

[PATCH v7 11/22] tcg/ppc: Add support for vector saturated add/subtract

2019-09-30 Thread Richard Henderson
Add support for vector saturated add/subtract using Altivec instructions: VADDSBS, VADDSHS, VADDSWS, VADDUBS, VADDUHS, VADDUWS, and VSUBSBS, VSUBSHS, VSUBSWS, VSUBUBS, VSUBUHS, VSUBUWS. Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic --- tcg/ppc/tcg-target.h | 2 +- tcg

[PATCH v7 07/22] tcg/ppc: Enable tcg backend vector compilation

2019-09-30 Thread Richard Henderson
Introduce all of the flags required to enable tcg backend vector support, and a runtime flag to indicate the host supports Altivec instructions. For now, do not actually set have_isa_altivec to true, because we have not yet added all of the code to actually generate all of the required insns. Howe

[PATCH v5 00/10] Audio: Mixeng-free 5.1/7.1 audio support

2019-09-30 Thread Kővágó, Zoltán
Hi, I've updated my mixeng-free audio patches. The documentation probably requires more polishing, but I'm sending this now so the other parts can be reviewed too. Changes from v4: * Removed already merged commits. * Bugfix in "audio: make mixeng optional" commit. * Dropped the "paaudio: channe

[PATCH v7 13/22] tcg/ppc: Support vector multiply

2019-09-30 Thread Richard Henderson
For Altivec, this is always an expansion. Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic --- tcg/ppc/tcg-target.h | 2 +- tcg/ppc/tcg-target.opc.h | 8 +++ tcg/ppc/tcg-target.inc.c | 113 ++- 3 files changed, 121 insertions(+), 2

[PATCH v7 14/22] tcg/ppc: Support vector dup2

2019-09-30 Thread Richard Henderson
This is only used for 32-bit hosts. Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic --- tcg/ppc/tcg-target.inc.c | 9 + 1 file changed, 9 insertions(+) diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.inc.c index d4b3354626..8a508136ce 100644 --- a/tcg/ppc

[PATCH v5 06/10] audio: basic support for multichannel audio

2019-09-30 Thread Kővágó, Zoltán
Which currently only means removing some checks. Old code won't require more than two channels, but new code will need it. Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c | 7 --- audio/audio.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/audio/alsaaudio.c b

[PATCH v7 18/22] tcg/ppc: Update vector support for v2.07 VSX

2019-09-30 Thread Richard Henderson
These new instructions are conditional only on MSR.VSX and are thus part of the VSX instruction set, and not Altivec. This includes double-word loads and stores. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.inc.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tcg/ppc

[PATCH v7 15/22] tcg/ppc: Enable Altivec detection

2019-09-30 Thread Richard Henderson
Now that we have implemented the required tcg operations, we can enable detection of host vector support. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.inc.c | 4 1 file changed, 4 insertions(+) diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.inc.c index 8a508136ce..d7

[PATCH v7 21/22] tcg/ppc: Update vector support for v3.00 load/store

2019-09-30 Thread Richard Henderson
These new instructions are a mix of those like LXSD that are only conditional only on MSR.VEC and those like LXV that are conditional on MSR.VEC for TX=1. Thus, in the end, we can consider all of these as Altivec instructions. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.inc.c | 47 +

[PATCH v7 17/22] tcg/ppc: Update vector support for v2.07 Altivec

2019-09-30 Thread Richard Henderson
These new instructions are conditional only on MSR.VEC and are thus part of the Altivec instruction set, and not VSX. This includes lots of double-word arithmetic and a few extra logical operations. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.h | 4 +- tcg/ppc/tcg-target.inc.c |

[PATCH v7 16/22] tcg/ppc: Update vector support for VSX

2019-09-30 Thread Richard Henderson
The VSX instruction set instructions include double-word loads and stores, double-word load and splat, double-word permute, and bit select. All of which require multiple operations in the Altivec instruction set. Because the VSX registers map %vsr32 to %vr0, and we have no current intention or ne

[PATCH v7 22/22] tcg/ppc: Update vector support for v3.00 dup/dupi

2019-09-30 Thread Richard Henderson
These new instructions are conditional on MSR.VEC for TX=1, so we can consider these Altivec instructions. Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.inc.c | 28 ++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/tcg/ppc/tcg-target.inc.c b/tc

Re: Thoughts on VM fence infrastructure

2019-09-30 Thread Felipe Franciosi
> On Sep 30, 2019, at 8:45 PM, Rafael David Tinoco > wrote: > > There are times when the main loop can get blocked even though the CPU threads can be running and can in some configurations perform IO even without the main loop (I think!). >>> Ah, that's a very good point. Inde

[PATCH v5 09/10] usbaudio: change playback counters to 64 bit

2019-09-30 Thread Kővágó, Zoltán
With stereo playback, they need about 375 minutes of continuous audio playback to overflow, which is usually not a problem (as stopping and later resuming playback resets the counters). But with 7.1 audio, they only need about 95 minutes to overflow. After the overflow, the buf->prod % USBAUDIO_P

[PATCH v5 01/10] audio: add mixing-engine option (documentation)

2019-09-30 Thread Kővágó, Zoltán
This will allow us to disable mixeng when we use a decent backend. Disabling mixeng have a few advantages: * we no longer convert the audio output from one format to another, when the underlying audio system would just convert it to a third format. We no longer convert, only the underlying sys

[PATCH v5 05/10] audio: replace shift in audio_pcm_info with bytes_per_frame

2019-09-30 Thread Kővágó, Zoltán
The bit shifting trick worked because the number of bytes per frame was always a power-of-two (since QEMU only supports mono, stereo and 8, 16 and 32 bit samples). But if we want to add support for surround sound, this no longer holds true. Signed-off-by: Kővágó, Zoltán --- audio/alsaaudio.c

[PATCH v5 03/10] paaudio: get/put_buffer functions

2019-09-30 Thread Kővágó, Zoltán
This lets us avoid some buffer copying when using mixeng. Signed-off-by: Kővágó, Zoltán --- audio/paaudio.c | 83 + 1 file changed, 83 insertions(+) diff --git a/audio/paaudio.c b/audio/paaudio.c index ed31f863f7..6ccdf31415 100644 --- a/audio/paa

[PATCH v5 08/10] usb-audio: support more than two channels of audio

2019-09-30 Thread Kővágó, Zoltán
This commit adds support for 5.1 and 7.1 audio playback. This commit adds a new property to usb-audio: * multi=on|off Whether to enable the 5.1 and 7.1 audio support. When off (default) it continues to emulate the old stereo-only device. When on, it emulates a slightly different audio dev

[PATCH v5 02/10] audio: make mixeng optional

2019-09-30 Thread Kővágó, Zoltán
Implementation of the previously added mixing-engine option. Signed-off-by: Kővágó, Zoltán --- Notes: Changes from v4: * audio_pcm_hw_add_* always returns a new HW (or fails) when not using mixeng audio/audio.c | 70 ++ audio/audio

Re: Lockup with --accel tcg,thread=single

2019-09-30 Thread Paolo Bonzini
On 30/09/19 21:20, Alex Bennée wrote: > Does seem to imply the vCPU CPUState is where the queue is. That's not > to say there shouldn't be a single work queue for thread=single. Indeed it doesn't. I confused this with commit a8efa60633 ("cpus: run work items for all vCPUs if single-threaded", 201

[PATCH v5 04/10] audio: support more than two channels in volume setting

2019-09-30 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio.c | 30 ++ audio/audio.h | 10 ++ audio/audio_int.h | 4 ++-- audio/paaudio.c| 20 audio/spiceaudio.c | 14 -- 5 files changed, 54 insertions(+), 24 deletions(-) dif

[PATCH v5 07/10] usb-audio: do not count on avail bytes actually available

2019-09-30 Thread Kővágó, Zoltán
This assumption is no longer true when mixeng is turned off. Signed-off-by: Kővágó, Zoltán --- hw/usb/dev-audio.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/hw/usb/dev-audio.c b/hw/usb/dev-audio.c index ae42e5a2f1..74c99b1f12 100644 --- a/h

[PATCH v5 10/10] paaudio: fix channel order for usb-audio 5.1 and 7.1 streams

2019-09-30 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/paaudio.c | 50 - 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index d195b1caa8..6ff0d17537 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -338,17 +33

Re: [PATCH] user-exec: Do not filter the signal on si_code

2019-09-30 Thread Richard Henderson
On 9/30/19 12:29 PM, Richard Henderson wrote: > This is a workaround for a ppc64le host kernel bug. > > For the test case linux-test, we have an instruction trace > > IN: sig_alarm > ... > > IN: > 0x400080ed28: 38ac li r0, 0xac > 0x400080ed2c: 4402 sc > > IN: __libc_nanosleep

Re: Arch info lost in "info cpus"

2019-09-30 Thread Eduardo Habkost
On Mon, Sep 30, 2019 at 12:22:22PM +0200, Sergio Lopez wrote: > > Alex Bennée writes: > > > Sergio Lopez writes: > > > >> Hi, > >> > >> Commit 137b5cb6ab565cb3781d5337591e155932b4230e (hmp: change > >> hmp_info_cpus to use query-cpus-fast) updated the "info cpus" commit to > >> make it more lig

[PATCH 1/1] nbd: add empty .bdrv_reopen_prepare

2019-09-30 Thread Maxim Levitsky
Fixes commit job / qemu-img commit, when commiting qcow2 file which is based on nbd export. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1718727 Signed-off-by: Maxim Levitsky --- block/nbd.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/block/nbd.c b/block/nbd.c

[PATCH 0/1] RFC: implement reopen for nbd driver

2019-09-30 Thread Maxim Levitsky
Hi, It looks like nbd driver doesn't have support for reopen, which doesn't allow to commit qcow2 snapshots which have nbd export as a base file. This is because the base is opened read-only, and only when commit job starts it reopens the base read-write. Now after talking with Eric Blake, I under

<    1   2   3   >