Re: [PATCH v4 0/4] avocado-qemu: New SMMUv3 and intel IOMMU tests

2021-07-06 Thread Eric Auger
Hi William, Philippe, On 7/5/21 11:24 PM, Willian Rampazzo wrote: > On Mon, Jul 5, 2021 at 6:20 PM Philippe Mathieu-Daudé > wrote: >> On 7/5/21 11:10 PM, Willian Rampazzo wrote: >>> Hi Eric, >>> >>> On Mon, Jul 5, 2021 at 4:55 AM Eric Auger wrote: Hi Wainer, On 7/1/21 1:22 AM, Wa

[PATCH] configure: Remove the OBJCC variable from config-host.mak

2021-07-06 Thread Thomas Huth
The last user of this variable has been removed in commit 660f793093 ("Makefile: inline the relevant parts of rules.mak"), so we don't need this variable in config-host.mak anymore. Signed-off-by: Thomas Huth --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure

[PATCH v8 0/9] vhost-vdpa: add support for configure interrupt

2021-07-06 Thread Cindy Lu
these patches are add the support for configure interrupt These code are all tested in vp-vdpa (support configure interrupt) vdpa_sim (not support configure interrupt), virtio tap device test in virtio-pci bus and virtio-mmio bus Change in v2: Add support for virtio-mmio bus active the notifie

[PATCH v8 4/9] vhost-vdpa: add support for config interrupt call back

2021-07-06 Thread Cindy Lu
Add new call back function in vhost-vdpa, this call back function only supported in vhost-vdpa backend Signed-off-by: Cindy Lu --- hw/virtio/trace-events | 2 ++ hw/virtio/vhost-vdpa.c | 7 +++ 2 files changed, 9 insertions(+) diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events ind

[PATCH v8 5/9] vhost-net:add support for configure interrupt

2021-07-06 Thread Cindy Lu
Add configure notifier support in vhost and virtio driver When backend support VIRTIO_NET_F_STATUS,setup the configure interrupt function in vhost_net_start and release the related resource when vhost_net_stop Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 36 ++

[PATCH v8 1/9] virtio: introduce macro IRTIO_CONFIG_IRQ_IDX

2021-07-06 Thread Cindy Lu
In order to support configure interrupt for vhost-vdpa introduce VIRTIO_CONFIG_IRQ_IDX -1 as a queue index, then we can reuse the function guest_notifier_mask and guest_notifier_pending. we add the check of queue index, if the driver is not support configure interrupt, the function will just return

[PATCH v8 2/9] virtio-pci:decouple virtqueue from interrupt setting process

2021-07-06 Thread Cindy Lu
Decouple virtqueue from interrupt setting process to support config interrupt Now the code for interrupt/vector are coupling with the vq number, this patch will decouple the vritqueue numbers from these functions Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 55 ---

[PATCH v8 7/9] virtio-pci: decouple notifier from interrupt process

2021-07-06 Thread Cindy Lu
use the virtio_pci_get_notifier function to get the notifer, the input of the function will is the idx, the output is notifier and vector Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 45 -- 1 file changed, 35 insertions(+), 10 deletions(-) diff --

[PATCH v8 6/9] virtio-mmio: add support for configure interrupt

2021-07-06 Thread Cindy Lu
Add configure interrupt support for virtio-mmio bus. This interrupt will working while backend is vhost-vdpa Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio.c index

[PATCH v8 3/9] vhost: add new call back function for config interrupt

2021-07-06 Thread Cindy Lu
To support configure interrupt, we need to add a new call back function for config interrupt. Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h index 8a6f8e2a

[PATCH v8 9/9] virtio-pci: add support for configure interrupt

2021-07-06 Thread Cindy Lu
Add support for configure interrupt, use kvm_irqfd_assign and set the gsi to kernel. When the configure notifier was eventfd_signal by host kernel, this will finally inject an msix interrupt to guest Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 60 +++-

[PATCH v8 8/9] virtio-pci:decouple the single vector from the interrupt process

2021-07-06 Thread Cindy Lu
use the kvm_virtio_pci_vector_use_one and _release_one these funtion is to deal with the single vector, the whole process will finish in a loop with vq number. Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 109 - 1 file changed, 42 insertions(+), 67

[PATCH] config-host.mak: remove unused compiler-related lines

2021-07-06 Thread Paolo Bonzini
Most of the build is not done via Makefiles, therefore the toolchain variables are mostly unused. They are still used by tests/tcg and pc-bios/roms, but most of them are not needed there. Signed-off-by: Paolo Bonzini --- configure | 10 -- meson.build | 1 - 2 files changed, 11 delet

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

2021-07-06 Thread Eric Auger
Hi, On 6/12/21 8:52 AM, Eric Auger wrote: > > > On 6/2/21 8:00 PM, Shashi Mallela wrote: >> Added register definitions relevant to ITS,implemented overall >> ITS device framework with stubs for ITS control and translater >> regions read/write,extended ITS common to handle mmio init between >> ex

Re: [PATCH] configure: Remove the OBJCC variable from config-host.mak

