Re: about mirror cancel

2021-04-16 Thread Max Reitz
On 15.04.21 20:46, Vladimir Sementsov-Ogievskiy wrote: Hi all! Recently I've implemented fast-cancelling of mirror job: do bdrv_cancel_in_flight() in mirror_cancel(). Now I'm in doubt: is it a correct thing? I heard, that mirror-cancel is a kind of valid mirror completion.. Looking at docu

Re: about mirror cancel

2021-04-16 Thread Max Reitz
On 16.04.21 09:05, Max Reitz wrote: On 15.04.21 20:46, Vladimir Sementsov-Ogievskiy wrote: [...] Note, that if cancelling all in-flight requests on target is wrong on mirror cancel, we still don't have real bug, as the only implementation of .bdrv_cancel_in_flight is stopping reconnect waiti

Re: [PATCH] plugins/syscall: Added a table-like summary output

2021-04-16 Thread Mahmoud Mandour
On Fri, Apr 16, 2021 at 8:54 AM Mahmoud Mandour wrote: > On Thu, Apr 15, 2021 at 5:20 PM Mahmoud Mandour > wrote: > >> >> Hello. I just realized that this hunk: > > static void vcpu_syscall_ret(qemu_plugin_id_t id, unsigned int vcpu_idx, >> int64_t num, int64_t ret)

[PATCH v2] plugins/syscall: Added a table-like summary output

2021-04-16 Thread Mahmoud Mandour
Added a table-like output which contains the total number of calls for each used syscall along with the number of errors that occurred. Per-call tracing is still available through supplying the argument ``print`` to the plugin. Signed-off-by: Mahmoud Mandour --- v1: https://lists.gnu.org/archive

Re: [PATCH RFC] migration: warn about non-migratable configurations unless '--no-migration' was specified

2021-04-16 Thread Vitaly Kuznetsov
"Dr. David Alan Gilbert" writes: > * Daniel P. Berrangé (berra...@redhat.com) wrote: >> On Thu, Apr 15, 2021 at 05:44:02PM +0200, Vitaly Kuznetsov wrote: >> > When a migration blocker is added nothing is reported to the user, >> > inability to migrate such guest may come as a late surprise. As a

[PATCH 2/2] hw/block/nvme: fix lbaf formats initialization

2021-04-16 Thread Gollu Appalanaidu
Currently LBAF formats are being intialized based on metadata size if and only if nvme-ns "ms" parameter is non-zero value. Since FormatNVM command being supported device parameter "ms" may not be the criteria to initialize the supported LBAFs. Signed-off-by: Gollu Appalanaidu --- hw/block/nvme-

[PATCH 1/2] hw/block/nvme: consider metadata read aio return value in compare

2021-04-16 Thread Gollu Appalanaidu
Currently in compare command metadata aio read blk_aio_preadv return value ignored, consider it and complete the block accounting. Signed-off-by: Gollu Appalanaidu --- hw/block/nvme.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 624a143

Re: about mirror cancel

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
16.04.2021 10:11, Max Reitz wrote: On 16.04.21 09:05, Max Reitz wrote: On 15.04.21 20:46, Vladimir Sementsov-Ogievskiy wrote: [...] Note, that if cancelling all in-flight requests on target is wrong on mirror cancel, we still don't have real bug, as the only implementation of .bdrv_cancel_

[PATCH] pc-bios/s390-ccw: don't try to read the next block if end of chunk is reached

2021-04-16 Thread Marc Hartmayer
Don't read the block if a null block number is reached, because this means that the end of chunk is reached. Reviewed-by: Collin Walling Signed-off-by: Marc Hartmayer --- pc-bios/s390-ccw/bootmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pc-bios/s390-ccw/bootmap.c b/

Re: [EXTERNAL] Re: [PULL 18/23] accel/tcg: re-factor non-RAM execution code

2021-04-16 Thread Cédric Le Goater
On 4/15/21 7:34 PM, Peter Maydell wrote: > On Thu, 15 Apr 2021 at 18:18, Cédric Le Goater wrote: >> >> On 4/15/21 5:55 PM, Philippe Mathieu-Daudé wrote: >>> On 4/15/21 4:54 PM, Peter Maydell wrote: On Thu, 15 Apr 2021 at 15:32, Alex Bennée wrote: > --8<---cut here

Re: [PATCH 00/11] Add support for Blob resources feature

2021-04-16 Thread Gerd Hoffmann
Hi, > > Marc-André has experimental code for a dbus-based UI for qemu. It doesn't > > use pipewire > > as data transport though. At least the first version posted a while ago @ > > qemu-devel > > doesn't. > [Kasireddy, Vivek] What is the main motivation for a new dbus-based UI for > Qemu?

