Re: [Qemu-devel] [PATCH] build: Don't ignore qapi-visit-core.c

2019-09-12 Thread Thomas Huth
On 12/09/2019 20.46, Eric Blake wrote: > This file is version-controlled, and not generated from a .json file. > > Fixes: bf582c3461b > Reported-by: Thomas Huth > Signed-off-by: Eric Blake > --- > .gitignore | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/.gitignore b/.gitignore > ind

Re: [Qemu-devel] [PATCH] target/arm: Fix sign-extension for SMLAL*

2019-09-12 Thread Laurent Desnogues
Hello, On Thu, Sep 12, 2019 at 8:31 PM Richard Henderson wrote: > > The 32-bit product should be sign-extended, not zero-extended. > > Fixes: ea96b374641b > Reported-by: Laurent Desnogues > Signed-off-by: Richard Henderson No more failures on my tests. Tested-by: Laurent Desnogues Thanks,

[Qemu-devel] [Bug 1843852] [NEW] QEMU does not express a dependency on perl-Test-Harness

2019-09-12 Thread John Snow
Public bug reported: This is a minor thing; in Fedora you can install most of the developer dependencies by issuing something like `dnf builddep qemu-kvm` and this takes care of just about everything such that you can run ./configure and make. For "make check" though, configure doesn't catch that

[Qemu-devel] [PATCH 2/2] roms/Makefile.edk2: don't pull in submodules when building from tarball

2019-09-12 Thread Michael Roth
Currently the `make efi` target pulls submodules nested under the roms/edk2 submodule as dependencies. However, when we attempt to build from a tarball this fails since we are no longer in a git tree. A preceding patch will pre-populate these submodules in the tarball, so assume this build depende

[Qemu-devel] [PATCH 0/2] Fix tarball builds of UEFI/EDK2 firmware

2019-09-12 Thread Michael Roth
Bruce noticed that we cannot build `make efi` target from the v4.1.0 tarball. This is due to a failure on the part of the make-release script to pull in submodules nested under other submodules, as well as Makefile.edk2's assumptions about being in a git tree. Suggestions for more robust solutions

[Qemu-devel] [PATCH 1/2] make-release: pull in edk2 submodules so we can build it from tarballs

2019-09-12 Thread Michael Roth
The `make efi` target added by 536d2173 is built from the roms/edk2 submodule, which in turn relies on additional submodules nested under roms/edk2. The make-release script currently only pulls in top-level submodules, so these nested submodules are missing in the resulting tarball. We could try

Re: [Qemu-devel] [PATCH] docker: add sanitizers back to clang build

2019-09-12 Thread John Snow
On 9/11/19 9:52 PM, no-re...@patchew.org wrote: > Patchew URL: https://patchew.org/QEMU/20190912014442.5757-1-js...@redhat.com/ > > > > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Subject: [Qemu-devel] [PATCH] docker: add saniti

Re: [Qemu-devel] [PATCH 2/6] exec.c: remove an unnecessary assert on PHYS_MAP_NODE_NIL in phys_map_node_alloc()

2019-09-12 Thread Wei Yang
On Thu, Sep 12, 2019 at 02:42:26PM +0200, Paolo Bonzini wrote: >On 12/09/19 04:51, Wei Yang wrote: >> On Fri, Aug 23, 2019 at 09:07:50AM +0800, Wei Yang wrote: >>> On Thu, Aug 22, 2019 at 12:24:32PM +0200, Paolo Bonzini wrote: On 21/03/19 09:25, Wei Yang wrote: > PHYS_MAP_NODE_NIL is assig

Re: [Qemu-devel] [PATCH v8 01/13] vfio: KABI for migration interface

2019-09-12 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Thursday, September 12, 2019 10:41 PM > > On Tue, 3 Sep 2019 06:57:27 + > "Tian, Kevin" wrote: > > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > > Sent: Saturday, August 31, 2019 12:33 AM > > > > > > On F

[Qemu-devel] [PATCH v3 1/3] block/qcow2: refactoring of threaded encryption code

2019-09-12 Thread Maxim Levitsky
This commit tries to clarify few function arguments, and add comments describing the encrypt/decrypt interface Signed-off-by: Maxim Levitsky --- block/qcow2-cluster.c | 8 +++--- block/qcow2-threads.c | 63 ++- 2 files changed, 54 insertions(+), 17 deleti

Re: [Qemu-devel] [PATCH 1/2] LUKS: better error message when creating too large files

2019-09-12 Thread Maxim Levitsky
On Mon, 2019-07-22 at 10:05 +0100, Daniel P. Berrangé wrote: > On Sun, Jul 21, 2019 at 09:15:07PM +0300, Maxim Levitsky wrote: > > Currently if you attampt to create too large file with luks you > > get the following error message: > > > > Formatting 'test.luks', fmt=luks size=17592186044416 key-s

[Qemu-devel] [PATCH v3 3/3] qemu-iotests: Add test for bz #1745922

2019-09-12 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- tests/qemu-iotests/263 | 91 ++ tests/qemu-iotests/263.out | 40 + tests/qemu-iotests/group | 1 + 3 files changed, 132 insertions(+) create mode 100755 tests/qemu-iotests/263 create mode 100644 tests/q

[Qemu-devel] [PATCH v2 10/11] iotests: filter few more luks specific create options

2019-09-12 Thread Maxim Levitsky
Those options are test input anyway, and this allows more tests to be able to have same output on both qcow2 luks encrypted images and raw luks images Signed-off-by: Maxim Levitsky --- tests/qemu-iotests/087.out | 6 +++--- tests/qemu-iotests/134.out | 2 +- tests/qemu-iotests/158.ou

