[PATCH v3 0/5] block-copy: protect block-copy internal structures

2021-06-08 Thread Emanuele Giuseppe Esposito
This serie of patches aims to reduce the usage of the AioContexlock in block-copy, by introducing smaller granularity locks thus on making the block layer thread safe. This serie depends on my previous serie that brings thread safety to the smaller API used by block-copy, like ratelimit, progress

[PATCH v3 1/5] block-copy: streamline choice of copy_range vs. read/write

2021-06-08 Thread Emanuele Giuseppe Esposito
From: Paolo Bonzini Put the logic to determine the copy size in a separate function, so that there is a simple state machine for the possible methods of copying data from one BlockDriverState to the other. Use .method instead of .copy_range as in-out argument, and include also .zeroes as an addi

[PATCH v3 4/5] block-copy: add a CoMutex

2021-06-08 Thread Emanuele Giuseppe Esposito
Add a CoMutex to protect concurrent access of block-copy data structures. This mutex also protects .copy_bitmap, because its thread-safe API does not prevent it from assigning two tasks to the same bitmap region. .finished, .cancelled and reads to .ret and .error_is_read will be protected in the

[PATCH v3 2/5] block-copy: improve comments of BlockCopyTask and BlockCopyState types and functions

2021-06-08 Thread Emanuele Giuseppe Esposito
As done in BlockCopyCallState, categorize BlockCopyTask and BlockCopyState in IN, State and OUT fields. This is just to understand which field has to be protected with a lock. .sleep_state is handled in the series "coroutine: new sleep/wake API" and thus here left as TODO. Signed-off-by: Emanuele

[PATCH v3 5/5] block-copy: atomic .cancelled and .finished fields in BlockCopyCallState

2021-06-08 Thread Emanuele Giuseppe Esposito
By adding acquire/release pairs, we ensure that .ret and .error_is_read fields are written by block_copy_dirty_clusters before .finished is true. The atomic here are necessary because the fields are concurrently modified also outside coroutines. Signed-off-by: Emanuele Giuseppe Esposito --- blo

[PATCH v3 3/5] block-copy: move progress_set_remaining in block_copy_task_end

2021-06-08 Thread Emanuele Giuseppe Esposito
Moving this function in task_end ensures to update the progress anyways, even if there is an error. It also helps in next patch, allowing task_end to have only one critical section. Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Emanuele Giuseppe Esposito --- block/block-copy.c | 6 +

Re: [PATCH] s390x/kvm: remove unused gs handling

2021-06-08 Thread Cornelia Huck
On Wed, Jun 02 2021, Cornelia Huck wrote: > With commit 0280b3eb7c05 ("s390x/kvm: use cpu model for gscb on > compat machines"), we removed any calls to kvm_s390_get_gs() > in favour of a different mechanism. > > Let's remove the unused kvm_s390_get_gs(), and with it the now > unneeded cap_gs as

Re: [PATCH] configure: Check whether we can compile the s390-ccw bios with -msoft-float

2021-06-08 Thread Thomas Huth
On 25/05/2021 17.13, Philippe Mathieu-Daudé wrote: On 5/25/21 4:40 PM, Thomas Huth wrote: On 25/05/2021 16.31, Cornelia Huck wrote: On Tue, 25 May 2021 16:20:32 +0200 Thomas Huth wrote: The -msoft-float switch is not available in older versions of Clang. Since we rely on the compiler to not

Re: [PATCH v4 1/6] blkdebug: refactor removal of a suspended request

2021-06-08 Thread Emanuele Giuseppe Esposito
On 07/06/2021 11:23, Paolo Bonzini wrote: On 04/06/21 18:16, Eric Blake wrote: On Fri, Jun 04, 2021 at 12:07:36PM +0200, Emanuele Giuseppe Esposito wrote: Extract to a separate function.  Do not rely on FOREACH_SAFE, which is only "safe" if the *current* node is removed---not if another node

Re: [PATCH] docs/tools/virtiofsd.rst: Do not hard-code the QEMU binary name

2021-06-08 Thread Stefan Hajnoczi
On Mon, Jun 07, 2021 at 07:42:50PM +0200, Thomas Huth wrote: > In downstream, we want to use a different name for the QEMU binary, > and some people might also use the docs for non-x86 binaries, that's > why we already created the |qemu_system| placeholder in the past. > Use it now in the virtiofsd

