Re: [PATCH v6 01/19] configure, meson: override C compiler for cmake

2022-02-20 Thread Paolo Bonzini
On 2/18/22 15:49, Jag Raman wrote: Concerning the generated files, I see the following in CMakeMesonToolchainFile.cmake: Without patch: set(CMAKE_C_COMPILER "/opt/rh/devtoolset-9/root/usr/bin/cc" "-m64" "-mcx16”) With patch: set(CMAKE_C_COMPILER "cc" "-m64" "-mcx16") I don't understand why i

[PATCH v10 0/5] QEMU RISC-V AIA support

2022-02-20 Thread Anup Patel
From: Anup Patel The advanced interrupt architecture (AIA) extends the per-HART local interrupt support. Along with this, it also adds IMSIC (MSI contrllor) and Advanced PLIC (wired interrupt controller). The latest AIA draft specification can be found here: https://github.com/riscv/riscv-aia/re

[PATCH v10 3/5] hw/riscv: virt: Add optional AIA IMSIC support to virt machine

2022-02-20 Thread Anup Patel
From: Anup Patel We extend virt machine to emulate both AIA IMSIC and AIA APLIC devices only when "aia=aplic-imsic" parameter is passed along with machine name in the QEMU command-line. The AIA IMSIC is only a per-HART MSI controller so we use AIA APLIC in MSI-mode to forward all wired interrupts

[PATCH v10 1/5] hw/riscv: virt: Add optional AIA APLIC support to virt machine

2022-02-20 Thread Anup Patel
From: Anup Patel We extend virt machine to emulate AIA APLIC devices only when "aia=aplic" parameter is passed along with machine name in QEMU command-line. When "aia=none" or not specified then we fallback to original PLIC device emulation. Signed-off-by: Anup Patel Signed-off-by: Anup Patel

[PATCH v10 2/5] hw/intc: Add RISC-V AIA IMSIC device emulation

2022-02-20 Thread Anup Patel
From: Anup Patel The RISC-V AIA (Advanced Interrupt Architecture) defines a new interrupt controller for MSIs (message signal interrupts) called IMSIC (Incoming Message Signal Interrupt Controller). The IMSIC is per-HART device and also suppport virtualizaiton of MSIs using dedicated VS-level gue

[PATCH v10 4/5] docs/system: riscv: Document AIA options for virt machine

2022-02-20 Thread Anup Patel
From: Anup Patel We have two new machine options "aia" and "aia-guests" available for the RISC-V virt machine so let's document these options. Signed-off-by: Anup Patel Signed-off-by: Anup Patel Reviewed-by: Alistair Francis Reviewed-by: Frank Chang --- docs/system/riscv/virt.rst | 16 +

[PATCH v10 5/5] hw/riscv: virt: Increase maximum number of allowed CPUs

2022-02-20 Thread Anup Patel
From: Anup Patel To facilitate software development of RISC-V systems with large number of HARTs, we increase the maximum number of allowed CPUs to 512 (2^9). We also add a detailed source level comments about limit defines which impact the physical address space utilization. Signed-off-by: Anu

Re: [PATCH 01/11] mos6522: add defines for IFR bit flags

2022-02-20 Thread Mark Cave-Ayland
On 05/02/2022 12:06, BALATON Zoltan wrote: On Sat, 5 Feb 2022, Philippe Mathieu-Daudé wrote: On 5/2/22 11:51, Mark Cave-Ayland wrote: On 27/01/2022 23:16, BALATON Zoltan wrote: On Thu, 27 Jan 2022, Mark Cave-Ayland wrote: These are intended to make it easier to see how the physical control

Re: [PATCH 04/11] mos6522: switch over to use qdev gpios for IRQs

2022-02-20 Thread Mark Cave-Ayland
On 07/02/2022 19:29, Peter Maydell wrote: On Thu, 27 Jan 2022 at 21:01, Mark Cave-Ayland wrote: For historical reasons each mos6522 instance implements its own setting and update of the IFR flag bits using methods exposed by MOS6522DeviceClass. As of today this is no longer required, and it i

Re: [PATCH v6 01/19] configure, meson: override C compiler for cmake

2022-02-20 Thread Paolo Bonzini
On 2/20/22 09:27, Paolo Bonzini wrote: On 2/18/22 15:49, Jag Raman wrote: Concerning the generated files, I see the following in CMakeMesonToolchainFile.cmake: Without patch: set(CMAKE_C_COMPILER "/opt/rh/devtoolset-9/root/usr/bin/cc" "-m64" "-mcx16”) With patch: set(CMAKE_C_COMPILER "cc" "-

[PATCH] target/nios2: Shadow register set, EIC and VIC

2022-02-20 Thread amir . gonnen
>From 99efcd655e83f034bce25271fe592d8789529e54 Mon Sep 17 00:00:00 2001 From: Amir Gonnen Date: Thu, 17 Feb 2022 15:43:14 +0200 Subject: [PATCH] target/nios2: Shadow register set, EIC and VIC Implement nios2 Vectored Interrupt Controller (VIC). This includes Exteral Interrupt Controller interface

Re: [PULL 00/12] virtiofs queue

2022-02-20 Thread Peter Maydell
On Thu, 17 Feb 2022 at 17:30, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > The following changes since commit c13b8e9973635f34f3ce4356af27a311c993729c: > > Merge remote-tracking branch > 'remotes/alistair/tags/pull-riscv-to-apply-20220216' into staging (2022-02-16

Re: [PATCH] target/nios2: Shadow register set, EIC and VIC

2022-02-20 Thread Peter Maydell
On Sun, 20 Feb 2022 at 13:07, wrote: > > From 99efcd655e83f034bce25271fe592d8789529e54 Mon Sep 17 00:00:00 2001 > From: Amir Gonnen > Date: Thu, 17 Feb 2022 15:43:14 +0200 > Subject: [PATCH] target/nios2: Shadow register set, EIC and VIC > > Implement nios2 Vectored Interrupt Controller (VIC). >

Re: configure: How to pass flags to the Objective-C compiler?

2022-02-20 Thread Paolo Bonzini
On 2/19/22 20:17, Joshua Seaton wrote: Is that accurate? If so, will there be follow-up patches? If not, could you clarify how this amounts to affecting Objective-C compilation steps? This entry in the machine file affects the compilation steps: + test -n "$objcc" && echo "objc_args = [$(meso

[PATCH v8 05/11] 9p: darwin: Ignore O_{NOATIME, DIRECT}

2022-02-20 Thread Will Cohen
From: Keno Fischer Darwin doesn't have either of these flags. Darwin does have F_NOCACHE, which is similar to O_DIRECT, but has different enough semantics that other projects don't generally map them automatically. In any case, we don't support O_DIRECT on Linux at the moment either. Signed-off-

[PATCH v8 00/11] 9p: Add support for darwin

2022-02-20 Thread Will Cohen
This is a followup to https://lists.gnu.org/archive/html/qemu-devel/2022-02/msg04298.html, adding 9p server support for Darwin. Since v7, no functional changes have been made to this patch set, but Patch 9/11 (9p: darwin: Implement compatibility for mknodat) was rebased to apply cleanly on top o

[PATCH v8 02/11] 9p: Rename 9p-util -> 9p-util-linux

2022-02-20 Thread Will Cohen
From: Keno Fischer The current file only has the Linux versions of these functions. Rename the file accordingly and update the Makefile to only build it on Linux. A Darwin version of these will follow later in the series. Signed-off-by: Keno Fischer [Michael Roitzsch: - Rebase for NixOS] Signed

[PATCH v8 03/11] 9p: darwin: Handle struct stat(fs) differences

2022-02-20 Thread Will Cohen
From: Keno Fischer Signed-off-by: Keno Fischer Signed-off-by: Michael Roitzsch [Will Cohen: - Note lack of f_namelen and f_frsize on Darwin - Ensure that tv_sec and tv_nsec are both initialized for Darwin and non-Darwin] Signed-off-by: Will Cohen --- hw/9pfs/9p-pro

[PATCH v8 06/11] 9p: darwin: Move XATTR_SIZE_MAX->P9_XATTR_SIZE_MAX

2022-02-20 Thread Will Cohen
From: Keno Fischer Signed-off-by: Keno Fischer Signed-off-by: Michael Roitzsch Because XATTR_SIZE_MAX is not defined on Darwin, create a cross-platform P9_XATTR_SIZE_MAX instead. [Will Cohen: - Adjust coding style - Lower XATTR_SIZE_MAX to 64k - Add explanatory conte

[PATCH v8 01/11] 9p: linux: Fix a couple Linux assumptions

2022-02-20 Thread Will Cohen
From: Keno Fischer - Guard Linux only headers. - Add qemu/statfs.h header to abstract over the which headers are needed for struct statfs - Define `ENOATTR` only if not only defined (it's defined in system headers on Darwin). Signed-off-by: Keno Fischer [Michael Roitzsch: - Rebase for

[PATCH v8 04/11] 9p: darwin: Handle struct dirent differences

2022-02-20 Thread Will Cohen
From: Keno Fischer On darwin d_seekoff exists, but is optional and does not seem to be commonly used by file systems. Use `telldir` instead to obtain the seek offset and inject it into d_seekoff, and create a qemu_dirent_off helper to call it appropriately when appropriate. Signed-off-by: Keno F

[PATCH v8 09/11] 9p: darwin: Implement compatibility for mknodat

2022-02-20 Thread Will Cohen
From: Keno Fischer Darwin does not support mknodat. However, to avoid race conditions with later setting the permissions, we must avoid using mknod on the full path instead. We could try to fchdir, but that would cause problems if multiple threads try to call mknodat at the same time. However, lu

[PATCH v8 08/11] 9p: darwin: Compatibility for f/l*xattr

2022-02-20 Thread Will Cohen
From: Keno Fischer On darwin `fgetxattr` takes two extra optional arguments, and the l* variants are not defined (in favor of an extra flag to the regular variants. Signed-off-by: Keno Fischer [Michael Roitzsch: - Rebase for NixOS] Signed-off-by: Michael Roitzsch Signed-off-by: Will Cohen ---

[PATCH v8 07/11] 9p: darwin: *xattr_nofollow implementations

2022-02-20 Thread Will Cohen
From: Keno Fischer This implements the darwin equivalent of the functions that were moved to 9p-util(-linux) earlier in this series in the new 9p-util-darwin file. Signed-off-by: Keno Fischer [Michael Roitzsch: - Rebase for NixOS] Signed-off-by: Michael Roitzsch Signed-off-by: Will Cohen ---

[PATCH v8 10/11] 9p: darwin: Adjust assumption on virtio-9p-test

2022-02-20 Thread Will Cohen
The previous test depended on the assumption that P9_DOTL_AT_REMOVEDIR and AT_REMOVEDIR have the same value. While this is true on Linux, it is not true everywhere, and leads to an incorrect test failure on unlink_at, noticed when adding 9p to darwin: Received response 7 (RLERROR) instead of 77 (

[PATCH v8 11/11] 9p: darwin: meson: Allow VirtFS on Darwin

2022-02-20 Thread Will Cohen
From: Keno Fischer To allow VirtFS on darwin, we need to check that pthread_fchdir_np is available, which has only been available since macOS 10.12. Additionally, virtfs_proxy_helper is disabled on Darwin. This patch series does not currently provide an implementation of the proxy-helper, but th

Re: [PATCH 08/11] mos6522: add "info via" HMP command for debugging

2022-02-20 Thread Mark Cave-Ayland
On 08/02/2022 13:10, Daniel P. Berrangé wrote: On Tue, Feb 08, 2022 at 01:06:59PM +, Mark Cave-Ayland wrote: On 08/02/2022 12:49, Daniel P. Berrangé wrote: I was under the impression that monitor_register_hmp_info_hrt() does all the magic here i.e. it declares the underlying QMP command w

RE: [PATCH] target/nios2: Shadow register set, EIC and VIC

2022-02-20 Thread Amir Gonnen
Hi Peter, I can split the VIC from the core+EIC changes, although the core+EIC changes make little sense without a VIC to interact with them. However, I'm not sure how to split the changes to the nios2 core into multiple patches. The shadow register set, together with the EIC interface and inter

Re: [PATCH 01/11] mos6522: add defines for IFR bit flags

2022-02-20 Thread BALATON Zoltan
On Sun, 20 Feb 2022, Mark Cave-Ayland wrote: On 05/02/2022 12:06, BALATON Zoltan wrote: On Sat, 5 Feb 2022, Philippe Mathieu-Daudé wrote: On 5/2/22 11:51, Mark Cave-Ayland wrote: On 27/01/2022 23:16, BALATON Zoltan wrote: On Thu, 27 Jan 2022, Mark Cave-Ayland wrote: These are intended to mak

[PATCH 0/2] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-02-20 Thread Liav Albani
This can allow the guest OS to determine more easily if i8042 controller is present in the system or not, so it doesn't need to do probing of the controller, but just initialize it immediately, before enumerating the ACPI AML namespace. To allow "flexible" indication, I don't hardcode the bit at l

Re: [PATCH] target/nios2: Shadow register set, EIC and VIC

2022-02-20 Thread Peter Maydell
On Sun, 20 Feb 2022 at 15:37, Amir Gonnen wrote: > I can split the VIC from the core+EIC changes, although the core+EIC changes > make little sense without a VIC to interact with them. > However, I'm not sure how to split the changes to the nios2 core into > multiple patches. > The shadow regist

[PATCH 1/2] hw/isa: add function to check for existence of device by its type

2022-02-20 Thread Liav Albani
Signed-off-by: Liav Albani --- hw/isa/isa-bus.c | 17 + include/hw/isa/isa.h | 1 + 2 files changed, 18 insertions(+) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 6c31398dda..39d1768797 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -222,6 +222,23 @@ void

[PATCH 2/2] hw/acpi: add indication for i8042 in IA-PC boot flags of the FADT table

2022-02-20 Thread Liav Albani
This can allow the guest OS to determine more easily if i8042 controller is present in the system or not, so it doesn't need to do probing of the controller, but just initialize it immediately, before enumerating the ACPI AML namespace. Signed-off-by: Liav Albani --- hw/acpi/aml-build.c

Re: [PULL 00/39] ppc queue

2022-02-20 Thread Peter Maydell
On Fri, 18 Feb 2022 at 10:38, Cédric Le Goater wrote: > > The following changes since commit c13b8e9973635f34f3ce4356af27a311c993729c: > > Merge remote-tracking branch > 'remotes/alistair/tags/pull-riscv-to-apply-20220216' into staging (2022-02-16 > 09:57:11 +) > > are available in the Git

Re: [PATCH v3 4/6] hw/openrisc/openrisc_sim: Increase max_cpus to 4

2022-02-20 Thread Philippe Mathieu-Daudé
On 19/2/22 07:42, Stafford Horne wrote: Now that we no longer have a limit of 2 CPUs due to fixing the IRQ routing issues we can increase the max. Here we increase the limit to 4, we could go higher, but currently OMPIC has a limit of 4, so we align with that. Signed-off-by: Stafford Horne ---

Re: [PATCH v3 3/6] hw/openrisc/openrisc_sim: Use IRQ splitter when connecting UART

2022-02-20 Thread Philippe Mathieu-Daudé
On 19/2/22 07:42, Stafford Horne wrote: Currently the OpenRISC SMP configuration only supports 2 cores due to the UART IRQ routing being limited to 2 cores. As was done in commit 1eeffbeb11 ("hw/openrisc/openrisc_sim: Use IRQ splitter when connecting IRQ to multiple CPUs") we can use a splitter

Re: [PATCH v8 04/11] 9p: darwin: Handle struct dirent differences

2022-02-20 Thread Christian Schoenebeck
On Sonntag, 20. Februar 2022 17:50:49 CET Will Cohen wrote: > From: Keno Fischer > > On darwin d_seekoff exists, but is optional and does not seem to > be commonly used by file systems. Use `telldir` instead to obtain > the seek offset and inject it into d_seekoff, and create a > qemu_dirent_off

Re: [PATCH v8 04/11] 9p: darwin: Handle struct dirent differences

2022-02-20 Thread Will Cohen
Apologies — I tested on Mac but should have done Linux too. Will revise. On Sun, Feb 20, 2022 at 4:28 PM Christian Schoenebeck < qemu_...@crudebyte.com> wrote: > On Sonntag, 20. Februar 2022 17:50:49 CET Will Cohen wrote: > > From: Keno Fischer > > > > On darwin d_seekoff exists, but is optional

Re: [PATCH v8 09/11] 9p: darwin: Implement compatibility for mknodat

2022-02-20 Thread Christian Schoenebeck
On Sonntag, 20. Februar 2022 17:50:54 CET Will Cohen wrote: > From: Keno Fischer > > Darwin does not support mknodat. However, to avoid race conditions > with later setting the permissions, we must avoid using mknod on > the full path instead. We could try to fchdir, but that would cause > proble

Re: [PATCH v3 4/6] hw/openrisc/openrisc_sim: Increase max_cpus to 4

2022-02-20 Thread Stafford Horne
On Sun, Feb 20, 2022 at 09:07:17PM +0100, Philippe Mathieu-Daudé wrote: > On 19/2/22 07:42, Stafford Horne wrote: > > Now that we no longer have a limit of 2 CPUs due to fixing the > > IRQ routing issues we can increase the max. Here we increase > > the limit to 4, we could go higher, but currentl

Re: [PATCH v3 3/6] hw/openrisc/openrisc_sim: Use IRQ splitter when connecting UART

2022-02-20 Thread Stafford Horne
On Sun, Feb 20, 2022 at 09:06:41PM +0100, Philippe Mathieu-Daudé wrote: > On 19/2/22 07:42, Stafford Horne wrote: > > Currently the OpenRISC SMP configuration only supports 2 cores due to > > the UART IRQ routing being limited to 2 cores. As was done in commit > > 1eeffbeb11 ("hw/openrisc/openrisc

Re: [RFC PATCH] virtio-net: Unlimit tx queue size if peer is vdpa

2022-02-20 Thread Jason Wang
在 2022/2/18 上午1:50, Eugenio Pérez 写道: The code used to limit the maximum size of tx queue for others backends than vhost_user since the introduction of configurable tx queue size in 9b02e1618cf2 ("virtio-net: enable configurable tx queue size"). As vhost_user, vhost_vdpa devices should deal wi

[PATCH] gdbstub.c: add support for info proc mappings

2022-02-20 Thread Disconnect3d
This commit adds support for `info proc mappings` and a few other commands into the QEMU user-mode emulation gdbstub. For that, support for the following GDB remote protocol commands has been added: * vFile:setfs: pid * vFile:open: filename, flags, mode * vFile:pread: fd, count, offset * vFile:clo

Re: [PATCH 2/2] Allow VIRTIO_F_IN_ORDER to be negotiated for vdpa devices

2022-02-20 Thread Jason Wang
在 2022/2/18 下午6:22, Eugenio Perez Martin 写道: On Thu, Feb 17, 2022 at 8:32 AM Michael S. Tsirkin wrote: On Tue, Feb 15, 2022 at 12:52:31PM +0530, Gautam Dawar wrote: This patch adds the ability to negotiate VIRTIO_F_IN_ORDER bit for vhost-vdpa backend when the underlying device supports this

Re: Call for GSoC and Outreachy project ideas for summer 2022

2022-02-20 Thread Klaus Jensen
On Jan 28 15:47, Stefan Hajnoczi wrote: > Dear QEMU, KVM, and rust-vmm communities, > QEMU will apply for Google Summer of Code 2022 > (https://summerofcode.withgoogle.com/) and has been accepted into > Outreachy May-August 2022 (https://www.outreachy.org/). You can now > submit internship project

Re: [PATCH RFCv2 2/4] i386/pc: relocate 4g start to 1T where applicable

2022-02-20 Thread Igor Mammedov
On Fri, 18 Feb 2022 17:12:21 + Joao Martins wrote: > On 2/14/22 15:31, Igor Mammedov wrote: > > On Mon, 14 Feb 2022 15:05:00 + > > Joao Martins wrote: > >> On 2/14/22 14:53, Igor Mammedov wrote: > >>> On Mon, 7 Feb 2022 20:24:20 + > >>> Joao Martins wrote: > +{ > +

Re: [PATCH v3 2/3] hw/smbios: fix table memory corruption with large memory vms

2022-02-20 Thread Igor Mammedov
On Thu, 17 Feb 2022 19:02:05 +0530 (IST) Ani Sinha wrote: > On Thu, 17 Feb 2022, Igor Mammedov wrote: > > > On Mon, 14 Feb 2022 19:42:35 +0530 > > > > > > > Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2023977 > > s/buglink/Resolves/ > > > > OK I am curious about this one. > > P

Re: [PATCH v10 0/5] QEMU RISC-V AIA support

2022-02-20 Thread Alistair Francis
On Sun, Feb 20, 2022 at 6:57 PM Anup Patel wrote: > > From: Anup Patel > > The advanced interrupt architecture (AIA) extends the per-HART local > interrupt support. Along with this, it also adds IMSIC (MSI contrllor) > and Advanced PLIC (wired interrupt controller). > > The latest AIA draft speci

Re: [PATCH v2] hw: riscv: opentitan: fixup SPI addresses

2022-02-20 Thread Alistair Francis
On Fri, Feb 18, 2022 at 4:38 PM Alistair Francis wrote: > > From: Wilfred Mallawa > > This patch updates the SPI_DEVICE, SPI_HOST0, SPI_HOST1 > base addresses. Also adds these as unimplemented devices. > > The address references can be found [1]. > > [1] > https://github.com/lowRISC/opentitan/bl

Re: [PATCH 17/31] vdpa: adapt vhost_ops callbacks to svq

2022-02-20 Thread Jason Wang
在 2022/2/18 上午1:13, Eugenio Perez Martin 写道: On Tue, Feb 8, 2022 at 4:58 AM Jason Wang wrote: 在 2022/2/1 上午2:58, Eugenio Perez Martin 写道: On Sun, Jan 30, 2022 at 5:03 AM Jason Wang wrote: 在 2022/1/22 上午4:27, Eugenio Pérez 写道: First half of the buffers forwarding part, preparing vhost-vdp

Re: [PATCH 01/31] vdpa: Reorder virtio/vhost-vdpa.c functions

2022-02-20 Thread Jason Wang
在 2022/1/28 下午3:57, Eugenio Perez Martin 写道: On Fri, Jan 28, 2022 at 6:59 AM Jason Wang wrote: 在 2022/1/22 上午4:27, Eugenio Pérez 写道: vhost_vdpa_set_features and vhost_vdpa_init need to use vhost_vdpa_get_features in svq mode. vhost_vdpa_dev_start needs to use almost all _set_ functions: vh

Re: [PATCH 09/31] vhost-vdpa: Take into account SVQ in vhost_vdpa_set_vring_call

2022-02-20 Thread Jason Wang
在 2022/2/18 下午8:35, Eugenio Perez Martin 写道: On Tue, Feb 8, 2022 at 4:23 AM Jason Wang wrote: 在 2022/1/31 下午11:34, Eugenio Perez Martin 写道: On Sat, Jan 29, 2022 at 9:06 AM Jason Wang wrote: 在 2022/1/22 上午4:27, Eugenio Pérez 写道: Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c

Re: [PATCH 01/31] vdpa: Reorder virtio/vhost-vdpa.c functions

2022-02-20 Thread Eugenio Perez Martin
On Mon, Feb 21, 2022 at 8:31 AM Jason Wang wrote: > > > 在 2022/1/28 下午3:57, Eugenio Perez Martin 写道: > > On Fri, Jan 28, 2022 at 6:59 AM Jason Wang wrote: > >> > >> 在 2022/1/22 上午4:27, Eugenio Pérez 写道: > >>> vhost_vdpa_set_features and vhost_vdpa_init need to use > >>> vhost_vdpa_get_features in

Re: [PATCH 18/31] vhost: Shadow virtqueue buffers forwarding

2022-02-20 Thread Jason Wang
在 2022/2/17 下午8:48, Eugenio Perez Martin 写道: On Tue, Feb 8, 2022 at 9:16 AM Jason Wang wrote: 在 2022/2/1 下午7:25, Eugenio Perez Martin 写道: On Sun, Jan 30, 2022 at 7:47 AM Jason Wang wrote: 在 2022/1/22 上午4:27, Eugenio Pérez 写道: @@ -272,6 +590,28 @@ void vhost_svq_set_svq_kick_fd(VhostShado