RE: [PATCH v6 09/10] Add the function of colo_bitmap_clear_dirty

2021-04-16 Thread Rao, Lei
Hi, Dave The performance data has added to the commit messages. Do you have any other suggestions? Thanks Lei. -Original Message- From: Rao, Lei Sent: Friday, April 9, 2021 11:21 AM To: Zhang, Chen ; lizhij...@cn.fujitsu.com; jasow...@redhat.com; quint...@redhat.com; dgilb...@redhat.

[Bug 1923861] Re: Hardfault when accessing FPSCR register

2021-04-16 Thread ml-0
Thanks for the fix. I applied it and 1. yes, the hard fault when reading FPSCR is gone. 2. yes, I also see the UNDEF. Note that on the Corstone-300 MPS3-AN547 FVP I can access mvfr0 via vmrs. I changed the vmrs to ldr. Now I can read the registers. The values differ from what the FVP tells me: f

[PATCH v3 01/33] block/nbd: fix channel object leak

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
From: Roman Kagan nbd_free_connect_thread leaks the channel object if it hasn't been stolen. Unref it and fix the leak. Signed-off-by: Roman Kagan --- block/nbd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/nbd.c b/block/nbd.c index 1d4668d42d..739ae2941f 100644 --- a/block/nbd.

[PATCH v3 02/33] block/nbd: fix how state is cleared on nbd_open() failure paths

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
We have two "return error" paths in nbd_open() after nbd_process_options(). Actually we should call nbd_clear_bdrvstate() on these paths. Interesting that nbd_process_options() calls nbd_clear_bdrvstate() by itself. Let's fix leaks and refactor things to be more obvious: - intialize yank at top o

[PATCH v3 00/33] block/nbd: rework client connection

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
The series substitutes "[PATCH v2 00/10] block/nbd: move connection code to separate file" Supersedes: <20210408140827.332915-1-vsement...@virtuozzo.com> so it's called v3 block/nbd.c is overcomplicated. These series is a big refactoring, which finally drops all the complications around drained s

[PATCH v3 06/33] util/async: aio_co_schedule(): support reschedule in same ctx

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
With the following patch we want to call wake coroutine from thread. And it doesn't work with aio_co_wake: 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 ai

[PATCH v3 07/33] block/nbd: simplify waking of nbd_co_establish_connection()

2021-04-16 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 v3 05/33] block/nbd: BDRVNBDState: drop unused connect_err and connect_status

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
These fields are write-only. Drop them. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Roman Kagan --- block/nbd.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 6efa11a185..d67556c7ee 100644 --- a/block/nbd.c +++ b/bl

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

2021-04-16 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 Reviewed-by: Roman Kagan --- block/nbd.c | 49 +++-- 1 file

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

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 43 ++- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 21a4039359..8531d019b2 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -118,7 +118,7 @@ typed

[PATCH v3 03/33] block/nbd: ensure ->connection_thread is always valid

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
From: Roman Kagan Simplify lifetime management of BDRVNBDState->connect_thread by delaying the possible cleanup of it until the BDRVNBDState itself goes away. This also reverts 0267101af6 "block/nbd: fix possible use after free of s->connect_thread" as now s->connect_thread can't be cleared unt

[PATCH v3 08/33] block/nbd: drop thr->state

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
We don't need all these states. The code refactored to use two boolean variables looks simpler. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 125 ++-- 1 file changed, 34 insertions(+), 91 deletions(-) diff --git a/block/nbd.c b/bl

[PATCH v3 12/33] block/nbd: introduce nbd_client_connection_new()

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

[PATCH v3 04/33] block/nbd: nbd_client_handshake(): fix leak of s->ioc

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/nbd.c b/block/nbd.c index 272af60b44..6efa11a185 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -1891,6 +1891,8 @@ static int nbd_client_handshake(BlockDriverState *bs, Error **

[PATCH v3 11/33] block/nbd: rename NBDConnectThread to NBDClientConnection

2021-04-16 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 v3 22/33] block/nbd: pass monitor directly to connection thread

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
monitor_cur() is used by socket_get_fd, but it doesn't work in connection thread. Let's monitor directly to cover this thing. We are going to unify connection establishing path in nbd_open and reconnect, so we should support fd-passing. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/blo

[PATCH v3 27/33] block/nbd: split nbd_co_do_establish_connection out of nbd_reconnect_attempt

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
Split out part, that we want to reuse for nbd_open(). Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 79 +++-- 1 file changed, 41 insertions(+), 38 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 15b5921725..59971bfba8 100

[PATCH v3 10/33] block/nbd: make nbd_co_establish_connection_cancel() bs-independent