2021-07-06 Thread Paolo Bonzini
On 06/07/21 09:19, Thomas Huth wrote: The last user of this variable has been removed in commit 660f793093 ("Makefile: inline the relevant parts of rules.mak"), so we don't need this variable in config-host.mak anymore. Signed-off-by: Thomas Huth There's quite a few more: CXX, OBJCC, ARFLAGS,

Re: [PATCH] configure: Remove the OBJCC variable from config-host.mak

2021-07-06 Thread Philippe Mathieu-Daudé
On 7/6/21 9:19 AM, Thomas Huth wrote: > The last user of this variable has been removed in commit > 660f793093 ("Makefile: inline the relevant parts of rules.mak"), > so we don't need this variable in config-host.mak anymore. > > Signed-off-by: Thomas Huth > --- > configure | 1 - > 1 file chang

Re: [PATCH] config-host.mak: remove unused compiler-related lines

2021-07-06 Thread Thomas Huth
On 06/07/2021 09.29, Paolo Bonzini wrote: Most of the build is not done via Makefiles, therefore the toolchain variables are mostly unused. They are still used by tests/tcg and pc-bios/roms, but most of them are not needed there. Signed-off-by: Paolo Bonzini --- configure | 10 --

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

2021-07-06 Thread Eric Auger
Hi, On 6/11/21 6:21 PM, Eric Auger wrote: > Hi, > > On 6/2/21 8:00 PM, Shashi Mallela wrote: >> Added register definitions relevant to ITS,implemented overall >> ITS device framework with stubs for ITS control and translater >> regions read/write,extended ITS common to handle mmio init between >>

Re: [PATCH 1/2] roms/u-boot: Bump ppce500 u-boot to v2021.07 to add eTSEC support

2021-07-06 Thread Philippe Mathieu-Daudé
Hi Bin, On 7/6/21 6:31 AM, Bin Meng wrote: > Update the QEMU shipped u-boot.e500 image built from U-Boot mainline > v2021.07 release, which added eTSEC support to the QEMU ppce500 target, > via the following U-Boot series: > > http://patchwork.ozlabs.org/project/uboot/list/?series=233875&state=

Re: [PATCH v5 01/10] hw/intc: GICv3 ITS initial framework

2021-07-06 Thread Eric Auger
Hi, On 6/30/21 5:31 PM, Shashi Mallela wrote: > Added register definitions relevant to ITS,implemented overall > ITS device framework with stubs for ITS control and translater > regions read/write,extended ITS common to handle mmio init between > existing kvm device and newer qemu device. > > Sig

Re: [PATCH 18/18] vhost-vdpa: multiqueue support