Re: [PATCH v16 04/99] qtest/arm-cpu-features: Use generic qtest_has_accel() to check for KVM

2021-06-08 Thread Philippe Mathieu-Daudé
On 6/7/21 3:22 PM, Thomas Huth wrote: > On 04/06/2021 17.51, Alex Bennée wrote: >> From: Philippe Mathieu-Daudé >> >> Use the recently added generic qtest_has_accel() method to >> check if KVM is available. >> >> Suggested-by: Claudio Fontana >> Reviewed-by: Andrew Jones >> Reviewed-by: Alex Ben

Re: [PATCH v16 06/99] qtest/arm-cpu-features: Remove TCG fallback to KVM specific tests

2021-06-08 Thread Philippe Mathieu-Daudé
On 6/7/21 3:28 PM, Thomas Huth wrote: > On 04/06/2021 17.51, Alex Bennée wrote: >> From: Philippe Mathieu-Daudé >> >> sve_tests_sve_off_kvm() and test_query_cpu_model_expansion_kvm() >> tests are now only being run if KVM is available. Drop the TCG >> fallback. >> >> Suggested-by: Andrew Jones >>

Re: [RFC PATCH 0/7] Support protection keys in an AMD EPYC-Milan VM

2021-06-08 Thread David Edmondson
On Thursday, 2021-05-20 at 15:56:40 +01, David Edmondson wrote: > AMD EPYC-Milan CPUs introduced support for protection keys, previously > available only with Intel CPUs. > > AMD chose to place the XSAVE state component for the protection keys > at a different offset in the XSAVE state area than t

Re: [PATCH v16 08/99] qtest/migration-test: Skip tests if KVM not builtin on s390x/ppc64