2021-04-16 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 Reviewed-by: Roman Kagan --- block/nbd.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/block/nbd.c b/block/

[PATCH v3 24/33] block/nbd: drop BDRVNBDState::sioc

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
Currently sioc pointer is used just to pass from socket-connection to nbd negotiation. Drop the field, and use local variables instead. With next commit we'll update nbd/client-connection.c to behave appropriately (return only top-most ioc, not two channels). Signed-off-by: Vladimir Sementsov-Ogie

[PATCH v3 19/33] block/nbd: split nbd_handle_updated_info out of nbd_client_handshake()

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
To be reused in the following patch. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 99 ++--- 1 file changed, 57 insertions(+), 42 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 5e63caaf4b..03ffe95231 100644 --- a/block/n

[PATCH v3 23/33] block/nbd: nbd_teardown_connection() don't touch s->sioc

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
Negotiation during reconnect is now done in thread, and s->sioc is not available during negotiation. Negotiation in thread will be cancelled by nbd_client_connection_release() called from nbd_clear_bdrvstate(). So, we don't need this code chunk anymore. Signed-off-by: Vladimir Sementsov-Ogievskiy

[PATCH v3 21/33] qemu-socket: pass monitor link to socket_get_fd directly

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
Detecting monitor by current coroutine works bad when we are not in coroutine context. And that's exactly so in nbd reconnect code, where qio_channel_socket_connect_sync() is called from thread. Add a possibility to pass monitor by hand, to be used in the following commit. Signed-off-by: Vladimir

[PATCH v3 28/33] nbd/client-connection: do qio_channel_set_delay(false)

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
nbd_open() does it (through nbd_establish_connection()). Actually we lost that call on reconnect path in 1dc4718d849e1a1fe "block/nbd: use non-blocking connect: fix vm hang on connect()" when we have introduced reconnect thread. Fixes: 1dc4718d849e1a1fe665ce5241ed79048cfa2cfc Signed-off-by: Vladim

[PATCH v3 14/33] nbd: move connection code from block/nbd to nbd/client-connection

2021-04-16 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 v3 26/33] block-coroutine-wrapper: allow non bdrv_ prefix

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
We are going to reuse the script to generate a qcow2_ function in further commit. Prepare the script now. Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/block-coroutine-wrapper.py | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/block-coroutine-wrapper.

[PATCH v3 20/33] block/nbd: use negotiation of NBDClientConnection

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
Use a new possibility of negotiation in connect thread. Now we are on the way of simplifying connection_co. We want to move the whole reconnect code to NBDClientConnection. NBDClientConnection already updated to support negotiation and retry. Use now the first thing. Signed-off-by: Vladimir Sement

[PATCH v3 15/33] nbd/client-connection: use QEMU_LOCK_GUARD

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- nbd/client-connection.c | 94 ++--- 1 file changed, 42 insertions(+), 52 deletions(-) diff --git a/nbd/client-connection.c b/nbd/client-connection.c index 4e39a5b1af..b45a0bd5f6 100644 --- a/nbd/client-connection

Re: [PATCH v3 33/33] block/nbd: drop connection_co

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
16.04.2021 11:14, Vladimir Sementsov-Ogievskiy wrote: 16.04.2021 11:09, Vladimir Sementsov-Ogievskiy wrote: OK, that's a big rewrite of the logic. Pre-patch we have an always running coroutine - connection_co. It does reply receiving and reconnecting. And it leads to a lot of difficult and unob

[PATCH v3 29/33] nbd/client-connection: add option for non-blocking connection attempt

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
We'll need a possibility of non-blocking nbd_co_establish_connection(), so that it returns immediately, and it returns success only if connections was previously established in background. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/nbd.h | 2 +- block/nbd.c | 2

[PATCH v3 16/33] nbd/client-connection: add possibility of negotiation

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
Add arguments and logic to support nbd negotiation in the same thread after successful connection. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/nbd.h | 9 +++- block/nbd.c | 4 +- nbd/client-connection.c | 105 ++-- 3 files

[PATCH v3 30/33] block/nbd: reuse nbd_co_do_establish_connection() in nbd_open()

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
The only last step we need to reuse the function is coroutine-wrapper. nbd_open() may be called from non-coroutine context. So, generate the wrapper and use it. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/coroutines.h | 6 +++ block/nbd.c| 101 ++--

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

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
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 use same NBDClientConnection instance to connect once in nbd_open() and then use retry semantics for reconnect. Signe

[PATCH v3 32/33] block/nbd: safer transition to receiving request

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
req->receiving is a flag of request being in one concrete yield point in nbd_co_do_receive_one_chunk(). Such kind of boolean flag is always better to unset before scheduling the coroutine, to avoid double scheduling. So, let's be more careful. Signed-off-by: Vladimir Sementsov-Ogievskiy --- blo