2021-07-06 Thread Jason Wang
在 2021/7/1 下午2:51, Eugenio Perez Martin 写道: * provide control queue via peers as well. */ if (n->nic_conf.peers.queues) { diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index cc11b2ec40..048344b4bc 100644 --- a/net/vhost-vdpa.c +++ b/net/vhost-vdpa.c @@ -18,6 +18,7 @@ #i

Re: [PATCH 1/2] roms/u-boot: Bump ppce500 u-boot to v2021.07 to add eTSEC support

2021-07-06 Thread Bin Meng
Hi Philippe, On Tue, Jul 6, 2021 at 3:41 PM Philippe Mathieu-Daudé wrote: > > Hi Bin, > > On 7/6/21 6:31 AM, Bin Meng wrote: > > Update the QEMU shipped u-boot.e500 image built from U-Boot mainline > > v2021.07 release, which added eTSEC support to the QEMU ppce500 target, > > via the following U

Re: [PATCH 07/18] vhost-vdpa: tweak the error label in vhost_vdpa_add()

2021-07-06 Thread Jason Wang
在 2021/6/23 下午11:03, Stefano Garzarella 写道: On Mon, Jun 21, 2021 at 12:16:39PM +0800, Jason Wang wrote: Introduce new error label to avoid the unnecessary checking of net pointer. Fixes: 1e0a84ea49b68 ("vhost-vdpa: introduce vhost-vdpa net client") Signed-off-by: Jason Wang --- net/vhost-vdp

Re: [PATCH] config-host.mak: remove unused compiler-related lines

2021-07-06 Thread Paolo Bonzini
On 06/07/21 09:37, Thomas Huth wrote: I wasn't quite sure whether we'd still need some of those e.g. for compiling capstone or dtc, but looking at meson.build again, I think you're right, we're not using "make" to build those anymore, right? Yeah, only the ROMs are built via makefiles (I'd l

Re: [PATCH 07/18] vhost-vdpa: tweak the error label in vhost_vdpa_add()

2021-07-06 Thread Jason Wang
在 2021/7/6 下午4:03, Jason Wang 写道: 在 2021/6/23 下午11:03, Stefano Garzarella 写道: On Mon, Jun 21, 2021 at 12:16:39PM +0800, Jason Wang wrote: Introduce new error label to avoid the unnecessary checking of net pointer. Fixes: 1e0a84ea49b68 ("vhost-vdpa: introduce vhost-vdpa net client") Signed-o

[PATCH v3] Set icon for QEMU binary on Mac OS

2021-07-06 Thread Paolo Bonzini
From: John Arbuckle Before switching the build system over to Meson, an icon was added to the QEMU binary on Mac OS. This patch adds back that feature; it piggybacks on the existing scripts/entitlement.sh, which already does in-place changes to the executable on Darwin. Signed-off-by: John Arbuc

[PATCH] target/xtensa/xtensa-semi: Fix compilation problem on Haiku

2021-07-06 Thread Thomas Huth
The errno numbers are very large on Haiku, so the linking currently fails there with a "final link failed: memory exhausted" error message. We should not use the errno number as array indexes here, thus convert the code to a switch-case statement instead. A clever compiler should be able to optimiz

Re: [question] Shall we flush ITS tables into guest RAM when shutdown the VM?

2021-07-06 Thread Kunkun Jiang
Hi Eric, On 2021/6/30 17:16, Eric Auger wrote: On 6/30/21 3:38 AM, Kunkun Jiang wrote: On 2021/6/30 4:14, Eric Auger wrote: Hi Kunkun, On 6/29/21 11:33 AM, Kunkun Jiang wrote: Hi all, Accroding to the patch cddafd8f353d2d251b1a5c6c948a577a85838582, our original intention is to flush the IT

Re: [PATCH v4 11/22] tests/docker: expand centos8 package list

2021-07-06 Thread Alex Bennée
Daniel P. Berrangé writes: > On Mon, Jul 05, 2021 at 10:41:55PM +0100, Daniel P. Berrangé wrote: >> On Mon, Jul 05, 2021 at 09:27:56PM +0100, Alex Bennée wrote: >> > >> > Daniel P. Berrangé writes: >> > >> > > This is the fully expanded list of build pre-requisites QEMU can >> > > conceivabl

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

2021-07-06 Thread Thomas Huth
On 16/04/2021 14.52, Thomas Huth wrote: QEMU currently crashes when the user tries to do something like: qemu-system-x86_64 -M x-remote -device piix3-ide It's now several months later already, and this crash has still not been fixed yet. The next softfreeze is around the corner and the "de

Re: [PATCH] target/xtensa/xtensa-semi: Fix compilation problem on Haiku

2021-07-06 Thread Philippe Mathieu-Daudé
On 7/6/21 10:18 AM, Thomas Huth wrote: > The errno numbers are very large on Haiku, so the linking currently > fails there with a "final link failed: memory exhausted" error > message. We should not use the errno number as array indexes here, > thus convert the code to a switch-case statement inste

Re: [PATCH 07/18] vhost-vdpa: tweak the error label in vhost_vdpa_add()

2021-07-06 Thread Stefano Garzarella
On Tue, Jul 06, 2021 at 04:10:22PM +0800, Jason Wang wrote: 在 2021/7/6 下午4:03, Jason Wang 写道: 在 2021/6/23 下午11:03, Stefano Garzarella 写道: On Mon, Jun 21, 2021 at 12:16:39PM +0800, Jason Wang wrote: Introduce new error label to avoid the unnecessary checking of net pointer. Fixes: 1e0a84ea49

[PATCH V2 02/18] vhost: use unsigned int for nvqs

2021-07-06 Thread Jason Wang
Switch to use unsigned int for nvqs since it's not expected to be negative. Reviewed-by: Eli Cohen Signed-off-by: Jason Wang --- include/hw/virtio/vhost.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index 21a9a52088..

[PATCH V2 04/18] vhost-vdpa: remove the unnecessary check in vhost_vdpa_add()

2021-07-06 Thread Jason Wang
The VhostVDPAState is just allocated by qemu_new_net_client() via g_malloc0() in net_vhost_vdpa_init(). So s->vhost_net is NULL for sure, let's remove this unnecessary check in vhost_vdpa_add(). Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 4 1 file changed, 4 deletions(-) diff --git a

[PATCH V2 03/18] vhost_net: do not assume nvqs is always 2

2021-07-06 Thread Jason Wang
This patch switches to initialize dev.nvqs from the VhostNetOptions instead of assuming it was 2. This is useful for implementing control virtqueue support which will be a single vhost_net structure with a single cvq. Note that nvqs is still set to 2 for all users and this patch does not change fu

[PATCH V2 00/18] vhost-vDPA multiqueue

2021-07-06 Thread Jason Wang
Hi All: This patch implements the multiqueue support for vhost-vDPA. The most important requirement the control virtqueue support. The virtio-net and vhost-net core are tweak to support control virtqueue as if what data queue pairs are done: a dedicated vhost_net device which is coupled with the N

[PATCH V2 06/18] vhost-vdpa: fix leaking of vhost_net in vhost_vdpa_add()

2021-07-06 Thread Jason Wang
Fixes: 1e0a84ea49b68 ("vhost-vdpa: introduce vhost-vdpa net client") Reviewed-by: Stefano Garzarella Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index f5689a7c32..21f09c546f 100644 --- a/net/vhost-vdpa.c +

[PATCH V2 05/18] vhost-vdpa: don't cleanup twice in vhost_vdpa_add()

2021-07-06 Thread Jason Wang
The previous vhost_net_cleanup is sufficient for freeing, calling vhost_vdpa_del() in this case will lead an extra round of free. Note that this kind of "double free" is safe since vhost_dev_cleanup() zero the whole structure. Reviewed-by: Stefano Garzarella Signed-off-by: Jason Wang --- net/vh

[PATCH V2 10/18] vhost-vdpa: open device fd in net_init_vhost_vdpa()

2021-07-06 Thread Jason Wang
This path switches to open device fd in net_init_vhost_vpda(). This is used to prepare for the multiqueue support. Reviewed-by: Stefano Garzarella Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/net/vhos

[PATCH V2 01/18] vhost_net: remove the meaningless assignment in vhost_net_start_one()

2021-07-06 Thread Jason Wang
The nvqs and vqs have been initialized during vhost_net_init() and are not expected to change during the life cycle of vhost_net structure. So this patch removes the meaningless assignment. Reviewed-by: Eli Cohen Signed-off-by: Jason Wang --- hw/net/vhost_net.c | 3 --- 1 file changed, 3 deleti

[PATCH V2 11/18] vhost-vdpa: classify one time request

2021-07-06 Thread Jason Wang
Vhost-vdpa uses one device multiqueue queue (pairs) model. So we need to classify the one time request (e.g SET_OWNER) and make sure those request were only called once per device. This is used for multiqueue support. Signed-off-by: Jason Wang --- hw/virtio/vhost-vdpa.c | 51 +++

[PATCH V2 08/18] vhost-vdpa: fix the wrong assertion in vhost_vdpa_init()

2021-07-06 Thread Jason Wang
Vhost_vdpa_add() can fail for various reasons, so the assertion of the succeed is wrong. Instead, we should free the NetClientState and propagate the error to the caller Reviewed-by: Stefano Garzarella Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 5 - 1 file changed, 4 insertions(+), 1

[PATCH V2 07/18] vhost-vdpa: tweak the error label in vhost_vdpa_add()

2021-07-06 Thread Jason Wang
Introduce new error label to avoid the unnecessary checking of net pointer. Fixes: 1e0a84ea49b68 ("vhost-vdpa: introduce vhost-vdpa net client") Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/net/vhost-vdpa.c b/net

[PATCH V2 13/18] vhost-vdpa: let net_vhost_vdpa_init() returns NetClientState *

2021-07-06 Thread Jason Wang
This patch switches to let net_vhost_vdpa_init() to return NetClientState *. This is used for the callers to allocate multiqueue NetClientState for multiqueue support. Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff

[PATCH V2 14/18] net: introduce control client

2021-07-06 Thread Jason Wang
This patch introduces a boolean for the device has control queue which can accepts control command via network queue. The first user would be the control virtqueue support for vhost. Signed-off-by: Jason Wang --- include/net/net.h | 5 + net/net.c | 24 +--- 2 f

[PATCH V2 09/18] vhost-vdpa: remove the unncessary queue_index assignment

2021-07-06 Thread Jason Wang
The queue_index of NetClientState should be assigned in set_netdev() afterwards, so trying to net_vhost_vdpa_init() is meaningless. This patch removes this. Reviewed-by: Stefano Garzarella Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 1 - 1 file changed, 1 deletion(-) diff --git a/net/vhos

[PATCH V2 12/18] vhost-vdpa: prepare for the multiqueue support

2021-07-06 Thread Jason Wang
Unlike vhost-kernel, vhost-vdpa adapts a single device multiqueue model. So we need to simply use virtqueue index as the vhost virtqueue index. This is a must for multiqueue to work for vhost-vdpa. Signed-off-by: Jason Wang --- hw/virtio/vhost-vdpa.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH V2 17/18] virtio-net: vhost control virtqueue support

2021-07-06 Thread Jason Wang
This patch implements the control virtqueue support for vhost. This requires virtio-net to figure out the datapath queue pairs and control virtqueue via is_datapath and pass the number of those two types of virtqueues to vhost_net_start()/vhost_net_stop(). Signed-off-by: Jason Wang --- hw/net/vi

[PATCH V2 18/18] vhost-vdpa: multiqueue support

2021-07-06 Thread Jason Wang
This patch implements the multiqueue support for vhost-vdpa. This is done simply by reading the number of queue pairs from the config space and initialize the datapath and control path net client. Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 104 +++---

[PATCH V2 15/18] vhost-net: control virtqueue support

2021-07-06 Thread Jason Wang
We assume there's no cvq in the past, this is not true when we need control virtqueue support for vhost-user backends. So this patch implements the control virtqueue support for vhost-net. As datapath, the control virtqueue is also required to be coupled with the NetClientState. The vhost_net_start

[PATCH V2 16/18] virito-net: use "qps" instead of "queues" when possible

2021-07-06 Thread Jason Wang
Most of the time, "queues" really means queue pairs. So this patch switch to use "qps" to avoid confusion. Signed-off-by: Jason Wang --- hw/net/vhost_net.c | 6 +- hw/net/virtio-net.c| 150 - include/hw/virtio/virtio-net.h | 4 +- 3 fil

Re: [PATCH 07/18] vhost-vdpa: tweak the error label in vhost_vdpa_add()

2021-07-06 Thread Jason Wang
On Tue, Jul 6, 2021 at 4:27 PM Stefano Garzarella wrote: > > On Tue, Jul 06, 2021 at 04:10:22PM +0800, Jason Wang wrote: > > > >在 2021/7/6 下午4:03, Jason Wang 写道: > >> > >>在 2021/6/23 下午11:03, Stefano Garzarella 写道: > >>>On Mon, Jun 21, 2021 at 12:16:39PM +0800, Jason Wang wrote: > Introduce ne

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

2021-07-06 Thread Philippe Mathieu-Daudé
On 7/6/21 10:24 AM, Thomas Huth wrote: > On 16/04/2021 14.52, Thomas Huth wrote: >> QEMU currently crashes when the user tries to do something like: >> >>   qemu-system-x86_64 -M x-remote -device piix3-ide > > It's now several months later already, and this crash has still not been > fixed yet. Th

Re: [RFC v6 08/13] target/s390x: split cpu-dump from helper.c

2021-07-06 Thread Al Cho
On Mon, 2021-07-05 at 08:25 +0200, Claudio Fontana wrote: > On 7/2/21 9:25 AM, Al Cho wrote: > > On Thu, 2021-07-01 at 14:35 +0200, Thomas Huth wrote: > > > On 29/06/2021 16.19, Cho, Yu-Chen wrote: > > > > Splitting this functionality also allows us to make helper.c > > > > sysemu- > > > > only. >

Re: [PATCH 01/10] iotests/297: modify is_python_file to work from any CWD

2021-07-06 Thread Vladimir Sementsov-Ogievskiy
25.06.2021 21:20, John Snow wrote: Add a directory argument to is_python_file to allow it to work correctly no matter what CWD we happen to run it from. This is done in anticipation of running the iotests from another directory (./python/). Signed-off-by: John Snow Reviewed-by: Vladimir Sement

Re: [PATCH] hw/net: Discard overly fragmented packets

2021-07-06 Thread Mauro Matteo Cascella
Hello Philippe, I think you don't need root privileges to craft such a highly fragmented packet from within the guest (tools like hping3 or nmap come to mind). Right? If so, we may consider allocating a CVE for this bug. If not, this is not CVE worthy - root does not need an assertion failure to c

Re: [PATCH 02/10] iotests/297: Add get_files() function

2021-07-06 Thread Vladimir Sementsov-Ogievskiy
25.06.2021 21:20, John Snow wrote: Split out file discovery into its own method to begin separating out the "environment setup" and "test execution" phases. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/297 | 11 +-- 1 file changed, 9

Re: [PATCH 03/10] iotests/297: Don't rely on distro-specific linter binaries

2021-07-06 Thread Vladimir Sementsov-Ogievskiy
25.06.2021 21:20, John Snow wrote: 'pylint-3' is another Fedora-ism. Use "python3 -m pylint" or "python3 -m mypy" to access these scripts instead. This style of invocation will prefer the "correct" tool when run in a virtual environment. Note that we still check for "pylint-3" before the test be

Re: [RFC v6 08/13] target/s390x: split cpu-dump from helper.c

2021-07-06 Thread Thomas Huth
On 06/07/2021 10.47, Al Cho wrote: On Mon, 2021-07-05 at 08:25 +0200, Claudio Fontana wrote: On 7/2/21 9:25 AM, Al Cho wrote: On Thu, 2021-07-01 at 14:35 +0200, Thomas Huth wrote: On 29/06/2021 16.19, Cho, Yu-Chen wrote: Splitting this functionality also allows us to make helper.c sysemu- onl

Re: [PATCH] hw/net: Discard overly fragmented packets

2021-07-06 Thread Philippe Mathieu-Daudé
Hi Mauro, On 7/6/21 11:00 AM, Mauro Matteo Cascella wrote: > Hello Philippe, > > I think you don't need root privileges to craft such a highly > fragmented packet from within the guest (tools like hping3 or nmap > come to mind). Right? If so, we may consider allocating a CVE for this > bug. If no

Re: [PATCH v5 1/2] target/s390x: Fix SIGILL/SIGFPE/SIGTRAP psw.addr reporting

2021-07-06 Thread Ulrich Weigand
On Mon, Jul 05, 2021 at 10:19:56PM +0200, Ilya Leoshkevich wrote: > On Mon, 2021-07-05 at 21:18 +0200, David Hildenbrand wrote: > > > > Looks better to me, but I'm not an expert on signals, so I cannot tell > > what si_addr is supposed to contain in that case. > > > > Thanks, I'll send a v6 the

Re: [RFC v6 08/13] target/s390x: split cpu-dump from helper.c

2021-07-06 Thread Claudio Fontana
On 7/6/21 11:06 AM, Thomas Huth wrote: > On 06/07/2021 10.47, Al Cho wrote: >> On Mon, 2021-07-05 at 08:25 +0200, Claudio Fontana wrote: >>> On 7/2/21 9:25 AM, Al Cho wrote: On Thu, 2021-07-01 at 14:35 +0200, Thomas Huth wrote: > On 29/06/2021 16.19, Cho, Yu-Chen wrote: >> Splitting th

Re: [PATCH v5 04/10] hw/intc: GICv3 ITS Command processing

2021-07-06 Thread Peter Maydell
On Tue, 6 Jul 2021 at 04:25, wrote: > > On Mon, 2021-07-05 at 20:47 -0400, shashi.mall...@linaro.org wrote: > > On Mon, 2021-07-05 at 15:54 +0100, Peter Maydell wrote: > > > I missed this the first time around, but I don't think this is > > > right. > > > Different CPUs could have different GICR_P

Re: [PATCH v5 04/10] hw/intc: GICv3 ITS Command processing

2021-07-06 Thread Eric Auger
Hi, On 7/5/21 4:07 PM, Peter Maydell wrote: > On Wed, 30 Jun 2021 at 16:32, Shashi Mallela > wrote: >> >> Added ITS command queue handling for MAPTI,MAPI commands,handled ITS >> translation which triggers an LPI via INT command as well as write >> to GITS_TRANSLATER register,defined enum to diff

Re: [PATCH v5 02/10] hw/intc: GICv3 ITS register definitions added

2021-07-06 Thread Eric Auger
Hi, On 6/30/21 5:31 PM, Shashi Mallela wrote: > Defined descriptors for ITS device table,collection table and ITS > command queue entities.Implemented register read/write functions, > extract ITS table parameters and command queue parameters,extended > gicv3 common to capture qemu address space(wh

Re: [PATCH v6 1/2] target/s390x: Fix SIGILL and SIGFPE psw.addr reporting

2021-07-06 Thread David Hildenbrand
On 05.07.21 23:04, Ilya Leoshkevich wrote: For SIGILL, SIGFPE and SIGTRAP the PSW must point after the instruction, and at the instruction for other signals. Currently under qemu-user for SIGFILL and SIGFPE it points at the instruction. Fix by advancing psw.addr for these signals. Buglink: http

Re: [PATCH v5 03/10] hw/intc: GICv3 ITS command queue framework

2021-07-06 Thread Eric Auger
Hi Shashi, On 6/30/21 5:31 PM, Shashi Mallela wrote: > Added functionality to trigger ITS command queue processing on > write to CWRITE register and process each command queue entry to > identify the command type and handle commands like MAPD,MAPC,SYNC. > > Signed-off-by: Shashi Mallela > Review

[PATCH 2/4] hw/nvme: mark nvme-subsys non-hotpluggable

2021-07-06 Thread Klaus Jensen
From: Klaus Jensen We currently lack the infrastructure to handle subsystem hotplugging, so disable it. Signed-off-by: Klaus Jensen --- hw/nvme/subsys.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/nvme/subsys.c b/hw/nvme/subsys.c index 192223d17ca1..dc7a96862f37 100644 --- a/hw/nvme

Re: [PATCH 04/10] iotests/297: Create main() function

2021-07-06 Thread Vladimir Sementsov-Ogievskiy
25.06.2021 21:20, John Snow wrote: Instead of running "run_linters" directly, create a main() function that will be responsible for environment setup, leaving run_linters() responsible only for execution of the linters. (That environment setup will be moved over in forthcoming commits.) Signed-

[PATCH 0/4] hw/nvme: fix controller hotplugging

2021-07-06 Thread Klaus Jensen
From: Klaus Jensen Back in May, Hannes posted a fix[1] to re-enable NVMe PCI hotplug. We discussed a bit back and fourth and I mentioned that the core issue was an artifact of the parent/child relationship stemming from the qdev setup we have with namespaces attaching to controller through a qdev

[PATCH 1/4] hw/nvme: remove NvmeCtrl parameter from ns setup/check functions

2021-07-06 Thread Klaus Jensen
From: Klaus Jensen The nvme_ns_setup and nvme_ns_check_constraints should not depend on the controller state. Refactor and remove it. Signed-off-by: Klaus Jensen --- hw/nvme/nvme.h | 2 +- hw/nvme/ctrl.c | 2 +- hw/nvme/ns.c | 37 ++--- 3 files changed, 20 i

RE: [PATCH] migration: Move bitmap_mutex out of migration_bitmap_clear_dirty()

2021-07-06 Thread Wang, Wei W
On Monday, July 5, 2021 9:42 PM, David Hildenbrand wrote: > On 03.07.21 04:53, Wang, Wei W wrote: > > On Friday, July 2, 2021 3:07 PM, David Hildenbrand wrote: > >> On 02.07.21 04:48, Wang, Wei W wrote: > >>> On Thursday, July 1, 2021 10:22 PM, David Hildenbrand wrote: > On 01.07.21 14:51, Pet

[PATCH 4/4] hw/nvme: fix controller hot unplugging

2021-07-06 Thread Klaus Jensen
From: Klaus Jensen Prior to this patch the nvme-ns devices are always children of the NvmeBus owned by the NvmeCtrl. This causes the namespaces to be unrealized when the parent device is removed. However, when subsystems are involved, this is not what we want since the namespaces may be attached

[PATCH] misc: Remove redundant new line in perror()

2021-07-06 Thread Li Zhijian
Signed-off-by: Li Zhijian --- migration/rdma.c | 2 +- softmmu/cpus.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index 7fb9646f6ef..e99e2e16a73 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -1133,7 +1133,7 @@ static int q

[PATCH 3/4] hw/nvme: unregister controller with subsystem at exit

2021-07-06 Thread Klaus Jensen
From: Klaus Jensen Make sure the controller is unregistered from the subsystem when device is removed. Signed-off-by: Klaus Jensen --- hw/nvme/nvme.h | 1 + hw/nvme/ctrl.c | 4 hw/nvme/subsys.c | 5 + 3 files changed, 10 insertions(+) diff --git a/hw/nvme/nvme.h b/hw/nvme/nvme.h

Re: [PATCH 05/10] iotests/297: Separate environment setup from test execution

2021-07-06 Thread Vladimir Sementsov-Ogievskiy
25.06.2021 21:20, John Snow wrote: Move environment setup into main(), leaving pure test execution behind in run_linters(). Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

Re: [PATCH 06/10] iotests/297: Add 'directory' argument to run_linters

2021-07-06 Thread Vladimir Sementsov-Ogievskiy
25.06.2021 21:20, John Snow wrote: Allow run_linters to work well if it's executed from a different directory. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

[PATCH] docs/system: riscv: Update Microchip Icicle Kit for direct kernel boot

2021-07-06 Thread Bin Meng
From: Bin Meng This adds a new section in the documentation to demonstrate how to use the new direct kernel boot feature for Microchip Icicle Kit, other than the HSS bootflow, using an upstream U-Boot v2021.07 image as an example. It also updates the truth table to have a new '-dtb' column which

Re: [PATCH v4 1/4] s390x/css: Introduce an ESW struct

2021-07-06 Thread Philippe Mathieu-Daudé
Hi Eric, On 6/18/21 1:25 AM, Eric Farman wrote: > The Interrupt Response Block is comprised of several other > structures concatenated together, but only the 12-byte > Subchannel-Status Word (SCSW) is defined as a proper struct. > Everything else is a simple array of 32-bit words. > > Let's defin

Re: [PATCH 07/10] iotests/297: return error code from run_linters()

2021-07-06 Thread Vladimir Sementsov-Ogievskiy
25.06.2021 21:20, John Snow wrote: This turns run_linters() into a bit of a hybrid test; returning non-zero on failed execution while also printing diffable information. This is done for the benefit of the avocado simple test runner, which will soon be attempting to execute this test from a diffe

Re: [PATCH] misc: Remove redundant new line in perror()

2021-07-06 Thread Philippe Mathieu-Daudé
Cc'ing qemu-trivial@ On 7/6/21 11:44 AM, Li Zhijian wrote: > Signed-off-by: Li Zhijian > --- > migration/rdma.c | 2 +- > softmmu/cpus.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/migration/rdma.c b/migration/rdma.c > index 7fb9646f6ef..e99e2e16a73 100644 > --

[PATCH 01/18] crypto: remove conditional around 3DES crypto test cases

2021-07-06 Thread Daniel P . Berrangé
The main method checks whether the cipher choice is supported at runtime, so there is no need for compile time conditions. Signed-off-by: Daniel P. Berrangé --- tests/unit/test-crypto-cipher.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/unit/test-crypto-cipher.c b/tests/unit/test-

[PATCH 06/18] crypto: drop gcrypt thread initialization code

2021-07-06 Thread Daniel P . Berrangé
This is only required on gcrypt < 1.6.0, and is thus obsolete since commit b33a84632a3759c00320fd80923aa963c11207fc Author: Daniel P. Berrangé Date: Fri May 14 13:04:08 2021 +0100 crypto: bump min gcrypt to 1.8.0, dropping RHEL-7 support Signed-off-by: Daniel P. Berrangé --- crypt

[PATCH 05/18] crypto: fix gcrypt min version 1.8 regression

2021-07-06 Thread Daniel P . Berrangé
The min gcrypt was bumped: commit b33a84632a3759c00320fd80923aa963c11207fc Author: Daniel P. Berrangé Date: Fri May 14 13:04:08 2021 +0100 crypto: bump min gcrypt to 1.8.0, dropping RHEL-7 support but this was accidentally lost in conflict resolution for commit 5761251138cb69c310

[PATCH 07/18] crypto: drop custom XTS support in gcrypt driver

2021-07-06 Thread Daniel P . Berrangé
The XTS cipher mode was introduced in gcrypt 1.8.0, which matches QEMU's current minimum version. Signed-off-by: Daniel P. Berrangé --- crypto/cipher-gcrypt.c.inc | 127 - meson.build| 14 +--- 2 files changed, 1 insertion(+), 140 deletions(-)

[PATCH 09/18] crypto: delete built-in DES implementation

2021-07-06 Thread Daniel P . Berrangé
The built-in DES implementation is used for the VNC server password authentication scheme. When building system emulators it is reasonable to expect that an external crypto library is being used. It is thus not worth keeping a home grown DES implementation in tree. Signed-off-by: Daniel P. Berrang

[PATCH 03/18] crypto: skip essiv ivgen tests if AES+ECB isn't available

2021-07-06 Thread Daniel P . Berrangé
Signed-off-by: Daniel P. Berrangé --- tests/unit/test-crypto-ivgen.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/unit/test-crypto-ivgen.c b/tests/unit/test-crypto-ivgen.c index f581e6aba7..29630ed348 100644 --- a/tests/unit/test-crypto-ivgen.c +++ b/te

[PATCH 12/18] crypto: flip priority of backends to prefer gcrypt

2021-07-06 Thread Daniel P . Berrangé
Originally we preferred to use nettle, over gcrypt because gnutls already links to nettle and thus it minimizes the dependencies. In retrospect this was the wrong criteria to optimize for. Currently shipping versions of gcrypt have cipher impls that are massively faster than those in nettle and th

[PATCH 02/18] crypto: remove obsolete crypto test condition

2021-07-06 Thread Daniel P . Berrangé
Since we now require gcrypt >= 1.8.0, there is no need to exclude the pbkdf test case. Signed-off-by: Daniel P. Berrangé --- tests/unit/test-crypto-pbkdf.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/unit/test-crypto-pbkdf.c b/tests/unit/test-crypto-pbkdf.c inde

[PATCH 18/18] crypto: prefer gnutls as the crypto backend if new enough

2021-07-06 Thread Daniel P . Berrangé
If we have gnutls >= 3.6.13, then it has enough functionality and performance that we can use it as the preferred crypto backend. Signed-off-by: Daniel P. Berrangé --- meson.build | 59 +++-- 1 file changed, 35 insertions(+), 24 deletions(-) diff

[PATCH 04/18] crypto: use &error_fatal in crypto tests

2021-07-06 Thread Daniel P . Berrangé
Using error_fatal provides better diagnostics when tests failed, than using asserts, because we see the text of the error message. Signed-off-by: Daniel P. Berrangé --- tests/unit/test-crypto-hash.c | 12 ++-- tests/unit/test-crypto-hmac.c | 28 2 files chang

[PATCH 00/18] crypto: misc cleanup and introduce gnutls backend driver

2021-07-06 Thread Daniel P . Berrangé
Currently the crypto layer has a choice of backend drivers * builtin - AES/DES for ciphers using in-tree impl, glib for hash / hmac * gcrypt - all ciphers and al hash/hmac algs * nettle - all ciphers and al hash/hmac algs We currently default to nettle because that minimizes the d

[PATCH 08/18] crypto: add crypto tests for single block DES-ECB and DES-CBC

2021-07-06 Thread Daniel P . Berrangé
The GNUTLS crypto provider doesn't support DES-ECB, only DES-CBC. We can use the latter to simulate the former, if we encrypt only 1 block (8 bytes) of data at a time, using a all-zeros IV. This is a very inefficient way to use the QCryptoCipher APIs, but since the VNC authentication challenge is o

[PATCH 11/18] crypto: rename des-rfb cipher to just des

2021-07-06 Thread Daniel P . Berrangé
Currently the crypto layer exposes support for a 'des-rfb' algorithm which is just normal single-DES, with the bits in each key byte reversed. This special key munging is required by the RFB protocol password authentication mechanism. Since the crypto layer is generic shared code, it makes more se

[PATCH 13/18] crypto: introduce build system for gnutls crypto backend

2021-07-06 Thread Daniel P . Berrangé
This introduces the build logic needed to decide whether we can use gnutls as a crypto driver backend. The actual implementations will be introduced in following patches. We only wish to use gnutls if it has version 3.6.14 or newer, because that is what finally brings HW accelerated AES-XTS mode fo

[PULL 03/40] ui: Fix the "-display sdl,window_close=..." parameter

2021-07-06 Thread Paolo Bonzini
From: Thomas Huth According to the QAPI schema, there is a "-" and not a "_" between "window" and "close", and we're also talking about "window-close" in the long parameter description in qemu-options.hx, so we should make sure that we rather use the variant with the "-" by default instead of onl

[PATCH 10/18] crypto: delete built-in XTS cipher mode support

2021-07-06 Thread Daniel P . Berrangé
The built-in AES+XTS implementation is used for the LUKS encryption When building system emulators it is reasonable to expect that an external crypto library is being used instead. The performance of the builtin XTS implementation is terrible as it has no CPU acceleration support. It is thus not wo

[PULL 12/40] target/i386: Make x86_ext_save_areas visible outside cpu.c

2021-07-06 Thread Paolo Bonzini
From: David Edmondson Provide visibility of the x86_ext_save_areas array and associated type outside of cpu.c. Signed-off-by: David Edmondson Message-Id: <20210705104632.2902400-6-david.edmond...@oracle.com> Signed-off-by: Paolo Bonzini --- target/i386/cpu.c | 7 +-- target/i386/cpu.h | 9

Re: [RFC PATCH] hw/display/virtio-gpu: Fix memory leak (CID 1453811)

2021-07-06 Thread Philippe Mathieu-Daudé
If this is not a proper fix, what would be the correct one? On 6/21/21 11:59 AM, Philippe Mathieu-Daudé wrote: > ping? > > On 6/14/21 12:52 PM, Philippe Mathieu-Daudé wrote: >> ping? >> >> On 5/31/21 12:19 PM, Philippe Mathieu-Daudé wrote: >>> To avoid leaking memory on the error path, reorder th

[PATCH 15/18] crypto: add gnutls hash provider

2021-07-06 Thread Daniel P . Berrangé
This adds support for using gnutls as a provider of the crypto hash APIs. Signed-off-by: Daniel P. Berrangé --- crypto/hash-gnutls.c | 104 +++ crypto/meson.build | 2 + 2 files changed, 106 insertions(+) create mode 100644 crypto/hash-gnutls.c diff

  1   2   3   4   5   >