[PATCH 2/2] target/riscv: Auto set elen from vector extension by default

2022-07-08 Thread Kito Cheng
Default ELEN is setting to 64 for now, which is incorrect setting for Zve32*, and spec has mention minimum VLEN and supported EEW in chapter "Zve*: Vector Extensions for Embedded Processors" is 32 for Zve32. ELEN actaully could be derived from which extensions are enabled, so this patch set elen t

[PATCH 1/2] target/riscv: Lower bound of VLEN is 32, and check VLEN >= ELEN

2022-07-08 Thread Kito Cheng
According RVV spec 1.0, the minmal requirement of VLEN is great than or equal to ELEN, and minmal possible ELEN is 32, and also spec has mention `Minimum VLEN` for zve32* is 32, so the lower bound of VLEN is 32 I think. [1] https://github.com/riscv/riscv-v-spec/blob/master/v-spec.adoc#2-implement

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-07-08 Thread Alistair Francis
On Thu, Jul 7, 2022 at 11:04 AM Jason A. Donenfeld wrote: > > Hey Alistair, > > On Tue, Jul 05, 2022 at 03:09:09AM +0200, Jason A. Donenfeld wrote: > > Hi Alistair, > > > > On Wed, Jun 29, 2022 at 4:09 AM Alistair Francis > > wrote: > > > I have a Linux 5.8 test case that is failing due to this

AioContext lock removal: help needed

2022-07-08 Thread Emanuele Giuseppe Esposito
Hello everyone, As you all know, I am trying to find a way to replace the well known AioContext lock with something else that makes sense and provides the same (or even better) guarantees than using this lock. The reason for this change have been explained over and over and I don't really want to

Re: [RFC PATCH v9 01/23] vhost: Return earlier if used buffers overrun

