[Qemu-devel] [PATCH v3 21/23] hw/rdma: Do not use bitmap_zero_extend to free bitmap

2018-11-12 Thread Yuval Shaia
bitmap_zero_extend is designed to work for extending, not for shrinking. Using g_free instead. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_rm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c index 0a5ab8935a..35a96d9a64 100644 --- a/hw/r

[Qemu-devel] [PATCH v3 14/23] hw/rdma: Initialize node_guid from vmxnet3 mac address

2018-11-12 Thread Yuval Shaia
node_guid should be set once device is load. Make node_guid be GID format (32 bit) of PCI function 0 vmxnet3 device's MAC. A new function was added to do the conversion. So for example the MAC 56:b6:44:e9:62:dc will be converted to GID 54b6:44ff:fee9:62dc. Signed-off-by: Yuval Shaia --- hw/rdma

Re: [Qemu-devel] [PATCH] slirp: add tftp tracing

2018-11-12 Thread Liam Merwick
On 13/11/2018 07:03, Gerd Hoffmann wrote: Useful when debugging pxeboot, to see what the guest tries to do. Signed-off-by: Gerd Hoffmann Reviewed-by: Liam Merwick --- Makefile.objs | 1 + slirp/tftp.c | 3 +++ slirp/trace-events | 5 + 3 files changed, 9 insertions(+

[Qemu-devel] [PATCH v3 19/23] vl: Introduce shutdown_notifiers

2018-11-12 Thread Yuval Shaia
Notifier will be used for signaling shutdown event to inform system is shutdown. This will allow devices and other component to run some cleanup code needed before VM is shutdown. Signed-off-by: Yuval Shaia --- include/sysemu/sysemu.h | 1 + vl.c| 15 ++- 2 files

[Qemu-devel] [PATCH v3 13/23] hw/pvrdma: Make sure PCI function 0 is vmxnet3

2018-11-12 Thread Yuval Shaia
Guest driver enforces it, we should also. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma.h | 2 ++ hw/rdma/vmw/pvrdma_main.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/hw/rdma/vmw/pvrdma.h b/hw/rdma/vmw/pvrdma.h index b019cb843a..10a3c4fb7c 100644 --- a/hw/rdma/vmw/pvrdma.h

[Qemu-devel] [PATCH v3 20/23] hw/pvrdma: Clean device's resource when system is shutdown

2018-11-12 Thread Yuval Shaia
In order to clean some external resources such as GIDs, QPs etc, register to receive notification when VM is shutdown. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma.h | 2 ++ hw/rdma/vmw/pvrdma_main.c | 12 2 files changed, 14 insertions(+) diff --git a/hw/rdma/vmw/pvrdma

[Qemu-devel] [PATCH v3 11/23] hw/pvrdma: Add support to allow guest to configure GID table

2018-11-12 Thread Yuval Shaia
The control over the RDMA device's GID table is done by updating the device's Ethernet function addresses. Usually the first GID entry is determine by the MAC address, the second by the first IPv6 address and the third by the IPv4 address. Other entries can be added by adding more IP addresses. The

[Qemu-devel] [PATCH v3 23/23] docs: Update pvrdma device documentation

2018-11-12 Thread Yuval Shaia
Interface with the device is changed with the addition of support for MAD packets. Adjust documentation accordingly. While there fix a minor mistake which may lead to think that there is a relation between using RXE on host and the compatibility with bare-metal peers. Signed-off-by: Yuval Shaia

[Qemu-devel] [PATCH v3 15/23] hw/pvrdma: Make device state depend on Ethernet function state

2018-11-12 Thread Yuval Shaia
User should be able to control the device by changing Ethernet function state so if user runs 'ifconfig ens3 down' the PVRDMA function should be down as well. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/rdma/vmw

[Qemu-devel] [PATCH v3 12/23] vmxnet3: Move some definitions to header file

2018-11-12 Thread Yuval Shaia
pvrdma setup requires vmxnet3 device on PCI function 0 and PVRDMA device on PCI function 1. pvrdma device needs to access vmxnet3 device object for several reasons: 1. Make sure PCI function 0 is vmxnet3. 2. To monitor vmxnet3 device state. 3. To configure node_guid accoring to vmxnet3 device's MAC

[Qemu-devel] [PATCH v3 22/23] hw/rdma: Do not call rdma_backend_del_gid on an empty gid

2018-11-12 Thread Yuval Shaia
When device goes down the function fini_ports loops over all entries in gid table regardless of the fact whether entry is valid or not. In case that entry is not valid we'd like to skip from any further processing in backend device. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_rm.c | 4 1 fi

[Qemu-devel] [PATCH v3 18/23] hw/rdma: Remove unneeded code that handles more that one port

2018-11-12 Thread Yuval Shaia
Device supports only one port, let's remove a dead code that handles more than one port. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_rm.c | 34 -- hw/rdma/rdma_rm.h | 2 +- hw/rdma/rdma_rm_defs.h | 4 ++-- 3 files changed, 19 insertions(+), 21 deletion

[Qemu-devel] [PATCH v3 08/23] hw/pvrdma: Set the correct opcode for recv completion

2018-11-12 Thread Yuval Shaia
The function pvrdma_post_cqe populates CQE entry with opcode from the given completion element. For receive operation value was not set. Fix it by setting it to IBV_WC_RECV. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_qp_ops.c | 3 ++- 1 file changed, 2 insert

[Qemu-devel] [PATCH v3 01/23] contrib/rdmacm-mux: Add implementation of RDMA User MAD multiplexer

2018-11-12 Thread Yuval Shaia
RDMA MAD kernel module (ibcm) disallow more than one MAD-agent for a given MAD class. This does not go hand-by-hand with qemu pvrdma device's requirements where each VM is MAD agent. Fix it by adding implementation of RDMA MAD multiplexer service which on one hand register as a sole MAD agent with

[Qemu-devel] [PATCH v3 17/23] hw/pvrdma: Fill error code in command's response

2018-11-12 Thread Yuval Shaia
Driver checks error code let's set it. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_cmd.c | 67 1 file changed, 48 insertions(+), 19 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c index 0d3c818c20..a326c5d470 100644 --

[Qemu-devel] [PATCH v3 04/23] hw/rdma: Abort send-op if fail to create addr handler

2018-11-12 Thread Yuval Shaia
Function create_ah might return NULL, let's exit with an error. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_backend.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c index d7a4bbd91f..1e148398a2 100644 --- a/hw

[Qemu-devel] [PATCH v3 06/23] hw/pvrdma: Make function reset_device return void

2018-11-12 Thread Yuval Shaia
This function cannot fail - fix it to return void Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c index 6c8c0154fa..fc2abd34af 10064

[Qemu-devel] [PATCH v3 05/23] hw/rdma: Add support for MAD packets

2018-11-12 Thread Yuval Shaia
MAD (Management Datagram) packets are widely used by various modules both in kernel and in user space for example the rdma_* API which is used to create and maintain "connection" layer on top of RDMA uses several types of MAD packets. To support MAD packets the device uses an external utility (cont

[Qemu-devel] [PATCH v3 00/23] Add support for RDMA MAD

2018-11-12 Thread Yuval Shaia
Hi all. This is a major enhancement to the pvrdma device to allow it to work with state of the art applications such as MPI. As described in patch #5, MAD packets are management packets that are used for many purposes including but not limited to communication layer above IB verbs API. Patch 1 e

[Qemu-devel] [PATCH v3 16/23] hw/pvrdma: Fill all CQE fields

2018-11-12 Thread Yuval Shaia
Add ability to pass specific WC attributes to CQE such as GRH_BIT flag. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 59 +++-- hw/rdma/rdma_backend.h | 4 +-- hw/rdma/vmw/pvrdma_qp_ops.c | 31 +++ 3 files changed, 58 insertion

[Qemu-devel] [PATCH v3 02/23] hw/rdma: Add ability to force notification without re-arm

2018-11-12 Thread Yuval Shaia
Upon completion of incoming packet the device pushes CQE to driver's RX ring and notify the driver (msix). While for data-path incoming packets the driver needs the ability to control whether it wished to receive interrupts or not, for control-path packets such as incoming MAD the driver needs to b

[Qemu-devel] [PATCH v3 03/23] hw/rdma: Return qpn 1 if ibqp is NULL

2018-11-12 Thread Yuval Shaia
Device is not supporting QP0, only QP1. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/rdma_backend.h b/hw/rdma/rdma_backend.h index 86e8fe8ab6..3ccc9a2494 100644 --- a/hw/rdma/rdma_backend.h +++ b/hw/rdma/rdma_ba

[Qemu-devel] [PATCH v3 10/23] json: Define new QMP message for pvrdma

2018-11-12 Thread Yuval Shaia
pvrdma requires that the same GID attached to it will be attached to the backend device in the host. A new QMP messages is defined so pvrdma device can broadcast any change made to its GID table. This event is captured by libvirt which in turn will update the GID table in the backend device. Sign

[Qemu-devel] [PATCH v3 22/23] hw/rdma: Do not call rdma_backend_del_gid on an empty gid

2018-11-12 Thread Yuval Shaia
When device goes down the function fini_ports loops over all entries in gid table regardless of the fact whether entry is valid or not. In case that entry is not valid we'd like to skip from any further processing in backend device. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_rm.c | 4 1 fi

[Qemu-devel] [PATCH v3 23/23] docs: Update pvrdma device documentation

2018-11-12 Thread Yuval Shaia
Interface with the device is changed with the addition of support for MAD packets. Adjust documentation accordingly. While there fix a minor mistake which may lead to think that there is a relation between using RXE on host and the compatibility with bare-metal peers. Signed-off-by: Yuval Shaia

[Qemu-devel] [PATCH v3 09/23] hw/pvrdma: Set the correct opcode for send completion

2018-11-12 Thread Yuval Shaia
opcode for WC should be set by the device and not taken from work element. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_qp_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/vmw/pvrdma_qp_ops.c b/hw/rdma/vmw/pvrdma_qp_ops.c index 7b0f440fda..3388be1926 100644

[Qemu-devel] [PATCH v3 20/23] hw/pvrdma: Clean device's resource when system is shutdown

2018-11-12 Thread Yuval Shaia
In order to clean some external resources such as GIDs, QPs etc, register to receive notification when VM is shutdown. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma.h | 2 ++ hw/rdma/vmw/pvrdma_main.c | 12 2 files changed, 14 insertions(+) diff --git a/hw/rdma/vmw/pvrdma

[Qemu-devel] [PATCH v3 21/23] hw/rdma: Do not use bitmap_zero_extend to free bitmap

2018-11-12 Thread Yuval Shaia
bitmap_zero_extend is designed to work for extending, not for shrinking. Using g_free instead. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_rm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c index 0a5ab8935a..35a96d9a64 100644 --- a/hw/r

[Qemu-devel] [PATCH v3 13/23] hw/pvrdma: Make sure PCI function 0 is vmxnet3

2018-11-12 Thread Yuval Shaia
Guest driver enforces it, we should also. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma.h | 2 ++ hw/rdma/vmw/pvrdma_main.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/hw/rdma/vmw/pvrdma.h b/hw/rdma/vmw/pvrdma.h index b019cb843a..10a3c4fb7c 100644 --- a/hw/rdma/vmw/pvrdma.h

[Qemu-devel] [PATCH v3 07/23] hw/pvrdma: Make default pkey 0xFFFF

2018-11-12 Thread Yuval Shaia
Commit 6e7dba23af ("hw/pvrdma: Make default pkey 0x") exports default pkey as external definition but omit the change from 0x7FFF to 0x. Fixes: 6e7dba23af ("hw/pvrdma: Make default pkey 0x") Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma.h | 2 +- 1

[Qemu-devel] [PATCH v3 19/23] vl: Introduce shutdown_notifiers

2018-11-12 Thread Yuval Shaia
Notifier will be used for signaling shutdown event to inform system is shutdown. This will allow devices and other component to run some cleanup code needed before VM is shutdown. Signed-off-by: Yuval Shaia --- include/sysemu/sysemu.h | 1 + vl.c| 15 ++- 2 files

[Qemu-devel] [PATCH v3 18/23] hw/rdma: Remove unneeded code that handles more that one port

2018-11-12 Thread Yuval Shaia
Device supports only one port, let's remove a dead code that handles more than one port. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_rm.c | 34 -- hw/rdma/rdma_rm.h | 2 +- hw/rdma/rdma_rm_defs.h | 4 ++-- 3 files changed, 19 insertions(+), 21 deletion

[Qemu-devel] [PATCH v3 15/23] hw/pvrdma: Make device state depend on Ethernet function state

2018-11-12 Thread Yuval Shaia
User should be able to control the device by changing Ethernet function state so if user runs 'ifconfig ens3 down' the PVRDMA function should be down as well. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/rdma/vmw

[Qemu-devel] [PATCH v3 10/23] json: Define new QMP message for pvrdma

2018-11-12 Thread Yuval Shaia
pvrdma requires that the same GID attached to it will be attached to the backend device in the host. A new QMP messages is defined so pvrdma device can broadcast any change made to its GID table. This event is captured by libvirt which in turn will update the GID table in the backend device. Sign

[Qemu-devel] [PATCH v3 17/23] hw/pvrdma: Fill error code in command's response

2018-11-12 Thread Yuval Shaia
Driver checks error code let's set it. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_cmd.c | 67 1 file changed, 48 insertions(+), 19 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c index 0d3c818c20..a326c5d470 100644 --

[Qemu-devel] [PATCH v3 07/23] hw/pvrdma: Make default pkey 0xFFFF

2018-11-12 Thread Yuval Shaia
Commit 6e7dba23af ("hw/pvrdma: Make default pkey 0x") exports default pkey as external definition but omit the change from 0x7FFF to 0x. Fixes: 6e7dba23af ("hw/pvrdma: Make default pkey 0x") Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma.h | 2 +- 1

[Qemu-devel] [PATCH v3 16/23] hw/pvrdma: Fill all CQE fields

2018-11-12 Thread Yuval Shaia
Add ability to pass specific WC attributes to CQE such as GRH_BIT flag. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 59 +++-- hw/rdma/rdma_backend.h | 4 +-- hw/rdma/vmw/pvrdma_qp_ops.c | 31 +++ 3 files changed, 58 insertion

[Qemu-devel] [PATCH v3 11/23] hw/pvrdma: Add support to allow guest to configure GID table

2018-11-12 Thread Yuval Shaia
The control over the RDMA device's GID table is done by updating the device's Ethernet function addresses. Usually the first GID entry is determine by the MAC address, the second by the first IPv6 address and the third by the IPv4 address. Other entries can be added by adding more IP addresses. The

[Qemu-devel] [PATCH v3 08/23] hw/pvrdma: Set the correct opcode for recv completion

2018-11-12 Thread Yuval Shaia
The function pvrdma_post_cqe populates CQE entry with opcode from the given completion element. For receive operation value was not set. Fix it by setting it to IBV_WC_RECV. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_qp_ops.c | 3 ++- 1 file changed, 2 insert

[Qemu-devel] [PATCH v3 05/23] hw/rdma: Add support for MAD packets

2018-11-12 Thread Yuval Shaia
MAD (Management Datagram) packets are widely used by various modules both in kernel and in user space for example the rdma_* API which is used to create and maintain "connection" layer on top of RDMA uses several types of MAD packets. To support MAD packets the device uses an external utility (cont

[Qemu-devel] [PATCH v3 14/23] hw/rdma: Initialize node_guid from vmxnet3 mac address

2018-11-12 Thread Yuval Shaia
node_guid should be set once device is load. Make node_guid be GID format (32 bit) of PCI function 0 vmxnet3 device's MAC. A new function was added to do the conversion. So for example the MAC 56:b6:44:e9:62:dc will be converted to GID 54b6:44ff:fee9:62dc. Signed-off-by: Yuval Shaia --- hw/rdma

[Qemu-devel] [PATCH v3 03/23] hw/rdma: Return qpn 1 if ibqp is NULL

2018-11-12 Thread Yuval Shaia
Device is not supporting QP0, only QP1. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/rdma_backend.h b/hw/rdma/rdma_backend.h index 86e8fe8ab6..3ccc9a2494 100644 --- a/hw/rdma/rdma_backend.h +++ b/hw/rdma/rdma_ba

[Qemu-devel] [PATCH v3 06/23] hw/pvrdma: Make function reset_device return void

2018-11-12 Thread Yuval Shaia
This function cannot fail - fix it to return void Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c index 6c8c0154fa..fc2abd34af 10064

[Qemu-devel] [PATCH v3 09/23] hw/pvrdma: Set the correct opcode for send completion

2018-11-12 Thread Yuval Shaia
opcode for WC should be set by the device and not taken from work element. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_qp_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/vmw/pvrdma_qp_ops.c b/hw/rdma/vmw/pvrdma_qp_ops.c index 7b0f440fda..3388be1926 100644

[Qemu-devel] [PATCH v3 12/23] vmxnet3: Move some definitions to header file

2018-11-12 Thread Yuval Shaia
pvrdma setup requires vmxnet3 device on PCI function 0 and PVRDMA device on PCI function 1. pvrdma device needs to access vmxnet3 device object for several reasons: 1. Make sure PCI function 0 is vmxnet3. 2. To monitor vmxnet3 device state. 3. To configure node_guid accoring to vmxnet3 device's MAC

[Qemu-devel] [PATCH v3 01/23] contrib/rdmacm-mux: Add implementation of RDMA User MAD multiplexer

2018-11-12 Thread Yuval Shaia
RDMA MAD kernel module (ibcm) disallow more than one MAD-agent for a given MAD class. This does not go hand-by-hand with qemu pvrdma device's requirements where each VM is MAD agent. Fix it by adding implementation of RDMA MAD multiplexer service which on one hand register as a sole MAD agent with

[Qemu-devel] [PATCH v3 04/23] hw/rdma: Abort send-op if fail to create addr handler

2018-11-12 Thread Yuval Shaia
Function create_ah might return NULL, let's exit with an error. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_backend.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c index d7a4bbd91f..1e148398a2 100644 --- a/hw

[Qemu-devel] [PATCH v3 00/23] Add support for RDMA MAD

2018-11-12 Thread Yuval Shaia
Hi all. This is a major enhancement to the pvrdma device to allow it to work with state of the art applications such as MPI. As described in patch #5, MAD packets are management packets that are used for many purposes including but not limited to communication layer above IB verbs API. Patch 1 e

[Qemu-devel] [PATCH v3 02/23] hw/rdma: Add ability to force notification without re-arm

2018-11-12 Thread Yuval Shaia
Upon completion of incoming packet the device pushes CQE to driver's RX ring and notify the driver (msix). While for data-path incoming packets the driver needs the ability to control whether it wished to receive interrupts or not, for control-path packets such as incoming MAD the driver needs to b

[Qemu-devel] [PATCH] slirp: add tftp tracing

2018-11-12 Thread Gerd Hoffmann
Useful when debugging pxeboot, to see what the guest tries to do. Signed-off-by: Gerd Hoffmann --- Makefile.objs | 1 + slirp/tftp.c | 3 +++ slirp/trace-events | 5 + 3 files changed, 9 insertions(+) create mode 100644 slirp/trace-events diff --git a/Makefile.objs b/Makefile.ob

Re: [Qemu-devel] [PATCH v1 2/3] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-11-12 Thread Yu Zhang
On Tue, Nov 13, 2018 at 02:12:17PM +0800, Peter Xu wrote: > On Tue, Nov 13, 2018 at 01:45:44PM +0800, Yu Zhang wrote: > > [...] > > > > > Since at it, another thing I thought about is making sure the IOMMU > > > > capabilities will match between host and guest IOMMU, which I think > > > > this se

Re: [Qemu-devel] [PATCH v5 07/14] tests: Add bbc:microbit / nRF51 test suite

2018-11-12 Thread Thomas Huth
On 2018-11-12 22:42, Steffen Görtz wrote: > The microbit-test includes tests for the nRF51 NVMC > peripheral and will host future nRF51 peripheral tests > and board-level bbc:microbit tests. > > Signed-off-by: Steffen Görtz > Reviewed-by: Stefan Hajnoczi > --- > tests/Makefile.include | 2 + >

Re: [Qemu-devel] [PATCH v5 01/14] qtest: Add set_irq_in command to set IRQ/GPIO level

2018-11-12 Thread Thomas Huth
On 2018-11-12 22:42, Steffen Görtz wrote: > Adds a new qtest command "set_irq_in" which allows > to set qemu gpio lines to a given level. > > Based on https://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02363.html > which never got merged. > > Signed-off-by: Steffen Görtz > Originally-by: M

Re: [Qemu-devel] [PATCH v1 2/3] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-11-12 Thread Peter Xu
On Tue, Nov 13, 2018 at 01:45:44PM +0800, Yu Zhang wrote: [...] > > > Since at it, another thing I thought about is making sure the IOMMU > > > capabilities will match between host and guest IOMMU, which I think > > > this series has ignorred so far. E.g., when we're having assigned > > > device

Re: [Qemu-devel] [PATCH v1 3/3] intel-iommu: search iotlb for levels supported by the address width.

2018-11-12 Thread Yu Zhang
On Tue, Nov 13, 2018 at 01:18:54PM +0800, Peter Xu wrote: > On Mon, Nov 12, 2018 at 08:38:30PM +0800, Yu Zhang wrote: > > On Mon, Nov 12, 2018 at 05:36:38PM +0800, Peter Xu wrote: > > > On Mon, Nov 12, 2018 at 05:25:48PM +0800, Yu Zhang wrote: > > > > On Mon, Nov 12, 2018 at 04:51:22PM +0800, Peter

Re: [Qemu-devel] [PATCH v1 2/3] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-11-12 Thread Yu Zhang
On Tue, Nov 13, 2018 at 01:04:51PM +0800, Peter Xu wrote: > On Tue, Nov 13, 2018 at 11:37:07AM +0800, Peter Xu wrote: > > On Mon, Nov 12, 2018 at 05:42:01PM +0800, Yu Zhang wrote: > > > On Mon, Nov 12, 2018 at 04:36:34PM +0800, Peter Xu wrote: > > > > On Fri, Nov 09, 2018 at 07:49:46PM +0800, Yu Zh

Re: [Qemu-devel] [PATCH v1 2/3] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-11-12 Thread Yu Zhang
On Tue, Nov 13, 2018 at 11:37:07AM +0800, Peter Xu wrote: > On Mon, Nov 12, 2018 at 05:42:01PM +0800, Yu Zhang wrote: > > On Mon, Nov 12, 2018 at 04:36:34PM +0800, Peter Xu wrote: > > > On Fri, Nov 09, 2018 at 07:49:46PM +0800, Yu Zhang wrote: > > > > A 5-level paging capable VM may choose to use 5

Re: [Qemu-devel] [Qemu-ppc] [PATCH qemu] ppc/spapr: Receive and store device tree blob from SLOF

2018-11-12 Thread Alexey Kardashevskiy
On 12/11/2018 20:05, Greg Kurz wrote: > On Mon, 12 Nov 2018 15:12:26 +1100 > Alexey Kardashevskiy wrote: > >> On 12/11/2018 05:10, Greg Kurz wrote: >>> Hi Alexey, >>> >>> Just a few remarks. See below. >>> >>> On Thu, 8 Nov 2018 12:44:06 +1100 >>> Alexey Kardashevskiy wrote: >>> SLOF

Re: [Qemu-devel] [PATCH v1 3/3] intel-iommu: search iotlb for levels supported by the address width.

2018-11-12 Thread Peter Xu
On Mon, Nov 12, 2018 at 08:38:30PM +0800, Yu Zhang wrote: > On Mon, Nov 12, 2018 at 05:36:38PM +0800, Peter Xu wrote: > > On Mon, Nov 12, 2018 at 05:25:48PM +0800, Yu Zhang wrote: > > > On Mon, Nov 12, 2018 at 04:51:22PM +0800, Peter Xu wrote: > > > > On Fri, Nov 09, 2018 at 07:49:47PM +0800, Yu Zh

Re: [Qemu-devel] [PATCH v1 2/3] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-11-12 Thread Peter Xu
On Tue, Nov 13, 2018 at 11:37:07AM +0800, Peter Xu wrote: > On Mon, Nov 12, 2018 at 05:42:01PM +0800, Yu Zhang wrote: > > On Mon, Nov 12, 2018 at 04:36:34PM +0800, Peter Xu wrote: > > > On Fri, Nov 09, 2018 at 07:49:46PM +0800, Yu Zhang wrote: > > > > A 5-level paging capable VM may choose to use 5

Re: [Qemu-devel] [PATCH] virtio-net: support RSC v4/v6 tcp traffic for Windows HCK

2018-11-12 Thread Wei Xu
Looks good, I can't recall the status of last version well but I remember Jason gave some comments about sanity check are quiet essential, have you addressed them? Reviewed by: Wei Xu On Fri, Nov 09, 2018 at 04:58:27PM +0200, Yuri Benditovich wrote: > This commit adds implementation of RX packet

Re: [Qemu-devel] [PATCH v1 2/3] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-11-12 Thread Peter Xu
On Mon, Nov 12, 2018 at 05:42:01PM +0800, Yu Zhang wrote: > On Mon, Nov 12, 2018 at 04:36:34PM +0800, Peter Xu wrote: > > On Fri, Nov 09, 2018 at 07:49:46PM +0800, Yu Zhang wrote: > > > A 5-level paging capable VM may choose to use 57-bit IOVA address width. > > > E.g. guest applications like DPDK

Re: [Qemu-devel] [PATCH] 9p: write lock path in v9fs_co_open2()

2018-11-12 Thread zhibin hu
Sorry, i have no time to make poc recently. IMHO, the implementation of v9fs_path_copy is not secure, it first free the original value and than copy the new value, there is a race. So each caller must ensure the synchronization, maybe more locks are needed. thanks. On Mon, Nov 12, 2018 at 10:3

[Qemu-devel] [Bug 1802915] Re: GTK display refresh rate is throttled

2018-11-12 Thread Chen Zhang
** Description changed: Guest OS running with GL enabled GTK display shows a reduced refresh rate, e.g. moving cursor around with iGVT-g DMA Buf. - It seems that a default refresh interval GUI_REFRESH_INTERVAL_DEFAULT + Apparently, a default refresh interval GUI_REFRESH_INTERVAL_DEFAULT (

[Qemu-devel] [PULL for-3.1 0/2] qemu-ga patch queue for 3.1.0

2018-11-12 Thread Michael Roth
The following changes since commit 160e5c22e55b3f775c2003dfc626fa872ee4a7a1: Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging (2018-11-09 10:54:10 +) are available in the Git repository at: git://github.com/mdroth/qemu.git tags/qga-pull-2018-11-12-tag for you

[Qemu-devel] [PULL for-3.1 1/2] qga-win: fix leaks of build_guest_disk_info()

2018-11-12 Thread Michael Roth
From: Marc-André Lureau Introduced in commit b1ba8890e63ce9432c41c5c3fc229f54c87c9c99, vol_h handle should be closed, and "out" cleanup should be done after DeviceIoControl() fails. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Michael Roth --- qga/comma

[Qemu-devel] [PULL for-3.1 2/2] qga: Add multiple include guard to guest-agent-core.h

2018-11-12 Thread Michael Roth
From: Peter Maydell The guest-agent-core.h header was missing the usual guards against multiple inclusion; add them. (Spotted by lgtm.com's static analyzer.) Signed-off-by: Peter Maydell Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Sig

Re: [Qemu-devel] [PATCH v2] Acceptance tests: add Linux initrd checking test

2018-11-12 Thread Eduardo Habkost
On Fri, Nov 09, 2018 at 01:21:53PM -0500, Wainer dos Santos Moschetta wrote: > QEMU used to exits with a not accurate error message when > an initrd > 2GiB was passed. That was fixed on patch: > > commit f3839fda5771596152b75dd1e1a6d050e6e6e380 > Author: Li Zhijian > Date: Thu

Re: [Qemu-devel] [PATCH] nvme: fix oob access issue(CVE-2018-16847)

2018-11-12 Thread Li Qiang
Ping what't the status of this patch. I see Kevin's new pr doesn't contain this patch. Thanks, Li Qiang Li Qiang 于2018年11月2日周五 上午9:22写道: > Currently, the nvme_cmb_ops mr doesn't check the addr and size. > This can lead an oob access issue. This is triggerable in the guest. > Add check to a

[Qemu-devel] [PATCH] memory: check write/read_with_attrs in memory dispatch

2018-11-12 Thread Li Qiang
This can avoid the NULL-deref if the rm doesn't has a read/write nor write/read_with_attrs callback. Signed-off-by: Li Qiang --- memory.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/memory.c b/memory.c index d14c6dec1d..3baf5857b9 100644 --- a/memory.c +++ b/memor

Re: [Qemu-devel] [PATCH for-3.2 1/7] tests/pvpanic: Make the pvpanic test independent of global_qtest

2018-11-12 Thread Eric Blake
On 11/12/18 1:08 PM, Thomas Huth wrote: We want to get rid of global_qtest in the long run, thus do not use the wrappers like inb() and outb() here anymore. Signed-off-by: Thomas Huth --- tests/pvpanic-test.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) Reviewed-by:

Re: [Qemu-devel] How to emulate block I/O timeout on qemu side?

2018-11-12 Thread Dongli Zhang
On 11/13/2018 06:52 AM, Marc Olson via Qemu-devel wrote: > On 11/11/18 11:36 PM, Dongli Zhang wrote: >> On 11/12/2018 03:13 PM, Marc Olson via Qemu-devel wrote: >>> On 11/3/18 10:24 AM, Dongli Zhang wrote: The 'write' latency of sector=40960 is set to a very large value. When the I/O

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-12 Thread Liran Alon
> On 13 Nov 2018, at 2:07, Jim Mattson wrote: > > On Mon, Nov 12, 2018 at 4:00 PM, Liran Alon wrote: >> >> >>> On 12 Nov 2018, at 18:54, Daniel P. Berrangé wrote: >>> >>> On Mon, Nov 12, 2018 at 04:50:54PM +, Dr. David Alan Gilbert wrote: * Daniel P. Berrangé (berra...@redhat.com

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-12 Thread Liran Alon
> On 12 Nov 2018, at 18:50, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: >> On Sun, Nov 04, 2018 at 11:19:57PM +0100, Paolo Bonzini wrote: >>> On 02/11/2018 17:54, Daniel P. Berrangé wrote: We have usually followed a rule that new machine types must

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-12 Thread Liran Alon
> On 12 Nov 2018, at 18:54, Daniel P. Berrangé wrote: > > On Mon, Nov 12, 2018 at 04:50:54PM +, Dr. David Alan Gilbert wrote: >> * Daniel P. Berrangé (berra...@redhat.com) wrote: >>> On Sun, Nov 04, 2018 at 11:19:57PM +0100, Paolo Bonzini wrote: On 02/11/2018 17:54, Daniel P. Berrangé

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-12 Thread Jim Mattson via Qemu-devel
On Mon, Nov 12, 2018 at 4:00 PM, Liran Alon wrote: > > >> On 12 Nov 2018, at 18:54, Daniel P. Berrangé wrote: >> >> On Mon, Nov 12, 2018 at 04:50:54PM +, Dr. David Alan Gilbert wrote: >>> * Daniel P. Berrangé (berra...@redhat.com) wrote: On Sun, Nov 04, 2018 at 11:19:57PM +0100, Paolo Bo

Re: [Qemu-devel] [PATCH 0/2] linux-user/mips: Support the n32 ABI for the R5900

2018-11-12 Thread Maciej W. Rozycki
On Fri, 9 Nov 2018, Maciej W. Rozycki wrote: > > Some readelf results: > > > > mips64el/stretch > > > > Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 > > Class: ELF64 > > Flags: 0x8007, noreorder, pic, cpic, mips64r2 > > Hmm, that's weird -- what executable did you che

Re: [Qemu-devel] [RFC PATCH 02/11] decodetree: Add multiple include guard

2018-11-12 Thread Philippe Mathieu-Daudé
On 12/11/18 23:30, Eduardo Habkost wrote: On Mon, Nov 12, 2018 at 12:36:13AM +0100, Philippe Mathieu-Daudé wrote: It is necessary when splitting an ISA, or when using multiple ISAs. Signed-off-by: Philippe Mathieu-Daudé --- TODO: explain why, use case TODO: escape full path? --- scripts/deco

Re: [Qemu-devel] [PATCH v2 07/11] block: Leave BDS.backing_file constant

2018-11-12 Thread Eric Blake
On 8/9/18 5:31 PM, Max Reitz wrote: Parts of the block layer treat BDS.backing_file as if it were whatever the image header says (i.e., if it is a relative path, it is relative to the overlay), other parts treat it like a cache for bs->backing->bs->filename (relative paths are relative to the CWD

Re: [Qemu-devel] [PATCH v2 06/11] iotests: Add tests for mirror @replaces loops

2018-11-12 Thread Eric Blake
On 8/9/18 5:31 PM, Max Reitz wrote: This adds two tests for cases where our old check_to_replace_node() function failed to detect that executing this job with these parameters would result in a cyclic graph. Signed-off-by: Max Reitz --- tests/qemu-iotests/041 | 124 +++

Re: [Qemu-devel] How to emulate block I/O timeout on qemu side?

2018-11-12 Thread Marc Olson via Qemu-devel
On 11/11/18 11:36 PM, Dongli Zhang wrote: On 11/12/2018 03:13 PM, Marc Olson via Qemu-devel wrote: On 11/3/18 10:24 AM, Dongli Zhang wrote: The 'write' latency of sector=40960 is set to a very large value. When the I/O is stalled in guest due to that sector=40960 is accessed, I do see below mes

Re: [Qemu-devel] [for 3.1? Qemu-devel] [PATCH v2 05/11] block: Fix check_to_replace_node()

2018-11-12 Thread Eric Blake
On 8/9/18 5:31 PM, Max Reitz wrote: Currently, check_to_replace_node() only allows mirror to replace a node in the chain of the source node, and only if it is the first non-filter node below the source. Well, technically, the idea is that you can exactly replace a quorum child by mirroring from

Re: [Qemu-devel] [PATCH v2 04/11] block: Storage child access function

2018-11-12 Thread Eric Blake
On 8/9/18 5:31 PM, Max Reitz wrote: For completeness' sake, add a function for accessing a node's storage child, too. For filters, this is there filtered child; for non-filters, s/there/their/ this is bs->file. Some places are deliberately left unconverted: - BDS opening/closing functions w

Re: [Qemu-devel] [RFC PATCH 02/11] decodetree: Add multiple include guard

2018-11-12 Thread Eduardo Habkost
On Mon, Nov 12, 2018 at 12:36:13AM +0100, Philippe Mathieu-Daudé wrote: > It is necessary when splitting an ISA, or when using multiple ISAs. > > Signed-off-by: Philippe Mathieu-Daudé > --- > TODO: explain why, use case > TODO: escape full path? > --- > scripts/decodetree.py | 5 + > 1 file

Re: [Qemu-devel] [PATCH v2 03/11] block: Filtered children access functions

2018-11-12 Thread Eric Blake
On 8/9/18 5:31 PM, Max Reitz wrote: What bs->file and bs->backing mean depends on the node. For filter nodes, both signify a node that will eventually receive all R/W accesses. For format nodes, bs->file contains metadata and data, and bs->backing will not receive writes -- instead, writes are

Re: [Qemu-devel] [PULL 40/55] target/arm: Enable SVE for aarch64-linux-user

2018-11-12 Thread Alex Bennée
Laurent Vivier writes: > On 29/06/2018 16:53, Peter Maydell wrote: >> From: Richard Henderson >> >> Enable ARM_FEATURE_SVE for the generic "max" cpu. >> >> Tested-by: Alex Bennée >> Reviewed-by: Peter Maydell >> Signed-off-by: Richard Henderson >> Message-id: 20180627043328.11531-35-richard

[Qemu-devel] [PATCH for-4.0 07/17] tcg/i386: Use TCG_TARGET_NEED_LDST_OOL_LABELS

2018-11-12 Thread Richard Henderson
Move the entire memory operation out of line. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.h | 2 +- tcg/i386/tcg-target.inc.c | 401 -- 2 files changed, 171 insertions(+), 232 deletions(-) diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-t

[Qemu-devel] [PATCH for-4.0 16/17] tcg/arm: Force qemu_ld/st arguments into fixed registers

2018-11-12 Thread Richard Henderson
This is an incremental step toward moving the qemu_ld/st code sequence out of line. Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.inc.c | 116 +-- 1 file changed, 75 insertions(+), 41 deletions(-) diff --git a/tcg/arm/tcg-target.inc.c b/tcg/arm/tcg-

[Qemu-devel] [PATCH for-4.0 13/17] tcg/arm: Parameterize the temps for tcg_out_tlb_read

2018-11-12 Thread Richard Henderson
When moving the qemu_ld/st arguments to the right place for a function call, we'll need to move the temps out of the way. Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.inc.c | 89 +--- 1 file changed, 46 insertions(+), 43 deletions(-) diff --git a/t

[Qemu-devel] [PATCH for-4.0 15/17] tcg/arm: Reduce the number of temps for tcg_out_tlb_read

2018-11-12 Thread Richard Henderson
When moving the qemu_ld/st thunk out of line, we no longer have LR for use as a temporary. In the worst case we must make do with 3 temps, when dealing with a 64-bit guest address. This in turn imples that we cannot use LDRD anymore, as there are not enough temps. Signed-off-by: Richard Henderso

[Qemu-devel] [PATCH for-4.0 09/17] tcg/aarch64: Parameterize the temps for tcg_out_tlb_read

2018-11-12 Thread Richard Henderson
When moving the qemu_ld/st arguments to the right place for a function call, we'll need to move the temps out of the way. Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.inc.c | 74 +++- 1 file changed, 40 insertions(+), 34 deletions(-) diff --git a/t

[Qemu-devel] [PATCH for-4.0 17/17] tcg/arm: Use TCG_TARGET_NEED_LDST_OOL_LABELS

2018-11-12 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.h | 2 +- tcg/arm/tcg-target.inc.c | 302 +++ 2 files changed, 118 insertions(+), 186 deletions(-) diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h index 94b3578c55..02981abdcc 100644 --- a/

[Qemu-devel] [PATCH for-4.0 11/17] tcg/aarch64: Use B not BL for tcg_out_goto_long

2018-11-12 Thread Richard Henderson
This was a typo copying from tcg_out_call, apparently. Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.inc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/aarch64/tcg-target.inc.c b/tcg/aarch64/tcg-target.inc.c index ea5fe33fca..403f5caf14 100644 --- a/tcg/a

[Qemu-devel] [PATCH for-4.0 14/17] tcg/arm: Add constraints for R0-R5

2018-11-12 Thread Richard Henderson
These are function call arguments that we will need soon. Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.inc.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tcg/arm/tcg-target.inc.c b/tcg/arm/tcg-target.inc.c index 414c91c9ea..4339c472e8 100644 --- a/tcg/arm/

[Qemu-devel] [PATCH for-4.0 05/17] tcg: Return success from patch_reloc

2018-11-12 Thread Richard Henderson
This moves the assert for success from inside patch_reloc to outside patch_reloc. This touches all tcg backends. Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.inc.c | 44 ++--- tcg/arm/tcg-target.inc.c | 26 +--- tcg/i386/tcg-target.

[Qemu-devel] [PATCH for-4.0 08/17] tcg/aarch64: Add constraints for x0, x1, x2

2018-11-12 Thread Richard Henderson
These are function call arguments that we will need soon. Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.inc.c | 12 1 file changed, 12 insertions(+) diff --git a/tcg/aarch64/tcg-target.inc.c b/tcg/aarch64/tcg-target.inc.c index 30091f6a69..148de0b7f2 100644 --- a/tcg/

[Qemu-devel] [PATCH v5 11/14] hw/timer/nrf51_timer: Add nRF51 Timer peripheral

2018-11-12 Thread Steffen Görtz
This patch adds the model for the nRF51 timer peripheral. Currently, only the TIMER mode is implemented. Signed-off-by: Steffen Görtz --- hw/timer/Makefile.objs | 1 + hw/timer/nrf51_timer.c | 337 + hw/timer/trace-events | 5 + includ

[Qemu-devel] [PATCH for-4.0 06/17] tcg: Add TCG_TARGET_NEED_LDST_OOL_LABELS

2018-11-12 Thread Richard Henderson
This variant of tcg-ldst.inc.c allows the entire thunk to be moved out-of-line, with caching across TBs within a region. Signed-off-by: Richard Henderson --- tcg/tcg.h | 4 ++ tcg/tcg-ldst-ool.inc.c | 94 ++ tcg/tcg.c | 20 ++

[Qemu-devel] [PATCH for-4.0 04/17] tcg/i386: Force qemu_ld/st arguments into fixed registers

2018-11-12 Thread Richard Henderson
This is an incremental step toward moving the qemu_ld/st code sequence out of line. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.inc.c | 193 +++--- 1 file changed, 159 insertions(+), 34 deletions(-) diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/t

[Qemu-devel] [PATCH for-4.0 12/17] tcg/aarch64: Use TCG_TARGET_NEED_LDST_OOL_LABELS

2018-11-12 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.h | 2 +- tcg/aarch64/tcg-target.inc.c | 191 +-- 2 files changed, 93 insertions(+), 100 deletions(-) diff --git a/tcg/aarch64/tcg-target.h b/tcg/aarch64/tcg-target.h index 9aea1d1771..d1bd77c41d 10

  1   2   3   4   >