[PATCH v3 2/5] blkdebug: move post-resume handling to resume_req_by_tag

2021-05-17 Thread Emanuele Giuseppe Esposito
We want to move qemu_coroutine_yield() after the loop on rules, because QLIST_FOREACH_SAFE is wrong if the rule list is modified while the coroutine has yielded. Therefore move the suspended request to the heap and clean it up from the remove side. All that is left is for blkdebug_debug_event to h

Re: [PATCH 2/2] tests/tcg/x86_64: add vsyscall smoke test

2021-05-17 Thread Ilya Leoshkevich
On Mon, 2021-05-17 at 14:52 +0200, Cornelia Huck wrote: > On Wed, 12 May 2021 06:02:50 +0200 > Ilya Leoshkevich wrote: > > > Having a small test will prevent trivial regressions in the future. > > > > Signed-off-by: Ilya Leoshkevich > > --- > >  tests/tcg/x86_64/Makefile.target |  6 +- > >

[PATCH v3 4/5] blkdebug: do not suspend in the middle of QLIST_FOREACH_SAFE

2021-05-17 Thread Emanuele Giuseppe Esposito
That would be unsafe in case a rule other than the current one is removed while the coroutine has yielded. Keep FOREACH_SAFE because suspend_request deletes the current rule. After this patch, *all* matching rules are deleted before suspending the coroutine, rather than just one. This doesn't affe

[PATCH v3 0/5] blkdebug: fix racing condition when iterating on

2021-05-17 Thread Emanuele Giuseppe Esposito
When qemu_coroutine_enter is executed in a loop (even QEMU_FOREACH_SAFE), the new routine can modify the list, for example removing an element, causing problem when control is given back to the caller that continues iterating on the same list. Patch 1 solves the issue in blkdebug_debug_resume by

Re: [PATCH 03/21] qdev-properties: PropertyInfo: add realized_set_allowed field

2021-05-17 Thread Vladimir Sementsov-Ogievskiy
17.05.2021 15:40, Max Reitz wrote: On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: Add field, so property can declare support for setting the property when device is realized. To be used in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   include/hw/qdev-propertie

[PATCH v2 24/26] s390x/tcg: Implement VECTOR FP (MAXIMUM|MINIMUM)

2021-05-17 Thread David Hildenbrand
For IEEE functions, we can reuse the softfloat implementations. For the other functions, implement it generically for 32bit/64bit/128bit - carefully taking care of all weird special cases according to the tables defined in the PoP. Signed-off-by: David Hildenbrand --- target/s390x/helper.h

[PATCH v2 25/26] s390x/tcg: We support Vector enhancements facility

2021-05-17 Thread David Hildenbrand
Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/gen-features.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c index a6ec918e90..219b1f9420 100644 --- a/target/s390x/gen-features.c +++ b/target/s390x/g

[PATCH v2 22/26] s390x/tcg: Implement VECTOR FP NEGATIVE MULTIPLY AND (ADD|SUBTRACT)

2021-05-17 Thread David Hildenbrand
Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 6 + target/s390x/insn-data.def | 4 target/s390x/translate_vx.c.inc | 39 +++-- target/s390x/vec_fpu_helper.c | 2 ++ 4 files changed, 49 insertions(+), 2 deletions(-) diff --gi

Re: [RFC PATCH v3 8/9] hw/arm/virt-acpi-build: Generate PPTT table

2021-05-17 Thread Andrew Jones
On Mon, May 17, 2021 at 09:43:34PM +0800, wangyanan (Y) wrote: > BTW, it seems patch 1 and 5 were possibly missed for some review. > Any comments for them too? Thanks! I reviewed them and agreed with them, but you already provided my s-o-b on them, so I didn't bother giving an r-b. Feel free to ad

[PATCH v2 19/26] s390x/tcg: Implement 32/128 bit for VECTOR FP PERFORM SIGN OPERATION

2021-05-17 Thread David Hildenbrand
Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/translate_vx.c.inc | 106 ++-- 1 file changed, 73 insertions(+), 33 deletions(-) diff --git a/target/s390x/translate_vx.c.inc b/target/s390x/translate_vx.c.inc index e94c9f9d86..4d1ccb41

[PATCH v2 20/26] s390x/tcg: Implement 32/128 bit for VECTOR FP TEST DATA CLASS IMMEDIATE

2021-05-17 Thread David Hildenbrand
Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 2 ++ target/s390x/translate_vx.c.inc | 23 ++-- target/s390x/vec_fpu_helper.c | 47 + 3 files changed, 70 insertions(+), 2 deletions(-) diff --git a/target/s390x/helper.h b/targ

Re: [PATCH 01/21] block: introduce bdrv_replace_child_bs()

2021-05-17 Thread Vladimir Sementsov-Ogievskiy
17.05.2021 15:09, Max Reitz wrote: On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: Add function to transactionally replace bs inside BdrvChild. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   include/block/block.h |  2 ++   block.c   | 36 ++

[PATCH v2 15/26] s390x/tcg: Implement 32/128 bit for VECTOR FP COMPARE *

2021-05-17 Thread David Hildenbrand
In addition to 32/128bit variants, we also have to support the "Signal-on-QNaN (SQ)" bit. Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 12 +++ target/s390x/translate_vx.c.inc | 57 - target/s390x/vec_fpu_helper.c | 64 ++

