Re: [RFC v12 41/65] tests: restrict TCG-only arm-cpu-features tests to TCG builds

2021-04-08 Thread Claudio Fontana
On 3/28/21 7:23 PM, Richard Henderson wrote: > On 3/26/21 1:36 PM, Claudio Fontana wrote: >> sve_tests_sve_max_vq_8, >> sve_tests_sve_off, >> test_query_cpu_model_expansion > > The final two confused me before I realized there are separate tests for kvm. > I think we should rename them to *_tcg,

Re: [PATCH-for-6.0? v2] hw/isa/Kconfig: Add missing dependency VIA VT82C686 -> APM

2021-04-08 Thread Philippe Mathieu-Daudé
On 4/8/21 3:22 PM, BALATON Zoltan wrote: > On Thu, 8 Apr 2021, Philippe Mathieu-Daudé wrote: >> This patch apparently got lost. > > No, it's queued for 6.1 as part of my pegasos2 series in David's tree: > > https://github.com/dgibson/qemu/commits/ppc-for-6.1 Ah great, thank you both. > > Regar

[Bug 1920913] Re: Openjdk11+ fails to install on s390x

2021-04-08 Thread Namrata Bhave
@davidhildenbrand The other issue which you have mentioned as duplicate shows java getting stuck for long, whereas for me it crashes right away. Do you think these 2 are related? Also observed another behaviour : java -version randomly passes, sometimes. I can also confirm that it is observed und

Re: [PATCH v28 00/23] i386 cleanup PART 2

2021-04-08 Thread Philippe Mathieu-Daudé
Hi Paolo, On 3/22/21 5:41 PM, Paolo Bonzini wrote: > Looks good to me, thanks for all the effort! > > Paolo > > On 22/03/21 14:27, Claudio Fontana wrote: >> v27 -> v28: >> >> * rebased on latest master; >>    I indicated the conflicts for the affected patches in the commit >> message, >>    in c

Re: [RFC PATCH v2 00/11] qemu_iotests: improve debugging options

2021-04-08 Thread Emanuele Giuseppe Esposito
On 08/04/2021 14:39, Markus Armbruster wrote: Emanuele Giuseppe Esposito writes: On 08/04/2021 10:26, Markus Armbruster wrote: Emanuele Giuseppe Esposito writes: This series adds the option to attach gdbserver and valgrind to the QEMU binary running in qemu_iotests. It also allows to re

[Bug 1921092] Re: gdbstub debug of multi-cluster machines is undocumented and confusing

2021-04-08 Thread Peter Maydell
There's now a new docs section on debugging multicore (including multi- cluster) machines: https://qemu-project.gitlab.io/qemu/system/gdb.html#debugging-multicore- machines -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs

Re: [RFC PATCH 1/3] vfio: Introduce helpers to mark dirty pages of a RAM section

2021-04-08 Thread Auger Eric
Hi Kunkun, On 2/19/21 10:42 AM, Kunkun Jiang wrote: > Extract part of the code from vfio_sync_dirty_bitmap to form a > new helper, which allows to mark dirty pages of a RAM section. > This helper will be called for nested stage. > > Signed-off-by: Kunkun Jiang > --- > hw/vfio/common.c | 22

Re: [PATCH 0/3] hw: Constify VMStateDescription

2021-04-08 Thread Keqian Zhu
On 2021/4/8 21:22, Philippe Mathieu-Daudé wrote: > On 3/15/21 10:05 AM, Keqian Zhu wrote: >> Hi Philippe, >> >> It seems that vmstate_ecc_state and vmstate_x86_cpu can also be constified. >> Found by . > > Correct (I only searched for the static ones). > > Do you mind sending a patch? OK, I'll

Re: [RFC PATCH 2/3] vfio: Add vfio_prereg_listener_log_sync in nested stage

2021-04-08 Thread Auger Eric
Hi Kunkun, On 2/19/21 10:42 AM, Kunkun Jiang wrote: > On Intel, the DMA mapped through the host single stage. Instead > we set up the stage 2 and stage 1 separately in nested mode as there > is no "Caching Mode". You need to rewrite the above sentences, Missing ARM and also the 1st sentences miss

[PATCH] vmstate: Constify some VMStateDescriptions

2021-04-08 Thread Keqian Zhu
Constify vmstate_ecc_state and vmstate_x86_cpu. Signed-off-by: Keqian Zhu --- hw/block/ecc.c | 2 +- include/hw/block/flash.h | 2 +- target/i386/cpu.h| 2 +- target/i386/machine.c| 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/block/ecc.c b/hw/blo

[PATCH v2 01/10] block/nbd: introduce NBDConnectThread reference counter

2021-04-08 Thread Vladimir Sementsov-Ogievskiy
The structure is shared between NBD BDS and connection thread. And it is possible the connect thread will finish after closing and releasing for the bs. To handle this we have a concept of CONNECT_THREAD_RUNNING_DETACHED state and when thread is running and BDS is going to be closed we don't free t

[PATCH v2 08/10] block/nbd: rename NBDConnectThread to NBDClientConnection

2021-04-08 Thread Vladimir Sementsov-Ogievskiy
We are going to move connection code to own file and want clear names and APIs. The structure is shared between user and (possibly) several runs of connect-thread. So it's wrong to call it "thread". Let's rename to something more generic. Appropriately rename connect_thread and thr variables to c