[Qemu-devel] [PATCH v3 2/3] block/qcow2: fix the corruption when rebasing luks encrypted files

2019-09-12 Thread Maxim Levitsky
This fixes subtle corruption introduced by luks threaded encryption in commit 8ac0f15f335 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1745922 The corruption happens when we do a write that * writes to two or more unallocated clusters at once * doesn't fully cover the first sector

[Qemu-devel] [PATCH v2 09/11] block/qcow2: implement blockdev-amend

2019-09-12 Thread Maxim Levitsky
Currently only for changing crypto parameters Signed-off-by: Maxim Levitsky --- block/qcow2.c| 71 qapi/block-core.json | 6 ++-- 2 files changed, 75 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 26f83aeb44..

[Qemu-devel] [PATCH v3 0/3] Fix qcow2+luks corruption introduced by commit 8ac0f15f335

2019-09-12 Thread Maxim Levitsky
Commit 8ac0f15f335 accidently broke the COW of non changed areas of newly allocated clusters, when the write spans multiple clusters, and needs COW both prior and after the write. This results in 'after' COW area being encrypted with wrong sector address, which render it corrupted. Bugzilla: https

[Qemu-devel] [PATCH v2 06/11] qcow2: implement crypto amend options

2019-09-12 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- block/qcow2.c | 77 +-- 1 file changed, 62 insertions(+), 15 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 0618a63793..26f83aeb44 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -172,6 +172,25 @@

[Qemu-devel] [PATCH v2 02/11] qcrypto-luks: extend the create options for upcoming encryption key management

2019-09-12 Thread Maxim Levitsky
Now you can specify which slot to put the encryption key to Plus add 'active' option which will let user erase the key secret instead of adding it. Check that active=true it when creating. Signed-off-by: Maxim Levitsky --- block/crypto.c | 2 ++ block/crypto.h | 16

[Qemu-devel] [PATCH v2 11/11] iotests : add tests for encryption key management

2019-09-12 Thread Maxim Levitsky
Note that currently I add tests 300-302, which are placeholders to ease the rebase. In final version of these patches I will update these. Signed-off-by: Maxim Levitsky --- tests/qemu-iotests/300 | 202 + tests/qemu-iotests/300.out | 98 +++ tests/qem

[Qemu-devel] [PATCH v2 07/11] block: add x-blockdev-amend qmp command

2019-09-12 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- block/Makefile.objs | 2 +- block/amend.c | 116 ++ include/block/block_int.h | 23 ++-- qapi/block-core.json | 26 + qapi/job.json | 4 +- 5 files changed, 163 insertions(+)

[Qemu-devel] [PATCH v2 05/11] block/crypto: implement the encryption key management

2019-09-12 Thread Maxim Levitsky
This implements the encryption key management using the generic code in qcrypto layer (currently only for qemu-img amend) This code adds another 'write_func' because the initialization write_func works directly on the underlying file, because during the creation, there is no open instance of the l

[Qemu-devel] [PATCH v2 01/11] qcrypto: add suport for amend options

2019-09-12 Thread Maxim Levitsky
This adds the qcrypto_amend_options and corresponding crypto driver callbacks for the for encrypted key managedment Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- crypto/block.c | 31 +++ crypto/blockpriv.h | 8 include/crypt

[Qemu-devel] [PATCH v2 08/11] block/crypto: implement blockdev-amend

2019-09-12 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky Reviewed-by: Daniel P. Berrangé --- block/crypto.c | 85 ++-- qapi/block-core.json | 7 ++-- 2 files changed, 71 insertions(+), 21 deletions(-) diff --git a/block/crypto.c b/block/crypto.c index f42fa057e6..5905f7f520

[Qemu-devel] [PATCH v2 03/11] qcrypto-luks: implement the encryption key management

2019-09-12 Thread Maxim Levitsky
Signed-off-by: Maxim Levitsky --- crypto/block-luks.c | 356 +++- 1 file changed, 354 insertions(+), 2 deletions(-) diff --git a/crypto/block-luks.c b/crypto/block-luks.c index fed80e6646..26ce50b111 100644 --- a/crypto/block-luks.c +++ b/crypto/block-luks

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

2019-09-12 Thread Maxim Levitsky
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 the review feedback, plus I tested (and fixed sadly) the somewhat ugly code that allows to still write share a raw luks

[Qemu-devel] [PATCH v2 04/11] block: amend: add 'force' option

2019-09-12 Thread Maxim Levitsky
'force' optinion will be used for some unsafe option amend operations. This includes things like erasing last keyslot in luks (which pretty much guarantees destroying the data, unless the master key is backed up by extrnal means, but that _might_ be desired result) Signed-off-by: Maxim Levitsky

Re: [Qemu-devel] [PULL 15/36] memory: fix race between TCG and accesses to dirty bitmap

2019-09-12 Thread Paolo Bonzini
Il gio 12 set 2019, 19:43 Richard Henderson ha scritto: > >>> Fortunately, in order to fix it, no change is required to the > >>> vCPU thread. However, the reader thread must delay the read after > >>> the vCPU thread has finished the write. This can be approximated > >>> conservatively by run_

Re: [Qemu-devel] [PATCH v2] docs/nvdimm: add example on persistent backend setup