[PATCH v2 12/26] s390x/tcg: Implement VECTOR MULTIPLY SUM LOGICAL

2021-05-17 Thread David Hildenbrand
Fortunately, we only need the Doubleword implementation. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/insn-data.def | 2 ++ target/s390x/translate_vx.c.inc | 50 + 2 files changed, 52 insertions(+) diff --git a/target/s3

[PATCH v2 17/26] s390x/tcg: Implement 64 bit for VECTOR FP LOAD LENGTHENED

2021-05-17 Thread David Hildenbrand
64 bit -> 128 bit, there is only a single final element. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 1 + target/s390x/translate_vx.c.inc | 19 --- target/s390x/vec_fpu_helper.c | 13 + 3 files changed, 30

[PATCH v2 14/26] s390x/tcg: Implement 32/128 bit for VECTOR (LOAD FP INTEGER|FP SQUARE ROOT)

2021-05-17 Thread David Hildenbrand
Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 4 ++ target/s390x/translate_vx.c.inc | 74 ++--- target/s390x/vec_fpu_helper.c | 46 +++- 3 files changed, 109 insertions(+), 15 deletions(-) diff --git a/target/s390x/helper.h

[PATCH v2 18/26] s390x/tcg: Implement 128 bit for VECTOR FP LOAD ROUNDED

2021-05-17 Thread David Hildenbrand
128 bit -> 64 bit, there is only a single element to process. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 1 + target/s390x/translate_vx.c.inc | 11 ++- target/s390x/vec_fpu_helper.c | 19 +++ 3 files changed,

[PATCH v2 13/26] s390x/tcg: Implement 32/128 bit for VECTOR FP (ADD|DIVIDE|MULTIPLY|SUBTRACT)

2021-05-17 Thread David Hildenbrand
In case of 128bit, we always have a single element. Add new helpers for reading/writing 32/128 bit floats. Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 8 target/s390x/translate_vx.c.inc | 85 + target/s390x/vec_fpu_helper.c | 74

[PATCH v2 07/26] s390x/tcg: Simplify vfma64() handling

2021-05-17 Thread David Hildenbrand
Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 2 -- target/s390x/translate_vx.c.inc | 8 +++ target/s390x/vec_fpu_helper.c | 42 + 3 files changed, 20 insertions(+), 32 deletions(-) diff --git a/target/s390x/helper.h b/target/s390x

Re: [PATCH v1] softmmu/vl: make default prealloc-threads work w/o -mem-prealloc

2021-05-17 Thread Igor Mammedov
On Thu, 11 Mar 2021 11:59:18 +0300 Denis Plotnikov wrote: > Preallocation in memory backends can be specified with either global > QEMU option "-mem-prealloc", or with per-backend property > "prealloc=true". In the latter case, however, the default for the > number of preallocation threads is no

[PATCH v2 16/26] s390x/tcg: Implement 32/128 bit for VECTOR FP COMPARE (AND SIGNAL) SCALAR

2021-05-17 Thread David Hildenbrand
Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 4 +++ target/s390x/translate_vx.c.inc | 38 ++-- target/s390x/vec_fpu_helper.c | 44 - 3 files changed, 77 insertions(+), 9 deletions(-) diff --git a/target/s390x/he

[PATCH v2 08/26] s390x/tcg: Simplify vfll32() handling

2021-05-17 Thread David Hildenbrand
Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 1 - target/s390x/translate_vx.c.inc | 6 +- target/s390x/vec_fpu_helper.c | 21 + 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/target/s390x/helper.h b/target/s390x/helper.h index

[PATCH v2 06/26] s390x/tcg: Simplify vftci64() handling

2021-05-17 Thread David Hildenbrand
Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 1 - target/s390x/translate_vx.c.inc | 7 ++- target/s390x/vec_fpu_helper.c | 29 +++-- 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/target/s390x/helper.h b/target/s390x/help

[PATCH v2 26/26] s390x/cpumodel: Bump up QEMU model to a stripped-down IBM z14 GA2

2021-05-17 Thread David Hildenbrand
TCG implements everything we need to run basic z14 OS+software. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- hw/s390x/s390-virtio-ccw.c | 3 +++ target/s390x/cpu_models.c | 4 ++-- target/s390x/gen-features.c | 15 +-- 3 files changed, 14 insertions(+), 8

[PATCH v2 11/26] s390x/tcg: Implement VECTOR BIT PERMUTE

2021-05-17 Thread David Hildenbrand
Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 1 + target/s390x/insn-data.def | 2 ++ target/s390x/translate_vx.c.inc | 8 target/s390x/vec_helper.c | 22 ++ 4 files changed, 33 insertions(+) diff

[PATCH v2 05/26] s390x/tcg: Simplify vfc64() handling

2021-05-17 Thread David Hildenbrand
Pass the m5 field via simd_data() and don't provide specialized handlers for single-element variants. Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 6 --- target/s390x/translate_vx.c.inc | 45 +--- target/s390x/vec_fpu_helper.c | 94 +--

[PATCH v2 02/26] s390x/tcg: Fix instruction name for VECTOR FP LOAD (LENGTHENED|ROUNDED)

2021-05-17 Thread David Hildenbrand
Let's use the correct name. Signed-off-by: David Hildenbrand --- target/s390x/insn-data.def | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def index 0bb1886a2e..35a0086a85 100644 --- a/target/s390x/insn-data.def +++ b/t