[PATCH v3 18/33] nbd/client-connection: shutdown connection on release

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
Now, when thread can do negotiation and retry, it may run relatively long. We need a mechanism to stop it, when user is not interested in result anymore. So, on nbd_client_connection_release() let's shutdown the socked, and do not retry connection if thread is detached. Signed-off-by: Vladimir Sem

[PATCH v3 33/33] block/nbd: drop connection_co

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
OK, that's a big rewrite of the logic. Pre-patch we have an always running coroutine - connection_co. It does reply receiving and reconnecting. And it leads to a lot of difficult and unobvious code around drained sections and context switch. We also abuse bs->in_flight counter which is increased f

[PATCH v3 25/33] nbd/client-connection: return only one io channel

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
block/nbd doesn't need underlying sioc channel anymore. So, we can update nbd/client-connection interface to return only one top-most io channel, which is more straight forward. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/nbd.h | 4 ++-- block/nbd.c | 13 ++

Re: [PATCH v3 33/33] block/nbd: drop connection_co

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
16.04.2021 11:09, Vladimir Sementsov-Ogievskiy wrote: OK, that's a big rewrite of the logic. Pre-patch we have an always running coroutine - connection_co. It does reply receiving and reconnecting. And it leads to a lot of difficult and unobvious code around drained sections and context switch.

[PATCH v3 31/33] block/nbd: add nbd_clinent_connected() helper

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
We already have two similar helpers for other state. Let's add another one for convenience. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/nbd.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index 3b31941a83..6cc5

Re: [PATCH 0/8] virtiofsd: Changed various allocations to GLib functions

2021-04-16 Thread Mahmoud Mandour
On Mon, Mar 22, 2021 at 5:53 PM Stefan Hajnoczi wrote: > On Fri, Mar 19, 2021 at 03:47:03PM +0200, Mahmoud Mandour wrote: > > On Fri, Mar 19, 2021 at 3:25 PM Mahmoud Mandour > > wrote: > > > > > Replaced allocations done using malloc(), calloc(), and realloc() > > > to their equivalent functions

Re: [PATCH 2/2] hw/block/nvme: fix lbaf formats initialization

2021-04-16 Thread Klaus Jensen
On Apr 16 12:52, Gollu Appalanaidu wrote: Currently LBAF formats are being intialized based on metadata size if and only if nvme-ns "ms" parameter is non-zero value. Since FormatNVM command being supported device parameter "ms" may not be the criteria to initialize the supported LBAFs. Signed-of

Re: [EXTERNAL] Re: [PULL 18/23] accel/tcg: re-factor non-RAM execution code

2021-04-16 Thread Alex Bennée
Cédric Le Goater writes: > On 4/15/21 7:34 PM, Peter Maydell wrote: >> On Thu, 15 Apr 2021 at 18:18, Cédric Le Goater wrote: >>> >>> On 4/15/21 5:55 PM, Philippe Mathieu-Daudé wrote: On 4/15/21 4:54 PM, Peter Maydell wrote: > On Thu, 15 Apr 2021 at 15:32, Alex Bennée wrote: >> --

Re: [PATCH V4 1/7] qapi/net.json: Add IP_PROTOCOL definition

2021-04-16 Thread Markus Armbruster
"Zhang, Chen" writes: >> -Original Message- >> From: Markus Armbruster >> Sent: Thursday, April 15, 2021 11:15 PM >> To: Zhang, Chen >> Cc: Dr. David Alan Gilbert ; Lukas Straub >> ; Li Zhijian ; Jason Wang >> ; qemu-dev ; Zhang >> Chen >> Subject: Re: [PATCH V4 1/7] qapi/net.json: Add

[Bug 1923861] Re: Hardfault when accessing FPSCR register

2021-04-16 Thread Peter Maydell
Some of those ID register differences are expected; some I'm surprised by. The differences are: * no MVE (expected, we don't implement it yet) * no double-precision * no FP16 So the missing double-precision is why your vcvt UNDEFs. Those last two ought to be present, but something is squashing

Re: [PATCH 2/2] Support monitor chardev hotswap with QMP

2021-04-16 Thread Markus Armbruster
Li Zhang writes: > On Tue, Apr 13, 2021 at 8:41 AM Markus Armbruster wrote: >> >> Li Zhang writes: >> >> > From: Li Zhang >> > >> > For some scenarios, it needs to hot-add a monitor device. >> > But QEMU doesn't support hotplug yet. It also works by adding >> > a monitor with null backend by d

Re: [PATCH 2/2] Support monitor chardev hotswap with QMP