2019-09-12 Thread Wei Yang
On Thu, Sep 12, 2019 at 02:16:00PM +0200, Stefan Hajnoczi wrote: >On Thu, Aug 01, 2019 at 08:40:53AM +0800, Wei Yang wrote: >> Persistent backend setup requires some knowledge about nvdimm and ndctl >> tool. Some users report they may struggle to gather these knowledge and >> have difficulty to set

Re: [Qemu-devel] [PATCH] migration: fix one typo in comment of function migration_total_bytes()

2019-09-12 Thread Wei Yang
On Thu, Sep 12, 2019 at 09:44:41AM +0200, Juan Quintela wrote: >Wei Yang wrote: >> Signed-off-by: Wei Yang > >Reviewed-by: Juan Quintela > >for(i = 0; i < 0; i++) > printf("Beginning is with double n, not double g"); :-) -- Wei Yang Help you, Help me

Re: [Qemu-devel] [PATCH] memory: inline and optimize devend_memop

2019-09-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190912141820.30702-1-pbonz...@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 SCRIPT BEGIN ==

[Qemu-devel] [Bug 1841592] Re: ppc: softfloat float implementation issues

2019-09-12 Thread Alex Bennée
Testing on current master shows the behavior is correct. I guess rth's patch fixed this case. ** Changed in: qemu Status: New => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/184

Re: [Qemu-devel] [PATCH 2/2] ati: use vga_read_byte in ati_cursor_define

2019-09-12 Thread BALATON Zoltan
On Thu, 12 Sep 2019, Gerd Hoffmann wrote: This makes sure reads are confined to vga video memory. Reported-by: xu hang Signed-off-by: Gerd Hoffmann --- hw/display/ati.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/display/ati.c b/hw/display/ati.c index 8f94

Re: [Qemu-devel] [RFC] docs: vhost-user: add in-band kick/call messages

2019-09-12 Thread Johannes Berg
On Thu, 2019-09-12 at 14:22 +0200, Stefan Hajnoczi wrote: > > The vhost-user spec is unclear and inconsistent. Patches are welcome. :) > A footnote describing the old terminology would be necessary so that > existing documentation, code, etc can still be decyphered when the spec > changes the t

[Qemu-devel] [PATCH v2 2/3] cputlb: Replace switches in load/store_helper with callback

2019-09-12 Thread Richard Henderson
Add a function parameter to perform the actual load/store to ram. With optimization, this results in identical code. Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 159 +++-- 1 file changed, 83 insertions(+), 76 deletions(-) diff --git a/accel/

[Qemu-devel] [PATCH v2 3/3] cputlb: Introduce TLB_BSWAP

2019-09-12 Thread Richard Henderson
Handle bswap on ram directly in load/store_helper. This fixes a bug with the previous implementation in that one cannot use the I/O path for RAM. Fixes: a26fc6f5152b47f1 Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 2 + accel/tcg/cputlb.c | 118 ---

[Qemu-devel] [PATCH v2 1/3] cputlb: Disable __always_inline__ without optimization

2019-09-12 Thread Richard Henderson
This forced inlining can result in missing symbols, which makes a debugging build harder to follow. Reported-by: Peter Maydell Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- include/qemu/compiler.h | 11 +++ accel/tcg/cputlb.c | 4 ++-- 2 files changed, 13 insert

[Qemu-devel] [PATCH v2 0/3] cputlb: Adjust tlb bswap implementation

2019-09-12 Thread Richard Henderson
Changes from v1: * Move QEMU_ALWAYS_INLINE to qemu/compiler.h. * Rename some inline wrapper functions. * Don't break TLB_NOTDIRTY in patch 3. Blurb from v1: The version that Tony came up with, and I reviewed, doesn't actually work when applied to RAM. It only worked for i/o memory. This w

Re: [Qemu-devel] [RFC PATCH] virtio-blk: schedule virtio_notify_config to run on main context

2019-09-12 Thread Michael S. Tsirkin
On Thu, Sep 12, 2019 at 08:19:25PM +0200, Sergio Lopez wrote: > Another AioContext-related issue, and this is a tricky one. > > Executing a QMP block_resize request for a virtio-blk device running > on an iothread may cause a deadlock involving the following mutexes: > > - main thead > * Has a

[Qemu-devel] [Bug 1841592] Re: ppc: softfloat float implementation issues

2019-09-12 Thread Richard Henderson
It should be a fused multiply add; you may need to use -ffast-math or something to get the compiler to generate the proper instruction. However, one can see from target/ppc/translate/fp-impl.inc.c: /* fmadd - fmadds */ GEN_FLOAT_ACB(madd, 0x1D, 1, PPC_FLOAT); through to _GEN_FLOAT_ACB: gen_

Re: [Qemu-devel] [PATCH 09/10] block/qcow2: implement blockdev-amend

2019-09-12 Thread Maxim Levitsky
On Fri, 2019-09-06 at 15:12 +0100, Daniel P. Berrangé wrote: > On Fri, Aug 30, 2019 at 11:56:07PM +0300, Maxim Levitsky wrote: > > Currently only for changing crypto parameters > > > > Signed-off-by: Maxim Levitsky > > --- > > block/qcow2.c| 71 +++

Re: [Qemu-devel] [PATCH 08/10] block/crypto: implement blockdev-amend

2019-09-12 Thread Maxim Levitsky
On Fri, 2019-09-06 at 15:10 +0100, Daniel P. Berrangé wrote: > On Fri, Aug 30, 2019 at 11:56:06PM +0300, Maxim Levitsky wrote: > > Signed-off-by: Maxim Levitsky > > --- > > block/crypto.c | 86 +--- > > qapi/block-core.json | 4 +-- > > 2 files chang