[PATCH v2 23/26] softfloat: Implement float128_(min|minnum|minnummag|max|maxnum|maxnummag)

2021-05-17 Thread David Hildenbrand
With Richard's softfloat rework, the float128 implementation is straight-forward. Unfortuantely, we don't have any tests we can simply adjust/unlock. Cc: Aurelien Jarno Cc: Peter Maydell Cc: "Alex Bennée" Cc: Richard Henderson Signed-off-by: David Hildenbrand --- fpu/softfloat.c | 17

[PATCH v2 10/26] s390x/tcg: Simplify wfc64() handling

2021-05-17 Thread David Hildenbrand
... and prepare for 32/128 bit support. Signed-off-by: David Hildenbrand --- target/s390x/vec_fpu_helper.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/target/s390x/vec_fpu_helper.c b/target/s390x/vec_fpu_helper.c index d07bc7cd64..219ef19d24 1006

[PATCH v2 03/26] s390x/tcg: Simplify vop64_3() handling

2021-05-17 Thread David Hildenbrand
Let's simplify, reworking our handler generation, passing the whole "m5" register content and not providing specialized handlers for "se", and reading/writing proper float64 values using new helpers. Suggested-by: Richard Henderson Signed-off-by: David Hildenbrand --- target/s390x/helper.h

[PATCH v2 01/26] s390x/tcg: Fix FP CONVERT TO (LOGICAL) FIXED NaN handling

2021-05-17 Thread David Hildenbrand
In case we encounter a NaN, we have to return the smallest possible number, corresponding to either 0 or the maximum negative number. This seems to differ from IEEE handling as implemented in softfloat, whereby we return the biggest possible number. While at it, use float32_to_uint64() in the CLGE

[PATCH v2 21/26] s390x/tcg: Implement 32/128 bit for VECTOR FP MULTIPLY AND (ADD|SUBTRACT)

2021-05-17 Thread David Hildenbrand
Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 4 +++ target/s390x/translate_vx.c.inc | 47 - target/s390x/vec_fpu_helper.c | 44 +- 3 files changed, 87 insertions(+), 8 deletions(-) diff --git a/target/s390x/

[PATCH v2 09/26] s390x/tcg: Simplify vflr64() handling

2021-05-17 Thread David Hildenbrand
Signed-off-by: David Hildenbrand --- target/s390x/helper.h | 1 - target/s390x/translate_vx.c.inc | 3 +-- target/s390x/vec_fpu_helper.c | 29 +++-- 3 files changed, 8 insertions(+), 25 deletions(-) diff --git a/target/s390x/helper.h b/target/s390x/helper.h

[PATCH v2 04/26] s390x/tcg: Simplify vop64_2() handling

2021-05-17 Thread David Hildenbrand
Let's rework our macros and simplify. We still need helper functions in most cases due to the different parameters types. Next, we'll only have 32/128bit variants for vfi and vfsq, so special case the others. Note that for vfsq, the XxC and erm passed in the simd_data() will never be set, resulti

[PATCH v2 00/26] s390x/tcg: Implement Vector enhancements facility and switch to z14

2021-05-17 Thread David Hildenbrand
This series adds support for the "Vector enhancements facility" and bumps the qemu CPU model to a stripped-down z14. I tested most vector FP instructions by generating random instructions and vectors, comparing the result with results on actual hardware. I did not test instructions/instruction var

Re: [ANNOUNCE] libblkio v0.1.0 preview release

2021-05-17 Thread Stefan Hajnoczi
On Fri, May 14, 2021 at 05:55:13PM +0200, Kevin Wolf wrote: > Am 13.05.2021 um 11:47 hat Stefan Hajnoczi geschrieben: > > On Thu, May 06, 2021 at 12:33:24PM +0200, Kevin Wolf wrote: > > > Am 06.05.2021 um 10:46 hat Stefan Hajnoczi geschrieben: > > > > What do you think about this: > > > > > > > >

Re: [PATCH v12 1/8] arm64: mte: Handle race when synchronising tags

2021-05-17 Thread Marc Zyngier
Hi Steven, On Mon, 17 May 2021 13:32:32 +0100, Steven Price wrote: > > mte_sync_tags() used test_and_set_bit() to set the PG_mte_tagged flag > before restoring/zeroing the MTE tags. However if another thread were to > race and attempt to sync the tags on the same page before the first > thread h

Re: [PATCH v1] softfloat: Silence signaling NaN when converting to/from float128

2021-05-17 Thread David Hildenbrand
On 05.05.21 12:49, David Hildenbrand wrote: We forgot to silence the NaN, just as we already do for the other conversions. Found by comparing the result of running randomly generated FP instructions under s390x/tcg and comparing against the result on real HW. Unfortunately, test cases like f32_

Re: [PATCH qemu v19] spapr: Implement Open Firmware client interface

2021-05-17 Thread BALATON Zoltan
On Mon, 17 May 2021, Alexey Kardashevskiy wrote: On 5/17/21 09:34, BALATON Zoltan wrote: On Sat, 15 May 2021, BALATON Zoltan wrote: On Sat, 15 May 2021, BALATON Zoltan wrote: On Thu, 22 Apr 2021, Alexey Kardashevskiy wrote: [snip] vof_claim virt=0x0 size=0xc38 align=0x0 => 0x0 vof_claim vi

