[PULL 14/26] qapi: net: introduce a way to bypass qemu_opts_parse_noisily()

2022-10-27 Thread Jason Wang
From: Laurent Vivier As qemu_opts_parse_noisily() flattens the QAPI structures ("type" field of Netdev structure can collides with "type" field of SocketAddress), we introduce a way to bypass qemu_opts_parse_noisily() and use directly visit_type_Netdev() to parse the backend parameters. More

[PULL 15/26] net: introduce qemu_set_info_str() function

2022-10-27 Thread Jason Wang
From: Laurent Vivier Embed the setting of info_str in a function. Signed-off-by: Laurent Vivier Reviewed-by: David Gibson Acked-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- hw/net/xen_nic.c | 5 ++--- include/net/net.h | 1 + net/l2tpv3.c

[PULL 12/26] net: remove the @errp argument of net_client_inits()

2022-10-27 Thread Jason Wang
From: Laurent Vivier The only caller passes _fatal, so use this directly in the function. It's what we do for -blockdev, -device, and -object. Suggested-by: Markus Armbruster Signed-off-by: Laurent Vivier Reviewed-by: Markus Armbruster Reviewed-by: David Gibson Acked-by: Michael S. Tsirkin

[PULL 17/26] net: socket: Don't ignore EINVAL on netdev socket connection

2022-10-27 Thread Jason Wang
From: Stefano Brivio Other errors are treated as failure by net_socket_connect_init(), but if connect() returns EINVAL, we'll fail silently. Remove the related exception. Signed-off-by: Stefano Brivio Signed-off-by: Laurent Vivier Reviewed-by: David Gibson Acked-by: Michael S. Tsirkin

[PULL 11/26] net: introduce convert_host_port()

2022-10-27 Thread Jason Wang
From: Laurent Vivier Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Reviewed-by: David Gibson Acked-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- include/qemu/sockets.h | 2 ++ net/net.c | 62 ++ 2 files

[PULL 23/26] qemu-sockets: move and rename SocketAddress_to_str()

2022-10-27 Thread Jason Wang
From: Laurent Vivier Rename SocketAddress_to_str() to socket_uri() and move it to util/qemu-sockets.c close to socket_parse(). socket_uri() generates a string from a SocketAddress while socket_parse() generates a SocketAddress from a string. Signed-off-by: Laurent Vivier Reviewed-by: David

[PULL 25/26] net: stream: move to QIO to enable additional parameters

2022-10-27 Thread Jason Wang
From: Laurent Vivier Use QIOChannel, QIOChannelSocket and QIONetListener. This allows net/stream to use all the available parameters provided by SocketAddress. Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- net/stream.c| 492

[PULL 04/26] vdpa: Remove shadow CVQ command check

2022-10-27 Thread Jason Wang
From: Eugenio Pérez The guest will see undefined behavior if it issue not negotiate commands, bit it is expected somehow. Simplify code deleting this check. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 48

[PULL 05/26] vhost-vdpa: allow passing opened vhostfd to vhost-vdpa

2022-10-27 Thread Jason Wang
From: Si-Wei Liu Similar to other vhost backends, vhostfd can be passed to vhost-vdpa backend as another parameter to instantiate vhost-vdpa net client. This would benefit the use case where only open file descriptors, as opposed to raw vhost-vdpa device paths, are accessible from the QEMU

[PULL 19/26] net: stream: add unix socket

2022-10-27 Thread Jason Wang
From: Laurent Vivier Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Acked-by: Michael S. Tsirkin Acked-by: Markus Armbruster (QAPI schema) Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Jason Wang --- net/stream.c| 107

[PULL 18/26] net: stream: Don't ignore EINVAL on netdev socket connection

2022-10-27 Thread Jason Wang
From: Stefano Brivio Other errors are treated as failure by net_stream_client_init(), but if connect() returns EINVAL, we'll fail silently. Remove the related exception. Signed-off-by: Stefano Brivio [lvivier: applied to net/stream.c] Signed-off-by: Laurent Vivier Reviewed-by: Daniel P.

[PULL 24/26] qemu-sockets: update socket_uri() and socket_parse() to be consistent

2022-10-27 Thread Jason Wang
From: Laurent Vivier To be consistent with socket_uri(), add 'tcp:' prefix for inet type in socket_parse(), by default socket_parse() use tcp when no prefix is provided (format is host:port). In socket_uri(), use 'vsock:' prefix for vsock type rather than 'tcp:' because it makes a vsock address

[PULL 13/26] net: simplify net_client_parse() error management

2022-10-27 Thread Jason Wang
From: Laurent Vivier All net_client_parse() callers exit in case of error. Move exit(1) to net_client_parse() and remove error checking from the callers. Suggested-by: Markus Armbruster Signed-off-by: Laurent Vivier Reviewed-by: Markus Armbruster Reviewed-by: David Gibson Acked-by: Michael

[PULL 03/26] vdpa: Delete duplicated vdpa_feature_bits entry

2022-10-27 Thread Jason Wang
From: Eugenio Pérez This entry was duplicated on referenced commit. Removing it. Fixes: 402378407dbd ("vhost-vdpa: multiqueue support") Signed-off-by: Eugenio Pérez Acked-by: Jason Wang Signed-off-by: Jason Wang --- net/vhost-vdpa.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PULL 07/26] vhost: allocate event_idx fields on vring