Re: [Qemu-devel] [PATCH 06/10] qcow2: implement crypto amend options

2019-09-12 Thread Maxim Levitsky
On Fri, 2019-09-06 at 15:06 +0100, Daniel P. Berrangé wrote: > On Fri, Aug 30, 2019 at 11:56:04PM +0300, Maxim Levitsky wrote: > > --- > > block/qcow2.c | 79 --- > > 1 file changed, 63 insertions(+), 16 deletions(-) > > > > @@ -4888,9 +4899,22 @@ s

Re: [Qemu-devel] [PATCH 3/3] cputlb: Introduce TLB_BSWAP

2019-09-12 Thread Richard Henderson
On 9/11/19 10:56 AM, Tony Nguyen wrote: >> @@ -1372,26 +1364,27 @@ load_helper(CPUArchState *env, target_ulong addr, >> TCGMemOpIdx oi, >> /* On watchpoint hit, this will longjmp out. */ >> cpu_check_watchpoint(env_cpu(env), addr, size, >>

[Qemu-devel] [Bug 1841592] Re: ppc: softfloat float implementation issues

2019-09-12 Thread Alex Bennée
I'm confused by this testcase as it's not a fused multiply-add but as you say two combined operations. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1841592 Title: ppc: softfloat float implementati

[Qemu-devel] [PATCH] build: Don't ignore qapi-visit-core.c

2019-09-12 Thread Eric Blake
This file is version-controlled, and not generated from a .json file. Fixes: bf582c3461b Reported-by: Thomas Huth Signed-off-by: Eric Blake --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e9bbc006d39e..7de868d1eab4 100644 --- a/.gitignore +++ b/.

[Qemu-devel] [Bug 1843651] Re: m68k fpu bug

2019-09-12 Thread Alex Bennée
** Tags added: fpu m68k -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1843651 Title: m68k fpu bug Status in QEMU: New Bug description: On gcc123 cfarm machine, I was testing m68k executable

[Qemu-devel] [Bug 1843795] Re: 'mtfsf' instruction can clear FI incorrectly

2019-09-12 Thread Alex Bennée
** Tags added: fpu ppc testcase -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1843795 Title: 'mtfsf' instruction can clear FI incorrectly Status in QEMU: New Bug description: Using mtfsf inst

Re: [Qemu-devel] hw/vfio/pci: duplicated invocation of vfio_msix_vector_release() in vfio_msix_disable()

2019-09-12 Thread Alex Williamson
On Tue, 10 Sep 2019 19:01:22 +0800 Guoheyi wrote: > Hi folks, > > Recently we found there are 2 invocations of vfio_msix_vector_release() > in vfio_msix_disable(). The 1st one is in msix_unset_vector_notifiers(), > for we set device's msix_vector_release_notifier to > vfio_msix_vector_release

Re: [Qemu-devel] [PATCH v8 01/13] vfio: KABI for migration interface

2019-09-12 Thread Alex Williamson
On Tue, 3 Sep 2019 06:57:27 + "Tian, Kevin" wrote: > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Saturday, August 31, 2019 12:33 AM > > > > On Fri, 30 Aug 2019 08:06:32 + > > "Tian, Kevin" wrote: > > > > > > From: Tian, Kevin > > > > Sent: Friday, August 30,

[Qemu-devel] [PATCH] target/arm: Fix sign-extension for SMLAL*

2019-09-12 Thread Richard Henderson
The 32-bit product should be sign-extended, not zero-extended. Fixes: ea96b374641b Reported-by: Laurent Desnogues Signed-off-by: Richard Henderson --- target/arm/translate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/arm/translate.c b/target/arm/translate.c in

[Qemu-devel] [RFC PATCH] virtio-blk: schedule virtio_notify_config to run on main context

2019-09-12 Thread Sergio Lopez
Another AioContext-related issue, and this is a tricky one. Executing a QMP block_resize request for a virtio-blk device running on an iothread may cause a deadlock involving the following mutexes: - main thead * Has acquired: qemu_mutex_global. * Is trying the acquire: iothread AioContext l

Re: [Qemu-devel] [PATCH v2] memory: inline and optimize devend_memop

2019-09-12 Thread Richard Henderson
On 9/12/19 10:18 AM, Paolo Bonzini wrote: > -MemOp devend_memop(enum device_endian end); > +static inline MemOp devend_memop(enum device_endian end) Ah ha, yes of course, the static inline. Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH] memory: inline and optimize devend_memop

2019-09-12 Thread Richard Henderson
On 9/12/19 10:18 AM, Paolo Bonzini wrote: > devend_memop can rely on the fact that the result is always either > 0 or MO_BSWAP, corresponding respectively to host endianness and > the opposite. Native (target) endianness in turn can be either > the host endianness, in which case MO_BSWAP is only r

Re: [Qemu-devel] [PATCH v2 1/5] rcu: Add automatically released rcu_read_lock variant

2019-09-12 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 11/09/19 21:06, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > RCU_READ_LOCK_AUTO takes the rcu_read_lock and then uses glib's > > g_auto infrastructure (and thus whatever the compiler's hooks are) to > > release it

Re: [Qemu-devel] [PULL 15/36] memory: fix race between TCG and accesses to dirty bitmap