Re: [PATCH v1 5/7] docs: mark intention to deprecate TCG tracing functionality

2021-05-17 Thread Stefan Hajnoczi
On Mon, May 17, 2021 at 11:47:11AM +0100, Alex Bennée wrote: > > Daniel P. Berrangé writes: > > > On Wed, May 05, 2021 at 11:41:46AM +0100, Alex Bennée wrote: > >> > >> Alex Bennée writes: > >> > >> > Daniel P. Berrangé writes: > >> > > >> >> On Wed, May 05, 2021 at 10:22:57AM +0100, Alex Be

Re: [RFC PATCH v3 8/9] hw/arm/virt-acpi-build: Generate PPTT table

2021-05-17 Thread wangyanan (Y)
Hi Drew, On 2021/5/17 16:02, Andrew Jones wrote: On Sun, May 16, 2021 at 06:28:59PM +0800, Yanan Wang wrote: From: Andrew Jones Add the Processor Properties Topology Table (PPTT) to expose CPU topology information defined by users to ACPI guests. Note, a DT-boot Linux guest with a non-flat C

Re: [Qemu-devel] [PATCH 7/7] target/xtensa: move non-HELPER functions to helper.c

2021-05-17 Thread Philippe Mathieu-Daudé
On 5/17/21 3:10 PM, Philippe Mathieu-Daudé wrote: > On 5/17/21 2:11 PM, Max Filippov wrote: >> On Mon, May 17, 2021 at 4:50 AM Max Filippov wrote: >>> >>> Hi Philippe, >>> >>> On Sun, May 16, 2021 at 10:05 PM Philippe Mathieu-Daudé >>> wrote: Hi Max, On Mon, Jan 14, 2019 at 8:

Re: [PATCH] include/qemu/bswap.h: using atomic memory load/store for word access

2021-05-17 Thread maobibo
PMM, Thanks for kindly response. I reply inline. 在 2021年05月17日 17:23, Peter Maydell 写道: > On Mon, 17 May 2021 at 03:54, Bibo Mao wrote: >> >> virtio ring buffer has lockless ring buffer scheme. When guest vcpu >> reads the memory, qemu io thread may is writing the same address. >> It requiires

Re: [PATCH v2 0/4] virtio: Improve boot time of virtio-scsi-pci and virtio-blk-pci

2021-05-17 Thread Stefan Hajnoczi
On Mon, May 17, 2021 at 10:32:59AM +0200, Greg Kurz wrote: > On Wed, 12 May 2021 17:05:53 +0100 > Stefan Hajnoczi wrote: > > > On Fri, May 07, 2021 at 06:59:01PM +0200, Greg Kurz wrote: > > > Now that virtio-scsi-pci and virtio-blk-pci map 1 virtqueue per vCPU, > > > a serious slow down may be ob

[PATCH] Signed-off-by: Dmitry Voronetskiy

2021-05-17 Thread Dmitry Voronetskiy
From: Dmitry Voronetskiy the value passed to strerror should be positive --- hw/i386/kvm/apic.c | 2 +- hw/i386/kvm/clock.c | 4 ++-- hw/i386/kvm/i8254.c | 10 +- hw/i386/kvm/i8259.c | 4 ++-- hw/i386/kvm/ioapic.c | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) dif

Re: [PATCH] replication: move include out of root directory

2021-05-17 Thread Philippe Mathieu-Daudé
On 5/17/21 2:19 PM, Paolo Bonzini wrote: > The replication.h file is included from migration/colo.c and > tests/unit/test-replication.c, > so it should be in include/. > > Signed-off-by: Paolo Bonzini > --- > block/replication.c | 2 +- > replication.h => include/block/

[PATCH] virtio: Clarify MR transaction optimization

2021-05-17 Thread Greg Kurz
The device model batching its ioeventfds in a single MR transaction is an optimization. Clarify this in virtio-scsi, virtio-blk and generic virtio code. Also clarify that the transaction must commit before closing ioeventfds so that no one is tempted to merge the loops in the start functions error

Re: [RFC PATCH v3 2/9] device_tree: Add qemu_fdt_add_path

2021-05-17 Thread wangyanan (Y)
On 2021/5/17 14:27, Andrew Jones wrote: On Sun, May 16, 2021 at 06:28:53PM +0800, Yanan Wang wrote: From: Andrew Jones Hi Yanan, This looks good, but the authorship is no longer correct. You've completely rewritten it, so I think the most I deserve is a Co-developed-by and maybe even just a

Re: [RFC PATCH v3 2/9] device_tree: Add qemu_fdt_add_path

2021-05-17 Thread wangyanan (Y)
On 2021/5/17 11:11, David Gibson wrote: On Sun, May 16, 2021 at 06:28:53PM +0800, Yanan Wang wrote: From: Andrew Jones qemu_fdt_add_path() works like qemu_fdt_add_subnode(), except it also adds all missing subnodes from the given path. We'll use it in a coming patch where we will add cpu-map

Re: [PATCH 50/72] softfloat: Move minmax_flags to softfloat-parts.c.inc