[PATCH v2 07/10] block/nbd: make nbd_co_establish_connection_cancel() bs-independent

2021-04-08 Thread Vladimir Sementsov-Ogievskiy
nbd_co_establish_connection_cancel() actually needs only pointer to NBDConnectThread. So, make it clean. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index a487fd1e68..eb

[PATCH v2 04/10] block/nbd: simplify waking of nbd_co_establish_connection()

2021-04-08 Thread Vladimir Sementsov-Ogievskiy
Instead of connect_bh, bh_ctx and wait_connect fields we can live with only one link to waiting coroutine, protected by mutex. So new logic is: nbd_co_establish_connection() sets wait_co under mutex, release the mutex and do yield(). Note, that wait_co may be scheduled by thread immediately after

[PATCH v2 05/10] block/nbd: drop thr->state

2021-04-08 Thread Vladimir Sementsov-Ogievskiy
Actually, the only bit of information we need is "is thread running or not". We don't need all these states. So, instead of thr->state add boolean variable thr->running and refactor the code. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 103 ++

Re: [PATCH v2] monitor/qmp: fix race on CHR_EVENT_CLOSED without OOB

2021-04-08 Thread Markus Armbruster
Thomas Lamprecht writes: > On 08.04.21 14:49, Markus Armbruster wrote: >> Kevin Wolf writes: >>> Am 08.04.2021 um 11:21 hat Markus Armbruster geschrieben: Should this go into 6.0? >>> >>> This is something that the responsible maintainer needs to decide. >> >> Yes, and that's me. I'm soli

[PATCH v2 09/10] block/nbd: introduce nbd_client_connection_new()

2021-04-08 Thread Vladimir Sementsov-Ogievskiy
This is the last step of creating bs-independing nbd connection interface. With next commit we can finally move it to separate file. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/block/nbd.c b/block

[Bug 1915063] Re: Windows 10 wil not install using qemu-system-x86_64

2021-04-08 Thread Christian Ehrhardt 
Finally I'm able to test on a Threadripper myself now. Note: In regard to the commit that Babu identified - I'm on kernel 5.10.0-1020-oem so that patch would be applied already. I need to find an older kernel to retry with that as well (on that new kernel) I did a full Win10 install and it worked

[PATCH v2 02/10] block/nbd: BDRVNBDState: drop unused connect_err and connect_status

2021-04-08 Thread Vladimir Sementsov-Ogievskiy
These fields are write-only. Drop them. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 64b2977dc8..b0bbde741a 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -117,8 +117,6

[PATCH v2 10/10] nbd: move connection code from block/nbd to nbd/client-connection

2021-04-08 Thread Vladimir Sementsov-Ogievskiy
We now have bs-independent connection API, which consists of four functions: nbd_client_connection_new() nbd_client_connection_unref() nbd_co_establish_connection() nbd_co_establish_connection_cancel() Move them to a separate file together with NBDClientConnection structure which becomes

[PATCH v2 06/10] block/nbd: bs-independent interface for nbd_co_establish_connection()

2021-04-08 Thread Vladimir Sementsov-Ogievskiy
We are going to split connection code to separate file. Now we are ready to give nbd_co_establish_connection() clean and bs-independent interface. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 49 +++-- 1 file changed, 31 insertions(+),

[PATCH v2 00/10] block/nbd: move connection code to separate file

2021-04-08 Thread Vladimir Sementsov-Ogievskiy
Hi all! This substitutes "[PATCH 00/14] nbd: move reconnect-thread to separate file" Supersedes: <20210407104637.36033-1-vsement...@virtuozzo.com> I want to simplify block/nbd.c which is overcomplicated now. First step is splitting out what could be split. These series creates new file nbd/clien