2021-06-08 Thread Philippe Mathieu-Daudé
On 6/4/21 11:11 PM, Richard Henderson wrote: > On 6/4/21 8:51 AM, Alex Bennée wrote: >>   if (g_str_equal(qtest_get_arch(), "ppc64") && >>   (access("/sys/module/kvm_hv", F_OK) || >> - access("/dev/kvm", R_OK | W_OK))) { >> + access("/dev/kvm", R_OK | W_OK) || !qtest_has

Re: [PATCH 1/6] hyper-v: Overlay abstraction for synic event and msg pages

2021-06-08 Thread Alexander Graf
On 24.05.21 21:54, Siddharth Chandrasekaran wrote: Capture overlay page semantic variables into 'struct overlay_page' and add methods that operate over it. Adapt existing synic event and mesage pages to use these methods to setup and manage overlays. Since all overlay pages use bit 0 of the GP

Re: [PATCH 4/6] kvm/i386: Avoid multiple calls to check_extension(KVM_CAP_HYPERV)

2021-06-08 Thread Alexander Graf
On 24.05.21 21:54, Siddharth Chandrasekaran wrote: KVM_CAP_HYPERV is a VM ioctl and can be cached at kvm_arch_init() instead of performing an ioctl each time in hyperv_enabled() which is called foreach vCPU. Apart from that, this variable will come in handy in a subsequent patch. Signed-off-by

Re: [PATCH 2/6] hyper-v: Use -1 as invalid overlay address

2021-06-08 Thread Alexander Graf
On 24.05.21 21:54, Siddharth Chandrasekaran wrote: When managing overlay pages, we used hwaddr 0 to signal an invalid address (to disable a page). Although unlikely, 0 _could_ be a valid overlay offset as Hyper-V TLFS does not specify anything about it. Use -1 as the invalid address indicator

Re: [PATCH] docs/tools/virtiofsd: Fix bad rst syntax

2021-06-08 Thread Stefan Hajnoczi
On Mon, Jun 07, 2021 at 08:00:15PM +0200, Thomas Huth wrote: > For literal blocks, there has to be an empty line after the two colons, > and the block itself should be indented. > > Signed-off-by: Thomas Huth > --- > docs/tools/virtiofsd.rst | 8 +--- > 1 file changed, 5 insertions(+), 3 del

[PATCH 2/7] Fix the qemu crash when guest shutdown during checkpoint

2021-06-08 Thread Zhang Chen
From: "Rao, Lei" This patch fixes the following: qemu-system-x86_64: invalid runstate transition: 'colo' ->'shutdown' Aborted (core dumped) Signed-off-by: Lei Rao Reviewed-by: Li Zhijian Reviewed-by: Zhang Chen Reviewed-by: Lukas Straub Tested-by: Lukas Straub Signed-off-by: Zhang C

[PATCH 3/7] Optimize the function of filter_send

2021-06-08 Thread Zhang Chen
From: "Rao, Lei" The iov_size has been calculated in filter_send(). we can directly return the size.In this way, this is no need to repeat calculations in filter_redirector_receive_iov(); Signed-off-by: Lei Rao Reviewed-by: Li Zhijian Reviewed-by: Zhang Chen Reviewed-by: Lukas Straub Tested-

[PATCH 0/7] COLO proxy patch

2021-06-08 Thread Zhang Chen
Hi Jason, Please help me merge the COLO proxy patch to net branch. Thanks Chen Rao, Lei (7): Remove some duplicate trace code. Fix the qemu crash when guest shutdown during checkpoint Optimize the function of filter_send Remove migrate_set_block_enabled in checkpoint Add a function name

Re: [PATCH 3/6] kvm/i386: Stop using cpu->kvm_msr_buf in kvm_put_one_msr()

2021-06-08 Thread Alexander Graf
On 24.05.21 21:54, Siddharth Chandrasekaran wrote: kvm_put_one_msr() zeros cpu->kvm_msr_buf and uses it to set one MSR to KVM. It is pretty wasteful as cpu->kvm_msr_buf is 4096 bytes long; instead use a local buffer to avoid memset. Also, expose this method from kvm_i386.h as hyperv.c needs to

[PATCH 4/7] Remove migrate_set_block_enabled in checkpoint

2021-06-08 Thread Zhang Chen
From: "Rao, Lei" We can detect disk migration in migrate_prepare, if disk migration is enabled in COLO mode, we can directly report an error.and there is no need to disable block migration at every checkpoint. Signed-off-by: Lei Rao Signed-off-by: Zhang Chen Reviewed-by: Li Zhijian Reviewed-b

[PATCH 1/7] Remove some duplicate trace code.

2021-06-08 Thread Zhang Chen
From: "Rao, Lei" There is the same trace code in the colo_compare_packet_payload. Signed-off-by: Lei Rao Reviewed-by: Li Zhijian Reviewed-by: Zhang Chen Reviewed-by: Lukas Straub Tested-by: Lukas Straub Signed-off-by: Zhang Chen --- net/colo-compare.c | 13 - 1 file changed, 1

Re: [PATCH v4 0/2] Gitlab: Add issue templates

2021-06-08 Thread Stefan Hajnoczi
On Mon, Jun 07, 2021 at 11:31:53AM -0400, John Snow wrote: > Add "Bug" and "Feature Request" templates to the Gitlab interface to > help improve the quality of newly reported issues. > > To see what this looks like, I've temporarily allowed my Gitlab fork to > diverge with these files merged. See

[PATCH 6/7] Add the function of colo_compare_cleanup

2021-06-08 Thread Zhang Chen
From: "Rao, Lei" This patch fixes the following: #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x7f6ae4559859 in __GI_abort () at abort.c:79 #2 0x559aaa386720 in error_exit (err=16, msg=0x559aaa5973d0 <__func__.16227> "qemu_mutex_destroy") at

[PATCH 5/7] Add a function named packet_new_nocopy for COLO.

2021-06-08 Thread Zhang Chen
From: "Rao, Lei" Use the packet_new_nocopy instead of packet_new in the filter-rewriter module. There will be one less memory copy in the processing of each network packet. Signed-off-by: Lei Rao Signed-off-by: Zhang Chen Reviewed-by: Zhang Chen --- net/colo.c| 25 +++

[PATCH 7/7] Fixed calculation error of pkt->header_size in fill_pkt_tcp_info()

2021-06-08 Thread Zhang Chen
From: "Rao, Lei" The data pointer has skipped vnet_hdr_len in the function of parse_packet_early().So, we can not subtract vnet_hdr_len again when calculating pkt->header_size in fill_pkt_tcp_info(). Otherwise, it will cause network packet comparsion errors and greatly increase the frequency of c

RE: [PATCH V7 0/6] Passthrough specific network traffic in COLO

2021-06-08 Thread Zhang, Chen
Hi Jason and Markus, No news for a while. If you have time, please give me more comments for this series. Thanks Chen > -Original Message- > From: Zhang, Chen > Sent: Wednesday, May 26, 2021 10:54 AM > To: Jason Wang ; qemu-dev de...@nongnu.org>; Eric Blake ; Dr. David Alan > Gilbert

Re: [PATCH v16 09/99] qtest/bios-tables-test: Rename tests not TCG specific

2021-06-08 Thread Philippe Mathieu-Daudé
On 6/7/21 3:39 PM, Thomas Huth wrote: > On 04/06/2021 17.51, Alex Bennée wrote: >> From: Philippe Mathieu-Daudé >> >> Various tests don't require TCG, but have '_tcg' in their name. >> As this is misleading, remove 'tcg' from their name. >> >> Reported-by: Igor Mammedov >> Reviewed-by: Igor Mamme

Re: [PULL 00/11] Trivial branch for 6.1 patches

2021-06-08 Thread Peter Maydell
On Mon, 7 Jun 2021 at 20:00, Laurent Vivier wrote: > > The following changes since commit 6f398e533f5e259b4f937f4aa9de970f7201d166: > > Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210604' > into staging (2021-06-05 11:25:52 +0100) > > are available in the Git repository at:

Re: [PATCH v5 10/11] block: use int64_t instead of int in driver discard handlers

2021-06-08 Thread Vladimir Sementsov-Ogievskiy
07.06.2021 21:13, Eric Blake wrote: On Wed, May 05, 2021 at 10:50:00AM +0300, Vladimir Sementsov-Ogievskiy wrote: We are generally moving to int64_t for both offset and bytes parameters on all io paths. Main motivation is realization of 64-bit write_zeroes operation for fast zeroing large disk

Re: [PATCH v16 00/99] arm tcg/kvm refactor and split with kvm only support

2021-06-08 Thread Philippe Mathieu-Daudé
Hi Alex, On 6/4/21 5:51 PM, Alex Bennée wrote: > Hi, > > I have picked up the baton from Claudio to try and get the ARM > re-factoring across the line. Most of the patches from Claudio remain > unchanged and have just had minor fixups from re-basing against the > moving target. I've done my best

Re: [PATCH v16 00/99] arm tcg/kvm refactor and split with kvm only support

2021-06-08 Thread Philippe Mathieu-Daudé
On 6/8/21 10:44 AM, Philippe Mathieu-Daudé wrote: > Hi Alex, > > On 6/4/21 5:51 PM, Alex Bennée wrote: >> Hi, >> >> I have picked up the baton from Claudio to try and get the ARM >> re-factoring across the line. Most of the patches from Claudio remain >> unchanged and have just had minor fixups fr

Re: [PATCH 5/6] kvm/i386: Add support for user space MSR filtering

2021-06-08 Thread Alexander Graf
On 24.05.21 22:01, Siddharth Chandrasekaran wrote: Check and enable user space MSR filtering capability and handle new exit reason KVM_EXIT_X86_WRMSR. This will be used in a follow up patch to implement hyper-v overlay pages. Signed-off-by: Siddharth Chandrasekaran This patch will break bis

Re: [PATCH v2] hw/intc/arm_gicv3_cpuif: Tolerate spurious EOIR writes

2021-06-08 Thread Peter Maydell
On Fri, 4 Jun 2021 at 14:07, Jean-Philippe Brucker wrote: > > Commit 382c7160d1cd ("hw/intc/arm_gicv3_cpuif: Fix EOIR write access > check logic") added an assert_not_reached() if the guest writes the EOIR > register while no interrupt is active. > > It turns out some software does this: EDK2, in

Re: [PATCH 0/3] target/arm: Decode fixes for aarch64

2021-06-08 Thread Peter Maydell
On Fri, 4 Jun 2021 at 19:36, Richard Henderson wrote: > > A couple of printfs left over from the beginning of time, > and asserts that are reachable because of lack of decode. > > > r~ > > > Richard Henderson (3): > target/arm: Diagnose UNALLOCATED in disas_simd_two_reg_misc_fp16 > target/arm:

Re: [PATCH 6/6] hyper-v: Handle hypercall code page as an overlay page

2021-06-08 Thread Alexander Graf
On 24.05.21 22:02, Siddharth Chandrasekaran wrote: Hypercall code page is specified in the Hyper-V TLFS to be an overlay page, ie., guest chooses a GPA and the host _places_ a page at that location, making it visible to the guest and the existing page becomes inaccessible. Similarly when disabl

Re: [PATCH v3 03/28] tcg: Re-order tcg_region_init vs tcg_prologue_init

2021-06-08 Thread Alex Bennée
Richard Henderson writes: > Instead of delaying tcg_region_init until after tcg_prologue_init > is complete, do tcg_region_init first and let tcg_prologue_init > shrink the first region by the size of the generated prologue. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée --

Re: [PATCH v16 02/99] accel: Introduce 'query-accels' QMP command

2021-06-08 Thread Philippe Mathieu-Daudé
On 6/7/21 3:07 PM, Thomas Huth wrote: > On 04/06/2021 17.51, Alex Bennée wrote: >> From: Philippe Mathieu-Daudé >> >> Introduce the 'query-accels' QMP command which returns a list >> of built-in accelerator names. >> >> - Accelerator is a QAPI enum of all existing accelerators, >> >> - Accelerator

Re: [PATCH v1 1/1] tests/data/acpi/virt: add IORT files for ITS

2021-06-08 Thread Peter Maydell
On Thu, 3 Jun 2021 at 15:51, Shashi Mallela wrote: > > Added expected IORT files applicable with latest > GICv3 ITS changes. > > Signed-off-by: Shashi Mallela I assume this is intended to fix the 'make check' failure with your ITS patches? This needs to be part of the ITS patch series, and it ha

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

2021-06-08 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 v4 00/26] s390x/tcg: Implement Vector enhancements facility and switch to z14