2021-05-17 Thread David Hildenbrand
On 08.05.21 03:47, Richard Henderson wrote: Rename to parts$N_minmax. Combine 3 bool arguments to a bitmask, return a tri-state value to indicate nan vs unchanged operand. Introduce ftype_minmax functions as a common optimization point. Fold bfloat16 expansions into the same macro as the other t

Re: [PATCH] 9pfs: simplify v9fs_walk()

2021-05-17 Thread Christian Schoenebeck
On Montag, 17. Mai 2021 13:35:09 CEST Greg Kurz wrote: > On Sun, 16 May 2021 17:55:34 +0200 > > Christian Schoenebeck wrote: > > There is only one comparison between nwnames and P9_MAXWELEM required. > > > > Signed-off-by: Christian Schoenebeck > > --- > > Nice catch. It's been there for a dec

Re: [PATCH v2] vhost-vdpa: Remove redundant declaration of address_space_memory

2021-05-17 Thread Philippe Mathieu-Daudé
Cc'ing qemu-trivial@ On 5/17/21 2:32 PM, Xie Yongji wrote: > The symbol address_space_memory are already declared in > include/exec/address-spaces.h. So let's add this header file > and remove the redundant declaration in include/hw/virtio/vhost-vdpa.h. > > Signed-off-by: Xie Yongji > Reviewed-b

Re: [Qemu-devel] [PATCH 7/7] target/xtensa: move non-HELPER functions to helper.c

2021-05-17 Thread Philippe Mathieu-Daudé
On 5/17/21 2:11 PM, Max Filippov wrote: > On Mon, May 17, 2021 at 4:50 AM Max Filippov wrote: >> >> Hi Philippe, >> >> On Sun, May 16, 2021 at 10:05 PM Philippe Mathieu-Daudé >> wrote: >>> >>> Hi Max, >>> >>> On Mon, Jan 14, 2019 at 8:52 AM Max Filippov wrote: Move remaining non-HELPER

Re: [Virtio-fs] [PATCH 0/7] virtiofsd: Few cleanups in virtio_send_data_iov()

2021-05-17 Thread Vivek Goyal
On Thu, May 13, 2021 at 03:50:33PM -0500, Connor Kuehl wrote: > On 5/11/21 4:37 PM, Vivek Goyal wrote: > > Hi, > > > > Code in virtio_send_data_iov() little twisted and complicated. This > > patch series just tries to simplify it a bit to make it little easier > > to read this piece of code. > >

Re: [Virtio-fs] [PATCH 7/7] virtiofsd: Set req->reply_sent right after sending reply

2021-05-17 Thread Vivek Goyal
On Thu, May 13, 2021 at 03:50:13PM -0500, Connor Kuehl wrote: > On 5/11/21 4:37 PM, Vivek Goyal wrote: > > There is no reason to set it in label "err". We should be able to set > > it right after sending reply. It is easier to read. > > > > Signed-off-by: Vivek Goyal > > --- > > tools/virtiofsd/

[PATCH] virtio: disable ioeventfd for record/replay

2021-05-17 Thread Pavel Dovgalyuk
virtio devices support separate iothreads waiting for events from file descriptors. These are asynchronous events that can't be recorded and replayed, therefore this patch disables ioeventfd for all devices when record or replay is enabled. Signed-off-by: Pavel Dovgalyuk --- hw/s390x/virtio-ccw.

[PATCH] replay: fix event queue flush for qemu shutdown

2021-05-17 Thread Pavel Dovgalyuk
This patch fixes event queue flush in the case of emulator shutdown. replay_finish_events should be called when replay_mode is not cleared. Signed-off-by: Pavel Dovgalyuk --- replay/replay.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/replay/replay.c b/replay/replay.

[PATCH] replay: improve determinism of virtio-net

2021-05-17 Thread Pavel Dovgalyuk
virtio-net device uses bottom halves for callbacks. These callbacks should be deterministic, because they affect VM state. This patch replaces BH invocations with corresponding replay functions, making them deterministic in record/replay mode. This patch also disables guest announce timers for reco

Re: [PULL 00/19] Block patches

2021-05-17 Thread Peter Maydell
On Fri, 14 May 2021 at 17:45, Max Reitz wrote: > > The following changes since commit 96662996eda78c48aa4e76d8615c7eb72d80: > > Merge remote-tracking branch > 'remotes/dgilbert/tags/pull-migration-20210513a' into staging (2021-05-14 > 12:03:47 +0100) > > are available in the Git repository

Re: [PATCH 2/2] tests/tcg/x86_64: add vsyscall smoke test

2021-05-17 Thread Cornelia Huck
On Wed, 12 May 2021 06:02:50 +0200 Ilya Leoshkevich wrote: > Having a small test will prevent trivial regressions in the future. > > Signed-off-by: Ilya Leoshkevich > --- > tests/tcg/x86_64/Makefile.target | 6 +- > tests/tcg/x86_64/vsyscall.c | 11 +++ > 2 files changed, 16

Qemu block filter insertion/removal API

2021-05-17 Thread Vladimir Sementsov-Ogievskiy
Hi all! I'd like to be sure that we know where we are going to. In blockdev-era where qemu user is aware about block nodes, all nodes have good names and controlled by user we can efficiently use block filters. We already have some useful filters: copy-on-read, throttling, compress. In my par

Re: [PATCH] Add missing coroutine_fn function signature to functions