2022-10-27 Thread Jason Wang
From: Eugenio Pérez There was not enough room to accomodate them. Reviewed-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez Signed-off-by: Jason Wang --- hw/virtio/vhost-shadow-virtqueue.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PULL 08/26] vhost: toggle device callbacks using used event idx

2022-10-27 Thread Jason Wang
From: Eugenio Pérez Actually use the new field of the used ring and tell the device if SVQ wants to be notified. The code is not reachable at the moment. Reviewed-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez Signed-off-by: Jason Wang --- hw/virtio/vhost-shadow-virtqueue.c | 18

[PULL 16/26] qapi: net: add stream and dgram netdevs

2022-10-27 Thread Jason Wang
From: Laurent Vivier Copied from socket netdev file and modified to use SocketAddress to be able to introduce new features like unix socket. "udp" and "mcast" are squashed into dgram netdev, multicast is detected according to the IP address type. "listen" and "connect" modes are managed by

[PULL 09/26] vhost: use avail event idx on vhost_svq_kick

2022-10-27 Thread Jason Wang
From: Eugenio Pérez So SVQ code knows if an event is needed. The code is not reachable at the moment. Reviewed-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez Signed-off-by: Jason Wang --- hw/virtio/vhost-shadow-virtqueue.c | 12 +++- 1 file changed, 11 insertions(+), 1

[PULL 21/26] net: dgram: move mcast specific code from net_socket_fd_init_dgram()

2022-10-27 Thread Jason Wang
From: Laurent Vivier It is less complex to manage special cases directly in net_dgram_mcast_init() and net_dgram_udp_init(). Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Acked-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- net/dgram.c | 143

[PULL 10/26] vhost: Accept event idx flag

2022-10-27 Thread Jason Wang
From: Eugenio Pérez Enabling all the code path created before. Reviewed-by: Michael S. Tsirkin Signed-off-by: Eugenio Pérez Signed-off-by: Jason Wang --- hw/virtio/vhost-shadow-virtqueue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/vhost-shadow-virtqueue.c

[PULL 20/26] net: dgram: make dgram_dst generic

2022-10-27 Thread Jason Wang
From: Laurent Vivier dgram_dst is a sockaddr_in structure. To be able to use it with unix socket, use a pointer to a generic sockaddr structure. Rename it dest_addr, and store socket length in dest_len. Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Acked-by: Michael S. Tsirkin

[PULL 00/26] Net patches

2022-10-27 Thread Jason Wang
The following changes since commit 344744e148e6e865f5a57e745b02a87e5ea534ad: Merge tag 'dump-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging (2022-10-26 10:53:49 -0400) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request

[PULL 22/26] net: dgram: add unix socket

2022-10-27 Thread Jason Wang
From: Laurent Vivier Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio Reviewed-by: David Gibson Acked-by: Michael S. Tsirkin Acked-by: Markus Armbruster (QAPI schema) Signed-off-by: Jason Wang --- net/dgram.c | 55 ++-

[PULL 06/26] net: improve error message for missing netdev backend

2022-10-27 Thread Jason Wang
From: Daniel P. Berrangé The current message when using '-net user...' with SLIRP disabled at compile time is: qemu-system-x86_64: -net user: Parameter 'type' expects a net backend type (maybe it is not compiled into this binary) An observation is that we're using the 'netdev->type' field

[PULL 02/26] virtio-net: fix TX timer with tx_burst

2022-10-27 Thread Jason Wang
From: Laurent Vivier When virtio_net_flush_tx() reaches the tx_burst value all the queue is not flushed and nothing restart the timer. Fix that by doing for TX timer as we do for bottom half TX: rearming the timer if we find any packet to send during the virtio_net_flush_tx() call. Fixes:

[PULL 26/26] net: stream: add QAPI events to report connection state

2022-10-27 Thread Jason Wang
From: Laurent Vivier The netdev reports NETDEV_STREAM_CONNECTED event when the backend is connected, and NETDEV_STREAM_DISCONNECTED when it is disconnected. The NETDEV_STREAM_CONNECTED event includes the destination address. This allows a system manager like libvirt to detect when the server

[PULL 01/26] virtio-net: fix bottom-half packet TX on asynchronous completion

2022-10-27 Thread Jason Wang
From: Laurent Vivier When virtio-net is used with the socket netdev backend, the backend can be busy and not able to collect new packets. In this case, net_socket_receive() returns 0 and registers a poll function to detect when the socket is ready again. In virtio_net_tx_bh(),

megasa regression in 7.1?

2022-10-27 Thread John Johnson
I pulled 7.1, and the megasas driver stopped being able to do reads from a disk. It looks to be related to this commit: https://github.com/qemu/qemu/commit/fe9d8927e265fd723a6dc87cd6d220f4677dbe1f#diffe3f5f30efc54747e0624dca63e5f55f0012736c1875b6e85526b3514e6911be3 which added some

[PATCH v6 11/11] tests/qtest: Enable qtest build on Windows

2022-10-27 Thread Bin Meng
Now that we have fixed various test case issues as seen when running on Windows, let's enable the qtest build on Windows. Signed-off-by: Bin Meng Reviewed-by: Thomas Huth --- Changes in v5: - Drop patches that are already merged Changes in v3: - Drop the host test Changes in v2: - new

[PATCH v6 09/11] tests/qtest: libqtest: Correct the timeout unit of blocking receive calls for win32