2021-06-08 Thread David Hildenbrand
@Conny, I think this should be good to go. 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

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

2021-06-08 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 Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand

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

2021-06-08 Thread David Hildenbrand
Reviewed-by: Richard Henderson 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

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

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

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

2021-06-08 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 v4 02/26] s390x/tcg: Fix instruction name for VECTOR FP LOAD (LENGTHENED|ROUNDED)

2021-06-08 Thread David Hildenbrand
Let's use the correct name. Reviewed-by: Richard Henderson 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/ta

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

2021-06-08 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 v4 06/26] s390x/tcg: Simplify vftci64() handling

2021-06-08 Thread David Hildenbrand
Reviewed-by: Richard Henderson 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/s3

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

2021-06-08 Thread David Hildenbrand
Reviewed-by: Richard Henderson 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/h

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

2021-06-08 Thread David Hildenbrand
Reviewed-by: Richard Henderson 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/targ

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

2021-06-08 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 v4 10/26] s390x/tcg: Simplify wfc64() handling

2021-06-08 Thread David Hildenbrand
... and prepare for 32/128 bit support. Reviewed-by: Richard Henderson 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 i

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

2021-06-08 Thread David Hildenbrand
Reviewed-by: Richard Henderson 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(-) dif

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

2021-06-08 Thread David Hildenbrand
Reviewed-by: Richard Henderson 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(

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

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

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

2021-06-08 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 v4 19/26] s390x/tcg: Implement 32/128 bit for VECTOR FP PERFORM SIGN OPERATION