2021-05-17 Thread cennedee
Focusing on a single file at a time now, this particular revised patch adds missing function signature `coroutine_fn` to definitions in scsi/qemu-pr-helper.c Intend to do more files in a separate patch series once I get the full flow of this. Compared to my previous e-mail, have also confirmed t

[PATCH v12 7/8] KVM: arm64: ioctl to fetch/store tags in a guest

2021-05-17 Thread Steven Price
The VMM may not wish to have it's own mapping of guest memory mapped with PROT_MTE because this causes problems if the VMM has tag checking enabled (the guest controls the tags in physical RAM and it's unlikely the tags are correct for the VMM). Instead add a new ioctl which allows the VMM to easi

[PATCH v12 6/8] arm64: kvm: Expose KVM_ARM_CAP_MTE

2021-05-17 Thread Steven Price
It's now safe for the VMM to enable MTE in a guest, so expose the capability to user space. Signed-off-by: Steven Price --- arch/arm64/kvm/arm.c | 9 + arch/arm64/kvm/sys_regs.c | 3 +++ 2 files changed, 12 insertions(+) diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c inde

Re: [PATCH 03/21] qdev-properties: PropertyInfo: add realized_set_allowed field

2021-05-17 Thread Max Reitz
On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: Add field, so property can declare support for setting the property when device is realized. To be used in the following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/hw/qdev-properties.h | 1 + hw/core/qdev-properties.

[PATCH v2] vhost-vdpa: Remove redundant declaration of address_space_memory

2021-05-17 Thread Xie Yongji
The symbol address_space_memory are already declared in include/exec/address-spaces.h. So let's add this header file and remove the redundant declaration in include/hw/virtio/vhost-vdpa.h. Signed-off-by: Xie Yongji Reviewed-by: Philippe Mathieu-Daudé --- hw/virtio/vhost-vdpa.c | 1 + in

[PATCH v12 8/8] KVM: arm64: Document MTE capability and ioctl

2021-05-17 Thread Steven Price
A new capability (KVM_CAP_ARM_MTE) identifies that the kernel supports granting a guest access to the tags, and provides a mechanism for the VMM to enable it. A new ioctl (KVM_ARM_MTE_COPY_TAGS) provides a simple way for a VMM to access the tags of a guest without having to maintain a PROT_MTE map

[PATCH v12 3/8] arm64: mte: Sync tags for pages where PTE is untagged

2021-05-17 Thread Steven Price
A KVM guest could store tags in a page even if the VMM hasn't mapped the page with PROT_MTE. So when restoring pages from swap we will need to check to see if there are any saved tags even if !pte_tagged(). However don't check pages for which pte_access_permitted() returns false as these will not

[PATCH v12 5/8] arm64: kvm: Save/restore MTE registers

2021-05-17 Thread Steven Price
Define the new system registers that MTE introduces and context switch them. The MTE feature is still hidden from the ID register as it isn't supported in a VM yet. Signed-off-by: Steven Price --- arch/arm64/include/asm/kvm_host.h | 6 ++ arch/arm64/include/asm/kvm_mte.h | 66

[PATCH v12 2/8] arm64: Handle MTE tags zeroing in __alloc_zeroed_user_highpage()

2021-05-17 Thread Steven Price
From: Catalin Marinas Currently, on an anonymous page fault, the kernel allocates a zeroed page and maps it in user space. If the mapping is tagged (PROT_MTE), set_pte_at() additionally clears the tags under a spinlock to avoid a race on the page->flags. In order to optimise the lock, clear the p

[PATCH v12 1/8] arm64: mte: Handle race when synchronising tags

2021-05-17 Thread Steven Price
mte_sync_tags() used test_and_set_bit() to set the PG_mte_tagged flag before restoring/zeroing the MTE tags. However if another thread were to race and attempt to sync the tags on the same page before the first thread had completed restoring/zeroing then it would see the flag is already set and con

[PATCH v12 4/8] arm64: kvm: Introduce MTE VM feature

2021-05-17 Thread Steven Price
Add a new VM feature 'KVM_ARM_CAP_MTE' which enables memory tagging for a VM. This will expose the feature to the guest and automatically tag memory pages touched by the VM as PG_mte_tagged (and clear the tag storage) to ensure that the guest cannot see stale tags, and so that the tags are correctl

Re: [PULL 00/20] Misc patches for 2020-05-17

2021-05-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210517112001.2564006-1-pbonz...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210517112001.2564006-1-pbonz...@redhat.com Subject: [PULL 00/20] Misc patches for 202

[PATCH v12 0/8] MTE support for KVM guest

2021-05-17 Thread Steven Price
This series adds support for using the Arm Memory Tagging Extensions (MTE) in a KVM guest. Changes since v11[1]: * Series is prefixed with a bug fix for a potential race synchronising tags. This is basically race as was recently[2] fixed for PG_dcache_clean where the update of the page fla

Re: [PATCH 02/21] block: introduce blk_replace_bs

2021-05-17 Thread Max Reitz
On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: Add function to change bs inside blk. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/sysemu/block-backend.h | 1 + block/block-backend.c | 8 2 files changed, 9 insertions(+) diff --git a/include/sysemu/block

RFC: Qemu backup interface plans