Re: [PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-04-08 Thread Catalin Marinas
On Wed, Apr 07, 2021 at 04:52:54PM +0100, Steven Price wrote: > On 07/04/2021 16:14, Catalin Marinas wrote: > > On Wed, Apr 07, 2021 at 11:20:18AM +0100, Steven Price wrote: > > > On 31/03/2021 19:43, Catalin Marinas wrote: > > > > When a slot is added by the VMM, if it asked for MTE in guest (I gu

[PATCH v2 03/10] util/async: aio_co_enter(): do aio_co_schedule in general case

2021-04-08 Thread Vladimir Sementsov-Ogievskiy
With the following patch we want to call aio_co_wake() from thread. And it works bad. Assume we have no iothreads. Assume we have a coroutine A, which waits in the yield point for external aio_co_wake(), and no progress can be done until it happen. Main thread is in blocking aio_poll() (for example

[Bug 1915063] Re: Windows 10 wil not install using qemu-system-x86_64

2021-04-08 Thread Babu Moger
@Christian, Yes. This following patch fixes the problem https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg01020.html I saw your ping on the patch. I am not sure why it is not picked up. I am going ping them today. >If I might ask - how does the kernel fix you referenced interact with th

Re: [PATCH v4 00/12] target/arm mte fixes

2021-04-08 Thread Richard Henderson
On 4/8/21 5:47 AM, Peter Maydell wrote: Richard Henderson (12): accel/tcg: Preserve PAGE_ANON when changing page permissions target/arm: Check PAGE_WRITE_ORG for MTE writeability target/arm: Fix mte_checkN target/arm: Split out mte_probe_int target/arm: Fix unaligned checks for mte

Re: [RFC v12 51/65] target/arm: cpu-sve: split TCG and KVM functionality

2021-04-08 Thread Claudio Fontana
On 3/28/21 8:21 PM, Richard Henderson wrote: > On 3/26/21 1:36 PM, Claudio Fontana wrote: >> +++ b/target/arm/kvm/kvm-sve.h >> @@ -0,0 +1,30 @@ >> +/* >> + * QEMU AArch64 CPU SVE KVM interface >> + * >> + * Copyright 2021 SUSE LLC >> + * >> + * This work is licensed under the terms of the GNU GPL,

Re: [RFC v12 07/65] target/arm: tcg: split tlb_helper user-only and sysemu-only parts

2021-04-08 Thread Alex Bennée
Claudio Fontana writes: > Signed-off-by: Claudio Fontana > Reviewed-by: Richard Henderson > +#include "qemu/osdep.h" > +#include "cpu.h" > +#include "internals.h" > +#include "exec/exec-all.h" > +#include "tcg/tlb_helper.h" > + > +bool arm_cpu_tlb_fill(CPUState *cs, vaddr address, int size,

Re: [RFC v12 17/65] target/arm: tcg: add stubs for some helpers for non-tcg builds

2021-04-08 Thread Richard Henderson
On 4/8/21 3:39 AM, Claudio Fontana wrote: On 3/28/21 6:22 PM, Richard Henderson wrote: On 3/26/21 1:36 PM, Claudio Fontana wrote: +int fp_exception_el(CPUARMState *env, int cur_el) +{ +return 0; +} Oh, I'm pretty sure this should be identical with sve_exception_el, where the fpu may or ma

[Bug 1915063] Re: Windows 10 wil not install using qemu-system-x86_64

2021-04-08 Thread Christian Ehrhardt 
David used "5.6.0-1042.46-oem", the closest I had was "5.6.0-1052-oem" so I tried that one. With that my win10 install immediately crashed into the reported issue. So to summarize: 1. I can reproduce it 2. Chances are high that it is fixed by kernel commit 841c2be0 "kvm: x86: replace kvm_spec_ct

Re: [RFC v12 05/65] target/arm: tcg: split mte_helper user-only and sysemu code

2021-04-08 Thread Alex Bennée
Claudio Fontana writes: > allocation_tag_mem has a different implementation for > user-only and sysemu, so move the two implementations into > the dedicated subdirs. > > Signed-off-by: Claudio Fontana > Reviewed-by: Richard Henderson be aware rth has some MTE fixes in flight which will likel

Re: [RFC v12 06/65] target/arm: tcg: move sysemu-only parts of debug_helper

2021-04-08 Thread Alex Bennée
Claudio Fontana writes: > move sysemu-only parts of debug_helper to sysemu/ > > Signed-off-by: Claudio Fontana > Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH] vmstate: Constify some VMStateDescriptions

2021-04-08 Thread Philippe Mathieu-Daudé
On 4/8/21 4:07 PM, Keqian Zhu wrote: > Constify vmstate_ecc_state and vmstate_x86_cpu. > > Signed-off-by: Keqian Zhu > --- > hw/block/ecc.c | 2 +- > include/hw/block/flash.h | 2 +- > target/i386/cpu.h| 2 +- > target/i386/machine.c| 2 +- > 4 files changed, 4 insertions(+

Re: QMP introspecting device props common to a bus type

2021-04-08 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Thu, Apr 08, 2021 at 01:56:28PM +0200, Markus Armbruster wrote: >> Daniel P. Berrangé writes: >> >> > When introspecting properties for devices, libvirt issues a sequence of >> > QMP 'device-list-properties' commands, one for each device type we >> > need info f

Re: [RFC v12 31/65] target/arm: move exception code out of tcg/helper.c

2021-04-08 Thread Richard Henderson
On 4/8/21 3:56 AM, Claudio Fontana wrote: It is a struggle to balance making TCG-only symbols "invisible" to kvm-builds, so one developing for KVM only can forget about them, and keeping TCG things contained, and on the other side opening up the ability to use tcg_enabled(), which requires tho

[Bug 1915063] Status changed to Confirmed

2021-04-08 Thread Ubuntu Kernel Bot
This change was made by a bot. ** Changed in: linux (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1915063 Title: Windows 10 wil not install using qemu-syst

qemu-img convert rbd volumes between different ceph clusters accelerate

2021-04-08 Thread 李明钊
Dear engineers: Is there an elegant way to copy an RBD volume to another Ceph cluster? I calculate the convert time with qemu-img 2.5 version or qemu-img 6.0 version, by copying a volume(capability is 2.5T and 18G only used) to another Ceph cluster. qemu-img [2.5 or 6.0] convert -p -f raw rb

Re: [PATCH v1 4/8] target/riscv: Remove the hardcoded MSTATUS_SD macro

2021-04-08 Thread Alistair Francis
On Mon, Apr 5, 2021 at 11:10 AM Richard Henderson wrote: > > On 4/2/21 1:02 PM, Alistair Francis wrote: > > @@ -369,6 +369,9 @@ static void gen_jal(DisasContext *ctx, int rd, > > target_ulong imm) > > static void mark_fs_dirty(DisasContext *ctx) > > { > > TCGv tmp; > > +CPUState *cp

Re: [PATCH v2 01/10] block/nbd: introduce NBDConnectThread reference counter

2021-04-08 Thread Roman Kagan
On Thu, Apr 08, 2021 at 05:08:18PM +0300, Vladimir Sementsov-Ogievskiy wrote: > The structure is shared between NBD BDS and connection thread. And it > is possible the connect thread will finish after closing and releasing > for the bs. To handle this we have a concept of > CONNECT_THREAD_RUNNING_D

Re: [PATCH v2 02/10] block/nbd: BDRVNBDState: drop unused connect_err and connect_status

2021-04-08 Thread Roman Kagan
On Thu, Apr 08, 2021 at 05:08:19PM +0300, Vladimir Sementsov-Ogievskiy wrote: > These fields are write-only. Drop them. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/nbd.c | 12 ++-- > 1 file changed, 2 insertions(+), 10 deletions(-) Reviewed-by: Roman Kagan

Re: [PATCH v2 4/8] qapi/error: Change assertion

2021-04-08 Thread John Snow
On 3/30/21 1:18 PM, John Snow wrote: Realizing now that this commit topic is wrong :) A prior version modified the assertion, I decided it was less churn to simply add one. I think ideally we'd have no assertions here and we'd rely on the type hints, but I don't think I can prove that this i

Re: [RFC PATCH v2 04/11] qemu-iotests: delay QMP socket timers

2021-04-08 Thread Paolo Bonzini
On 07/04/21 15:50, Emanuele Giuseppe Esposito wrote: def get_qmp_events_filtered(self, wait=60.0): result = [] -for ev in self.get_qmp_events(wait=wait): +qmp_wait = wait +if qemu_gdb: +qmp_wait = 0.0 +for ev in self.get_qmp_events(wait=

Re: [RFC PATCH v2 03/11] qemu-iotests: add option to attach gdbserver

2021-04-08 Thread Paolo Bonzini
On 07/04/21 15:50, Emanuele Giuseppe Esposito wrote: +self.gdb_qemu = os.getenv('GDB_QEMU') + +if gdb and not self.gdb_qemu: +self.gdb_qemu = 'localhost:12345' +elif self.gdb_qemu and not gdb: +del self.gdb_qemu +del os.environ['GDB_QEMU

RE: [PATCH v2] i386: Add missing cpu feature bits in EPYC-Rome model

2021-04-08 Thread Babu Moger
> -Original Message- > From: Christian Ehrhardt > Sent: Thursday, April 1, 2021 3:06 AM > To: david.edmond...@oracle.com > Cc: Moger, Babu ; Paolo Bonzini > ; Richard Henderson > ; Eduardo Habkost > ; pankaj.gu...@cloud.ionos.com > Subject: Re: [PATCH v2] i386: Add missing cpu feature b

Re: [PULL 0/6] V2 migration + virtiofsd queue

2021-04-08 Thread Peter Maydell
On Wed, 7 Apr 2021 at 19:02, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > The following changes since commit d0d3dd401b70168a353450e031727affee828527: > > Update version for v6.0.0-rc2 release (2021-04-06 18:34:34 +0100) > > are available in the Git repository at:

Re: [PATCH v2 03/10] util/async: aio_co_enter(): do aio_co_schedule in general case

2021-04-08 Thread Roman Kagan
On Thu, Apr 08, 2021 at 05:08:20PM +0300, Vladimir Sementsov-Ogievskiy wrote: > With the following patch we want to call aio_co_wake() from thread. > And it works bad. > Assume we have no iothreads. > Assume we have a coroutine A, which waits in the yield point for external > aio_co_wake(), and no

Re: [RFC v12 05/65] target/arm: tcg: split mte_helper user-only and sysemu code

2021-04-08 Thread Claudio Fontana
On 4/8/21 4:41 PM, Alex Bennée wrote: > > Claudio Fontana writes: > >> allocation_tag_mem has a different implementation for >> user-only and sysemu, so move the two implementations into >> the dedicated subdirs. >> >> Signed-off-by: Claudio Fontana >> Reviewed-by: Richard Henderson > > be aw

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

2021-04-08 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

[PATCH 3/5] blkdebug: track all actions

2021-04-08 Thread Emanuele Giuseppe Esposito
Add a counter for each action that a rule can trigger. This is mainly used to keep track of how many coroutine_yeld() we need to perform after processing all rules in the list. Co-developed-by: Paolo Bonzini Signed-off-by: Emanuele Giuseppe Esposito --- block/blkdebug.c | 17 -

[PATCH 1/5] blkdebug: refactor removal of a suspended request

2021-04-08 Thread Emanuele Giuseppe Esposito
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 is removed. Instead, just walk the entire list from the beginning when asked to resume all suspended requests with a given tag. Co-developed-by: Paolo Bonzini

[PATCH 5/5] blkdebug: protect rules and suspended_reqs with a lock

2021-04-08 Thread Emanuele Giuseppe Esposito
Co-developed-by: Paolo Bonzini Signed-off-by: Emanuele Giuseppe Esposito --- block/blkdebug.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index dffd869b32..e92a35ccbb 100644 --- a/block/blkdebug.c +++ b/

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

2021-04-08 Thread Emanuele Giuseppe Esposito
Use actions_count to see how many yeld to issue. Co-developed-by: Paolo Bonzini Signed-off-by: Emanuele Giuseppe Esposito --- block/blkdebug.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index 388b5ed615..dffd869b32 100644 --- a/

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

2021-04-08 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: [RFC PATCH v2 03/11] qemu-iotests: add option to attach gdbserver

2021-04-08 Thread Emanuele Giuseppe Esposito
On 08/04/2021 17:40, Paolo Bonzini wrote: On 07/04/21 15:50, Emanuele Giuseppe Esposito wrote: +    self.gdb_qemu = os.getenv('GDB_QEMU') + +    if gdb and not self.gdb_qemu: +    self.gdb_qemu = 'localhost:12345' +    elif self.gdb_qemu and not gdb: +    del self.

Re: [PATCH] libqtest: refuse QTEST_QEMU_BINARY=qemu-kvm

2021-04-08 Thread Stefan Hajnoczi
On Thu, Apr 08, 2021 at 12:37:36PM +0200, Laurent Vivier wrote: > On 07/04/2021 12:45, Stefan Hajnoczi wrote: > > Some downstreams rename the QEMU binary to "qemu-kvm". This breaks > > qtest_get_arch(), which attempts to parse the target architecture from > > the QTEST_QEMU_BINARY environment varia

Re: [PATCH v2 04/10] block/nbd: simplify waking of nbd_co_establish_connection()

2021-04-08 Thread Roman Kagan
On Thu, Apr 08, 2021 at 05:08:21PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Instead of connect_bh, bh_ctx and wait_connect fields we can live with > only one link to waiting coroutine, protected by mutex. > > So new logic is: > > nbd_co_establish_connection() sets wait_co under mutex, release

Re: [RFC PATCH v2 04/11] qemu-iotests: delay QMP socket timers

2021-04-08 Thread Emanuele Giuseppe Esposito
On 08/04/2021 17:40, Paolo Bonzini wrote: On 07/04/21 15:50, Emanuele Giuseppe Esposito wrote:   def get_qmp_events_filtered(self, wait=60.0):   result = [] -    for ev in self.get_qmp_events(wait=wait): +    qmp_wait = wait +    if qemu_gdb: +    qmp_wait = 0.

[PATCH] target/arm: Make Thumb store insns UNDEF for Rn==1111

2021-04-08 Thread Peter Maydell
The Arm ARM specifies that for Thumb encodings of the various plain store insns, if the Rn field is then we must UNDEF. This is different from the Arm encodings, where this case is either UNPREDICTABLE or has well-defined behaviour. The exclusive stores, store-release and STRD do not have th

Re: [Virtio-fs] Live migration support for virtio-fs

2021-04-08 Thread Stefan Hajnoczi
On Wed, Apr 07, 2021 at 06:05:29PM +, Ge, Xiongzi wrote: > Thanks Dr Gilbert, Vivek, Stefan, Greg! > I put together the discussion into this thread and CC qemu-devel@nongnu.org. > > Problem: > Current Virtio-FS does not support live migration. Even when the virtiofs > directory is not mount

[PATCH for-6.0? 3/3] iotests/041: block-job-complete on user-paused job

2021-04-08 Thread Max Reitz
Expand test_pause() to check what happens when issuing block-job-complete on a job that is on STANDBY because it has been paused by the user. (This should be an error, and in particular not hang job_wait_unpaused().) Signed-off-by: Max Reitz --- tests/qemu-iotests/041 | 13 - 1 file

[PATCH for-6.0? 1/3] job: Add job_wait_unpaused() for block-job-complete

2021-04-08 Thread Max Reitz
block-job-complete can only be applied when the job is READY, not when it is on STANDBY (ready, but paused). Draining a job technically pauses it (which makes a READY job enter STANDBY), and ending the drained section does not synchronously resume it, but only schedules the job, which will then be

Re: [PATCH v1 1/1] s390x: css: report errors from ccw_dstream_read/write

2021-04-08 Thread Pierre Morel
On 4/8/21 3:23 PM, Cornelia Huck wrote: On Thu, 8 Apr 2021 14:32:11 +0200 Pierre Morel wrote: On 4/8/21 11:02 AM, Cornelia Huck wrote: On Wed, 7 Apr 2021 19:47:11 +0200 Halil Pasic wrote: So this begs the question, do we need this fixed for old releases as well? My answer is yes we

[PATCH for-6.0? 2/3] test-blockjob: Test job_wait_unpaused()

2021-04-08 Thread Max Reitz
Create a job that remains on STANDBY after a drained section, and see that invoking job_wait_unpaused() will get it unstuck. Signed-off-by: Max Reitz --- tests/unit/test-blockjob.c | 140 + 1 file changed, 140 insertions(+) diff --git a/tests/unit/test-blockj

[PATCH for-6.0? 0/3] job: Add job_wait_unpaused() for block-job-complete

2021-04-08 Thread Max Reitz
Hi, See patch 1 for a detailed explanation of the problem. The gist is: Draining a READY job makes it transition to STANDBY, and jobs on STANDBY cannot be completed. Ending the drained section will schedule the job (so it is then resumed), but not wait until it is actually running again. Theref

[PATCH v2 1/1] s390x: css: report errors from ccw_dstream_read/write

2021-04-08 Thread Pierre Morel
ccw_dstream_read/write functions returned values are sometime not taking into account and reported back to the upper level of interpretation of CCW instructions. It follows that accessing an invalid address does not trigger a subchannel status program check to the guest as it should. Let's test t

Re: Mac OS real USB device support issue

2021-04-08 Thread Howard Spoelstra
On Thu, Apr 8, 2021 at 1:05 PM Gerd Hoffmann wrote: > > Hi, > > > > Those might be a good place to start. IOKit provides the drivers and > > > also the io registry which is probably where you can get if a driver > > > is bound to a device and which one is it. How to dissociate the > > > driver f

[PATCH v2 0/1] s390x: css: report errors from ccw_dstream_read/write

2021-04-08 Thread Pierre Morel
By checking the results of errors on SSCH in the kvm-unit-tests We noticed that no error was reported when a SSCH is started to access addresses not existing in the guest. For exemple accessing 3G on a guest with 1G memory. If we look at QEMU ccw_dstream_write/write functions we see that they are

Re: [PATCH v2 05/10] block/nbd: drop thr->state

2021-04-08 Thread Roman Kagan
On Thu, Apr 08, 2021 at 05:08:22PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Actually, the only bit of information we need is "is thread running or > not". We don't need all these states. So, instead of thr->state add > boolean variable thr->running and refactor the code. There's certain redund

[RFC PATCH] scripts/checkpatch: fix uninitialised value check

2021-04-08 Thread Alex Bennée
This was starting to show up in the check-patch test on gitlab. Fixes: d2f1af0e41 ("checkpatch: don't emit warning on newly created acpi data files") Signed-off-by: Alex Bennée Cc: Isaku Yamahata Cc: Michael S. Tsirkin --- scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) diff --gi

Re: [PATCH v2 06/10] block/nbd: bs-independent interface for nbd_co_establish_connection()

2021-04-08 Thread Roman Kagan
On Thu, Apr 08, 2021 at 05:08:23PM +0300, Vladimir Sementsov-Ogievskiy wrote: > We are going to split connection code to separate file. Now we are > ready to give nbd_co_establish_connection() clean and bs-independent > interface. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/nbd

Re: [PATCH v2 07/10] block/nbd: make nbd_co_establish_connection_cancel() bs-independent

2021-04-08 Thread Roman Kagan
On Thu, Apr 08, 2021 at 05:08:24PM +0300, Vladimir Sementsov-Ogievskiy wrote: > nbd_co_establish_connection_cancel() actually needs only pointer to > NBDConnectThread. So, make it clean. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block/nbd.c | 16 +++- > 1 file changed,

Re: [RFC PATCH] scripts/checkpatch: fix uninitialised value check

2021-04-08 Thread Peter Maydell
On Thu, 8 Apr 2021 at 17:49, Alex Bennée wrote: > > This was starting to show up in the check-patch test on gitlab. > > Fixes: d2f1af0e41 ("checkpatch: don't emit warning on newly created acpi data > files") > Signed-off-by: Alex Bennée > Cc: Isaku Yamahata > Cc: Michael S. Tsirkin > --- > sc

Re: [PATCH v2 08/10] block/nbd: rename NBDConnectThread to NBDClientConnection

2021-04-08 Thread Roman Kagan
On Thu, Apr 08, 2021 at 05:08:25PM +0300, Vladimir Sementsov-Ogievskiy wrote: > We are going to move connection code to own file and want clear names > and APIs. > > The structure is shared between user and (possibly) several runs of > connect-thread. So it's wrong to call it "thread". Let's renam

Re: [PATCH for-6.0? 1/3] job: Add job_wait_unpaused() for block-job-complete

2021-04-08 Thread John Snow
On 4/8/21 12:20 PM, Max Reitz wrote: block-job-complete can only be applied when the job is READY, not when it is on STANDBY (ready, but paused). Draining a job technically pauses it (which makes a READY job enter STANDBY), and ending the drained section does not synchronously resume it, but onl

Re: [PATCH v2 09/10] block/nbd: introduce nbd_client_connection_new()

2021-04-08 Thread Roman Kagan
On Thu, Apr 08, 2021 at 05:08:26PM +0300, Vladimir Sementsov-Ogievskiy wrote: > This is the last step of creating bs-independing nbd connection s/independing/independent/ > interface. With next commit we can finally move it to separate file. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > ---

Re: [PATCH for-6.0? 1/3] job: Add job_wait_unpaused() for block-job-complete

2021-04-08 Thread Vladimir Sementsov-Ogievskiy
08.04.2021 19:20, Max Reitz wrote: block-job-complete can only be applied when the job is READY, not when it is on STANDBY (ready, but paused). Draining a job technically pauses it (which makes a READY job enter STANDBY), and ending the drained section does not synchronously resume it, but only

[Bug 1922887] Re: STR in Thumb 32 decode problem

2021-04-08 Thread Peter Maydell
Patch sent to list: if you could test it against whatever your test case was that would be helpful. https://patchew.org/QEMU/20210408162402.5822-1-peter.mayd...@linaro.org/ PS: out of interest, why/how were you checking should-UNDEF cases ? ** Changed in: qemu Status: New => In Progress

Re: [PATCH for-6.0? 1/3] job: Add job_wait_unpaused() for block-job-complete

2021-04-08 Thread John Snow
On 4/8/21 12:58 PM, Vladimir Sementsov-Ogievskiy wrote: job-complete command is async. Can we instead just add a boolean like job->completion_requested, and set it if job-complete called in STANDBY state, and on job_resume job_complete will be called automatically if this boolean is true? job

Re: [PATCH v2 10/10] nbd: move connection code from block/nbd to nbd/client-connection

2021-04-08 Thread Roman Kagan
On Thu, Apr 08, 2021 at 05:08:27PM +0300, Vladimir Sementsov-Ogievskiy wrote: > We now have bs-independent connection API, which consists of four > functions: > > nbd_client_connection_new() > nbd_client_connection_unref() > nbd_co_establish_connection() > nbd_co_establish_connection_cance

Re: [PATCH v2 10/10] nbd: move connection code from block/nbd to nbd/client-connection

2021-04-08 Thread Vladimir Sementsov-Ogievskiy
08.04.2021 20:04, Roman Kagan wrote: On Thu, Apr 08, 2021 at 05:08:27PM +0300, Vladimir Sementsov-Ogievskiy wrote: We now have bs-independent connection API, which consists of four functions: nbd_client_connection_new() nbd_client_connection_unref() nbd_co_establish_connection() nbd

Re: [PATCH for-6.0? 0/3] job: Add job_wait_unpaused() for block-job-complete

2021-04-08 Thread John Snow
On 4/8/21 12:20 PM, Max Reitz wrote: Hi, See patch 1 for a detailed explanation of the problem. The gist is: Draining a READY job makes it transition to STANDBY, and jobs on STANDBY cannot be completed. Ending the drained section will schedule the job (so it is then resumed), but not wait unti

Re: [PATCH v2 00/10] block/nbd: move connection code to separate file

2021-04-08 Thread Roman Kagan
On Thu, Apr 08, 2021 at 05:08:17PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > This substitutes "[PATCH 00/14] nbd: move reconnect-thread to separate file" > Supersedes: <20210407104637.36033-1-vsement...@virtuozzo.com> > > I want to simplify block/nbd.c which is overcomplicated now.

[PATCH v2] Revert "target/mips: Deprecate nanoMIPS ISA"

2021-04-08 Thread Aleksandar Rikalo
NanoMIPS ISA is supported again, since MediaTek is taking over nanoMIPS toolchain development (confirmed at https://www.spinics.net/linux/fedora/libvir/msg217107.html). New release of the toolchain can be found at (https://github.com/MediaTek-Labs/nanomips-gnu-toolchain/releases/tag/nanoMIPS-2021.

Re: [PATCH for-6.0? 1/3] job: Add job_wait_unpaused() for block-job-complete

2021-04-08 Thread Vladimir Sementsov-Ogievskiy
08.04.2021 20:04, John Snow wrote: On 4/8/21 12:58 PM, Vladimir Sementsov-Ogievskiy wrote: job-complete command is async. Can we instead just add a boolean like job->completion_requested, and set it if job-complete called in STANDBY state, and on job_resume job_complete will be called automati

Re: [RFC v12 08/65] target/arm: tcg: split m_helper user-only and sysemu-only parts

2021-04-08 Thread Alex Bennée
Claudio Fontana writes: > in the process remove a few CONFIG_TCG that are superfluous now. > > Signed-off-by: Claudio Fontana > Reviewed-by: Richard Henderson > --- > target/arm/tcg/m_helper.h | 21 + > target/arm/tcg/m_helper.c | 2766 + > targe

[PATCH] hw/block/nvme: map prp fix if prp2 contains non-zero offset

2021-04-08 Thread Padmakar Kalghatgi
From: padmakar nvme_map_prp needs to calculate the number of list entries based on the offset value. For the subsequent PRP2 list, need to ensure the number of entries is within the MAX number of PRP entries for a page. Signed-off-by: Padmakar Kalghatgi --- hw/block/nvme.c | 12 +--- 1

RE: [PATCH v4 00/22] ppc: qemu: Add eTSEC support

2021-04-08 Thread Priyanka Jain
>-Original Message- >From: Bin Meng >Sent: Tuesday, April 6, 2021 2:18 PM >To: Priyanka Jain ; Ramon Fried >; Simon Glass ; U-Boot Mailing List > >Cc: Tom Rini ; Vladimir Oltean ; >qemu-devel@nongnu.org Developers ; qemu-ppc > >Subject: Re: [PATCH v4 00/22] ppc: qemu: Add eTSEC support >

Re: [PATCH] checkpatch: Fix use of uninitialized value

2021-04-08 Thread Isaku Yamahata
How about initializing them explicitly as follows? ($realfile ne '') prevents the case realfile eq '' && acpi_testexpted eq ''. Anyway your patch also should fix it. So Reviewed-by: Isaku Yamahata diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 8f7053ec9b..2eb894a628 100755 --

Re: [PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-04-08 Thread David Hildenbrand
On 08.04.21 16:18, Catalin Marinas wrote: On Wed, Apr 07, 2021 at 04:52:54PM +0100, Steven Price wrote: On 07/04/2021 16:14, Catalin Marinas wrote: On Wed, Apr 07, 2021 at 11:20:18AM +0100, Steven Price wrote: On 31/03/2021 19:43, Catalin Marinas wrote: When a slot is added by the VMM, if it

Re: [PATCH v2] Revert "target/mips: Deprecate nanoMIPS ISA"

2021-04-08 Thread Richard Henderson
On 4/8/21 10:01 AM, Aleksandar Rikalo wrote: NanoMIPS ISA is supported again, since MediaTek is taking over nanoMIPS toolchain development (confirmed at https://www.spinics.net/linux/fedora/libvir/msg217107.html ). New release of the

Re: [PATCH v10 2/6] arm64: kvm: Introduce MTE VM feature

2021-04-08 Thread Catalin Marinas
On Thu, Apr 08, 2021 at 08:16:17PM +0200, David Hildenbrand wrote: > On 08.04.21 16:18, Catalin Marinas wrote: > > On Wed, Apr 07, 2021 at 04:52:54PM +0100, Steven Price wrote: > > > On 07/04/2021 16:14, Catalin Marinas wrote: > > > > On Wed, Apr 07, 2021 at 11:20:18AM +0100, Steven Price wrote: >

Re: [PATCH] vmstate: Constify some VMStateDescriptions

2021-04-08 Thread Richard Henderson
On 4/8/21 7:07 AM, Keqian Zhu wrote: Constify vmstate_ecc_state and vmstate_x86_cpu. Signed-off-by: Keqian Zhu --- hw/block/ecc.c | 2 +- include/hw/block/flash.h | 2 +- target/i386/cpu.h| 2 +- target/i386/machine.c| 2 +- 4 files changed, 4 insertions(+), 4 deletio

Re: [PATCH v1 4/8] target/riscv: Remove the hardcoded MSTATUS_SD macro

2021-04-08 Thread Richard Henderson
On 4/8/21 8:20 AM, Alistair Francis wrote: target_ulong sd = is_32bit(ctx) ? MSTATUS32_SD : MSTATUS64_SD; It turns out clang doesn't like this, so I might still be stuck with ifdefs. I think we need #ifdef TARGET_RISCV32 #define is_32bit(ctx) true #else ... #endif based on $ cat z.c

Re: [PATCH] target/arm: Make Thumb store insns UNDEF for Rn==1111

2021-04-08 Thread Richard Henderson
On 4/8/21 9:24 AM, Peter Maydell wrote: The Arm ARM specifies that for Thumb encodings of the various plain store insns, if the Rn field is then we must UNDEF. This is different from the Arm encodings, where this case is either UNPREDICTABLE or has well-defined behaviour. The exclusive sto

Re: [RFC PATCH v2 04/11] qemu-iotests: delay QMP socket timers

2021-04-08 Thread Paolo Bonzini
Il gio 8 apr 2021, 18:06 Emanuele Giuseppe Esposito ha scritto: > > > On 08/04/2021 17:40, Paolo Bonzini wrote: > > On 07/04/21 15:50, Emanuele Giuseppe Esposito wrote: > >> def get_qmp_events_filtered(self, wait=60.0): > >> result = [] > >> -for ev in self.get_qmp_events(

Re: [PATCH v3 02/26] Hexagon (target/hexagon) cleanup gen_log_predicated_reg_write_pair

2021-04-08 Thread Richard Henderson
On 4/7/21 6:57 PM, Taylor Simpson wrote: Similar to previous cleanup of gen_log_predicated_reg_write Signed-off-by: Taylor Simpson --- target/hexagon/genptr.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v3 13/26] Hexagon (target/hexagon) cleanup ternary operators in semantics

2021-04-08 Thread Richard Henderson
On 4/7/21 6:57 PM, Taylor Simpson wrote: Change (cond ? (res = x) : (res = y)) to res = (cond ? x : y) This makes the semnatics easier to for idef-parser to deal with The following instructions are impacted C2_any8 C2_all8 C2_mux C2_muxii C2_muxir C2_muxri Signed

Re: [PATCH v3 14/26] Hexagon (target/hexagon) cleanup reg_field_info definition

2021-04-08 Thread Richard Henderson
On 4/7/21 6:57 PM, Taylor Simpson wrote: Include size in declaration Remove {0, 0} entry Suggested-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/reg_fields.c | 3 +-- target/hexagon/reg_fields.h | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) Reviewed-by

Re: [PATCH v3 15/26] Hexagon (target/hexagon) move QEMU_GENERATE to only be on during macros.h

2021-04-08 Thread Richard Henderson
On 4/7/21 6:57 PM, Taylor Simpson wrote: Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Taylor Simpson --- target/hexagon/genptr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH] hw/block/nvme: map prp fix if prp2 contains non-zero offset

2021-04-08 Thread Klaus Jensen
On Apr 8 21:53, Padmakar Kalghatgi wrote: From: padmakar nvme_map_prp needs to calculate the number of list entries based on the offset value. For the subsequent PRP2 list, need to ensure the number of entries is within the MAX number of PRP entries for a page. Signed-off-by: Padmakar Kalghat

<    1   2   3   4   >