2021-06-08 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 v4 15/26] s390x/tcg: Implement 32/128 bit for VECTOR FP COMPARE *

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

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

2021-06-08 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. Reviewed-by: Richard Henderson Signed-off-by: David Hildenbrand

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

2021-06-08 Thread David Hildenbrand
Reviewed-by: Richard Henderson 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 deletion

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

2021-06-08 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 v4 18/26] s390x/tcg: Implement 128 bit for VECTOR FP LOAD ROUNDED

2021-06-08 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 v4 24/26] linux-user: elf: s390x: Prepare for Vector enhancements facility

2021-06-08 Thread David Hildenbrand
Let's check for S390_FEAT_VECTOR_ENH and set HWCAP_S390_VXRS_EXT accordingly. Add all missing HWCAP defined in upstream Linux. Cc: Laurent Vivier Acked-by: Laurent Vivier Signed-off-by: David Hildenbrand --- include/elf.h| 7 +++ linux-user/elfload.c | 1 + 2 files changed, 8 inser

[PULL 06/12] machine: move dies from X86MachineState to CpuTopology

2021-06-08 Thread Paolo Bonzini
In order to make SMP configuration a Machine property, we need a getter as well as a setter. To simplify the implementation put everything that the getter needs in the CpuTopology struct. Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 1 + hw/i386/pc.c | 4 +--- hw/i386/x86

[PULL 05/12] qemu-option: remove now-dead code

2021-06-08 Thread Paolo Bonzini
-M was the sole user of qemu_opts_set and qemu_opts_set_defaults, remove them and the arguments that they used. Signed-off-by: Paolo Bonzini --- include/qemu/option.h | 3 --- tests/unit/test-qemu-opts.c | 35 - util/qemu-option.c | 51

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