2021-05-17 Thread Vladimir Sementsov-Ogievskiy
Hi all! I'd like to share and discuss some plans on Qemu backup interface I have. (actually, most of this I've presented on KVM Forum long ago.. But now I'm a lot closer to realization:) I'd start with a reminder about image fleecing: We have image fleecing scheme to export point-in-time sta

Re: [PATCH] remove qemu-options* from root directory

2021-05-17 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210517121908.2624991-1-pbonz...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210517121908.2624991-1-pbonz...@redhat.com Subject: [PATCH] remove qemu-options* from

[RFC PATCH 08/15] softmmu/cpu-timers: Remove unused 'exec/exec-all.h' header

2021-05-17 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- softmmu/cpu-timers.c | 1 - 1 file changed, 1 deletion(-) diff --git a/softmmu/cpu-timers.c b/softmmu/cpu-timers.c index 34ddfa02f1e..204d946a172 100644 --- a/softmmu/cpu-timers.c +++ b/softmmu/cpu-timers.c @@ -28,7 +28,6 @@ #include "migration/vmstate.

[RFC PATCH 05/15] accel/kvm: Simplify user-mode #ifdef'ry

2021-05-17 Thread Philippe Mathieu-Daudé
Now than we only build this stub with system emulation, remove the user-mode #ifdef'ry. Signed-off-by: Philippe Mathieu-Daudé --- accel/stubs/kvm-stub.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/accel/stubs/kvm-stub.c b/accel/stubs/kvm-stub.c index 6bda6c8c925..6ae1ff62607 100644

[RFC PATCH 04/15] accel: Only use TCG when building user-mode emulation

