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 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

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: [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 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

[PATCH v2 4/7] tests/acceptance: Tagging tests with "cpu:VALUE"

2021-04-08 Thread Wainer dos Santos Moschetta
The existing tests which are passing "-cpu VALUE" argument to the vm object are now properly "cpu:VALUE" tagged, so letting the avocado_qemu framework to handle that automatically. Signed-off-by: Wainer dos Santos Moschetta --- tests/acceptance/boot_linux_console.py | 16 +---

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 > --- >

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?

[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

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

Re: Mac OS real USB device support issue

2021-04-08 Thread Programmingkid
> On Apr 8, 2021, at 7:05 AM, 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 from

Re: Mac OS real USB device support issue

2021-04-08 Thread Programmingkid
> On Apr 8, 2021, at 12:40 PM, Howard Spoelstra wrote: > > 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

[PATCH] vhost-user-fs: fix features handling

2021-04-08 Thread Anton Kuchin
Make virtio-fs take into account server capabilities. Just returning requested features assumes they all of then are implemented by server and results in setting unsupported configuration if some of them are absent. Signed-off-by: Anton Kuchin --- hw/virtio/vhost-user-fs.c | 17

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

[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

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

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

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()

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: [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

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,

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

[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: [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 + >

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

[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 +---

Re: [PATCH v3 22/26] Hexagon (target/hexagon) circular addressing

2021-04-08 Thread Richard Henderson
On 4/7/21 6:57 PM, Taylor Simpson wrote: +static inline TCGv gen_read_ireg(TCGv result, TCGv val, int shift) +{ +/* + * Section 2.2.4 of the Hexagon V67 Programmer's Reference Manual + * + * The "I" value from a modifier register is divided into two pieces + * LSB

[PATCH v2 6/7] tests/acceptance: Add set_vm_arg() to the Test class

2021-04-08 Thread Wainer dos Santos Moschetta
The set_vm_arg method is added to avocado_qemu.Test class on this change. Use that method to set (or replace) an argument to the list of arguments given to the QEMU binary. Suggested-by: Cleber Rosa Signed-off-by: Wainer dos Santos Moschetta --- tests/acceptance/avocado_qemu/__init__.py | 16

[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

[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

[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 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

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

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

Re: [PATCH v3 19/26] Hexagon (target/hexagon) add A5_ACS (vacsh)

2021-04-08 Thread Richard Henderson
On 4/7/21 6:57 PM, Taylor Simpson wrote: Rxx32,Pe4 = vacsh(Rss32, Rtt32) Add compare and select elements of two vectors Test cases in tests/tcg/hexagon/multi_result.c Signed-off-by: Taylor Simpson --- target/hexagon/gen_tcg.h | 5 +++ target/hexagon/helper.h

[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 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

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

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

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

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 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 =

[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

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

[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

[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.

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 > --- >

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 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: [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

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

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 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(-)

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 v3 16/26] Hexagon (target/hexagon) compile all debug code

2021-04-08 Thread Richard Henderson
On 4/7/21 6:57 PM, Taylor Simpson wrote: Change #if HEX_DEBUG to if (HEX_DEBUG) so that the debug code doesn't bit rot. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Taylor Simpson --- target/hexagon/genptr.c| 72 ++-- target/hexagon/helper.h

[PATCH 1/2] hw/block/nvme: store aiocb in compare

2021-04-08 Thread Klaus Jensen
From: Klaus Jensen nvme_compare() fails to store the aiocb from the blk_aio_preadv() call. Fix this. Fixes: 0a384f923f51 ("hw/block/nvme: add compare command") Cc: Gollu Appalanaidu Signed-off-by: Klaus Jensen --- hw/block/nvme.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[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 +++

[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 ---

[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

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

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() >

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

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

[PATCH 2/2] hw/block/nvme: drain namespaces on sq deletion

2021-04-08 Thread Klaus Jensen
From: Klaus Jensen For most commands, when issuing an AIO, the BlockAIOCB is stored in the NvmeRequest aiocb pointer when the AIO is issued. The main use of this is cancelling AIOs when deleting submission queues (it is currently not used for Abort). However, some commands like Dataset

[RFC PATCH 1/5] channel-socket: Only set CLOEXEC if we have space for fds

2021-04-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" MSG_CMSG_CLOEXEC cleans up received fd's; it's really only for Unix sockets, but currently we enable it for everything; some socket types (IP_MPTCP) don't like this. Only enable it when we're giving the recvmsg room to receive fd's anyway. Signed-off-by: Dr.

Re: [RFC PATCH v2 01/11] python: qemu: add timer parameter for qmp.accept socket

2021-04-08 Thread John Snow
On 4/7/21 9:50 AM, Emanuele Giuseppe Esposito wrote: Extend the _post_launch function to include the timer as parameter instead of defaulting to 15 sec. Signed-off-by: Emanuele Giuseppe Esposito --- python/qemu/machine.py | 4 ++-- python/qemu/qtest.py | 4 ++-- 2 files changed, 4

Re: [RFC PATCH v2 02/11] python: qemu: pass the wrapper field from QEMUQtestmachine to QEMUMachine

2021-04-08 Thread John Snow
On 4/7/21 9:50 AM, Emanuele Giuseppe Esposito wrote: Signed-off-by: Emanuele Giuseppe Esposito --- python/qemu/machine.py | 2 +- python/qemu/qtest.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/python/qemu/machine.py b/python/qemu/machine.py index

[RFC PATCH 0/5] mptcp support

2021-04-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This RFC set adds support for multipath TCP (mptcp), in particular on the migration path - but should be extensible to other users. Multipath-tcp is a bit like bonding, but at L3; you can use it to handle failure, but can also use it to split traffic

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

2021-04-08 Thread Eduardo Habkost
On Thu, Apr 08, 2021 at 10:28:21AM -0500, Babu Moger wrote: > > > > -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 > > ;

Re: [PATCH 2/3] vhost-blk: Add vhost-blk-common abstraction

2021-04-08 Thread Raphael Norwitz
I'm mostly happy with this. Just some asks on variable renaming and comments which need to be fixed because of how you've moved things around. Also let's add a MAINTAINERS entry vhost-blk-common.h/c either under vhost-user-blk or create a new vhost-blk entry. I'm not sure what the best practices

[PATCH v4 22/26] Hexagon (target/hexagon) circular addressing

2021-04-08 Thread Taylor Simpson
The following instructions are added L2_loadrub_pci Rd32 = memub(Rx32++#s4:0:circ(Mu2)) L2_loadrb_pci Rd32 = memb(Rx32++#s4:0:circ(Mu2)) L2_loadruh_pci Rd32 = memuh(Rx32++#s4:1:circ(Mu2)) L2_loadrh_pci Rd32 = memh(Rx32++#s4:1:circ(Mu2))

[PATCH v4 21/26] Hexagon (target/hexagon) add A4_addp_c/A4_subp_c

2021-04-08 Thread Taylor Simpson
Rdd32 = add(Rss32, Rtt32, Px4):carry Add with carry Rdd32 = sub(Rss32, Rtt32, Px4):carry Sub with carry Test cases in tests/tcg/hexagon/multi_result.c Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/gen_tcg.h | 37

Re: [PATCH-for-6.0?] hw/arm/imx25_pdk: Fix error message for invalid RAM size

2021-04-08 Thread Igor Mammedov
On Thu, 8 Apr 2021 00:56:08 +0200 Philippe Mathieu-Daudé wrote: > The i.MX25 PDK board has 2 banks for SDRAM, each can > address up to 256 MiB. So the total RAM usable for this > board is 512M. When we ask for more we get a misleading > error message: > > $ qemu-system-arm -M imx25-pdk -m

[PATCH v2 7/7] tests/acceptance: Handle cpu tag on x86_cpu_model_versions tests

2021-04-08 Thread Wainer dos Santos Moschetta
Some test cases on x86_cpu_model_versions.py are corner cases because they need to pass extra options to the -cpu argument. Once the avocado_qemu framework will set -cpu automatically, the value should be reset. This changed those tests so to call set_vm_arg() to overwrite the -cpu value.

[RFC PATCH 3/5] migration: Add cleanup hook for inwards migration

2021-04-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a cleanup hook for incoming migration that gets called at the end as a way for a transport to allow cleanup. Signed-off-by: Dr. David Alan Gilbert --- migration/migration.c | 3 +++ migration/migration.h | 4 2 files changed, 7 insertions(+) diff --git

[RFC PATCH 4/5] migration/socket: Close the listener at the end

2021-04-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Delay closing the listener until the cleanup hook at the end; mptcp needs the listener to stay open while the other paths come in. Signed-off-by: Dr. David Alan Gilbert --- migration/multifd.c | 5 + migration/socket.c | 24 ++-- 2

[PATCH v4 24/26] Hexagon (target/hexagon) load and unpack bytes instructions

2021-04-08 Thread Taylor Simpson
The following instructions are added L2_loadbzw2_io Rd32 = memubh(Rs32+#s11:1) L2_loadbzw4_io Rdd32 = memubh(Rs32+#s11:1) L2_loadbsw2_io Rd32 = membh(Rs32+#s11:1) L2_loadbsw4_io Rdd32 = membh(Rs32+#s11:1) L4_loadbzw2_ur Rd32 =

[PATCH v4 04/26] Hexagon (target/hexagon) use env_archcpu and env_cpu

2021-04-08 Thread Taylor Simpson
Remove hexagon_env_get_cpu and replace with env_archcpu Replace CPU(hexagon_env_get_cpu(env)) with env_cpu(env) Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson --- linux-user/hexagon/cpu_loop.c | 2 +- target/hexagon/cpu.c | 4 ++--

[PATCH v4 16/26] Hexagon (target/hexagon) compile all debug code

2021-04-08 Thread Taylor Simpson
Change #if HEX_DEBUG to if (HEX_DEBUG) so the debug code doesn't bit rot Suggested-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/genptr.c| 72 ++-- target/hexagon/helper.h| 2 --

[PATCH v4 20/26] Hexagon (target/hexagon) add A6_vminub_RdP

2021-04-08 Thread Taylor Simpson
Rdd32,Pe4 = vminub(Rtt32, Rss32) Vector min of bytes Test cases in tests/tcg/hexagon/multi_result.c Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/gen_tcg.h | 27 +++ target/hexagon/genptr.c | 22

[PATCH v4 18/26] Hexagon (target/hexagon) add F2_sfinvsqrta

2021-04-08 Thread Taylor Simpson
Rd32,Pe4 = sfinvsqrta(Rs32) Square root approx The helper packs the 2 32-bit results into a 64-bit value, and the fGEN_TCG override unpacks them into the proper results. Test cases in tests/tcg/hexagon/multi_result.c FP exception tests added to tests/tcg/hexagon/fpstuff.c Reviewed-by:

[PATCH v2 2/7] tests/acceptance: Fix mismatch on cpu tagged tests

2021-04-08 Thread Wainer dos Santos Moschetta
There are test cases on machine_mips_malta.py and tcg_plugins.py files where the cpu tag does not correspond to the value actually given to the QEMU binary. This fixed those tests tags. Signed-off-by: Wainer dos Santos Moschetta --- tests/acceptance/machine_mips_malta.py | 6 +++---

[PATCH v2 3/7] tests/acceptance: Let the framework handle "cpu:VALUE" tagged tests

2021-04-08 Thread Wainer dos Santos Moschetta
The tests that are already tagged with "cpu:VALUE" don't need to add "-cpu VALUE" to the list of arguments of the vm object because the avocado_qemu framework is able to handle it automatically. Signed-off-by: Wainer dos Santos Moschetta --- tests/acceptance/boot_linux.py | 3 ---

[PATCH v2 0/7] tests/acceptance: Handle tests with "cpu" tag

2021-04-08 Thread Wainer dos Santos Moschetta
Currently the acceptance tests tagged with "machine" have the "-M TYPE" automatically added to the list of arguments of the QEMUMachine object. In other words, that option is passed to the launched QEMU. On this series it is implemented the same feature but instead for tests marked with "cpu".

[PATCH v2 1/7] tests/acceptance: Automatic set -cpu to the test vm

2021-04-08 Thread Wainer dos Santos Moschetta
This introduces a new feature to the functional tests: automatic setting of the '-cpu VALUE' option to the created vm if the test is tagged with 'cpu:VALUE'. The 'cpu' property is made available to the test object as well. For example, for a simple test as: def test(self): """

[RFC PATCH 2/5] io/net-listener: Call the notifier during finalize

2021-04-08 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Call the notifier during finalize; it's currently only called if we change it, which is not the intent. Signed-off-by: Dr. David Alan Gilbert --- io/net-listener.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/io/net-listener.c b/io/net-listener.c index

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

2021-04-08 Thread Keith Busch
On Thu, Apr 08, 2021 at 09:53:13PM +0530, Padmakar Kalghatgi wrote: > +/* > + * The first PRP list entry, pointed by PRP2 can contain > + * offsets. Hence, we need calculate the no of entries in > + * prp2 based on the offset it has. > +

[PATCH v4 07/26] Hexagon (target/hexagon) change variables from int to bool when appropriate

2021-04-08 Thread Taylor Simpson
Suggested-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/cpu_bits.h | 2 +- target/hexagon/decode.c| 80 +++--- target/hexagon/insn.h | 21 ++--

[PATCH v4 00/26] Hexagon (target/hexagon) update

2021-04-08 Thread Taylor Simpson
This patch series is a significant update for the Hexagon target The first 16 patches address feedback from Richard Henderson and Philippe Mathieu-Daud� The next 10 patches add the remaining instructions for the Hexagon scalar core The patches are logically independent but are

[PATCH v4 01/26] Hexagon (target/hexagon) TCG generation cleanup

2021-04-08 Thread Taylor Simpson
Simplify TCG generation of hex_reg_written Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/genptr.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/target/hexagon/genptr.c

[PATCH v4 26/26] Hexagon (target/hexagon) CABAC decode bin

2021-04-08 Thread Taylor Simpson
The following instruction is added S2_cabacdecbinRdd32=decbin(Rss32,Rtt32) Test cases added to tests/tcg/hexagon/misc.c Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/arch.c | 91 +++

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

2021-04-08 Thread Taylor Simpson
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 Reviewed-by: Richard Henderson Signed-off-by: Taylor

[PATCH v4 23/26] Hexagon (target/hexagon) bit reverse (brev) addressing

2021-04-08 Thread Taylor Simpson
The following instructions are added L2_loadrub_pbr Rd32 = memub(Rx32++Mu2:brev) L2_loadrb_pbr Rd32 = memb(Rx32++Mu2:brev) L2_loadruh_pbr Rd32 = memuh(Rx32++Mu2:brev) L2_loadrh_pbr Rd32 = memh(Rx32++Mu2:brev) L2_loadri_pbr Rd32 =

[PATCH v4 05/26] Hexagon (target/hexagon) properly generate TB end for DISAS_NORETURN

2021-04-08 Thread Taylor Simpson
When exiting a TB, generate all the code before returning from hexagon_tr_translate_packet so that nothing needs to be done in hexagon_tr_tb_stop. Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/translate.c | 62

[PATCH v2 5/7] python/qemu: Add args property to the QEMUMachine class

2021-04-08 Thread Wainer dos Santos Moschetta
This added the args property to QEMUMachine so that users of the class can access and handle the list of arguments to be given to the QEMU binary. Signed-off-by: Wainer dos Santos Moschetta --- python/qemu/machine.py | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH v5 3/3] tests/qtest: Add test for Aspeed HACE

2021-04-08 Thread Joel Stanley
This adds a test for the Aspeed Hash and Crypto (HACE) engine. It tests the currently implemented behavior of the hash functionality. The tests are similar, but are cut/pasted instead of broken out into a common function so the assert machinery produces useful output when a test fails.

[PATCH v5 0/3] hw/misc: Model ASPEED hash and crypto engine

2021-04-08 Thread Joel Stanley
This version of the series adds the cleanups Cédric made and the scatter gather feature that Klaus implemented. I took inspiration from Klaus's patches and reworked the direct hashing mode to easier implement both sg and direct modes. The r-b tags are preserved as the changes were minor. I

[PATCH v4 03/26] Hexagon (target/hexagon) remove unnecessary inline directives

2021-04-08 Thread Taylor Simpson
Suggested-by: Richard Henderson Reviewed-by: Richard Henderson Signed-off-by: Taylor Simpson --- target/hexagon/cpu.c | 9 - target/hexagon/decode.c| 6 +++--- target/hexagon/fma_emu.c | 39 --- target/hexagon/op_helper.c | 37

  1   2   3   >