2019-09-12 Thread Richard Henderson
On 9/12/19 2:54 AM, Pavel Dovgalyuk wrote: > Ping. > > > Pavel Dovgalyuk > >> -Original Message- >> From: dovgaluk [mailto:dovga...@ispras.ru] >> Sent: Monday, August 26, 2019 3:19 PM >> To: Paolo Bonzini; pavel.dovga...@ispras.ru >> Cc: qemu-devel@nongnu.org; Qemu-devel >> Subject: Re:

[Qemu-devel] [Bug 1841592] Re: ppc: softfloat float implementation issues

2019-09-12 Thread Alex Bennée
** Tags added: ppc64 testcase -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1841592 Title: ppc: softfloat float implementation issues Status in QEMU: New Bug description: Per bug #1841491, Ri

Re: [Qemu-devel] [PATCH v2 17/17] RISC-V: add vector extension premutation instructions

2019-09-12 Thread Richard Henderson
On 9/11/19 2:25 AM, liuzhiwei wrote: > +/* vfmv.f.s rd, vs2 # rd = vs2[0] (rs1=0) */ > +void VECTOR_HELPER(vfmv_f_s)(CPURISCVState *env, uint32_t rs1, uint32_t rs2, > +uint32_t rd) ... > +/* vmv.s.x vd, rs1 # vd[0] = rs1 */ > +void VECTOR_HELPER(vmv_s_x)(CPURISCVState *env, uint32_t rs1, uint3

Re: [Qemu-devel] [PULL v2 00/15] Linux user for 4.2 patches

2019-09-12 Thread Peter Maydell
On Wed, 11 Sep 2019 at 07:53, Laurent Vivier wrote: > > The following changes since commit 89ea03a7dc83ca36b670ba7f787802791fcb04b1: > > Merge remote-tracking branch > 'remotes/huth-gitlab/tags/m68k-pull-2019-09-07' into staging (2019-09-09 > 09:48:34 +0100) > > are available in the Git reposi

Re: [Qemu-devel] [PATCH] target/m68k/fpu_helper.c: rename the access arguments

2019-09-12 Thread Laurent Vivier
Le 12/09/2019 à 16:02, KONRAD Frederic a écrit : > The "access" arguments clash with a macro under Windows with MinGW: > CC m68k-softmmu/target/m68k/fpu_helper.o > target/m68k/fpu_helper.c: In function 'fmovem_predec': > target/m68k/fpu_helper.c:405:56: error: macro "access" passed 4 arg

Re: [Qemu-devel] [PATCH v2 16/17] RISC-V: add vector extension mask instructions

2019-09-12 Thread Richard Henderson
On 9/11/19 2:25 AM, liuzhiwei wrote: > +for (i = 0; i < vlmax; i++) { > +if (i < env->vfp.vstart) { > +continue; > +} else if (i < vl) { > +tmp = ~vector_mask_reg(env, rs1, width, lmul, i) & > +vector_mask_reg(env, rs2, width, lmul, i)

Re: [Qemu-devel] [PATCH v6 4/8] linux-user/syscall: Introduce target_sockaddr_nl

2019-09-12 Thread Laurent Vivier
Le 11/09/2019 à 21:34, Philippe Mathieu-Daudé a écrit : > On Mon, Sep 9, 2019 at 4:23 PM Laurent Vivier wrote: >> Le 08/09/2019 à 08:15, Philippe Mathieu-Daudé a écrit : >>> Signed-off-by: Philippe Mathieu-Daudé >>> Tested-By: Guido Günther >>> --- >>> linux-user/syscall.c | 6 -- >>>

[Qemu-devel] [Bug 1843795] [NEW] 'mtfsf' instruction can clear FI incorrectly

2019-09-12 Thread Paul Clarke
Public bug reported: Using mtfsf instruction can clear the FPSCR FI bit incorrectly. This code snippet exhibits the issue: -- fpscr.ll = 0x1fff; __builtin_mtfsf (0b, fpscr.d); fpscr.d = __builtin_mffs (); -- On POWER9 hardware: mffs: FPSCR = 0x77ff On qemu (gi

Re: [Qemu-devel] [PATCH v2 15/17] RISC-V: add vector extension reduction instructions

2019-09-12 Thread Richard Henderson
On 9/11/19 2:25 AM, liuzhiwei wrote: > +/* vredsum.vs vd, vs2, vs1, vm # vd[0] = sum(vs1[0] , vs2[*]) */ > +void VECTOR_HELPER(vredsum_vs)(CPURISCVState *env, uint32_t vm, uint32_t rs1, > +uint32_t rs2, uint32_t rd) > +{ > > +int width, lmul, vl, vlmax; > +int i, j, src2; > +uint6

Re: [Qemu-devel] [PATCH v2 09/17] RISC-V: add vector extension integer instructions part2, bit/shift

2019-09-12 Thread Richard Henderson
On 9/11/19 2:25 AM, liuzhiwei wrote: > +void VECTOR_HELPER(vand_vv)(CPURISCVState *env, uint32_t vm, uint32_t rs1, > +uint32_t rs2, uint32_t rd) > +{ > +int i, j, vl; > +uint32_t lmul, width, src1, src2, dest, vlmax; > + > +vl = env->vfp.vl; > +lmul = vector_get_lmul(env); > +

[Qemu-devel] [PULL 4/4] target/mips: gdbstub: Revert commit 8e0b373

2019-09-12 Thread Aleksandar Markovic
From: Libo Zhou Multiple reports from users were received regarding failures of packet 'g' communication with gdb for some MIPS configurations. It was found out (by bisecting) that the problematic commit is 8e0b373. Revert that commit until a better solution is developed. Suggested-by: Aleksanda

[Qemu-devel] [PULL 0/4] MIPS queue for September 12th, 2019

2019-09-12 Thread Aleksandar Markovic
From: Aleksandar Markovic The following changes since commit 6d2fdde42c3344099262431df6a3f429c509291d: Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-next-100919-2' into staging (2019-09-10 14:52:09 +0100) are available in the git repository at: https://github.com/AMarko

[Qemu-devel] [PULL 3/4] hw/mips/mips_jazz: Remove no-longer-necessary override of do_unassigned_access

2019-09-12 Thread Aleksandar Markovic
From: Peter Maydell Now that the MIPS CPU implementation uses the new do_transaction_failed hook, we can remove the old code that handled the do_unassigned_access hook. Signed-off-by: Peter Maydell Signed-off-by: Aleksandar Markovic Reviewed-by: Philippe Mathieu-Daudé Tested-by: Hervé Poussin

[Qemu-devel] [PULL 1/4] hw/mips/mips_jazz: Override do_transaction_failed hook

2019-09-12 Thread Aleksandar Markovic
From: Peter Maydell The MIPS Jazz ('magnum' and 'pica61') boards have some code which overrides the CPU's do_unassigned_access hook, so they can intercept it and not raise exceptions on data accesses to invalid addresses, only for instruction fetches. We want to switch MIPS over to using the do_

[Qemu-devel] [PULL 2/4] target/mips: Switch to do_transaction_failed() hook

2019-09-12 Thread Aleksandar Markovic
From: Peter Maydell Switch the MIPS target from the old unassigned_access hook to the new do_transaction_failed hook. Unlike the old hook, do_transaction_failed is only ever called from the TCG memory access paths, so there is no need for the "ignore this if we're using KVM" hack that we were pr

Re: [Qemu-devel] [PATCH v3 3/6] vmstate: replace DeviceState with VMStateIf

2019-09-12 Thread Halil Pasic
On Thu, 12 Sep 2019 16:25:11 +0400 Marc-André Lureau wrote: > diff --git a/hw/s390x/s390-skeys.c b/hw/s390x/s390-skeys.c > index d4807f..16b9bbf04d 100644 > --- a/hw/s390x/s390-skeys.c > +++ b/hw/s390x/s390-skeys.c > @@ -392,7 +392,7 @@ static inline void > s390_skeys_set_migration_enabled(O

[Qemu-devel] [PATCH] blockdev: avoid acquiring AioContext lock twice at do_drive_backup()

2019-09-12 Thread Sergio Lopez
do_drive_backup() acquires the AioContext lock of the corresponding BlockDriverState. This is not a problem when it's called from qmp_drive_backup(), but drive_backup_prepare() also acquires the lock before calling it. This change adds a BlockDriverState argument to do_drive_backup(), which is use

Re: [Qemu-devel] [PATCH] util/ioc.c: try to reassure Coverity about qemu_iovec_init_extended

2019-09-12 Thread Stefan Hajnoczi
On Tue, Sep 10, 2019 at 12:03:10PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Make it more obvious, that filling qiov corresponds to qiov allocation, > which in turn corresponds to total_niov calculation, based on mid_niov > (not mid_len). Still add an assertion to show that there should be no >

Re: [Qemu-devel] [PATCH] target/arm: fix CBAR register for AArch64 CPUs

2019-09-12 Thread Peter Maydell
On Thu, 12 Sep 2019 at 12:01, Luc Michel wrote: > > For AArch64 CPUs with a CBAR register, we have two views for it: > - in AArch64 state, the CBAR_EL1 register (S3_1_C15_C3_0), returns the > full 64 bits CBAR value > - in AArch32 state, the CBAR register (cp15, opc1=1, CRn=15, CRm=3, opc2

Re: [Qemu-devel] [RFC v3 PATCH 08/45] multi-process: add functions to synchronize proxy and remote endpoints

2019-09-12 Thread Stefan Hajnoczi
On Tue, Sep 03, 2019 at 04:37:34PM -0400, Jagannathan Raman wrote: > In some cases, for example MMIO read, QEMU has to wait for the remote to > complete a command before proceeding. An eventfd based mechanism is > added to synchronize QEMU & remote process. > > Signed-off-by: John G Johnson > Sig

Re: [Qemu-devel] [PATCH v2 08/17] RISC-V: add vector extension integer instructions part1, add/sub/adc/sbc

2019-09-12 Thread Richard Henderson
On 9/12/19 11:27 AM, Richard Henderson wrote: >> +void VECTOR_HELPER(vadc_vxm)(CPURISCVState *env, uint32_t rs1, >> +uint32_t rs2, uint32_t rd) >> +{ > > Watch the spacing between functions. > Pass gpr rs1 by value. > >> +void VECTOR_HELPER(vadc_vim)(CPURISCVState *env, uint32_t rs1, >> +

Re: [Qemu-devel] [RFC v3 PATCH 07/45] multi-process: define proxy-link object

2019-09-12 Thread Stefan Hajnoczi
On Tue, Sep 03, 2019 at 04:37:33PM -0400, Jagannathan Raman wrote: > diff --git a/include/io/proxy-link.h b/include/io/proxy-link.h > new file mode 100644 > index 000..ee78cdd > --- /dev/null > +++ b/include/io/proxy-link.h > @@ -0,0 +1,147 @@ Regarding naming: so far I've seen "remote", "mpqe

Re: [Qemu-devel] [PATCH v2 08/17] RISC-V: add vector extension integer instructions part1, add/sub/adc/sbc

2019-09-12 Thread Richard Henderson
On 9/11/19 2:25 AM, liuzhiwei wrote: > #define VECTOR_HELPER(name) HELPER(glue(vector_, name)) > +#define SIGNBIT8(1 << 7) > +#define SIGNBIT16 (1 << 15) > +#define SIGNBIT32 (1 << 31) > +#define SIGNBIT64 ((uint64_t)1 << 63) Perhaps make up your mind if you want signed or unsigned valu

[Qemu-devel] [PATCH 3/4] block/mirror: support unaligned write in active mirror

2019-09-12 Thread Vladimir Sementsov-Ogievskiy
Prior 9adc1cb49af8d do_sync_target_write had a bug: it reset aligned-up region in the dirty bitmap, which means that we may not copy some bytes and assume them copied, which actually leads to producing corrupted target. So 9adc1cb49af8d forced dirty bitmap granularity to be request_alignment for m

Re: [Qemu-devel] [PULL v2 00/46] testing updates (fixes, upgrades, caching)

2019-09-12 Thread Peter Maydell
On Tue, 10 Sep 2019 at 14:24, Alex Bennée wrote: > > The following changes since commit 89ea03a7dc83ca36b670ba7f787802791fcb04b1: > > Merge remote-tracking branch > 'remotes/huth-gitlab/tags/m68k-pull-2019-09-07' into staging (2019-09-09 > 09:48:34 +0100) > > are available in the Git repositor

[Qemu-devel] [PATCH 0/4] active-mirror: support unaligned guest operations

2019-09-12 Thread Vladimir Sementsov-Ogievskiy
Commit 9adc1cb49af8d fixed a bug about unaligned (to dirty bitmap granularity) guest writes (and discards) by simply requesting corresponding alignment on mirror-top filter. However forcing large alignment obviously decreases performance of unaligned requests. So it's time for a new solution which

Re: [Qemu-devel] [PATCH v2 3/3] xen: perform XenDevice clean-up in XenBus watch handler

2019-09-12 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD > Sent: 12 September 2019 16:04 > To: Paul Durrant > Cc: qemu-devel@nongnu.org; xen-de...@lists.xenproject.org; Stefano Stabellini > > Subject: Re: [PATCH v2 3/3] xen: perform XenDevice clean-up in XenBus watch > handler > > On Thu, Sep 12,

[Qemu-devel] [PATCH 2/4] block/block-backend: add blk_co_pwritev_part

2019-09-12 Thread Vladimir Sementsov-Ogievskiy
Add blk write function with qiov_offset parameter. It's needed for the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/block-backend.h | 4 block/block-backend.c | 17 + 2 files changed, 17 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PATCH 4/4] Revert "mirror: Only mirror granularity-aligned chunks"

2019-09-12 Thread Vladimir Sementsov-Ogievskiy
This reverts commit 9adc1cb49af8d4e54f57980b1eed5c0a4b2dafa6. "mirror: Only mirror granularity-aligned chunks" Since previous commit unaligned chunks are supported by do_sync_target_write. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/mirror.c | 29 - 1 f

[Qemu-devel] [PATCH 1/4] block/mirror: simplify do_sync_target_write

2019-09-12 Thread Vladimir Sementsov-Ogievskiy
do_sync_target_write is called from bdrv_mirror_top_do_write after write/discard operation, all inside active_write/active_write_settle protecting us from mirror iteration. So the whole area is dirty for sure, no reason to examine dirty bitmap. Signed-off-by: Vladimir Sementsov-Ogievskiy --- blo

Re: [Qemu-devel] [PATCH qemu] loader: Trace loaded images

2019-09-12 Thread Philippe Mathieu-Daudé
On 6/20/19 10:53 AM, Philippe Mathieu-Daudé wrote: > On 6/20/19 7:50 AM, Alexey Kardashevskiy wrote: >> On 17/06/2019 14:56, Philippe Mathieu-Daudé wrote: >>> On 6/17/19 3:25 AM, Alexey Kardashevskiy wrote: On 14/06/2019 19:33, Stefan Hajnoczi wrote: > On Fri, Jun 14, 2019 at 10:13:04AM +1

Re: [Qemu-devel] [PATCH v2 01/17] RISC-V: add vfp field in CPURISCVState

2019-09-12 Thread Richard Henderson
On 9/12/19 10:53 AM, Chih-Min Chao wrote: > > > On Thu, Sep 12, 2019 at 6:39 AM Richard Henderson > > wrote: > > On 9/11/19 10:51 AM, Chih-Min Chao wrote: > > Could  the VLEN be configurable in cpu initialization but not fixed in > > compilation

Re: [Qemu-devel] [PATCH v2 3/3] xen: perform XenDevice clean-up in XenBus watch handler

2019-09-12 Thread Anthony PERARD
On Thu, Sep 12, 2019 at 01:16:46PM +0100, Paul Durrant wrote: > Cleaning up offine XenDevice objects directly in ^ offline > xen_device_backend_changed() is dangerous as xen_device_unrealize() will > modify the watch list that is being walked. Even the QLIST_FOREACH_SAFE() > used in

Re: [Qemu-devel] [PATCH v2 07/17] RISC-V: add vector extension atomic instructions

2019-09-12 Thread Richard Henderson
On 9/11/19 2:25 AM, liuzhiwei wrote: > +case 64: > +if (vector_elem_mask(env, vm, width, lmul, i)) { > +int64_t tmp; > +idx= (target_long)env->vfp.vreg[src2].s64[j]; > +addr = idx + env->gpr[rs1]; > + > +#

Re: [Qemu-devel] [Qemu-discuss] Cross-posted : Odd QXL/KVM performance issue with a Windows 7 Guest

2019-09-12 Thread Brad Campbell
On 9/9/19 11:22 pm, Dr. David Alan Gilbert wrote: Oh, hmm. Sorry I don't know too much where to look then; you have any of: a) Windows b) guest graphics drivers c) spice server in qemu and probalby some more. So I think it's going to be a case of profiling on the two different syst

Re: [Qemu-devel] [PATCH v2 01/17] RISC-V: add vfp field in CPURISCVState

2019-09-12 Thread Chih-Min Chao
On Thu, Sep 12, 2019 at 6:39 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 9/11/19 10:51 AM, Chih-Min Chao wrote: > > Could the VLEN be configurable in cpu initialization but not fixed in > > compilation phase ? > > Take the integer element as example and the difference should

Re: [Qemu-devel] [PATCH] target/m68k/fpu_helper.c: rename the access arguments

2019-09-12 Thread KONRAD Frederic
Le 9/12/19 à 4:32 PM, Philippe Mathieu-Daudé a écrit : On 9/12/19 4:02 PM, KONRAD Frederic wrote: The "access" arguments clash with a macro under Windows with MinGW: CC m68k-softmmu/target/m68k/fpu_helper.o target/m68k/fpu_helper.c: In function 'fmovem_predec': target/m68k/fpu_h

Re: [Qemu-devel] [PATCH v2 06/17] RISC-V: add vector extension fault-only-first implementation

2019-09-12 Thread Richard Henderson
On 9/11/19 2:25 AM, liuzhiwei wrote: > diff --git a/linux-user/riscv/cpu_loop.c b/linux-user/riscv/cpu_loop.c > index 12aa3c0..d673fa5 100644 > --- a/linux-user/riscv/cpu_loop.c > +++ b/linux-user/riscv/cpu_loop.c > @@ -41,6 +41,13 @@ void cpu_loop(CPURISCVState *env) > sigcode = 0; >

Re: [Qemu-devel] [RFC v3 PATCH 05/45] multi-process: Add config option for multi-process QEMU

2019-09-12 Thread Stefan Hajnoczi
On Tue, Sep 03, 2019 at 04:37:31PM -0400, Jagannathan Raman wrote: > @@ -1543,6 +1544,10 @@ for opt do >;; >--disable-libpmem) libpmem=no >;; > + --enable-mpqemu) mpqemu=yes > + ;; > + --disable-mpqemu) mpqemu=no A previous patch used "remote" instead of "mpqemu", which is confusing

[Qemu-devel] [PATCH] spapr: Report kvm_irqchip_in_kernel() in 'info pic'

2019-09-12 Thread Greg Kurz
Unless the machine was started with kernel-irqchip=on, we cannot easily tell if we're actually using an in-kernel or an emulated irqchip. This information is important enough that it is worth printing it in 'info pic'. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |4 1 file changed, 4 in

[Qemu-devel] [PATCH] memory: inline and optimize devend_memop

2019-09-12 Thread Paolo Bonzini
devend_memop can rely on the fact that the result is always either 0 or MO_BSWAP, corresponding respectively to host endianness and the opposite. Native (target) endianness in turn can be either the host endianness, in which case MO_BSWAP is only returned for host-opposite endianness, or the oppos

Re: [Qemu-devel] [PATCH] target/m68k/fpu_helper.c: rename the access arguments

2019-09-12 Thread Philippe Mathieu-Daudé
On 9/12/19 4:02 PM, KONRAD Frederic wrote: > The "access" arguments clash with a macro under Windows with MinGW: > CC m68k-softmmu/target/m68k/fpu_helper.o > target/m68k/fpu_helper.c: In function 'fmovem_predec': > target/m68k/fpu_helper.c:405:56: error: macro "access" passed 4 arguments

Re: [Qemu-devel] [PATCH] spapr: Report kvm_irqchip_in_kernel() in 'info pic'

2019-09-12 Thread Cédric Le Goater
On 12/09/2019 16:30, Greg Kurz wrote: > Unless the machine was started with kernel-irqchip=on, we cannot easily > tell if we're actually using an in-kernel or an emulated irqchip. This > information is important enough that it is worth printing it in 'info > pic'. Nice ! > Signed-off-by: Greg K

[Qemu-devel] [PATCH] kvm: Fix typo in header of kvm_device_access()

2019-09-12 Thread Greg Kurz
Signed-off-by: Greg Kurz --- include/sysemu/kvm.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 909bcd77cf82..fd674772ab31 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -308,7 +308,7 @@ int kvm_vm_check_a

Re: [Qemu-devel] [PATCH v3 6/6] Add dbus-vmstate object

2019-09-12 Thread Eric Blake
On 9/12/19 7:25 AM, Marc-André Lureau wrote: > When instanciated, this object will connect to the given D-Bus instantiated > bus. During migration, it will take the data from org.qemu.VMState1 > instances. > > See documentation for further details. > > Signed-off-by: Marc-André Lureau > --- >

[Qemu-devel] [PULL 11/12] migration/qemu-file: fix potential buf waste for extra buf_index adjustment

2019-09-12 Thread Dr. David Alan Gilbert (git)
From: Wei Yang In add_to_iovec(), qemu_fflush() will be called if iovec is full. If this happens, buf_index is reset. Currently, this is not checked and buf_index would always been adjust with buf size. This is not harmful, but will waste some space in file buffer. This patch make add_to_iovec(

  1   2   3   4   >