2021-05-17 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- accel/meson.build | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/accel/meson.build b/accel/meson.build index b44ba30c864..0e296911aea 100644 --- a/accel/meson.build +++ b/accel/meson.build @@ -2,11 +2,13 @@ softmmu_ss.add(

[RFC PATCH 02/15] accel/whpx: Simplify #ifdef'ry

2021-05-17 Thread Philippe Mathieu-Daudé
whpx_apic_in_platform() is called from: - pic_irq_request() in hw/i386/x86.c - cpu_thread_is_idle() softmmu/cpus.c - apic_get_class() in target/i386/cpu-sysemu.c whpx_enabled() is called from: - cpu_report_tpr_access() in target/i386/helper.c By converting macros to a function, we can remove th

[PATCH] replication: move include out of root directory

2021-05-17 Thread Paolo Bonzini
The replication.h file is included from migration/colo.c and tests/unit/test-replication.c, so it should be in include/. Signed-off-by: Paolo Bonzini --- block/replication.c | 2 +- replication.h => include/block/replication.h | 4 ++-- migration/colo.c

[PATCH] remove qemu-options* from root directory

2021-05-17 Thread Paolo Bonzini
These headers are also included from softmmu/vl.c, so they should be in include/. Removing qemu-options-wrapper.h, since elsewhere we include "template" headers directly and #define the parameters in the including file, and move qemu-options.h to include/. Signed-off-by: Paolo Bonzini --- qemu-

[RFC PATCH 00/15] softmmu: Make various objects target agnostic

2021-05-17 Thread Philippe Mathieu-Daudé
Few changes to speed up builds, removing 330 objects. RFC because of: - accel hax/whpx changes - sysemu/memory_mapping target_ulong -> hwaddr which i'm not sure of the impacts. Philippe Mathieu-Daudé (15): accel/kvm: Add more stubs accel/whpx: Simplify #ifdef'ry accel/hax: Simplify #ifdef'r

Re: [PATCH qemu v19] spapr: Implement Open Firmware client interface

2021-05-17 Thread BALATON Zoltan
On Mon, 17 May 2021, Alexey Kardashevskiy wrote: On 5/16/21 01:04, BALATON Zoltan wrote: On Thu, 22 Apr 2021, Alexey Kardashevskiy wrote: [snip] +/* Defined as Big Endian */ +struct prom_args { +    uint32_t service; +    uint32_t nargs; +    uint32_t nret; +    uint32_t args[10]; +} QEMU_PA

Re: [PATCH V3 00/22] Live Update

2021-05-17 Thread Stefan Hajnoczi
On Fri, May 14, 2021 at 11:15:18AM -0400, Steven Sistare wrote: > On 5/14/2021 7:53 AM, Stefan Hajnoczi wrote: > > On Thu, May 13, 2021 at 04:21:15PM -0400, Steven Sistare wrote: > >> On 5/12/2021 12:42 PM, Stefan Hajnoczi wrote: > >>> On Fri, May 07, 2021 at 05:24:58AM -0700, Steve Sistare wrote:

Re: [Qemu-devel] [PATCH 7/7] target/xtensa: move non-HELPER functions to helper.c

2021-05-17 Thread Max Filippov
On Mon, May 17, 2021 at 4:50 AM Max Filippov wrote: > > Hi Philippe, > > On Sun, May 16, 2021 at 10:05 PM Philippe Mathieu-Daudé > wrote: > > > > Hi Max, > > > > On Mon, Jan 14, 2019 at 8:52 AM Max Filippov wrote: > > > > > > Move remaining non-HELPER functions from op_helper.c to helper.c. > >

Re: [PATCH] target/riscv: Remove obsolete 'CPU unmigratable' comment

2021-05-17 Thread Bin Meng
On Mon, May 17, 2021 at 3:08 PM Philippe Mathieu-Daudé wrote: > > The RISCV CPU is migratable since commit f7697f0e629 > ("target/riscv: Add basic vmstate description of CPU"), > so remove an obsolete comment which is now incorrect. > > Reported-by: Richard Henderson > Signed-off-by: Philippe Mat

Re: [PATCH 01/21] block: introduce bdrv_replace_child_bs()

2021-05-17 Thread Max Reitz
On 17.05.21 08:44, Vladimir Sementsov-Ogievskiy wrote: Add function to transactionally replace bs inside BdrvChild. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/block.h | 2 ++ block.c | 36 2 files changed, 38 insertions(

[PULL 20/20] KVM: Dirty ring support

2021-05-17 Thread Paolo Bonzini
From: Peter Xu KVM dirty ring is a new interface to pass over dirty bits from kernel to the userspace. Instead of using a bitmap for each memory region, the dirty ring contains an array of dirtied GPAs to fetch (in the form of offset in slots). For each vcpu there will be one dirty ring that bin

[RFC PATCH 14/15] softmmu/cpus: Extract QMP command handlers to cpus-qmp.c

2021-05-17 Thread Philippe Mathieu-Daudé
qmp_memsave() and qmp_pmemsave() call cpu_memory_rw_debug() and cpu_physical_memory_read(), which are target specific prototypes. To be able to build softmmu/cpus.c once for all targets, extract the QMP commands handlers to a new file which will be built per target. Signed-off-by: Philippe Mathieu

[RFC PATCH 15/15] softmmu: Build target-agnostic objects once

2021-05-17 Thread Philippe Mathieu-Daudé
Various softmmu objects aren't target specific. Move them to the generic softmmu source set. For our 31 softmmu targets, this is in total 330 objects less to build! Signed-off-by: Philippe Mathieu-Daudé --- softmmu/meson.build | 24 1 file changed, 12 insertions(+), 12

[PULL 19/20] KVM: Disable manual dirty log when dirty ring enabled

2021-05-17 Thread Paolo Bonzini
From: Peter Xu KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 is for KVM_CLEAR_DIRTY_LOG, which is only useful for KVM_GET_DIRTY_LOG. Skip enabling it for kvm dirty ring. More importantly, KVM_DIRTY_LOG_INITIALLY_SET will not wr-protect all the pages initially, which is against how kvm dirty ring is used -

[RFC PATCH 12/15] sysemu/kvm: Make kvm_on_sigbus() / kvm_on_sigbus_vcpu() target agnostic

2021-05-17 Thread Philippe Mathieu-Daudé
kvm_on_sigbus() and kvm_on_sigbus_vcpu() prototypes don't have to be target specific. Remove this limitation to be able to build softmmu/cpus.c once for all targets. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/kvm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff -

[PULL 18/20] KVM: Add dirty-ring-size property

2021-05-17 Thread Paolo Bonzini
From: Peter Xu Add a parameter for dirty gfn count for dirty rings. If zero, dirty ring is disabled. Otherwise dirty ring will be enabled with the per-vcpu gfn count as specified. If dirty ring cannot be enabled due to unsupported kernel or illegal parameter, it'll fallback to dirty logging.

[RFC PATCH 13/15] sysemu/memory_mapping: Become target-agnostic

2021-05-17 Thread Philippe Mathieu-Daudé
target_ulong is target-specific, while hwaddr isn't. memory_mapping_list_add_merge_sorted() uses hwaddr arguments anyway, so use the hwaddr type for MemoryMapping::virt_addr. Remove the unnecessary "exec/cpu-defs.h" target-speficic header from "memory_mapping.h" and use the target-agnostic "hw/co

[RFC PATCH 11/15] exec/cpu: Make address_space_init/reloading_memory_map target agnostic

2021-05-17 Thread Philippe Mathieu-Daudé
cpu_address_space_init() and cpu_reloading_memory_map() don't have to be target specific. Remove this limitation to be able to build softmmu/cpus.c once for all targets. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-common.h | 23 +++ include/exec/exec-all.h |

[RFC PATCH 10/15] exec/gdbstub: Make gdb_exit() / gdb_set_stop_cpu() target agnostic

2021-05-17 Thread Philippe Mathieu-Daudé
gdb_exit() and gdb_set_stop_cpu() prototypes don't have to be target specific. Remove this limitation to be able to build softmmu/cpus.c and softmmu/runstate.c once for all targets. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/gdbstub.h | 23 --- 1 file changed, 12

[RFC PATCH 06/15] hw/acpi/memory_hotplug: Remove unused 'hw/acpi/pc-hotplug.h' header

2021-05-17 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/acpi/memory_hotplug.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c index af378894235..104c1abd4eb 100644 --- a/hw/acpi/memory_hotplug.c +++ b/hw/acpi/memory_hotplug.c @@ -1,6 +1,5 @@ #include "

[RFC PATCH 09/15] softmmu/runstate: Clean headers

2021-05-17 Thread Philippe Mathieu-Daudé
Add the missing 'qemu/log.h' header and remove the unused 'exec/exec-all.h' one. Signed-off-by: Philippe Mathieu-Daudé --- softmmu/runstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softmmu/runstate.c b/softmmu/runstate.c index ce8977c6a29..ffd8ddf1341 100644 --- a/so

<    1   2   3   4   5   6   7   >