2021-06-08 Thread David Hildenbrand
Everything is wired up and all new instructions are implemented. 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..219b1f

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

2021-06-08 Thread David Hildenbrand
Reviewed-by: Richard Henderson 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 --gi

[PULL 04/12] vl: switch -M parsing to keyval

2021-06-08 Thread Paolo Bonzini
Switch from QemuOpts to keyval. This enables the introduction of non-scalar machine properties, and JSON syntax in the future. For JSON syntax to be supported right now, we would have to consider what would happen if string-based dictionaries (produced by -M key=val) were to be merged with strong

[PULL 02/12] keyval: introduce keyval_merge

2021-06-08 Thread Paolo Bonzini
This patch introduces a function that merges two keyval-produced (or keyval-like) QDicts. It can be used to emulate the behavior of .merge_lists = true QemuOpts groups, merging -readconfig sections and command-line options in a single QDict, and also to implement -set. Signed-off-by: Paolo Bonzin

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

2021-06-08 Thread David Hildenbrand
Reviewed-by: Richard Henderson 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 insertio

[PULL 07/12] machine: move common smp_parse code to caller

2021-06-08 Thread Paolo Bonzini
Most of smp_parse and pc_smp_parse is guarded by an "if (opts)" conditional, and the rest is common to both function. Move the conditional and the common code to the caller, machine_smp_parse. Move the replay_add_blocker call after all errors are checked for. Signed-off-by: Paolo Bonzini --- h

[PULL 01/12] qom: export more functions for use with non-UserCreatable objects

2021-06-08 Thread Paolo Bonzini
Machines and accelerators are not user-creatable but they are going to share similar command-line parsing machinery. Export functions that will be used with -machine and -accel in softmmu/vl.c. Signed-off-by: Paolo Bonzini --- include/qom/object.h| 23 qom/object_interfaces

[PULL 08/12] machine: add error propagation to mc->smp_parse

2021-06-08 Thread Paolo Bonzini
Clean up the smp_parse functions to use Error** instead of exiting. Signed-off-by: Paolo Bonzini --- hw/core/machine.c| 34 +++--- hw/i386/pc.c | 28 ++-- include/hw/boards.h | 2 +- include/hw/i386/pc.h | 2 -- 4 files changed,

[PULL 00/12] Machine and OS X changes for 2021-06-08

2021-06-08 Thread Paolo Bonzini
The following changes since commit 6f398e533f5e259b4f937f4aa9de970f7201d166: Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210604' into staging (2021-06-05 11:25:52 +0100) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for y

[PULL 10/12] machine: reject -smp dies!=1 for non-PC machines