2021-04-16 Thread Li Zhang
When I tried chardev-change, it reports this error: { "error": { "class": "GenericError", "desc": "Chardev user does not support chardev hotswap" } } On Fri, Apr 16, 2021 at 11:33 AM Markus Armbruster wrote: > > Li Zhang writes: > > > On Tue, Apr 13, 2021 at 8:41 AM Mark

[Bug 1923861] Re: Hardfault when accessing FPSCR register

2021-04-16 Thread Peter Maydell
Oops -- we were giving the AN547 a Cortex-M33 rather than the -M55 it ought to have :-( -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1923861 Title: Hardfault when accessing FPSCR register Status

[Bug 1923861] Re: Hardfault when accessing FPSCR register

2021-04-16 Thread ml-0
I changed the compile options to single precision, only. Then, my small FP example works. Ok for my purposes, I don't need double. But I would need MVE. Are there any plans to implement MVE? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to

[Bug 1924738] [NEW] Failed to restore domain - error load load virtio-balloon:virtio

2021-04-16 Thread Izorkin
Public bug reported: I noticed a domain restore error on my virtual machines. I can't reproduce the error on a test virtual machine. sudo virsh save linux2020 /var/lib/libvirt/qemu/save/linux2020.save Domain 'linux2020' saved to /var/lib/libvirt/qemu/save/linux2020.save sudo virsh restore /var/l

Re: [EXTERNAL] Re: [PULL 18/23] accel/tcg: re-factor non-RAM execution code

2021-04-16 Thread Cédric Le Goater
On 4/16/21 11:14 AM, Alex Bennée wrote: > > Cédric Le Goater writes: > >> On 4/15/21 7:34 PM, Peter Maydell wrote: >>> On Thu, 15 Apr 2021 at 18:18, Cédric Le Goater wrote: On 4/15/21 5:55 PM, Philippe Mathieu-Daudé wrote: > On 4/15/21 4:54 PM, Peter Maydell wrote: >> On Thu,

[Bug 1923861] Re: Hardfault when accessing FPSCR register

2021-04-16 Thread Peter Maydell
Yes, MVE is next on my todo list; it will probably be in 6.2, or maybe 7.0 depending how long it takes to implement it all. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1923861 Title: Hardfault wh

[PATCH] mptsas: remove unused MPTSASState.pending (CVE-2021-3392)

2021-04-16 Thread Michael Tokarev
During previous attempt to fix CVE-2021-3392 it was discovered that MPTSASState.pending is actually not used. So instead of fixing the prob, just remove the offending code entirely Signed-off-by: Michael Tokarev Cc: Prasad J Pandit Cc: qemu-sta...@nongnu.org --- hw/scsi/mptsas.c | 4 hw/sc

[PATCH-for-6.0?] configure: Improve error message with specified meson path is not found

2021-04-16 Thread Philippe Mathieu-Daudé
When building on a system where meson isn't available, but installed manually as user pip package, we get: $ ../configure --meson=~/.local/bin/meson qemu/configure: line 6387: --version: command not found You are attempting to run "setup" which requires administrative privileges, but more

[PATCH for-6.0?] hw/arm/armsse: Make SSE-300 use Cortex-M55

2021-04-16 Thread Peter Maydell
The SSE-300 has a Cortex-M55 (which was the whole reason for us modelling it), but we forgot to actually update the code to let it have a different CPU type from the IoTKit and SSE-200. Add CPU type as a field for ARMSSEInfo instead of hardcoding it to always use a Cortex-M33. Buglink: https://bu

[Bug 1923861] Re: Hardfault when accessing FPSCR register

2021-04-16 Thread Peter Maydell
https://patchew.org/QEMU/20210416104010.13228-1-peter.mayd...@linaro.org/ should fix the "not actually an M55" bug which will then give you the double-precision and FP16 (and the right FPSCR value). -- You received this bug notification because you are a member of qemu- devel-ml, which is subscri

Re: [PATCH 2/2] hw/block/nvme: fix lbaf formats initialization

2021-04-16 Thread Gollu Appalanaidu
On Fri, Apr 16, 2021 at 10:48:16AM +0200, Klaus Jensen wrote: On Apr 16 12:52, Gollu Appalanaidu wrote: Currently LBAF formats are being intialized based on metadata size if and only if nvme-ns "ms" parameter is non-zero value. Since FormatNVM command being supported device parameter "ms" may no

Re: [PATCH v4 09/12] qtest/migration-test: Skip tests if KVM not builtin on s390x/ppc64

2021-04-16 Thread Greg Kurz
On Thu, 15 Apr 2021 18:33:01 +0200 Philippe Mathieu-Daudé wrote: > We might have a s390x/ppc64 QEMU binary built without the KVM > accelerator (configured with --disable-kvm). > Checking for /dev/kvm accessibility isn't enough, also check for the > accelerator in the binary. > > Signed-off-by: P

Re: [Virtio-fs] [PATCH v2 01/25] DAX: vhost-user: Rework slave return values

2021-04-16 Thread Greg Kurz
On Wed, 14 Apr 2021 16:51:13 +0100 "Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > All the current slave handlers on the qemu side generate an 'int' > return value that's squashed down to a bool (!!ret) and stuffed into > a uint64_t (field of a union) to be returned.

Re: [Virtio-fs] [PATCH 1/2] virtiofsd: Allow use "-o xattrmap" without "-o xattr"

2021-04-16 Thread Greg Kurz
On Wed, 14 Apr 2021 20:12:06 + Carlos Venegas wrote: > When -o xattrmap is used, it will not work unless xattr is enabled. > > This patch enables xattr when -o xattrmap is used. > > Signed-off-by: Carlos Venegas > --- > tools/virtiofsd/passthrough_ll.c | 1 + > 1 file changed, 1 insertion

Re: [PATCH-for-6.0?] configure: Improve error message with specified meson path is not found

2021-04-16 Thread Darren Kenny
On Friday, 2021-04-16 at 12:25:59 +02, Philippe Mathieu-Daudé wrote: > When building on a system where meson isn't available, > but installed manually as user pip package, we get: > > $ ../configure --meson=~/.local/bin/meson > qemu/configure: line 6387: --version: command not found > You are

Re: [PATCH-for-6.0?] configure: Improve error message with specified meson path is not found

2021-04-16 Thread Peter Maydell
On Fri, 16 Apr 2021 at 12:09, Darren Kenny wrote: > > On Friday, 2021-04-16 at 12:25:59 +02, Philippe Mathieu-Daudé wrote: > > $ ../configure --meson=~/.local/bin/meson > > ERROR: Meson not found. Use --meson=/path/to/meson (absolute path) > Interesting that some shells don't expand the tild

[Bug 1923861] Re: Hardfault when accessing FPSCR register

2021-04-16 Thread ml-0
I tried your fix. Yes, the fpscr and mvfr0/1/2 values do match the FVP, now (except for the MVE bit which is explained above). Thx for the updates. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/19238

[PATCH v2] hw/block/nvme: fix lbaf formats initialization

2021-04-16 Thread Gollu Appalanaidu
Currently LBAF formats are being intialized based on metadata size if and only if nvme-ns "ms" parameter is non-zero value. Since FormatNVM command being supported device parameter "ms" may not be the criteria to initialize the supported LBAFs. Signed-off-by: Gollu Appalanaidu --- -v2: Addressin

Re: [PATCH-for-6.0?] mptsas: remove unused MPTSASState.pending (CVE-2021-3392)

2021-04-16 Thread Philippe Mathieu-Daudé
On 4/16/21 12:22 PM, Michael Tokarev wrote: > During previous attempt to fix CVE-2021-3392 it was discovered > that MPTSASState.pending is actually not used. So instead of > fixing the prob, just remove the offending code entirely What problem? > > Signed-off-by: Michael Tokarev > Cc: Prasad J

Re: Fwd: VirtioSound device emulation implementation

2021-04-16 Thread Gerd Hoffmann
Hi, > Starting off with the get config function for pcm streams. Initially I > thought I was supposed to store those configs in the VirtIOSound > struct but then I realized these configurations should be queried from > the backend and then be presented to the driver/guest. No. The device can c

Re: [PATCH-for-6.0?] mptsas: remove unused MPTSASState.pending (CVE-2021-3392)

2021-04-16 Thread Philippe Mathieu-Daudé
Cc'ing maintainers. On 4/16/21 1:27 PM, Philippe Mathieu-Daudé wrote: > On 4/16/21 12:22 PM, Michael Tokarev wrote: >> During previous attempt to fix CVE-2021-3392 it was discovered >> that MPTSASState.pending is actually not used. So instead of >> fixing the prob, just remove the offending code e

Re: [PATCH] target/riscv: fix wfi exception behavior

2021-04-16 Thread Jose Martins
> > -if ((env->priv == PRV_S && > > -get_field(env->mstatus, MSTATUS_TW)) || > > -riscv_cpu_virt_enabled(env)) { > > +if ((!riscv_cpu_virt_enabled(env) && env->priv == PRV_U) || > > > +(env->priv == PRV_S && get_field(env->mstatus, MSTATUS_TW))) { > > Shouldn't we ch

Re: [PATCH v4 0/4] accel/tcg: Make sure that tb->size != 0 after translation

2021-04-16 Thread Ilya Leoshkevich
On Thu, 2021-04-15 at 17:39 +0200, Cornelia Huck wrote: > On Thu, 15 Apr 2021 15:03:01 +0200 > Ilya Leoshkevich wrote: > > > If arch-specific code generates a translation block of size 0, > > tb_gen_code() may generate a spurious exception. > > > > Fix s390x (patch 1), ARM (patch 2) and xtensa (

Re: [PATCH v4 09/12] qtest/migration-test: Skip tests if KVM not builtin on s390x/ppc64

2021-04-16 Thread Cornelia Huck
On Thu, 15 Apr 2021 18:33:01 +0200 Philippe Mathieu-Daudé wrote: > We might have a s390x/ppc64 QEMU binary built without the KVM > accelerator (configured with --disable-kvm). > Checking for /dev/kvm accessibility isn't enough, also check for the > accelerator in the binary. > > Signed-off-by: P

Re: [PATCH 1/2] hw/block/nvme: consider metadata read aio return value in compare

2021-04-16 Thread Klaus Jensen
On Apr 16 12:52, Gollu Appalanaidu wrote: Currently in compare command metadata aio read blk_aio_preadv return value ignored, consider it and complete the block accounting. Signed-off-by: Gollu Appalanaidu --- hw/block/nvme.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/hw/bl

Re: [RFC PATCH 0/9] migration/snap-tool: External snapshot utility

2021-04-16 Thread Andrey Gruzdev
On 16.04.2021 02:50, Peter Xu wrote: On Wed, Mar 17, 2021 at 07:32:13PM +0300, Andrey Gruzdev wrote: This series is a kind of PoC for asynchronous snapshot reverting. This is about external snapshots only and doesn't involve block devices. Thus, it's mainly intended to be used with the new 'back

Re: [PATCH v4 02/19] flake8: Enforce shorter line length for comments and docstrings

2021-04-16 Thread Markus Armbruster
John Snow writes: > PEP8's BDFL writes: "For flowing long blocks of text with fewer > structural restrictions (docstrings or comments), the line length should > be limited to 72 characters." > > I do not like this patch. I have included it explicitly to recommend we > do not pay any further heed

[PATCH] hw/ide: Fix crash when plugging a piix3-ide device into the x-remote machine

2021-04-16 Thread Thomas Huth
QEMU currently crashes when the user tries to do something like: qemu-system-x86_64 -M x-remote -device piix3-ide This happens because the "isabus" variable is not initialized with the x-remote machine yet. Add a proper check for this condition and propagate the error to the caller, so we can fa

Re: [PATCH] pc-bios/s390-ccw: don't try to read the next block if end of chunk is reached

2021-04-16 Thread Thomas Huth
On 16/04/2021 09.47, Marc Hartmayer wrote: Don't read the block if a null block number is reached, because this means that the end of chunk is reached. Reviewed-by: Collin Walling Signed-off-by: Marc Hartmayer --- pc-bios/s390-ccw/bootmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v3] hw/block/nvme: fix lbaf formats initialization

2021-04-16 Thread Gollu Appalanaidu
Currently LBAF formats are being intialized based on metadata size if and only if nvme-ns "ms" parameter is non-zero value. Since FormatNVM command being supported device parameter "ms" may not be the criteria to initialize the supported LBAFs. Signed-off-by: Gollu Appalanaidu --- -v3: Remove "ms

Re: [PATCH v4] qapi: introduce 'query-cpu-model-cpuid' action

2021-04-16 Thread Vladimir Sementsov-Ogievskiy
15.04.2021 13:44, Valeriy Vdovin wrote: Introducing new qapi method 'query-cpu-model-cpuid'. This method can be used to get virtualized cpu model info generated by QEMU during VM initialization in the form of cpuid representation. Diving into more details about virtual cpu generation: QEMU first

[PATCH for-6.0? 0/6] extern "C" overhaul for C++ files

2021-04-16 Thread Peter Maydell
Hi; this patchseries is: (1) a respin of Paolo's patches, with the review issue Dan noticed fixed (ie handle arm-a64.cc too) (2) a copy of my "osdep.h: Move system includes to top" patch (3) some new patches which try to more comprehensively address the extern "C" issue I've marked th

[PATCH for-6.0? 2/6] osdep: protect qemu/osdep.h with extern "C"

2021-04-16 Thread Peter Maydell
From: Paolo Bonzini System headers may include templates if compiled with a C++ compiler, which cause the compiler to complain if qemu/osdep.h is included within a C++ source file's 'extern "C"' block. Add an 'extern "C"' block directly to qemu/osdep.h, so that system headers can be kept out of

[PATCH for-6.0? 4/6] osdep: Make os-win32.h and os-posix.h handle 'extern "C"' themselves

2021-04-16 Thread Peter Maydell
Both os-win32.h and os-posix.h include system header files. Instead of having osdep.h include them inside its 'extern "C"' block, make these headers handle that themselves, so that we don't include the system headers inside 'extern "C"'. This doesn't fix any current problems, but it's conceptually

[PATCH for-6.0? 3/6] include/qemu/osdep.h: Move system includes to top

2021-04-16 Thread Peter Maydell
Mostly osdep.h puts the system includes at the top of the file; but there are a couple of exceptions where we include a system header halfway through the file. Move these up to the top with the rest so that all the system headers we include are included before we include os-win32.h or os-posix.h.

[PATCH for-6.0? 1/6] osdep: include glib-compat.h before other QEMU headers

2021-04-16 Thread Peter Maydell
From: Paolo Bonzini glib-compat.h is sort of like a system header, and it needs to include system headers (glib.h) that may dislike being included under 'extern "C"'. Move it right after all system headers and before all other QEMU headers. Signed-off-by: Paolo Bonzini Reviewed-by: Daniel P. B

[PATCH for-6.0? 6/6] include/disas/dis-asm.h: Handle being included outside 'extern "C"'

2021-04-16 Thread Peter Maydell
Make dis-asm.h handle being included outside an 'extern "C"' block; this allows us to remove the 'extern "C"' blocks that our two C++ files that include it are using. Signed-off-by: Peter Maydell --- include/disas/dis-asm.h | 12 ++-- disas/arm-a64.cc| 2 -- disas/nanomips.cpp

[PATCH for-6.0? 5/6] include/qemu/bswap.h: Handle being included outside extern "C" block

2021-04-16 Thread Peter Maydell
Make bswap.h handle being included outside an 'extern "C"' block: all system headers are included first, then all declarations are put inside an 'extern "C"' block. This requires a little rearrangement as currently we have an ifdef ladder that has some system includes and some local declarations o

Re: [PATCH for-6.0? 0/6] extern "C" overhaul for C++ files

2021-04-16 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210416135543.20382-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210416135543.20382-1-peter.mayd...@linaro.org Subject: [PATCH for-6.0? 0/6] extern

Re: [PATCH v4 2/4] target/arm: Make sure that commpage's tb->size != 0

2021-04-16 Thread Peter Maydell
On Thu, 15 Apr 2021 at 14:03, Ilya Leoshkevich wrote: > > tb_gen_code() assumes that tb->size must never be zero, otherwise it > may produce spurious exceptions. For ARM this may happen when creating > a translation block for the commpage. > > Fix by pretending that commpage translation blocks hav

Re: [RFC PATCH 0/3] tests/tcg/ppc64le: paddi tests

2021-04-16 Thread Matheus K. Ferst
On 16/04/2021 00:52, David Gibson wrote: On Thu, Apr 15, 2021 at 06:41:35PM -0300, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst Based-on: <20210413211129.457272-1-luis.pi...@eldorado.org.br> First things first: it's unclear to me if this is testing stuff that's already merged, or

Re: [RFC PATCH 1/3] tests/docker: gcc-10 based images for ppc64{,le} tests

2021-04-16 Thread Alex Bennée
David Gibson writes: > On Thu, Apr 15, 2021 at 06:41:36PM -0300, matheus.fe...@eldorado.org.br wrote: >> From: Matheus Ferst >> >> A newer compiler is needed to build tests for Power10 instructions. As >> done for arm64 on c729a99d2701, new '-test-cross' images are created for >> ppc64 and pp

[PATCH] target/riscv: fix exception index on instruction access fault

2021-04-16 Thread Emmanuel Blot
When no MMU is used and the guest code attempts to fetch an instruction from an invalid memory location, the exception index defaults to a data load access fault, rather an instruction access fault. Signed-off-by: Emmanuel Blot --- target/riscv/cpu_helper.c | 4 +++- 1 file changed, 3 insertio

[PATCH v5] qapi: introduce 'query-cpu-model-cpuid' action

2021-04-16 Thread Valeriy Vdovin
Introducing new qapi method 'query-cpu-model-cpuid'. This method can be used to get virtualized cpu model info generated by QEMU during VM initialization in the form of cpuid representation. Diving into more details about virtual cpu generation: QEMU first parses '-cpu' command line option. From t

Re: [PATCHv2 1/1] Support monitor chardev hotswap with QMP

2021-04-16 Thread Markus Armbruster
Marc-André, I'd like your opinion for this one, in particular the use of g_source_remove(). Li Zhang writes: > For some scenarios, it needs to hot-add a monitor device. > But QEMU doesn't support hotplug yet. It also works by adding > a monitor with null backend by default and then change its >

  1   2   3   4   5   >