2022-10-27 Thread Bin Meng
Some qtest cases don't get response from the QEMU executable under test in time on Windows. It turns out that the socket receive call got timeout before it receive the complete response. The timeout value is supposed to be set to 50 seconds via the setsockopt() call, but there is a difference

[PATCH v6 00/11] tests/qtest: Enable running qtest on Windows

2022-10-27 Thread Bin Meng
In preparation to adding virtio-9p support on Windows, this series enables running qtest on Windows, so that we can run the virtio-9p tests on Windows to make sure it does not break accidently. Changes in v6: - drop patches that are already in Alex and Daniel's tree - remove CONFIG_POSIX from

Re: [PATCH v14 16/17] tests/qtest: netdev: test stream and dgram backends

2022-10-27 Thread Jason Wang
在 2022/10/21 17:09, Laurent Vivier 写道: Signed-off-by: Laurent Vivier Acked-by: Michael S. Tsirkin --- I got this: 63/63 ERROR:../tests/qtest/netdev-socket.c:139:test_stream_inet_ipv6: assertion failed (resp == expect): ("st0: index=0,type=stream,connection error\r\n" == "st0:

[PATCH v6 07/11] tests/qtest: migration-test: Make sure QEMU process "to" exited after migration is canceled

2022-10-27 Thread Bin Meng
From: Xuzhou Cheng Make sure QEMU process "to" exited before launching another target for migration in the test_multifd_tcp_cancel case. Signed-off-by: Xuzhou Cheng Signed-off-by: Bin Meng --- Changes in v6: - change to use qtest_wait_qemu() API Changes in v3: - Add a usleep(1) in the busy

[PATCH v6 01/11] accel/qtest: Support qtest accelerator for Windows

2022-10-27 Thread Bin Meng
From: Xuzhou Cheng Currently signal SIGIPI [=SIGUSR1] is used to kick the dummy CPU when qtest accelerator is used. However SIGUSR1 is unsupported on Windows. To support Windows, we add a QemuSemaphore CPUState::sem to kick the dummy CPU instead for Windows. Signed-off-by: Xuzhou Cheng

[PATCH v6 08/11] tests/qtest: libqos: Do not build virtio-9p unconditionally

2022-10-27 Thread Bin Meng
At present the virtio-9p related codes are built into libqos unconditionally. Change to build them conditionally by testing the 'virtfs' config option. Signed-off-by: Bin Meng --- Changes in v6: - new patch: "test/qtest/libqos: meson.build: Do not build virtio-9p unconditionally"

[PATCH v6 05/11] tests/qtest: Use EXIT_FAILURE instead of magic number

2022-10-27 Thread Bin Meng
When migration fails, QEMU exits with a status code EXIT_FAILURE. Change qtests to use the well-defined macro instead of magic number. Signed-off-by: Bin Meng --- Changes in v6: - new patch: "tests/qtest: Use EXIT_FAILURE instead of magic number" tests/qtest/dbus-vmstate-test.c | 2 +-

[PATCH v6 04/11] tests/qtest: device-plug-test: Reverse the usage of double/single quotes

2022-10-27 Thread Bin Meng
The usage of double/single quotes in test_q35_pci_unplug_json_request() should be reversed to work on both win32 and non-win32 platforms: - The value of -device parameter needs to be surrounded by "" as Windows does not drop '' when passing it to QEMU which causes QEMU command line option

[PATCH v6 10/11] .gitlab-ci.d/windows.yml: Increase the timeout to 90 minutes

2022-10-27 Thread Bin Meng
commit 9f8e6cad65a6 ("gitlab-ci: Speed up the msys2-64bit job by using --without-default-devices" changed to compile QEMU with the --without-default-devices switch for the msys2-64bit job, due to the build could not complete within the project timeout (1h), and also mentioned that a bigger

[PATCH v6 03/11] tests/qtest: Support libqtest to build and run on Windows

2022-10-27 Thread Bin Meng
At present the libqtest codes were written to depend on several POSIX APIs, including fork(), kill() and waitpid(). Unfortunately these APIs are not available on Windows. This commit implements the corresponding functionalities using win32 native APIs. With this change, all qtest cases can build

[PATCH v6 06/11] tests/qtest: libqtest: Introduce qtest_wait_qemu()

2022-10-27 Thread Bin Meng
Introduce an API for qtest to wait for the QEMU process to terminate. Suggested-by: Marc-André Lureau Signed-off-by: Bin Meng --- Changes in v6: - new patch: "tests/qtest: libqtest: Introduce qtest_wait_qemu()" tests/qtest/libqtest.h | 9 ++ tests/qtest/libqtest.c | 63

[PATCH v6 02/11] tests/qtest: Use send/recv for socket communication

2022-10-27 Thread Bin Meng
From: Xuzhou Cheng Socket communication in the libqtest and libqmp codes uses read() and write() which work on any file descriptor on *nix, and sockets in *nix are an example of a file descriptor. However sockets on Windows do not use *nix-style file descriptors, so read() and write() cannot be

Re: [PATCH 0/3] target: Rename headers using .def extension to .h.inc

2022-10-27 Thread Markus Armbruster
Peter Maydell writes: > On Thu, 27 Oct 2022 at 18:17, Markus Armbruster wrote: >> >> Peter Maydell writes: >> >> > On Thu, 27 Oct 2022 at 15:40, Markus Armbruster wrote: >> >> I wonder why we use any of .def, .h.inc, .inc.h, .c.inc, .inc.c. Why >> >> not .h and call it a day? No need to

RE: [PATCH v2] softmmu/physmem: Fix input parameters for flatview_access_allowed()

2022-10-27 Thread Duan, Zhenzhong
>-Original Message- >From: Duan, Zhenzhong >Sent: Friday, July 22, 2022 4:46 PM >To: qemu-devel@nongnu.org >Cc: pbonz...@redhat.com; pet...@redhat.com; da...@redhat.com; >f4...@amsat.org >Subject: [PATCH v2] softmmu/physmem: Fix input parameters for >flatview_access_allowed() > >The

Re: [PATCH 0/4] Shadow VirtQueue event index support

2022-10-27 Thread Jason Wang
在 2022/10/27 04:58, Michael S. Tsirkin 写道: On Thu, Oct 20, 2022 at 05:52:47PM +0200, Eugenio Pérez wrote: Event idx helps to reduce the number of notifications between the device and the driver. It allows them to specify an index on the circular descriptors rings where to issue the

Re: [PATCH v4 1/2] vfio: move the function vfio_get_xlat_addr() to memory.c

2022-10-27 Thread Alex Williamson
On Fri, 28 Oct 2022 10:23:16 +0800 Jason Wang wrote: > On Fri, Oct 28, 2022 at 10:08 AM Alex Williamson > wrote: > > > > On Fri, 28 Oct 2022 09:50:10 +0800 > > Jason Wang wrote: > > > > > On Fri, Oct 28, 2022 at 5:11 AM Alex Williamson > > > wrote: > > > > > > > > On Thu, 27 Oct 2022

Re: [PATCH v4 1/2] vfio: move the function vfio_get_xlat_addr() to memory.c

2022-10-27 Thread Jason Wang
On Fri, Oct 28, 2022 at 10:35 AM Alex Williamson wrote: > > On Fri, 28 Oct 2022 10:23:16 +0800 > Jason Wang wrote: > > > On Fri, Oct 28, 2022 at 10:08 AM Alex Williamson > > wrote: > > > > > > On Fri, 28 Oct 2022 09:50:10 +0800 > > > Jason Wang wrote: > > > > > > > On Fri, Oct 28, 2022 at 5:11

Re: [PATCH 00/16] hw/9pfs: Add 9pfs support for Windows

2022-10-27 Thread Bin Meng
On Fri, Oct 28, 2022 at 12:31 AM Christian Schoenebeck wrote: > > On Thursday, October 27, 2022 6:19:27 PM CEST Bin Meng wrote: > > Hi Christian, > > > > On Mon, Oct 24, 2022 at 1:16 PM Bin Meng wrote: > > > > > > At present there is no Windows support for 9p file system. > > > This series adds

Re: [PATCH v4 1/2] vfio: move the function vfio_get_xlat_addr() to memory.c

2022-10-27 Thread Jason Wang
On Fri, Oct 28, 2022 at 10:08 AM Alex Williamson wrote: > > On Fri, 28 Oct 2022 09:50:10 +0800 > Jason Wang wrote: > > > On Fri, Oct 28, 2022 at 5:11 AM Alex Williamson > > wrote: > > > > > > On Thu, 27 Oct 2022 15:40:31 +0800 > > > Cindy Lu wrote: > > > > > > > Move the function

RE: [PATCH] memory: Fix wrong end address dump

2022-10-27 Thread Duan, Zhenzhong
>-Original Message- >From: David Hildenbrand >Sent: Friday, July 22, 2022 2:44 PM >To: Duan, Zhenzhong ; qemu- >de...@nongnu.org >Cc: pbonz...@redhat.com; pet...@redhat.com; f4...@amsat.org >Subject: Re: [PATCH] memory: Fix wrong end address dump > >On 22.06.22 11:59, Zhenzhong Duan

Re: [PATCH v4 1/2] vfio: move the function vfio_get_xlat_addr() to memory.c

2022-10-27 Thread Alex Williamson
On Fri, 28 Oct 2022 09:50:10 +0800 Jason Wang wrote: > On Fri, Oct 28, 2022 at 5:11 AM Alex Williamson > wrote: > > > > On Thu, 27 Oct 2022 15:40:31 +0800 > > Cindy Lu wrote: > > > > > Move the function vfio_get_xlat_addr to softmmu/memory.c, and > > > change the name to

Re: [PATCH V4 3/4] intel-iommu: convert VTD_PE_GET_FPD_ERR() to be a function

2022-10-27 Thread Jason Wang
On Thu, Oct 27, 2022 at 9:16 PM Yi Liu wrote: > > On 2022/10/27 15:50, Jason Wang wrote: > > We used to have a macro for VTD_PE_GET_FPD_ERR() but it has an > > internal goto which prevents it from being reused. This patch convert > > that macro to a dedicated function and let the caller to decide

Re: [PATCH V4 1/4] intel-iommu: don't warn guest errors when getting rid2pasid entry

2022-10-27 Thread Jason Wang
On Thu, Oct 27, 2022 at 9:20 PM Yi Liu wrote: > > On 2022/10/27 15:50, Jason Wang wrote: > > We use to warn on wrong rid2pasid entry. But this error could be > > triggered by the guest and could happens during initialization. So > > let's don't warn in this case. > > > > Signed-off-by: Jason Wang

Re: [PATCH] net: improve error message for missing netdev backend

2022-10-27 Thread Jason Wang
On Thu, Oct 27, 2022 at 6:52 PM Daniel P. Berrangé wrote: > > ping: Jason, are you willing to queue this since it has two > positive reviews. > Yes, I've queued this. Thanks > On Mon, Oct 03, 2022 at 11:06:12AM +0100, Daniel P. Berrangé wrote: > > The current message when using '-net user...'

Re: [PATCH 3/3] vdpa: Expose VIRTIO_NET_F_STATUS unconditionally

2022-10-27 Thread Jason Wang
On Thu, Oct 27, 2022 at 6:18 PM Eugenio Perez Martin wrote: > > On Thu, Oct 27, 2022 at 8:54 AM Jason Wang wrote: > > > > On Thu, Oct 27, 2022 at 2:47 PM Eugenio Perez Martin > > wrote: > > > > > > On Thu, Oct 27, 2022 at 6:32 AM Jason Wang wrote: > > > > > > > > > > > > 在 2022/10/26 17:53,

Re: [PATCH v2] vhost-vdpa: allow passing opened vhostfd to vhost-vdpa

2022-10-27 Thread Jason Wang
On Fri, Oct 28, 2022 at 5:56 AM Si-Wei Liu wrote: > > Hi Jason, > > Sorry for top posting, but are you going to queue this patch? It looks > like the discussion has been settled and no further comment I got for 2 > weeks for this patch. Yes, I've queued this. Thanks > > Thanks, > -Siwei > > On

Re: [PATCH v4 1/2] vfio: move the function vfio_get_xlat_addr() to memory.c

2022-10-27 Thread Jason Wang
On Fri, Oct 28, 2022 at 5:11 AM Alex Williamson wrote: > > On Thu, 27 Oct 2022 15:40:31 +0800 > Cindy Lu wrote: > > > Move the function vfio_get_xlat_addr to softmmu/memory.c, and > > change the name to memory_get_xlat_addr().So we can use this > > function in other devices,such as vDPA device.

[PATCH v2 0/3] Improve FDT and support TPM for LoongArch

2022-10-27 Thread Xiaojuan Yang
This series load FDT table into dram memory space and add uart,rtc info into FDT, Add TPM device for LoongArch virt machine. Changes for v2: 1. Modify the title of the first patch("Change FDT base") to "Load FDT table into dram memory space". Changes for v1: 1. Change FDT base addr to 2

[PATCH v2 3/3] hw/loongarch: Add TPM device for LoongArch virt machine

2022-10-27 Thread Xiaojuan Yang
Add TPM device for LoongArch virt machine, including establish TPM acpi info and add TYPE_TPM_TIS_SYSBUS to dynamic_sysbus_devices list. Signed-off-by: Xiaojuan Yang --- hw/loongarch/acpi-build.c | 50 +-- hw/loongarch/virt.c | 4 2 files changed,

[PATCH v2 2/3] hw/loongarch: Improve fdt for LoongArch virt machine

2022-10-27 Thread Xiaojuan Yang
Add new items into LoongArch FDT, including rtc and uart info. Signed-off-by: Xiaojuan Yang --- hw/loongarch/virt.c| 31 +++ include/hw/pci-host/ls7a.h | 1 + 2 files changed, 32 insertions(+) diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c index

[PATCH v2 1/3] hw/loongarch: Load FDT table into dram memory space

2022-10-27 Thread Xiaojuan Yang
Load FDT table into dram memory space, and the addr is 2 MiB. Since lowmem region starts from 0, FDT base address is located at 2 MiB to avoid NULL pointer access. Signed-off-by: Xiaojuan Yang --- hw/loongarch/virt.c | 18 +++--- include/hw/loongarch/virt.h | 3 --- 2 files

Re: [PATCH] i386/cpu: Adjust cpuid addresable id count to match the spec

2022-10-27 Thread Wang, Lei
On 10/10/2022 10:49 AM, Ilya Oleinik wrote: > For EBX bits 23 - 16 in CPUID[01] Intel's manual states: > " > * The nearest power-of-2 integer that is not smaller than EBX[23:16] > is the number of unique initial APICIDs reserved for addressing > different logical processors in a

Re: [PATCH v1 2/3] target/riscv: Extend isa_ext_data for single letter extensions

2022-10-27 Thread Alistair Francis
On Thu, Oct 27, 2022 at 3:50 PM Mayuresh Chitale wrote: > > Currently the ISA string for a CPU is generated from two different > arrays, one for single letter extensions and another for multi letter > extensions. Add all the single letter extensions to the isa_ext_data > array and use it for

Re: [PATCH v5 00/13] Instantiate VT82xx functions in host device

2022-10-27 Thread Philippe Mathieu-Daudé
Hi Daniel, Bernhard, On 27/10/22 11:47, Daniel Henrique Barboza wrote: On 10/27/22 05:21, Bernhard Beschow wrote: Am 16. September 2022 14:36:05 UTC schrieb "Philippe Mathieu-Daudé" : On 12/9/22 21:50, Bernhard Beschow wrote: Am 1. September 2022 11:41:14 UTC schrieb Bernhard Beschow :

Re: [PATCH] target/i386: Expand eflags updates inline

2022-10-27 Thread Philippe Mathieu-Daudé
On 27/10/22 12:26, Richard Henderson wrote: The helpers for reset_rf, cli, sti, clac, stac are completely trivial; implement them inline. Drop some nearby #if 0 code. Signed-off-by: Richard Henderson --- target/i386/helper.h| 5 - target/i386/tcg/cc_helper.c | 41

Re: [PATCH 3/4] hw/i386/acpi-build: Resolve PIIX ISA bridge rather than ACPI controller

2022-10-27 Thread Philippe Mathieu-Daudé
On 26/10/22 15:31, Bernhard Beschow wrote: Resolving the PIIX ISA bridge rather than the PIIX ACPI controller mirrors the ICH9 code one line below. Signed-off-by: Bernhard Beschow --- hw/i386/acpi-build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe

Re: [PATCH 4/4] hw/i386/acpi-build: Generate AML for north and south bridges separately

2022-10-27 Thread Philippe Mathieu-Daudé
On 26/10/22 15:31, Bernhard Beschow wrote: The code currently assumes Q35 iff ICH9 and i440fx iff PIIX. This is slightly confusing when trying to understand the code. Split north and south bridge code to communicate which piece of code assumes which type of bridge. Signed-off-by: Bernhard

Re: [PATCH v2] vhost-vdpa: allow passing opened vhostfd to vhost-vdpa

2022-10-27 Thread Si-Wei Liu
Hi Jason, Sorry for top posting, but are you going to queue this patch? It looks like the discussion has been settled and no further comment I got for 2 weeks for this patch. Thanks, -Siwei On 10/13/2022 4:12 PM, Si-Wei Liu wrote: Jason, On 10/12/2022 10:02 PM, Jason Wang wrote: 在

Re: [PATCH 2/4] hw/i386/acpi-build: Resolve redundant attribute

2022-10-27 Thread Philippe Mathieu-Daudé
On 26/10/22 15:31, Bernhard Beschow wrote: The is_piix4 attribute is set once in one location and read once in another. Doing both in one location allows for removing the attribute altogether. Signed-off-by: Bernhard Beschow --- hw/i386/acpi-build.c | 20 ++-- 1 file

Re: [PATCH v2 0/3] hw/isa/piix4: Remove MIPS Malta specific bits

2022-10-27 Thread Philippe Mathieu-Daudé
On 27/10/22 22:47, Philippe Mathieu-Daudé wrote: Since v1: - bswap -> tswap (Bernhard) Bernhard posted a series merging both PIIX3/PIIX4 models in one [1]. Due to Malta-specific board code forced into the PIIX4 reset values, Bernhard had to include an array of "register values at reset" as a

Re: [PATCH v4 6/7] hw/sd/sdhci: Implement Freescale eSDHC device model

2022-10-27 Thread Philippe Mathieu-Daudé
Hi Bernhard, On 18/10/22 23:01, Bernhard Beschow wrote: Will allow e500 boards to access SD cards using just their own devices. Signed-off-by: Bernhard Beschow --- hw/sd/sdhci.c | 120 +- include/hw/sd/sdhci.h | 3 ++ 2 files changed, 122

Re: [PATCH 22/24] accel/tcg: Use interval tree for user-only page tracking

2022-10-27 Thread Richard Henderson
On 10/28/22 01:59, Alex Bennée wrote: I'm unwilling to put an expensive test like a function call (have_mmap_lock) before an inexpensive test like pointer != NULL. Is it really that more expensive? Well, yes. I mean, the function call isn't really slow, but it isn't single-cycle like a

[PATCH v2] s390x/css: revert SCSW ctrl/flag bits on error

2022-10-27 Thread Peter Jin
Revert the control and flag bits in the subchannel status word in case the SSCH operation fails with non-zero CC (ditto for CSCH and HSCH). According to POPS, the control and flag bits are only changed if SSCH, CSCH, and HSCH return CC 0, and no other action should be taken otherwise. In order to

Re: [PATCH v4 01/30] tests/docker: update fedora-win[32|64]-cross with lcitool

2022-10-27 Thread Richard Henderson
On 10/28/22 04:36, Alex Bennée wrote: Convert another two dockerfiles to lcitool and update. I renamed the helper because it is not Debian specific. We need an updated lcitool for this to deal with the weirdness of a 32bit nsis tool for both 32 and 64 bit builds. As a result there are some minor

Re: [PATCH v4 28/30] contrib/plugins: protect execlog's last_exec expansion

2022-10-27 Thread Richard Henderson
On 10/28/22 04:36, Alex Bennée wrote: We originally naively treated expansion as safe because we expected each new CPU/thread to appear in order. However the -M raspi2 model triggered a case where a new high cpu_index thread started executing just before a smaller one. Clean this up by

Re: [PATCH v4 7/7] hw/ppc/e500: Add Freescale eSDHC to e500plat

2022-10-27 Thread Philippe Mathieu-Daudé
On 18/10/22 23:01, Bernhard Beschow wrote: Adds missing functionality to e500plat machine which increases the chance of given "real" firmware images to access SD cards. Signed-off-by: Bernhard Beschow --- docs/system/ppc/ppce500.rst | 12 hw/ppc/Kconfig | 1 +

Re: [PATCH v4 1/2] vfio: move the function vfio_get_xlat_addr() to memory.c

2022-10-27 Thread Alex Williamson
On Thu, 27 Oct 2022 15:40:31 +0800 Cindy Lu wrote: > Move the function vfio_get_xlat_addr to softmmu/memory.c, and > change the name to memory_get_xlat_addr().So we can use this > function in other devices,such as vDPA device. > > Signed-off-by: Cindy Lu > --- > hw/vfio/common.c | 92

Re: [PATCH v4 5/7] hw/ppc/e500: Implement pflash handling

2022-10-27 Thread Philippe Mathieu-Daudé
On 18/10/22 23:01, Bernhard Beschow wrote: Allows e500 boards to have their root file system reside on flash using only builtin devices located in the eLBC memory region. Note that the flash memory area is only created when a -pflash argument is given, and that the size is determined by the

Re: [PULL 15/20] include/hw/core: Create struct CPUJumpCache

2022-10-27 Thread Richard Henderson
On 10/28/22 00:44, Ilya Leoshkevich wrote: Putting CPUJumpCache inside CPUState made problem go away: diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 18ca701b443..3ea528566c3 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -32,6 +32,7 @@ #include

Re: [PATCH v2 09/43] hw/usb/hcd-uhci: Introduce TYPE_ defines for device models

2022-10-27 Thread Philippe Mathieu-Daudé
On 22/10/22 17:04, Bernhard Beschow wrote: Suggested-by: Mark Cave-Ayland Signed-off-by: Bernhard Beschow --- hw/i386/pc_piix.c | 3 ++- hw/i386/pc_q35.c | 13 +++-- hw/isa/piix4.c| 2 +- hw/usb/hcd-uhci.c | 16 hw/usb/hcd-uhci.h | 9 + 5 files

Re: [PULL 00/23] 9p queue 2022-10-24

2022-10-27 Thread Warner Losh
On Thu, Oct 27, 2022, 1:45 PM Christian Schoenebeck wrote: > On Thursday, October 27, 2022 7:37:07 PM CEST Stefan Hajnoczi wrote: > > On Thu, 27 Oct 2022 at 12:38, Christian Schoenebeck > > wrote: > > > > > > On Thursday, October 27, 2022 5:53:47 PM CEST Thomas Huth wrote: > > > > On 24/10/2022

[PATCH v2 1/3] hw/mips/malta: Introduce PIIX4_PCI_DEVFN definition

2022-10-27 Thread Philippe Mathieu-Daudé
The PIIX4 PCI-ISA bridge function is always located at 10:0. Since we want to re-use its address, add the PIIX4_PCI_DEVFN definition. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/mips/malta.c

[PATCH v2 2/3] hw/mips/malta: Set PIIX4 IRQ routes in embedded bootloader

2022-10-27 Thread Philippe Mathieu-Daudé
Linux kernel expects the northbridge & southbridge chipsets configured by the BIOS firmware. We emulate that by writing a tiny bootloader code in write_bootloader(). Upon introduction in commit 5c2b87e34d ("PIIX4 support"), the PIIX4 configuration space included values specific to the Malta

[PATCH v2 3/3] hw/isa/piix4: Correct IRQRC[A:D] reset values

2022-10-27 Thread Philippe Mathieu-Daudé
IRQRC[A:D] registers reset value is 0x80. We were forcing the MIPS Malta machine routing to be able to boot a Linux kernel without any bootloader. We now have these registers initialized in the Malta machine write_bootloader(), so we can use the correct reset values. Signed-off-by: Philippe

[PATCH v2 0/3] hw/isa/piix4: Remove MIPS Malta specific bits

2022-10-27 Thread Philippe Mathieu-Daudé
Since v1: - bswap -> tswap (Bernhard) Bernhard posted a series merging both PIIX3/PIIX4 models in one [1]. Due to Malta-specific board code forced into the PIIX4 reset values, Bernhard had to include an array of "register values at reset" as a class property. This is not wrong, but to model

Re: [PULL 15/20] include/hw/core: Create struct CPUJumpCache

2022-10-27 Thread Richard Henderson
On 10/28/22 00:18, Ilya Leoshkevich wrote: in one of the wasmtime tests (host=x86_64, guest=s390x). GDB shows that the root cause is actually this: Thread 181 "wasi_tokio::pat" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x76c54640 (LWP 168352)]

Re: [PATCH 3/3] hw/isa/piix4: Correct IRQRC[A:D] reset values

2022-10-27 Thread Philippe Mathieu-Daudé
On 26/10/22 23:32, Bernhard Beschow wrote: On Wed, Oct 26, 2022 at 9:46 PM Philippe Mathieu-Daudé mailto:phi...@linaro.org>> wrote: IRQRC[A:D] registers reset value is 0x80. We were forcing the MIPS Malta machine routing to be able to boot a Linux kernel without any bootloader.

Re: [PULL 00/23] 9p queue 2022-10-24

2022-10-27 Thread Christian Schoenebeck
On Thursday, October 27, 2022 7:37:07 PM CEST Stefan Hajnoczi wrote: > On Thu, 27 Oct 2022 at 12:38, Christian Schoenebeck > wrote: > > > > On Thursday, October 27, 2022 5:53:47 PM CEST Thomas Huth wrote: > > > On 24/10/2022 12.54, Christian Schoenebeck wrote: > > > > The following changes since

Re: [PATCH v10 2/9] s390x/cpu topology: reporting the CPU topology to the guest

2022-10-27 Thread Janis Schoetterl-Glausch
On Wed, 2022-10-12 at 18:21 +0200, Pierre Morel wrote: > The guest can use the STSI instruction to get a buffer filled > with the CPU topology description. > > Let us implement the STSI instruction for the basis CPU topology > level, level 2. > > Signed-off-by: Pierre Morel > --- >

Re: [PATCH v2] target/hppa: Fix fid instruction emulation

2022-10-27 Thread Richard Henderson
On 10/28/22 03:03, Helge Deller wrote: The fid instruction (Floating-Point Identify) puts the FPU model and revision into the Status Register. Since those values shouldn't be 0, store values there which a PCX-L2 (for 32-bit) or a PCX-W2 (for 64-bit) would return. Noticed while trying to install

[PATCH 2/2] iotests: Adjust 186.out to account for 'null' node-name

2022-10-27 Thread Annie Li
A recent enhancement for setting the block backend name fails test 186 due to a 'null' node-name. This is expected; adjust the expected test output accordingly. Signed-off-by: Mark Kanda Signed-off-by: Annie Li --- tests/qemu-iotests/186.out | 36 ++-- 1 file

Re: [PATCH 2/2] hw/arm/boot: Set SCR_EL3.HXEn when booting kernel

2022-10-27 Thread Richard Henderson
On 10/28/22 00:02, Peter Maydell wrote: When we direct boot a kernel on a CPU which emulates EL3, we need to set up the EL3 system registers as the Linux kernel documentation specifies: https://www.kernel.org/doc/Documentation/arm64/booting.rst For CPUs with FEAT_HCX support this

[PATCH 1/2] block: Set the name of BlockBackend if possible

2022-10-27 Thread Annie Li
When QEMU emulates the SCSI device, it sets the 'device_id' of the SCSI device with the serial number configured by 'serial=' property, or with 'blk->name' of the block backend otherwise. Then QEMU emulates SCSI commands and fills the mandatory Device identification page(0x83) with the 'device_id'

Re: [PATCH 1/2] hw/arm/boot: Set SME and SVE EL3 vector lengths when booting kernel

2022-10-27 Thread Richard Henderson
On 10/28/22 00:02, Peter Maydell wrote: When we direct boot a kernel on a CPU which emulates EL3, we need to set up the EL3 system registers as the Linux kernel documentation specifies: https://www.kernel.org/doc/Documentation/arm64/booting.rst For SVE and SME this includes: -

Re: [PATCH v3 1/2] hw/nvme: Support for Namespaces Management from guest OS - create-ns

2022-10-27 Thread Keith Busch
On Thu, Oct 27, 2022 at 01:00:45PM -0500, Jonathan Derrick wrote: > +Parameters: > + > +``auto-ns-path=`` > + If specified indicates a support for dynamic management of nvme namespaces > + by means of nvme create-ns command. This path points > + to the storage area for backend images must

Re: [PATCH v10 1/9] s390x/cpu topology: core_id sets s390x CPU topology

2022-10-27 Thread Janis Schoetterl-Glausch
On Wed, 2022-10-26 at 10:34 +0200, Pierre Morel wrote: > > On 10/25/22 21:58, Janis Schoetterl-Glausch wrote: > > On Wed, 2022-10-12 at 18:20 +0200, Pierre Morel wrote: > > > In the S390x CPU topology the core_id specifies the CPU address > > > and the position of the core withing the topology. >

Re: [PATCH v2 2/6] target/i386: Use cpu_unwind_state_data for tpr access

2022-10-27 Thread Richard Henderson
On 10/27/22 22:22, Claudio Fontana wrote: On 10/27/22 12:02, Richard Henderson wrote: +/* Per x86_restore_state_to_opc. */ +if (TARGET_TB_PCREL) { +return (env->eip & TARGET_PAGE_MASK) | data[0]; +} else { +return data[0] - env->segs[R_CS].base; here we switch from

[PATCH] s390x/css: revert SCSW ctrl/flag bits on error

2022-10-27 Thread Peter Jin
Revert the control and flag bits in the subchannel status word in case the SSCH operation fails with non-zero CC (ditto for CSCH and HSCH). According to POPS, the control and flag bits are only changed if SSCH, CSCH, and HSCH return CC 0, and no other action should be taken otherwise. In order to

Re: [PATCH v4 01/17] hw/vfio/pci: Ensure MSI and MSI-X do not overlap

2022-10-27 Thread Alex Williamson
On Thu, 27 Oct 2022 15:36:49 +0900 Akihiko Odaki wrote: > vfio_add_std_cap() is designed to ensure that capabilities do not > overlap, but it failed to do so for MSI and MSI-X capabilities. > > Ensure MSI and MSI-X capabilities do not overlap with others by omitting > other overlapping

[PULL 49/58] mirror: switch to *_co_* functions

2022-10-27 Thread Kevin Wolf
From: Alberto Faria Signed-off-by: Alberto Faria Signed-off-by: Paolo Bonzini Message-Id: <20221013123711.620631-17-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/mirror.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH v9 0/5] improve error handling for module load

2022-10-27 Thread Kevin Wolf
Am 27.10.2022 um 16:52 hat Claudio Fontana geschrieben: > A ping on this one, is there anything more that needs to be urgently > addressed before it can be queued for inclusion? This is currently > creating problems for upstream kubevirt, due to the error handling not > properly reporting

  1   2   3   4   5   >