2022-07-08 Thread Jason Wang
On Thu, Jul 7, 2022 at 2:40 AM Eugenio Pérez wrote: > > Previous function misses the just picked avail buffer from the queue. > This way keeps blocking the used queue forever, but is cleaner to check > before calling to vhost_svq_get_buf. > > Fixes: 100890f7cad50 ("vhost: Shadow virtqueue buffers

[PATCH 2/2] target/riscv: Implement dump content of vector register

2022-07-08 Thread Kito Cheng
Implement -d cpu,vu to dump content of vector register. Signed-off-by: Kito Cheng --- target/riscv/cpu.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index c1b96da7da..97b289d277 100644 --- a/target/riscv/cpu.c +++ b

[PATCH 1/2] util/log: Add vu to dump content of vector unit

2022-07-08 Thread Kito Cheng
Add new option for -d vu to dump the content of vector unit, many target has vector register, but there is no easy way to dump the content, we use this on downstream for a while to help debug, and I feel that's really useful, so I think it would be great to upstream that to save debug time for othe

Re: [PATCH 1/8] virtio_queue_aio_attach_host_notifier: remove AioContext lock

2022-07-08 Thread Emanuele Giuseppe Esposito
Am 05/07/2022 um 16:11 schrieb Stefan Hajnoczi: > On Thu, Jun 09, 2022 at 10:37:20AM -0400, Emanuele Giuseppe Esposito wrote: >> @@ -146,7 +147,6 @@ int virtio_scsi_dataplane_start(VirtIODevice *vdev) >> >> s->dataplane_starting = false; >> s->dataplane_started = true; >> -aio_co

Re: [RFC PATCH v9 03/23] vdpa: delay set_vring_ready after DRIVER_OK

2022-07-08 Thread Jason Wang
On Thu, Jul 7, 2022 at 2:40 AM Eugenio Pérez wrote: > > To restore the device in the destination of a live migration we send the > commands through control virtqueue. For a device to read CVQ it must > have received DRIVER_OK status bit. > > However this open a window where the device could start

Re: [PATCH 3/8] virtio_blk_process_queued_requests: always run in a bh

2022-07-08 Thread Emanuele Giuseppe Esposito
Am 05/07/2022 um 16:23 schrieb Stefan Hajnoczi: > On Thu, Jun 09, 2022 at 10:37:22AM -0400, Emanuele Giuseppe Esposito wrote: >> diff --git a/hw/block/dataplane/virtio-blk.c >> b/hw/block/dataplane/virtio-blk.c >> index f9224f23d2..03e10a36a4 100644 >> --- a/hw/block/dataplane/virtio-blk.c >> +

Re: [RFC PATCH v9 04/23] vhost: Get vring base from vq, not svq

2022-07-08 Thread Jason Wang
On Thu, Jul 7, 2022 at 2:40 AM Eugenio Pérez wrote: > > The used idx used to match with this, but it will not match from the > moment we introduce svq_inject. It might be better to explain what "svq_inject" means here. > Rewind all the descriptors not used by > vdpa device and get the vq state p

Re: [PATCH 6/8] virtio-blk: mark IO_CODE functions

2022-07-08 Thread Emanuele Giuseppe Esposito
Am 05/07/2022 um 16:39 schrieb Stefan Hajnoczi: > On Thu, Jun 09, 2022 at 10:37:25AM -0400, Emanuele Giuseppe Esposito wrote: >> Just as done in the block API, mark functions in virtio-blk >> that are called also from iothread(s). >> >> We know such functions are IO because many are blk_* callba

Re: [PATCH 7/8] VirtIOBlock: protect rq with its own lock

2022-07-08 Thread Emanuele Giuseppe Esposito
Am 05/07/2022 um 16:45 schrieb Stefan Hajnoczi: > On Thu, Jun 09, 2022 at 10:37:26AM -0400, Emanuele Giuseppe Esposito wrote: >> @@ -946,17 +955,20 @@ static void virtio_blk_reset(VirtIODevice *vdev) >> * stops all Iothreads. >> */ >> blk_drain(s->blk); >> +aio_context_relea

Re: AioContext lock removal: help needed

2022-07-08 Thread Emanuele Giuseppe Esposito
Am 08/07/2022 um 10:42 schrieb Emanuele Giuseppe Esposito: > Hello everyone, > > As you all know, I am trying to find a way to replace the well known > AioContext lock with something else that makes sense and provides the > same (or even better) guarantees than using this lock. > > The reason

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-07-08 Thread Jason A. Donenfeld
Hi Alistair, On 7/8/22, Alistair Francis wrote: >> > but I think that's just the way things go unfortunately. > > Hmm... That's a pain. So there is a bug in older kernels where they > won't boot if we specify this? > > Can you point to the fixes? Actually, in trying to reproduce this, I don't a

Re: [PATCH] tests: migration-test: Allow test to run without uffd

2022-07-08 Thread Daniel P . Berrangé
On Thu, Jul 07, 2022 at 02:46:00PM -0400, Peter Xu wrote: > We used to stop running all tests if uffd is not detected. However > logically that's only needed for postcopy not the rest of tests. > > Keep running the rest when still possible. > > Signed-off-by: Peter Xu > --- > tests/qtest/migra

Re: [RFC PATCH v9 03/23] vdpa: delay set_vring_ready after DRIVER_OK

2022-07-08 Thread Eugenio Perez Martin
On Fri, Jul 8, 2022 at 11:06 AM Jason Wang wrote: > > On Thu, Jul 7, 2022 at 2:40 AM Eugenio Pérez wrote: > > > > To restore the device in the destination of a live migration we send the > > commands through control virtqueue. For a device to read CVQ it must > > have received DRIVER_OK status bi

Re: [RFC PATCH v9 03/23] vdpa: delay set_vring_ready after DRIVER_OK

2022-07-08 Thread Eugenio Perez Martin
On Fri, Jul 8, 2022 at 11:06 AM Jason Wang wrote: > > On Thu, Jul 7, 2022 at 2:40 AM Eugenio Pérez wrote: > > > > To restore the device in the destination of a live migration we send the > > commands through control virtqueue. For a device to read CVQ it must > > have received DRIVER_OK status bi

Re: [RFC PATCH v9 04/23] vhost: Get vring base from vq, not svq

2022-07-08 Thread Eugenio Perez Martin
On Fri, Jul 8, 2022 at 11:12 AM Jason Wang wrote: > > On Thu, Jul 7, 2022 at 2:40 AM Eugenio Pérez wrote: > > > > The used idx used to match with this, but it will not match from the > > moment we introduce svq_inject. > > It might be better to explain what "svq_inject" means here. > Good point,

Re: Support for Gaisler multicore LEONx SoCs

2022-07-08 Thread Frederic Konrad
Hi Gregg, AFAIK the leon3-generic can emulate the GR712RC with some little differences in the memorymap and / or timer / CPU count.  (You should be able to boot the Gaisler monocore linux with it). About the SMP support AdaCore had a few patches for it, I'll let Fabien answer. Regards,Fred

Re: [RFC PATCH] qobject: Rewrite implementation of QDict for in-order traversal

2022-07-08 Thread Markus Armbruster
Alex Bennée writes: > Markus Armbruster writes: > >> QDict is implemented as a simple hash table of fixed size. Observe: >> >> * Slow for large n. Not sure this matters. >> >> * A QDict with n entries takes 4120 + n * 32 bytes on my box. Wastes >> space for small n, which is a common case.

[PATCH 00/22] vdpa net devices Rx filter change notification with Shadow VQ

2022-07-08 Thread Eugenio Pérez
Control virtqueue is used by networking device for accepting various commands from the driver. It's a must to support advanced configurations. Rx filtering event is issues by qemu when device's MAC address changed once and the previous one has not been queried by external agents. Shadow VirtQueue

[PATCH 01/22] vhost: Return earlier if used buffers overrun

2022-07-08 Thread Eugenio Pérez
Previous function misses the just picked avail buffer from the queue. This way keeps blocking the used queue forever, but is cleaner to check before calling to vhost_svq_get_buf. Fixes: 100890f7cad50 ("vhost: Shadow virtqueue buffers forwarding") Acked-by: Jason Wang Signed-off-by: Eugenio Pérez

[PATCH 04/22] virtio-net: Expose ctrl virtqueue logic

2022-07-08 Thread Eugenio Pérez
This allows external vhost-net devices to modify the state of the VirtIO device model once vhost-vdpa device has acknowledge the control commands. Signed-off-by: Eugenio Pérez --- include/hw/virtio/virtio-net.h | 4 ++ hw/net/virtio-net.c| 84 -- 2 fi

[PATCH 07/22] vhost: Add SVQElement

2022-07-08 Thread Eugenio Pérez
This will allow SVQ to add metadata to the different queue elements. To simplify changes, only store actual element at this patch. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h | 8 -- hw/virtio/vhost-shadow-virtqueue.c | 41 -- 2 files chan

[PATCH 02/22] vhost: move descriptor translation to vhost_svq_vring_write_descs

2022-07-08 Thread Eugenio Pérez
It's done for both in and out descriptors so it's better placed here. Acked-by: Jason Wang Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c | 38 +- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/hw/virtio/vhost-shadow-virtqueue.c

[PATCH 05/22] vhost: Decouple vhost_svq_add_split from VirtQueueElement

2022-07-08 Thread Eugenio Pérez
VirtQueueElement comes from the guest, but we're heading SVQ to be able to inject element without the guest's knowledge. To do so, make this accept sg buffers directly, instead of using VirtQueueElement. Add vhost_svq_add_element to maintain element convenience Signed-off-by: Eugenio Pérez ---

[PATCH 09/22] vhost: Add opaque member to SVQElement

2022-07-08 Thread Eugenio Pérez
When qemu injects buffers to the vdpa device it will be used to maintain contextual data. If SVQ has no operation, it will be used to maintain the VirtQueueElement pointer. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h | 3 ++- hw/virtio/vhost-shadow-virtqueue.c | 13 +

[PATCH 03/22] vdpa: Clean vhost_vdpa_dev_start(dev, false)

2022-07-08 Thread Eugenio Pérez
Return value is never checked and is a clean path, so assume success Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 33 ++--- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index 66f054a12c..d

[PATCH 12/22] vhost: Add vhost_svq_inject

2022-07-08 Thread Eugenio Pérez
This allows qemu to inject buffers to the device. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h | 2 ++ hw/virtio/vhost-shadow-virtqueue.c | 37 ++ 2 files changed, 39 insertions(+) diff --git a/hw/virtio/vhost-shadow-virtqueue.h b/hw/virtio/v

[PATCH 08/22] vhost: Move last chain id to SVQ element

2022-07-08 Thread Eugenio Pérez
We will allow SVQ user to store opaque data for each element, so its easier if we store this kind of information just at avail. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h | 3 +++ hw/virtio/vhost-shadow-virtqueue.c | 14 -- 2 files changed, 11 insertions(+),

[PATCH 13/22] vhost: add vhost_svq_poll

2022-07-08 Thread Eugenio Pérez
It allows the Shadow Control VirtQueue to wait the device to use the commands that restore the net device state after a live migration. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h | 1 + hw/virtio/vhost-shadow-virtqueue.c | 54 -- 2 files chan

[PATCH 06/22] vhost: Reorder vhost_svq_last_desc_of_chain

2022-07-08 Thread Eugenio Pérez
SVQ is going to store it in SVQElement, so we need it before add functions. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/hw/virtio/vhost-shadow-virtqueue.c b/hw/virtio/vhost-shadow-

[PATCH 10/22] vdpa: Small rename of error labels

2022-07-08 Thread Eugenio Pérez
So later patches are cleaner Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost-vdpa.c b/hw/virtio/vhost-vdpa.c index d6ba4a492a..fccfc832ea 100644 --- a/hw/virtio/vhost-vdpa.c +++ b/hw/virtio/vhost-vdp

[PATCH 11/22] vhost: add vhost_svq_push_elem

2022-07-08 Thread Eugenio Pérez
This function allows external SVQ users to return guest's available buffers. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h | 2 ++ hw/virtio/vhost-shadow-virtqueue.c | 16 2 files changed, 18 insertions(+) diff --git a/hw/virtio/vhost-shadow-virtqueue.h

[PATCH 17/22] vdpa: Export vhost_vdpa_dma_map and unmap calls

2022-07-08 Thread Eugenio Pérez
Shadow CVQ will copy buffers on qemu VA, so we avoid TOCTOU attacks that can set a different state in qemu device model and vdpa device. Signed-off-by: Eugenio Pérez --- include/hw/virtio/vhost-vdpa.h | 4 hw/virtio/vhost-vdpa.c | 7 +++ 2 files changed, 7 insertions(+), 4 delet

[PATCH 16/22] vhost: add detach SVQ operation

2022-07-08 Thread Eugenio Pérez
To notify the caller it needs to discard the element. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.h | 11 +++ hw/virtio/vhost-shadow-virtqueue.c | 11 ++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-shadow-virtqueue.h b/hw

[PATCH 15/22] vhost: Add svq avail_handler callback

2022-07-08 Thread Eugenio Pérez
This allows external handlers to be aware of new buffers that the guest places in the virtqueue. When this callback is defined the ownership of guest's virtqueue element is transferred to the callback. This means that if the user wants to forward the descriptor it needs to manually inject it. The

[PATCH 18/22] vdpa: manual forward CVQ buffers

2022-07-08 Thread Eugenio Pérez
Do a simple forwarding of CVQ buffers, the same work SVQ could do but through callbacks. No functional change intended. Signed-off-by: Eugenio Pérez --- include/hw/virtio/vhost-vdpa.h | 3 ++ hw/virtio/vhost-vdpa.c | 3 +- net/vhost-vdpa.c | 59 +++

[PATCH 19/22] vdpa: Buffer CVQ support on shadow virtqueue

2022-07-08 Thread Eugenio Pérez
Introduce the control virtqueue support for vDPA shadow virtqueue. This is needed for advanced networking features like rx filtering. Virtio-net control VQ copies now the descriptors to qemu's VA, so we avoid TOCTOU with the guest's or device's memory every time there is a device model change. Oth

[PATCH 20/22] vdpa: Extract get features part from vhost_vdpa_get_max_queue_pairs

2022-07-08 Thread Eugenio Pérez
To know the device features is needed for CVQ SVQ, so SVQ knows if it can handle all commands or not. Extract from vhost_vdpa_get_max_queue_pairs so we can reuse it. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 30 -- 1 file changed, 20 insertions(+), 10 deleti

[PATCH 14/22] vhost: Add custom used buffer callback

2022-07-08 Thread Eugenio Pérez
The callback allows SVQ users to know the VirtQueue requests and responses. QEMU can use this to synchronize virtio device model state, allowing to migrate it with minimum changes to the migration code. If callbacks are specified at svq creation, the buffers need to be injected to the device using

[PATCH 21/22] vdpa: Add device migration blocker

2022-07-08 Thread Eugenio Pérez
The device may need to add migration blockers. For example, if vdpa device uses features not compatible with migration. Add the possibility here. Signed-off-by: Eugenio Pérez --- include/hw/virtio/vhost-vdpa.h | 1 + hw/virtio/vhost-vdpa.c | 14 ++ 2 files changed, 15 inser

[PATCH 22/22] vdpa: Add x-svq to NetdevVhostVDPAOptions

2022-07-08 Thread Eugenio Pérez
Finally offering the possibility to enable SVQ from the command line. Signed-off-by: Eugenio Pérez --- qapi/net.json| 9 +- net/vhost-vdpa.c | 74 ++-- 2 files changed, 79 insertions(+), 4 deletions(-) diff --git a/qapi/net.json b/qapi/net.js

Re: [PATCH v2 2/4] target/s390x: Remove DISAS_PC_STALE

2022-07-08 Thread David Hildenbrand
On 02.07.22 08:02, Richard Henderson wrote: > There is nothing to distinguish this from DISAS_TOO_MANY. > > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/translate.c | 13 - > 1 file changed, 4 insertions(+), 9 deletions(-) > > diff --git a/target/s390x/tcg/translate.c b

Re: [RFC PATCH v9 23/23] vdpa: Add x-svq to NetdevVhostVDPAOptions

2022-07-08 Thread Eugenio Perez Martin
On Thu, Jul 7, 2022 at 8:23 AM Markus Armbruster wrote: > > Eugenio Pérez writes: > > > Finally offering the possibility to enable SVQ from the command line. > > QMP, too, I guess. > Hi Markus, I'm not sure what you mean. Dynamic enabling / disabling of SVQ was delayed, and now it's only possib

Re: [RFC PATCH] qobject: Rewrite implementation of QDict for in-order traversal

2022-07-08 Thread Daniel P . Berrangé
On Wed, Jul 06, 2022 at 01:35:22PM +0200, Markus Armbruster wrote: > Markus Armbruster writes: > > > QDict is implemented as a simple hash table of fixed size. Observe: > > > > * Slow for large n. Not sure this matters. > > > > * A QDict with n entries takes 4120 + n * 32 bytes on my box. Wast

Re: [PATCH v2 1/4] target/s390x: Remove DISAS_GOTO_TB

2022-07-08 Thread David Hildenbrand
On 02.07.22 08:02, Richard Henderson wrote: > There is nothing to distinguish this from DISAS_NORETURN. > > Signed-off-by: Richard Henderson > --- > target/s390x/tcg/translate.c | 8 ++-- > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/target/s390x/tcg/translate.c b/targe

Re: [PATCH v2 3/4] target/s390x: Remove DISAS_PC_STALE_NOCHAIN

2022-07-08 Thread David Hildenbrand
On 02.07.22 08:02, Richard Henderson wrote: > Replace this with a flag: exit_to_mainloop. > We can now control the exit for each of DISAS_TOO_MANY, > DISAS_PC_UPDATED, and DISAS_PC_CC_UPDATED, and fold in > the check for PER. > > Signed-off-by: Richard Henderson Reviewed-by: David Hildenbrand

Re: [PATCH v2 4/4] target/s390x: Exit tb after executing ex_value

2022-07-08 Thread David Hildenbrand
On 02.07.22 08:02, Richard Henderson wrote: > When EXECUTE sets ex_value to interrupt the constructed instruction, > we implicitly disable interrupts so that the value is not corrupted. > Exit to the main loop after execution, so that we re-evaluate any > pending interrupts. > > Reported-by: Sven

Re: [PATCH 7/8] VirtIOBlock: protect rq with its own lock

2022-07-08 Thread Emanuele Giuseppe Esposito
Am 08/07/2022 um 11:33 schrieb Emanuele Giuseppe Esposito: > > > Am 05/07/2022 um 16:45 schrieb Stefan Hajnoczi: >> On Thu, Jun 09, 2022 at 10:37:26AM -0400, Emanuele Giuseppe Esposito wrote: >>> @@ -946,17 +955,20 @@ static void virtio_blk_reset(VirtIODevice *vdev) >>> * stops all Iothr

The case for array properties (was: [PULL 14/15] qdev: Base object creation on QDict rather than QemuOpts)

2022-07-08 Thread Markus Armbruster
Cc'ing QOM maintainers. Peter Maydell writes: > On Mon, 4 Jul 2022 at 05:50, Markus Armbruster wrote: >> My initial (knee-jerk) reaction to breaking array properties: Faster, >> Pussycat! Kill! Kill! > > In an ideal world, what would you replace them with? Let's first recapitulate their intend

[PATCH v2] hw/i386: pass RNG seed to e820 setup table

2022-07-08 Thread Jason A. Donenfeld
Tiny machines optimized for fast boot time generally don't use EFI, which means a random seed has to be supplied some other way, in this case by the e820 setup table, which supplies a place for one. This commit adds passing this random seed via the table. It is confirmed to be working with the Linu

Re: The case for array properties (was: [PULL 14/15] qdev: Base object creation on QDict rather than QemuOpts)

2022-07-08 Thread Daniel P . Berrangé
On Fri, Jul 08, 2022 at 01:40:43PM +0200, Markus Armbruster wrote: > Cc'ing QOM maintainers. > > Peter Maydell writes: > > > On Mon, 4 Jul 2022 at 05:50, Markus Armbruster wrote: > >> My initial (knee-jerk) reaction to breaking array properties: Faster, > >> Pussycat! Kill! Kill! > > > > In an

Re: [PATCH] hw/i386: pass RNG seed to e820 setup table

2022-07-08 Thread Daniel P . Berrangé
On Thu, Jun 30, 2022 at 01:37:17PM +0200, Jason A. Donenfeld wrote: > Tiny machines optimized for fast boot time generally don't use EFI, > which means a random seed has to be supplied some other way, in this > case by the e820 setup table, which supplies a place for one. This > commit adds passing

Re: [PATCH] hw/i386: pass RNG seed to e820 setup table

2022-07-08 Thread Jason A. Donenfeld
Hi Daniel, On Fri, Jul 8, 2022 at 2:00 PM Daniel P. Berrangé wrote: > > On Thu, Jun 30, 2022 at 01:37:17PM +0200, Jason A. Donenfeld wrote: > > Tiny machines optimized for fast boot time generally don't use EFI, > > which means a random seed has to be supplied some other way, in this > > case by

Re: The case for array properties

2022-07-08 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Fri, Jul 08, 2022 at 01:40:43PM +0200, Markus Armbruster wrote: >> Cc'ing QOM maintainers. >> >> Peter Maydell writes: >> >> > On Mon, 4 Jul 2022 at 05:50, Markus Armbruster wrote: >> >> My initial (knee-jerk) reaction to breaking array properties: Faster, >> >

Re: Intermittent meson failures on msys2

2022-07-08 Thread Marc-André Lureau
Hi On Mon, Jun 27, 2022 at 6:41 AM Richard Henderson < richard.hender...@linaro.org> wrote: > Hi guys, > > There's an occasional failure on msys2, where meson fails to capture the > output of a build > script. E.g. > > https://gitlab.com/qemu-project/qemu/-/jobs/2642051161 > > FAILED: ui/input-k

Re: [RFC PATCH v9 23/23] vdpa: Add x-svq to NetdevVhostVDPAOptions

2022-07-08 Thread Markus Armbruster
Eugenio Perez Martin writes: > On Thu, Jul 7, 2022 at 8:23 AM Markus Armbruster wrote: >> >> Eugenio Pérez writes: >> >> > Finally offering the possibility to enable SVQ from the command line. >> >> QMP, too, I guess. >> > > Hi Markus, > > I'm not sure what you mean. Dynamic enabling / disablin

Re: [PATCH 22/22] vdpa: Add x-svq to NetdevVhostVDPAOptions

2022-07-08 Thread Markus Armbruster
Eugenio Pérez writes: > Finally offering the possibility to enable SVQ from the command line. > > Signed-off-by: Eugenio Pérez Please carry forward Acked-by and Reviewed-by you received for prior revisions unless you change something that invalidates them. This ensures reviewers get credit, an

Re: Intermittent meson failures on msys2

2022-07-08 Thread Richard Henderson
On 7/8/22 18:11, Marc-André Lureau wrote: My guess is that CI randomly fails with "too many opened files", as I have seen that regularly on various projects with Windows runners. And here, it's probably reaching limits when running python/perl scripts simultaneously... I don't see an easy way to

Re: Intermittent meson failures on msys2

2022-07-08 Thread Daniel P . Berrangé
On Fri, Jul 08, 2022 at 04:41:48PM +0400, Marc-André Lureau wrote: > Hi > > On Mon, Jun 27, 2022 at 6:41 AM Richard Henderson < > richard.hender...@linaro.org> wrote: > > > Hi guys, > > > > There's an occasional failure on msys2, where meson fails to capture the > > output of a build > > script.

[PATCH 00/10] enable pnv-phb user created devices

2022-07-08 Thread Daniel Henrique Barboza
This series is built on top of "[PATCH v3 00/12] powernv: introduce pnv-phb base/proxy devices" [1] that is under review in [1]. I'm sending this last part of the pnv-phb rework to allow everyone to see what's the endgame I'm planning with this work. The main differences between the approach tak

[PATCH 02/10] ppc/pnv: add phb-id/chip-id PnvPHB4RootBus properties

2022-07-08 Thread Daniel Henrique Barboza
The same rationale provided in the PHB3 bus case applies here. Note: we could have merged both buses in a single object, like we did with the root ports, and spare some boilerplate. The reason we opted to preserve both buses objects is twofold: - there's not user side advantage in doing so. Unify

[PATCH 04/10] ppc/pnv: add helpers for pnv-phb user devices

2022-07-08 Thread Daniel Henrique Barboza
pnv_parent_qom_fixup() and pnv_parent_bus_fixup() are versions of the helpers that were reverted by commit 9c10d86fee "ppc/pnv: Remove user-created PHB{3,4,5} devices". They are needed to amend the QOM and bus hierarchies of user created pnv-phbs, matching them with default pnv-phbs. A new helper

[PATCH 06/10] ppc/pnv: enable user created pnv-phb for powernv8

2022-07-08 Thread Daniel Henrique Barboza
The bulk of the work was already done by previous patches. Use defaults_enabled() to determine whether we need to create the default devices or not. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb.c | 9 +++-- hw/ppc/pnv.c | 6 ++ 2 files changed, 13 insertions(+

[PATCH 01/10] ppc/pnv: add phb-id/chip-id PnvPHB3RootBus properties

2022-07-08 Thread Daniel Henrique Barboza
We rely on the phb-id and chip-id, which are PHB properties, to assign chassis and slot to the root port. For default devices this is no big deal: the root port is being created under pnv_phb_realize() and the values are being passed on via the 'index' and 'chip-id' of the pnv_phb_attach_root_port(

[PATCH 07/10] ppc/pnv: add PHB4 helpers for user created pnv-phb

2022-07-08 Thread Daniel Henrique Barboza
The PHB4 backend relies on a link with the corresponding PEC element. This is trivial to do during machine_init() time for default devices, but not so much for user created ones. pnv_phb4_get_pec() is a small variation of the function that was reverted by commit 9c10d86fee "ppc/pnv: Remove user-cr

[PATCH 08/10] ppc/pnv: enable user created pnv-phb powernv9

2022-07-08 Thread Daniel Henrique Barboza
Enable pnv-phb user created devices for powernv9 now that we have everything in place. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb.c | 2 +- hw/pci-host/pnv_phb4_pec.c | 6 -- hw/ppc/pnv.c | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --

[PATCH 03/10] ppc/pnv: set root port chassis and slot using Bus properties

2022-07-08 Thread Daniel Henrique Barboza
For default root ports we have a way of accessing chassis and slot, before root_port_realize(), via pnv_phb_attach_root_port(). For the future user created root ports this won't be the case: we can't use this helper because we don't have access to the PHB phb-id/chip-id values. In earlier patches

[PATCH 05/10] ppc/pnv: turn chip8->phbs[] into a PnvPHB* array

2022-07-08 Thread Daniel Henrique Barboza
When enabling user created PHBs (a change reverted by commit 9c10d86fee) we were handling PHBs created by default versus by the user in different manners. The only difference between these PHBs is that one will have a valid phb3->chip that is assigned during pnv_chip_power8_realize(), while the use

[PATCH 09/10] ppc/pnv: change pnv_phb4_get_pec() to also retrieve chip10->pecs

2022-07-08 Thread Daniel Henrique Barboza
The function assumes that we're always dealing with a PNV9_CHIP() object. This is not the case when the pnv-phb device belongs to a powernv10 machine. Change pnv_phb4_get_pec() to be able to work with PNV10_CHIP() if necessary. Signed-off-by: Daniel Henrique Barboza --- hw/pci-host/pnv_phb.c |

[PATCH 10/10] ppc/pnv: user creatable pnv-phb for powernv10

2022-07-08 Thread Daniel Henrique Barboza
Given that powernv9 and powernv10 uses the same pnv-phb backend, the logic to allow user created pnv-phbs for powernv10 is already in place. Let's flip the switch. Signed-off-by: Daniel Henrique Barboza --- hw/ppc/pnv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ppc/pnv.c b/hw/ppc/

Re: [PATCH 1/9] monitor: make error_vprintf_unless_qmp() static

2022-07-08 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Thu, Jul 7, 2022 at 4:25 PM Markus Armbruster wrote: > >> marcandre.lur...@redhat.com writes: >> >> > From: Marc-André Lureau >> > >> > Not needed outside monitor.c. Remove the needless stub. >> > >> > Signed-off-by: Marc-André Lureau >> > --- >> > includ

Re: [PATCH 1/9] monitor: make error_vprintf_unless_qmp() static

2022-07-08 Thread Marc-André Lureau
Hi On Fri, Jul 8, 2022 at 5:56 PM Markus Armbruster wrote: > Marc-André Lureau writes: > > > Hi > > > > On Thu, Jul 7, 2022 at 4:25 PM Markus Armbruster > wrote: > > > >> marcandre.lur...@redhat.com writes: > >> > >> > From: Marc-André Lureau > >> > > >> > Not needed outside monitor.c. Remove

Re: [PATCH] hw/i386: pass RNG seed to e820 setup table

2022-07-08 Thread Daniel P . Berrangé
On Fri, Jul 08, 2022 at 02:04:40PM +0200, Jason A. Donenfeld wrote: > Hi Daniel, > > On Fri, Jul 8, 2022 at 2:00 PM Daniel P. Berrangé wrote: > > > > On Thu, Jun 30, 2022 at 01:37:17PM +0200, Jason A. Donenfeld wrote: > > > Tiny machines optimized for fast boot time generally don't use EFI, > > >

Re: [PATCH v5 25/45] target/arm: Implement BFMOPA, BFMOPS

2022-07-08 Thread Richard Henderson
On 7/7/22 15:12, Peter Maydell wrote: +static inline uint32_t f16mop_adj_pair(uint32_t pair, uint32_t pg, uint32_t neg) +{ +pair ^= neg; You seem to be negating element 1 of row and col ('neg' here is 1 << 15 unless I've misread something, and it gets passed to the calls for both the row a

[PATCH] target/riscv: fix right shifts shamt value for rv128c

2022-07-08 Thread Frédéric Pétrot
For rv128c right shifts, the 6-bit shamt is sign extended to 7 bits. Signed-off-by: Frédéric Pétrot --- target/riscv/insn16.decode | 7 --- disas/riscv.c | 27 +-- target/riscv/translate.c | 12 +++- 3 files changed, 36 insertions(+), 10 deleti

[PATCH v6 02/45] target/arm: Add infrastructure for disas_sme

2022-07-08 Thread Richard Henderson
This includes the build rules for the decoder, and the new file for translation, but excludes any instructions. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate-a64.h | 1 + target/arm/sme.decode | 20 target/arm/translate-a64.c |

[PATCH v6 01/45] target/arm: Handle SME in aarch64_cpu_dump_state

2022-07-08 Thread Richard Henderson
Dump SVCR, plus use the correct access check for Streaming Mode. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index ae6dca2f01..9c58be8b1

[PATCH v6 03/45] target/arm: Trap non-streaming usage when Streaming SVE is active

2022-07-08 Thread Richard Henderson
This new behaviour is in the ARM pseudocode function AArch64.CheckFPAdvSIMDEnabled, which applies to AArch32 via AArch32.CheckAdvSIMDOrFPEnabled when the EL to which the trap would be delivered is in AArch64 mode. Given that ARMv9 drops support for AArch32 outside EL0, the trap EL detection ought

[PATCH v6 07/45] target/arm: Mark PMULL, FMMLA as non-streaming

2022-07-08 Thread Richard Henderson
Mark these as a non-streaming instructions, which should trap if full a64 support is not enabled in streaming mode. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/sme-fa64.decode | 2 -- target/arm/translate-sve.c | 24 +++- 2 files changed, 15 i

[PATCH v6 05/45] target/arm: Mark RDFFR, WRFFR, SETFFR as non-streaming

2022-07-08 Thread Richard Henderson
Mark these as a non-streaming instructions, which should trap if full a64 support is not enabled in streaming mode. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/sme-fa64.decode | 2 -- target/arm/translate-sve.c | 9 ++--- 2 files changed, 6 insertions(+), 5 de

[PATCH v6 00/45] target/arm: Scalable Matrix Extension

2022-07-08 Thread Richard Henderson
Changes for v6: * Some sub-word big-endian addressing fixups (pmm). * Logic errors for BFMOPA/FMOPA (pmm). * Fix for PR_SME_SET_VL hflags rebuild. r~ Richard Henderson (45): target/arm: Handle SME in aarch64_cpu_dump_state target/arm: Add infrastructure for disas_sme target/arm: Trap

[PATCH v6 10/45] target/arm: Mark string/histo/crypto as non-streaming

2022-07-08 Thread Richard Henderson
Mark these as non-streaming instructions, which should trap if full a64 support is not enabled in streaming mode. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/sme-fa64.decode | 1 - target/arm/translate-sve.c | 35 ++- 2 files chang

[PATCH v6 04/45] target/arm: Mark ADR as non-streaming

2022-07-08 Thread Richard Henderson
Mark ADR as a non-streaming instruction, which should trap if full a64 support is not enabled in streaming mode. Removing entries from sme-fa64.decode is an easy way to see what remains to be done. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate.h | 7 +

[PATCH v6 11/45] target/arm: Mark gather/scatter load/store as non-streaming

2022-07-08 Thread Richard Henderson
Mark these as a non-streaming instructions, which should trap if full a64 support is not enabled in streaming mode. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/sme-fa64.decode | 9 - target/arm/translate-sve.c | 6 ++ 2 files changed, 6 insertions(+),

[PATCH v6 06/45] target/arm: Mark BDEP, BEXT, BGRP, COMPACT, FEXPA, FTSSEL as non-streaming

2022-07-08 Thread Richard Henderson
Mark these as a non-streaming instructions, which should trap if full a64 support is not enabled in streaming mode. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/sme-fa64.decode | 3 --- target/arm/translate-sve.c | 22 -- 2 files changed, 12 in

[PATCH v6 09/45] target/arm: Mark SMMLA, UMMLA, USMMLA as non-streaming

2022-07-08 Thread Richard Henderson
Mark these as a non-streaming instructions, which should trap if full a64 support is not enabled in streaming mode. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/sme-fa64.decode | 1 - target/arm/translate-sve.c | 12 ++-- 2 files changed, 6 insertions(+),

[PATCH v6 12/45] target/arm: Mark gather prefetch as non-streaming

2022-07-08 Thread Richard Henderson
Mark these as a non-streaming instructions, which should trap if full a64 support is not enabled in streaming mode. In this case, introduce PRF_ns (prefetch non-streaming) to handle the checks. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/sme-fa64.decode | 3 ---

[PATCH v6 08/45] target/arm: Mark FTSMUL, FTMAD, FADDA as non-streaming

2022-07-08 Thread Richard Henderson
Mark these as a non-streaming instructions, which should trap if full a64 support is not enabled in streaming mode. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/sme-fa64.decode | 3 --- target/arm/translate-sve.c | 15 +++ 2 files changed, 11 insertion

[PATCH v6 25/45] target/arm: Implement BFMOPA, BFMOPS

2022-07-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/helper-sme.h| 2 ++ target/arm/sme.decode | 2 ++ target/arm/sme_helper.c| 56 ++ target/arm/translate-sme.c | 30 4 files changed, 90 insertions(+) diff --git a/target/arm/hel

[PATCH v6 14/45] target/arm: Mark LD1RO as non-streaming

2022-07-08 Thread Richard Henderson
Mark these as a non-streaming instructions, which should trap if full a64 support is not enabled in streaming mode. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/sme-fa64.decode | 3 --- target/arm/translate-sve.c | 2 ++ 2 files changed, 2 insertions(+), 3 deletion

[PATCH v6 13/45] target/arm: Mark LDFF1 and LDNF1 as non-streaming

2022-07-08 Thread Richard Henderson
Mark these as a non-streaming instructions, which should trap if full a64 support is not enabled in streaming mode. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/sme-fa64.decode | 2 -- target/arm/translate-sve.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions

[PATCH v6 36/45] linux-user/aarch64: Tidy target_restore_sigframe error return

2022-07-08 Thread Richard Henderson
Fold the return value setting into the goto, so each point of failure need not do both. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- linux-user/aarch64/signal.c | 26 +++--- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/linux-user/aarch64

[PATCH v6 16/45] target/arm: Handle SME in sve_access_check

2022-07-08 Thread Richard Henderson
The pseudocode for CheckSVEEnabled gains a check for Streaming SVE mode, and for SME present but SVE absent. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/tar

[PATCH v6 24/45] target/arm: Implement FMOPA, FMOPS (non-widening)

2022-07-08 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/helper-sme.h| 5 +++ target/arm/sme.decode | 9 + target/arm/sme_helper.c| 69 ++ target/arm/translate-sme.c | 32 ++ 4 files changed, 115 insertions(+) diff --git a/target/arm/

[PATCH v6 15/45] target/arm: Add SME enablement checks

2022-07-08 Thread Richard Henderson
These functions will be used to verify that the cpu is in the correct state for a given instruction. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate-a64.h | 21 + target/arm/translate-a64.c | 34 ++ 2 files

[PATCH v6 27/45] target/arm: Implement SME integer outer product

2022-07-08 Thread Richard Henderson
This is SMOPA, SUMOPA, USMOPA_s, UMOPA, for both Int8 and Int16. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper-sme.h| 16 target/arm/sme.decode | 10 + target/arm/sme_helper.c| 82 ++ target/arm/tr

[PATCH v6 17/45] target/arm: Implement SME RDSVL, ADDSVL, ADDSPL

2022-07-08 Thread Richard Henderson
These SME instructions are nominally within the SVE decode space, so we add them to sve.decode and translate-sve.c. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v4: Add streaming_{vec,pred}_reg_size. --- target/arm/translate-a64.h | 12 target/arm/sve.decode

  1   2   >