2021-06-08 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/core/machine.c b/hw/core/machine.c index 9ad8341a31..ffc076ae84 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -746,6 +746,10 @@ static void smp_parse(MachineState *ms, SMPConf

[PULL 11/12] machine: add smp compound property

2021-06-08 Thread Paolo Bonzini
Make -smp syntactic sugar for a compound property "-machine smp.{cores,threads,cpu,...}". machine_smp_parse is replaced by the setter for the property. numa-test will now cover the new syntax, while other tests still use -smp. Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 108

[PULL 12/12] vnc: avoid deprecation warnings for SASL on OS X

2021-06-08 Thread Paolo Bonzini
Apple has deprecated sasl.h functions in OS X 10.11. Therefore, all files that use SASL API need to disable -Wdeprecated-declarations. Remove the only use that is outside vnc-auth-sasl.c and add the relevant #pragma GCC diagnostic there. Signed-off-by: Paolo Bonzini Message-Id: <20210604120915.2

[PULL 03/12] keyval: introduce keyval_parse_into

2021-06-08 Thread Paolo Bonzini
Allow parsing multiple keyval sequences into the same dictionary. This will be used to simplify the parsing of the -M command line option, which is currently a .merge_lists = true QemuOpts group. Signed-off-by: Paolo Bonzini --- include/qemu/option.h | 2 ++ util/keyval.c | 43 +

[PULL 09/12] machine: pass QAPI struct to mc->smp_parse

2021-06-08 Thread Paolo Bonzini
As part of converting -smp to a property with a QAPI type, define the struct and use it to do the actual parsing. machine_smp_parse takes care of doing the QemuOpts->QAPI conversion by hand, for now. Signed-off-by: Paolo Bonzini --- hw/core/machine.c | 33 +++-- hw

Re: [PATCH v16 03/99] qtest: Add qtest_has_accel() method

2021-06-08 Thread Philippe Mathieu-Daudé
On 6/7/21 3:16 PM, Thomas Huth wrote: > On 04/06/2021 17.51, Alex Bennée wrote: >> From: Philippe Mathieu-Daudé >> >> Introduce the qtest_has_accel() method which allows a runtime >> query on whether a QEMU instance has an accelerator built-in. >> >> Reviewed-by: Eric Blake >> Reviewed-by: Alex B

Re: [PULL 00/12] Machine and OS X changes for 2021-06-08

2021-06-08 Thread Daniel P . Berrangé
On Tue, Jun 08, 2021 at 11:40:05AM +0200, Paolo Bonzini wrote: > The following changes since commit 6f398e533f5e259b4f937f4aa9de970f7201d166: > > Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210604' > into staging (2021-06-05 11:25:52 +0100) > > are available in the Git rep

Re: [PATCH v3 13/33] block/nbd: introduce nbd_client_connection_release()

2021-06-08 Thread Vladimir Sementsov-Ogievskiy
03.06.2021 00:27, Eric Blake wrote: On Fri, Apr 16, 2021 at 11:08:51AM +0300, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 43 ++- 1 file changed, 26 insertions(+), 17 deletions(-) Commit message s

Re: [PATCH v4 0/8] GICv3 LPI and ITS feature implementation

2021-06-08 Thread Peter Maydell
On Wed, 2 Jun 2021 at 19:00, Shashi Mallela wrote: > > This patchset implements qemu device model for enabling physical > LPI support and ITS functionality in GIC as per GICv3 specification. > Both flat table and 2 level tables are implemented.The ITS commands > for adding/deleting ITS table entri

Re: [PATCH v4 1/8] hw/intc: GICv3 ITS initial framework

2021-06-08 Thread Peter Maydell
On Wed, 2 Jun 2021 at 19:00, Shashi Mallela wrote: > > Added register definitions relevant to ITS,implemented overall > ITS device framework with stubs for ITS control and translater > regions read/write,extended ITS common to handle mmio init between > existing kvm device and newer qemu device. >

Re: [PATCH v3 09/33] block/nbd: bs-independent interface for nbd_co_establish_connection()

2021-06-08 Thread Vladimir Sementsov-Ogievskiy
02.06.2021 22:14, Eric Blake wrote: On Fri, Apr 16, 2021 at 11:08:47AM +0300, Vladimir Sementsov-Ogievskiy wrote: We are going to split connection code to separate file. Now we are to a separate ready to give nbd_co_establish_connection() clean and bs-independent interface. Signed-off-by: V

Re: [PATCH v3 17/33] nbd/client-connection: implement connection retry

2021-06-08 Thread Vladimir Sementsov-Ogievskiy
11.05.2021 23:54, Roman Kagan wrote: On Fri, Apr 16, 2021 at 11:08:55AM +0300, Vladimir Sementsov-Ogievskiy wrote: Add an option for thread to retry connection until success. We'll use nbd/client-connection both for reconnect and for initial connection in nbd_open(), so we need a possibility to

Re: [PATCH v4 2/8] hw/intc: GICv3 ITS register definitions added

2021-06-08 Thread Peter Maydell
On Wed, 2 Jun 2021 at 19:00, Shashi Mallela wrote: > > Defined descriptors for ITS device table,collection table and ITS > command queue entities.Implemented register read/write functions, > extract ITS table parameters and command queue parameters,extended > gicv3 common to capture qemu address s

Re: [PATCH v3 17/33] nbd/client-connection: implement connection retry

2021-06-08 Thread Vladimir Sementsov-Ogievskiy
03.06.2021 20:49, Vladimir Sementsov-Ogievskiy wrote: 03.06.2021 19:17, Eric Blake wrote: On Fri, Apr 16, 2021 at 11:08:55AM +0300, Vladimir Sementsov-Ogievskiy wrote: Add an option for thread to retry connection until success. We'll use for a thread to retry connection until it succeeds. n

Re: [PATCH v4 3/8] hw/intc: GICv3 ITS command queue framework

2021-06-08 Thread Peter Maydell
On Wed, 2 Jun 2021 at 19:00, Shashi Mallela wrote: > > Added functionality to trigger ITS command queue processing on > write to CWRITE register and process each command queue entry to > identify the command type and handle commands like MAPD,MAPC,SYNC. > > Signed-off-by: Shashi Mallela > --- >

Re: [RFC PATCH 00/11] hw/nvme: reimplement all multi-aio commands with custom aiocbs

2021-06-08 Thread Stefan Hajnoczi
On Fri, Jun 04, 2021 at 08:52:26AM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > This series reimplements flush, dsm, copy, zone reset and format nvm to > allow cancellation. I posted an RFC back in March ("hw/block/nvme: > convert ad-hoc aio tracking to aiocb") and I've applied some feedba

Re: [PATCH v8 02/12] accel: Introduce 'query-accels' QMP command

2021-06-08 Thread Philippe Mathieu-Daudé
On 6/3/21 7:19 PM, Alex Bennée wrote: > > Philippe Mathieu-Daudé writes: > >> Introduce the 'query-accels' QMP command which returns a list >> of built-in accelerator names. >> >> - Accelerator is a QAPI enum of all existing accelerators, >> >> - AcceleratorInfo is a QAPI structure providing acc

Re: [PATCH 8/9] virtiofsd: Optionally fill lo_inode.fhandle

2021-06-08 Thread Dr. David Alan Gilbert
* Max Reitz (mre...@redhat.com) wrote: > When the inode_file_handles option is set, try to generate a file handle > for new inodes instead of opening an O_PATH FD. > > Being able to open these again will require CAP_DAC_READ_SEARCH, so the > description text tells the user they will also need to s

Re: [PATCH v4 4/8] hw/intc: GICv3 ITS Command processing

2021-06-08 Thread Peter Maydell
On Wed, 2 Jun 2021 at 19:00, Shashi Mallela wrote: > > Added ITS command queue handling for MAPTI,MAPI commands,handled ITS > translation which triggers an LPI via INT command as well as write > to GITS_TRANSLATER register,defined enum to differentiate between ITS > command interrupt trigger and G

Re: [PATCH v16 04/99] qtest/arm-cpu-features: Use generic qtest_has_accel() to check for KVM

2021-06-08 Thread Philippe Mathieu-Daudé
On 6/8/21 10:22 AM, Philippe Mathieu-Daudé wrote: > On 6/7/21 3:22 PM, Thomas Huth wrote: >> On 04/06/2021 17.51, Alex Bennée wrote: >>> From: Philippe Mathieu-Daudé >>> >>> Use the recently added generic qtest_has_accel() method to >>> check if KVM is available. >>> >>> Suggested-by: Claudio Font

Re: [PATCH 5/6] kvm/i386: Add support for user space MSR filtering

2021-06-08 Thread Siddharth Chandrasekaran
On Tue, Jun 08, 2021 at 10:48:53AM +0200, Alexander Graf wrote: > On 24.05.21 22:01, Siddharth Chandrasekaran wrote: > > Check and enable user space MSR filtering capability and handle new exit > > reason KVM_EXIT_X86_WRMSR. This will be used in a follow up patch to > > implement hyper-v overlay pa

Re: [PATCH 6/6] hyper-v: Handle hypercall code page as an overlay page

2021-06-08 Thread Siddharth Chandrasekaran
On Tue, Jun 08, 2021 at 11:02:45AM +0200, Alexander Graf wrote: > On 24.05.21 22:02, Siddharth Chandrasekaran wrote: > > Hypercall code page is specified in the Hyper-V TLFS to be an overlay > > page, ie., guest chooses a GPA and the host _places_ a page at that > > location, making it visible to t

Re: [PATCH v4 5/8] hw/intc: GICv3 ITS Feature enablement

2021-06-08 Thread Peter Maydell
On Wed, 2 Jun 2021 at 19:00, Shashi Mallela wrote: > > Added properties to enable ITS feature and define qemu system > address space memory in gicv3 common,setup distributor and > redistributor registers to indicate LPI support. > > Signed-off-by: Shashi Mallela > --- > hw/intc/arm_gicv3_common.

Re: [PATCH v4 8/8] hw/arm/virt: add ITS support in virt GIC

2021-06-08 Thread Peter Maydell
On Wed, 2 Jun 2021 at 19:00, Shashi Mallela wrote: > > Included creation of ITS as part of virt platform GIC > initialization.This Emulated ITS model now co-exists with kvm Still missing space after '.'. > ITS and is enabled in absence of kvm irq kernel support in a > platform. > > Signed-off-b

  1   2   3   4   >