Re: Bluetooth support in QEMU

2022-08-15 Thread Thomas Huth
On 16/08/2022 06.22, vaishu venkat wrote: Hi Thomas, Thanks for prompt response. We currently using the QEMU version as below, * * *qemu-system-aarch64 -version QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.23) Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers*

Re: [PATCH 04/20] disas/nanomips: Remove helper methods from class

2022-08-15 Thread Thomas Huth
On 16/08/2022 02.19, Philippe Mathieu-Daudé wrote: On 15/8/22 09:26, Milica Lazarevic wrote: Helper methods from NMD class like NMD::renumber_registers, NMD::decode_gpr_gpr4... etc. are removed from the class. They're now declared global static functions. Following helper methods have been

Re: [PATCH 7/7] target/riscv: Honour -semihosting-config userspace=on and enable=on

2022-08-15 Thread Furquan Shaikh
On Mon, Aug 15, 2022 at 1:26 PM Richard Henderson wrote: > > On 8/15/22 14:03, Peter Maydell wrote: > > The riscv target incorrectly enabled semihosting always, whether the > > user asked for it or not. Call semihosting_enabled() passing the > > correct value to the is_userspace argument, which

[PATCH v1] target/riscv: Add xicondops in ISA entry

2022-08-15 Thread Rahul Pathak
XVentanaCondOps is Ventana custom extension. Add its extension entry in the ISA Ext array Signed-off-by: Rahul Pathak --- This patch is based on branch riscv-to-apply.next (Alistair qemu tree) Based on top commit: f2a91d8b78 target/riscv/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH v7 00/14] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-08-15 Thread Nikunj A. Dadhania
On 15/08/22 18:34, Chao Peng wrote: > On Fri, Aug 12, 2022 at 02:18:43PM +0530, Nikunj A. Dadhania wrote: >> >> >> On 12/08/22 12:48, Gupta, Pankaj wrote: >>> However, fallocate() preallocates full guest memory before starting the guest. With this behaviour

Re: Bluetooth support in QEMU

2022-08-15 Thread vaishu venkat
Hi Peter, Thanks for quick reply. We don't have an existing application running with qemu functionality. On Mon, Aug 15, 2022 at 9:36 PM Peter Maydell wrote: > On Mon, 15 Aug 2022 at 16:53, vaishu venkat > wrote: > > > > Hi team, > > We are currently required to use QEMU for

Re: Bluetooth support in QEMU

2022-08-15 Thread vaishu venkat
Hi Thomas, Thanks for prompt response. We currently using the QEMU version as below, *qemu-system-aarch64 -versionQEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.23)Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers* Could you please guide us with the, how to access

Re: [PATCH 0/4] hw/nvme: add irqfd support

2022-08-15 Thread Jinhao Fan
at 11:37 PM, Jinhao Fan wrote: > This patch series changes qemu-nvme's interrupt emulation to use event > notifiers, which can ensure thread-safe interrupt delivery when iothread > is used. In the first two patches, I convert qemu-nvme's IO emulation > logic to send irq via eventfd, so that the

[PATCH v2 19/24] vhost-net: vhost-user: update vhost_net_virtqueue_restart()

2022-08-15 Thread Kangjie Xu
Update vhost_net_virtqueue_restart() for vhost-user scenario. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo --- hw/net/vhost_net.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index c0d408f3b4..778081e54a 100644 --- a/hw/net/vhost_net.c

[PATCH v2 20/24] virtio-net: introduce flush_or_purge_queued_packets()

2022-08-15 Thread Kangjie Xu
Introduce the fucntion flush_or_purge_queued_packets(), it will be used in device reset and virtqueue reset. Therefore, we extract the common logic as a new function. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo --- hw/net/virtio-net.c | 17 +++-- 1 file changed, 11

[PATCH v2 24/24] vhost: vhost-user: enable vq reset feature

2022-08-15 Thread Kangjie Xu
Add virtqueue reset feature for vhost-user. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo --- hw/net/vhost_net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 9ea160e4e9..5bc89f2842 100644 --- a/hw/net/vhost_net.c +++

[PATCH v2 18/24] vhost-net: vhost-user: update vhost_net_virtqueue_stop()

2022-08-15 Thread Kangjie Xu
Update vhost_net_virtqueue_stop() for vhost-user scenario. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo --- hw/net/vhost_net.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 2ab67e875e..c0d408f3b4 100644 --- a/hw/net/vhost_net.c +++

[PATCH v2 21/24] virtio-net: support queue reset

2022-08-15 Thread Kangjie Xu
From: Xuan Zhuo virtio-net, vhost-kernel, vhost-user implement queue reset. Queued packets in the corresponding queue pair are flushed or purged. Signed-off-by: Xuan Zhuo Signed-off-by: Kangjie Xu --- hw/net/virtio-net.c | 19 +++ 1 file changed, 19 insertions(+) diff --git

[PATCH v2 16/24] vhost: vhost-user: update vhost_dev_virtqueue_stop()

2022-08-15 Thread Kangjie Xu
Update vhost_dev_virtqueue_stop() for vhost-user scenario. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo --- hw/virtio/vhost.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index fc3f550c76..a0d6824353 100644 ---

[PATCH v2 22/24] virtio-net: support queue_enable

2022-08-15 Thread Kangjie Xu
virtio-net: support queue_enable for vhost Support queue_enable in vhost scenario. It can be called when a vq reset operation is performed and the vq will be restared. It should be noted that we can restart the vq when the vhost has already started. When launching a new vhost-user device, the

[PATCH v2 14/24] vhost-user: introduce vhost_reset_vring() interface

2022-08-15 Thread Kangjie Xu
Introduce the interface vhost_reset_vring(). The interface is a wrapper to send a VHOST_USER_RESET_VRING message to the back-end. It will reset an individual vring in the back-end. Meanwhile, it will wait for a reply to ensure the reset has been completed. Signed-off-by: Kangjie Xu

[PATCH v2 15/24] vhost-user: add op to enable or disable a single vring

2022-08-15 Thread Kangjie Xu
The interface to set enable status for a single vring is lacked in VhostOps, since the vhost_set_vring_enable_op will manipulate all virtqueues in a device. Resetting a single vq will rely on this interface. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo --- hw/virtio/vhost-user.c

[PATCH v2 11/24] vhost-net: vhost-kernel: introduce vhost_net_virtqueue_stop()

2022-08-15 Thread Kangjie Xu
Introduce vhost_virtqueue_stop(), which can reset the virtqueue in the device. Then it will unmap vrings and the desc of the virtqueue. This patch only considers the case for vhost-kernel, when NetClientDriver is NET_CLIENT_DRIVER_TAP. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo ---

[PATCH v2 17/24] vhost: vhost-user: update vhost_dev_virtqueue_restart()

2022-08-15 Thread Kangjie Xu
Update vhost_dev_virtqueue_restart() for vhost-user scenario. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo --- hw/virtio/vhost.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index

[PATCH v2 12/24] vhost-net: vhost-kernel: introduce vhost_net_virtqueue_restart()

2022-08-15 Thread Kangjie Xu
Introduce vhost_net_virtqueue_restart(), which can restart the virtqueue when the vhost net started running before. If it fails to restart the virtqueue, the device will be stopped. This patch only considers the case for vhost-kernel, when NetClientDriver is NET_CLIENT_DRIVER_TAP. Signed-off-by:

[PATCH v2 10/24] vhost: introduce vhost_dev_virtqueue_restart()

2022-08-15 Thread Kangjie Xu
Introduce vhost_dev_virtqueue_restart(), which can restart the virtqueue when the vhost has already started running. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo --- hw/virtio/vhost.c | 13 + include/hw/virtio/vhost.h | 2 ++ 2 files changed, 15 insertions(+) diff

[PATCH v2 09/24] vhost: introduce vhost_dev_virtqueue_stop()

2022-08-15 Thread Kangjie Xu
Introduce vhost_dev_virtqueue_stop(), which can ummap the vrings and the desc of it. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo --- hw/virtio/vhost.c | 9 + include/hw/virtio/vhost.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/hw/virtio/vhost.c

[PATCH v2 02/24] virtio: introduce __virtio_queue_reset()

2022-08-15 Thread Kangjie Xu
From: Xuan Zhuo Separate the logic of vq reset. This logic will be called directly later. Signed-off-by: Xuan Zhuo --- hw/virtio/virtio.c | 37 + 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index

[PATCH v2 05/24] virtio: core: vq reset feature negotation support

2022-08-15 Thread Kangjie Xu
A a new command line parameter "queue_reset" is added. Meanwhile, the vq reset feature is disabled for pre-7.1 machines. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo --- hw/core/machine.c | 1 + include/hw/virtio/virtio.h | 4 +++- 2 files changed, 4 insertions(+), 1

[PATCH v2 08/24] vhost: extract the logic of unmapping the vrings and desc

2022-08-15 Thread Kangjie Xu
Introduce vhost_virtqueue_unmap() to ummap the vrings and desc of a virtqueue. The function will be used later. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo --- hw/virtio/vhost.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/hw/virtio/vhost.c

[PATCH v2 01/24] virtio: sync relevant definitions with linux

2022-08-15 Thread Kangjie Xu
From: Xuan Zhuo This is updated using scripts/update-linux-headers.sh. Added VIRTIO_F_RING_RESET, VIRTIO_PCI_COMMON_Q_RESET. It came from here: https://github.com/oasis-tcs/virtio-spec/issues/124 https://github.com/oasis-tcs/virtio-spec/issues/139 Add VIRTIO_PCI_COMMON_Q_NDATA, which comes

[PATCH v2 23/24] vhost: vhost-kernel: enable vq reset feature

2022-08-15 Thread Kangjie Xu
Add virtqueue reset feature for vhost-kernel. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo --- hw/net/vhost_net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c index 778081e54a..9ea160e4e9 100644 --- a/hw/net/vhost_net.c +++

[PATCH v2 06/24] virtio-pci: support queue reset

2022-08-15 Thread Kangjie Xu
From: Xuan Zhuo PCI devices support vq reset. Based on this function, the driver can adjust the size of the ring, and quickly recycle the buffer in the ring. The migration of the virtio devices will not happen during a reset operation. This is becuase the global iothread lock is held.

[PATCH 00/24] Support VIRTIO_F_RING_RESET for virtio-net, vhost-user, vhost-kernel in virtio pci-modern

2022-08-15 Thread Kangjie Xu
The virtio queue reset function has already been defined in the virtio spec 1.2. The relevant virtio spec information is here: https://github.com/oasis-tcs/virtio-spec/issues/124 https://github.com/oasis-tcs/virtio-spec/issues/139 This patch set is to support this function in QEMU. It

[PATCH v2 03/24] virtio: introduce virtio_queue_reset()

2022-08-15 Thread Kangjie Xu
From: Xuan Zhuo Introduce a new interface function virtio_queue_reset() to implement reset for vq. Add a new callback to VirtioDeviceClass for queue reset operation for each child device. Signed-off-by: Xuan Zhuo --- hw/virtio/virtio.c | 11 +++ include/hw/virtio/virtio.h |

[PATCH v2 13/24] docs: vhost-user: add VHOST_USER_RESET_VRING message

2022-08-15 Thread Kangjie Xu
To support the reset operation for an individual virtqueue, we introduce a new message VHOST_USER_RESET_VRING. This message is submitted by the front-end to reset an individual virtqueue to initial states in the back-end. The reply is needed to ensure that the reset operation is complete.

[PATCH v2 04/24] virtio: introduce virtio_queue_enable()

2022-08-15 Thread Kangjie Xu
Introduce the interface queue_enable() in VirtioDeviceClass and the fucntion virtio_queue_enable() in virtio, it can be called when VIRTIO_PCI_COMMON_Q_ENABLE is written and related virtqueue can be started. It only supports the devices of virtio 1 or later. The not-supported devices can only

[PATCH v2 07/24] virtio-pci: support queue enable

2022-08-15 Thread Kangjie Xu
PCI devices support vq enable. Based on this function, the driver can re-enable the virtqueue after the virtqueue is reset. Signed-off-by: Kangjie Xu Signed-off-by: Xuan Zhuo --- hw/virtio/virtio-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/virtio/virtio-pci.c

Re: [PATCH] hw/arm/bcm2835_property: Add support for RPI_FIRMWARE_FRAMEBUFFER_GET_NUM_DISPLAYS

2022-08-15 Thread Philippe Mathieu-Daudé via
On 12/8/22 16:35, Enrik Berkhan wrote: In more recent Raspbian OS Linux kernels, the fb driver gives up immediately if RPI_FIRMWARE_FRAMEBUFFER_GET_NUM_DISPLAYS fails or no displays are reported. This change simply always reports one display. It makes bcm2835_fb work again with these more

Re: [PATCH] target/arm: Rearrange cpu64.c so all the CPU initfns are together

2022-08-15 Thread Philippe Mathieu-Daudé via
On 12/8/22 19:41, Peter Maydell wrote: cpu64.c has ended up in a slightly odd order -- it starts with the initfns for most of the models-real-hardware CPUs; after that comes a bunch of support code for SVE, SME, pauth and LPA2 properties. Then come the initfns for the 'host' and 'max' CPU

Re: [PATCH] meson: be strict for boolean options

2022-08-15 Thread Philippe Mathieu-Daudé via
On 13/8/22 14:15, Anton Kochkov wrote: While Meson buildsystem accepts the 'false' as a value for boolean options, it's not covered by the specification and in general invalid. Some alternative Meson implementations, like Muon, do not accept 'false' or 'true' as a valid value for the boolean

Re: [PATCH 2/2] hw/mips/boston: Pack fdt in fdt filter

2022-08-15 Thread Philippe Mathieu-Daudé via
On 13/8/22 18:27, Jiaxun Yang wrote: FDT can be awfully fat after series of modifications in fdt filter. Just pack it up before add to ram. Signed-off-by: Jiaxun Yang --- hw/mips/boston.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/mips/boston.c b/hw/mips/boston.c index

Re: [PATCH] hw/riscv: microchip_pfsoc: fix kernel panics due to missing peripherals

2022-08-15 Thread Philippe Mathieu-Daudé via
Hi Conor, On 15/8/22 00:48, conor.doo...@microchip.com wrote: On 14/08/2022 23:08, Alistair Francis wrote: EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe On Sat, Aug 13, 2022 at 11:51 PM Conor Dooley wrote: QEMU support for PolarFire SoC seems to

Re: [PATCH 6/7] target/xtensa: Honour -semihosting-config userspace=on

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 21:03, Peter Maydell wrote: Honour the commandline -semihosting-config userspace=on option, instead of always permitting userspace semihosting calls in system emulation mode, by passing the correct value to the is_userspace argument of semihosting_enabled(). Note that this is a

Re: [PATCH 4/7] target/mips: Honour -semihosting-config userspace=on

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 21:03, Peter Maydell wrote: Honour the commandline -semihosting-config userspace=on option, instead of always permitting userspace semihosting calls in system emulation mode, by passing the correct value to the is_userspace argument of semihosting_enabled(). Note that this is a

Re: [PATCH 1/7] semihosting: Allow optional use of semihosting from userspace

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 21:02, Peter Maydell wrote: Currently our semihosting implementations generally prohibit use of semihosting calls in system emulation from the guest userspace. This is a very long standing behaviour justified originally "to provide some semblance of security" (since code with access

Re: [PATCH 19/20] disas/nanomips: Add modifier static

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 09:26, Milica Lazarevic wrote: Modifier static has been added to the remaining functions that shouldn't be used outside of the nanomips disassembler. Signed-off-by: Milica Lazarevic --- disas/nanomips.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [PATCH 04/20] disas/nanomips: Remove helper methods from class

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 09:26, Milica Lazarevic wrote: Helper methods from NMD class like NMD::renumber_registers, NMD::decode_gpr_gpr4... etc. are removed from the class. They're now declared global static functions. Following helper methods have been deleted because they're not used by the nanomips

Re: [PATCH 10/20] disas/nanomips: Delete nanomips.h

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 09:26, Milica Lazarevic wrote: Header file nanomips.h has been deleted for the nanomips disassembler to stay consistent with the rest of the disassemblers which don't include extra header files. Signed-off-by: Milica Lazarevic --- disas/nanomips.h | 28

Re: [PATCH 05/20] disas/nanomips: Remove __cond methods from class

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 16:20, Thomas Huth wrote: On 15/08/2022 13.07, Philippe Mathieu-Daudé wrote: On 15/8/22 09:26, Milica Lazarevic wrote: NMD class methods with the conditional_function type like NMD::ADDIU_32__cond, NMD::ADDIU_RS5__cond, etc. are removed from the NMD class. They're now declared

Re: [PATCH 09/20] disas/nanomips: Move typedefs etc to nanomips.cpp

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 09:26, Milica Lazarevic wrote: The following is moved from the nanomips.h to nanomips.cpp file: - #include line - typedefs - enums - definition of the Pool struct. Header file nanomips.h will be deleted to be consistent with the rest of the disas/ code. Signed-off-by: Milica

Re: [PATCH 07/20] disas/nanomips: Remove Pool tables from the class

2022-08-15 Thread Philippe Mathieu-Daudé via
On 15/8/22 09:26, Milica Lazarevic wrote: Pool tables are no longer declared as static fields of the NMD class but as global static variables. The NMD::Disassemble method is using the MAJOR Pool table variable, so its implementation is moved to the end of the nanomips.cpp file, right after the

Re: [PATCH] hw/riscv: Setting address of vector reset is improved

2022-08-15 Thread Alistair Francis
On Tue, Aug 16, 2022 at 6:15 AM Maksim Perov wrote: > > Previously address is set by default value 0x1000 which is hardcoded in > target/riscv/cpu_bits.h > If add to new RISC-V Machine in which ROM area is not based on 0x1000 address > than there is problem of running simulation > >

Re: [PATCH 6/7] target/xtensa: Honour -semihosting-config userspace=on

2022-08-15 Thread Max Filippov
On Mon, Aug 15, 2022 at 12:03 PM Peter Maydell wrote: > > Honour the commandline -semihosting-config userspace=on option, > instead of always permitting userspace semihosting calls in system > emulation mode, by passing the correct value to the is_userspace > argument of semihosting_enabled(). >

Re: [BUG] cxl can not create region

2022-08-15 Thread Dan Williams
Jonathan Cameron wrote: > On Fri, 12 Aug 2022 16:44:03 +0100 > Jonathan Cameron wrote: > > > On Thu, 11 Aug 2022 18:08:57 +0100 > > Jonathan Cameron via wrote: > > > > > On Tue, 9 Aug 2022 17:08:25 +0100 > > > Jonathan Cameron wrote: > > > > > > > On Tue, 9 Aug 2022 21:07:06 +0800 > > > >

Re: [PATCH for-7.2 v2 15/20] qmp/hmp, device_tree.c: introduce 'info fdt' command

2022-08-15 Thread Daniel Henrique Barboza
On 8/8/22 01:21, David Gibson wrote: On Fri, Aug 05, 2022 at 06:39:43AM -0300, Daniel Henrique Barboza wrote: Reading the FDT requires that the user saves the fdt_blob and then use 'dtc' to read the contents. Saving the file and using 'dtc' is a strong use case when we need to compare two

Re: [RFC PATCH 05/13] target/ppc: create an interrupt masking method for POWER9/POWER10

2022-08-15 Thread Fabiano Rosas
Matheus Ferst writes: > Create an interrupt masking method for the POWER9 and POWER10 > processors. The new method is based on cpu_has_work_POWER{9,10} and > ppc_pending_interrupt_legacy. > > Signed-off-by: Matheus Ferst > --- > target/ppc/excp_helper.c | 160

[PATCH] target/arm: Add cortex-a35

2022-08-15 Thread Hao Wu
Add cortex A35 core and enable it for virt board. Signed-off-by: Hao Wu Reviewed-by: Joe Komlodi --- docs/system/arm/virt.rst | 1 + hw/arm/virt.c| 1 + target/arm/cpu64.c | 69 3 files changed, 71 insertions(+) diff --git

Re: [RFC PATCH 06/13] target/ppc: remove embedded interrupts from ppc_pending_interrupt_p9

2022-08-15 Thread Fabiano Rosas
Matheus Ferst writes: > Critical Input, Watchdog Timer, and Fixed Interval Timer are only > defined for embedded CPUs. The Programmable Interval Timer is 40x-only. > > Signed-off-by: Matheus Ferst > --- > target/ppc/excp_helper.c | 18 -- > 1 file changed, 18 deletions(-) > >

Re: [PATCH 0/7] Allow semihosting from user mode

2022-08-15 Thread Richard Henderson
On 8/15/22 14:02, Peter Maydell wrote: Peter Maydell (7): semihosting: Allow optional use of semihosting from userspace target/arm: Honour -semihosting-config userspace=on target/m68k: Honour -semihosting-config userspace=on target/mips: Honour -semihosting-config userspace=on

Re: [PATCH 7/7] target/riscv: Honour -semihosting-config userspace=on and enable=on

2022-08-15 Thread Richard Henderson
On 8/15/22 14:03, Peter Maydell wrote: The riscv target incorrectly enabled semihosting always, whether the user asked for it or not. Call semihosting_enabled() passing the correct value to the is_userspace argument, which fixes this and also handles the userspace=on argument. Note that this

Re: [RFC PATCH 04/13] target/ppc: prepare to split ppc_interrupt_pending by excp_model

2022-08-15 Thread Fabiano Rosas
Matheus Ferst writes: > Rename the method to ppc_interrupt_pending_legacy and create a new > ppc_interrupt_pending that will call the appropriate interrupt masking > method based on env->excp_model. > > Signed-off-by: Matheus Ferst > --- > target/ppc/excp_helper.c | 10 +- > 1 file

Issue while making audio passthrough

2022-08-15 Thread Jainpadma Jain
> Hi all, > I am trying to do audio passthrough with qemu. I have tried this > before as well and it was working fine. Now when I launch qemu with > graphics and audio passthrough, I am getting below error message and qemu > launch is failing. > > qemu-system-x86_64: iommu has

[PATCH] hw/riscv: Setting address of vector reset is improved

2022-08-15 Thread Maksim Perov
Previously address is set by default value 0x1000 which is hardcoded in target/riscv/cpu_bits.h If add to new RISC-V Machine in which ROM area is not based on 0x1000 address than there is problem of running simulation Signed-off-by: Maksim Perov --- hw/riscv/boot.c | 4 1 file changed, 4

[PATCH] hw/riscv: Setting address of vector reset is improved

2022-08-15 Thread Maksim Perov
Previously address is set by default value 0x1000 which is hardcoded in target/riscv/cpu_bits.h If add to new RISC-V Machine in which ROM area is based on 0x1000 address than there is problem of running simulation Signed-off-by: Maksim Perov --- hw/riscv/boot.c | 4 1 file changed, 4

Re: [RFC PATCH 03/13] target/ppc: move interrupt masking out of ppc_hw_interrupt

2022-08-15 Thread Fabiano Rosas
Matheus Ferst writes: > Move the interrupt masking logic to a new method, ppc_pending_interrupt, > and only handle the interrupt processing in ppc_hw_interrupt. > > Signed-off-by: Matheus Ferst > --- > target/ppc/excp_helper.c | 228 --- > 1 file changed,

Re: [RFC PATCH 00/13] PowerPC interrupt rework

2022-08-15 Thread Cédric Le Goater
[ Adding Fabiano who reworked all exception models for 7.0 and Nick who rewrote the Linux side sometime ago ] On 8/15/22 18:20, Matheus Ferst wrote: Currently, PowerPC interrupts are handled as follows: 1) The CPU_INTERRUPT_HARD bit of cs->interrupt_request gates all interrupts; 2) The

Re: [PATCH for-7.2 v2 14/20] qmp/hmp, device_tree.c: introduce dumpdtb

2022-08-15 Thread Daniel Henrique Barboza
On 8/15/22 15:31, Dr. David Alan Gilbert wrote: * Daniel Henrique Barboza (danielhb...@gmail.com) wrote: On 8/8/22 00:30, David Gibson wrote: On Fri, Aug 05, 2022 at 06:39:42AM -0300, Daniel Henrique Barboza wrote: To save the FDT blob we have the '-machine dumpdtb=' property. With this

[PATCH 6/7] target/xtensa: Honour -semihosting-config userspace=on

2022-08-15 Thread Peter Maydell
Honour the commandline -semihosting-config userspace=on option, instead of always permitting userspace semihosting calls in system emulation mode, by passing the correct value to the is_userspace argument of semihosting_enabled(). Note that this is a behaviour change: if the user wants to do

[PATCH 4/7] target/mips: Honour -semihosting-config userspace=on

2022-08-15 Thread Peter Maydell
Honour the commandline -semihosting-config userspace=on option, instead of always permitting userspace semihosting calls in system emulation mode, by passing the correct value to the is_userspace argument of semihosting_enabled(). Note that this is a behaviour change: if the user wants to do

[PATCH 7/7] target/riscv: Honour -semihosting-config userspace=on and enable=on

2022-08-15 Thread Peter Maydell
The riscv target incorrectly enabled semihosting always, whether the user asked for it or not. Call semihosting_enabled() passing the correct value to the is_userspace argument, which fixes this and also handles the userspace=on argument. Note that this is a behaviour change: we used to default

[PATCH 2/7] target/arm: Honour -semihosting-config userspace=on

2022-08-15 Thread Peter Maydell
Honour the commandline -semihosting-config userspace=on option, instead of never permitting userspace semihosting calls in system emulation mode, by passing the correct value to the is_userspace argument of semihosting_enabled(), instead of manually checking and always forbidding semihosting if

[PATCH 3/7] target/m68k: Honour -semihosting-config userspace=on

2022-08-15 Thread Peter Maydell
Honour the commandline -semihosting-config userspace=on option, instead of never permitting userspace semihosting calls in system emulation mode, by passing the correct value to the is_userspace argument of semihosting_enabled(), instead of manually checking and always forbidding semihosting if

[PATCH 5/7] target/nios2: Honour -semihosting-config userspace=on

2022-08-15 Thread Peter Maydell
Honour the commandline -semihosting-config userspace=on option, instead of always permitting userspace semihosting calls in system emulation mode, by passing the correct value to the is_userspace argument of semihosting_enabled(). Note that this is a behaviour change: if the user wants to do

[PATCH 1/7] semihosting: Allow optional use of semihosting from userspace

2022-08-15 Thread Peter Maydell
Currently our semihosting implementations generally prohibit use of semihosting calls in system emulation from the guest userspace. This is a very long standing behaviour justified originally "to provide some semblance of security" (since code with access to the semihosting ABI can do things like

[PATCH 0/7] Allow semihosting from user mode

2022-08-15 Thread Peter Maydell
Currently our semihosting implementations usually prohibit use of semihosting calls in system emulation from the guest userspace. This is a very long standing behaviour justified originally "to provide some semblance of security" (since code with access to the semihosting ABI can do things like

Re: [PATCH for-7.2 v2 20/20] hmp, device_tree.c: add 'info fdt ' support

2022-08-15 Thread Dr. David Alan Gilbert
* Daniel Henrique Barboza (danielhb...@gmail.com) wrote: > 'info fdt' is only able to print full nodes so far. It would be good to > be able to also print single properties, since ometimes we just want > to verify a single value from the FDT. > > libfdt does not have support to find a property

Re: [PATCH for-7.2 v2 14/20] qmp/hmp, device_tree.c: introduce dumpdtb

2022-08-15 Thread Dr. David Alan Gilbert
* Daniel Henrique Barboza (danielhb...@gmail.com) wrote: > > > On 8/8/22 00:30, David Gibson wrote: > > On Fri, Aug 05, 2022 at 06:39:42AM -0300, Daniel Henrique Barboza wrote: > > > To save the FDT blob we have the '-machine dumpdtb=' property. > > > With this property set, the machine saves

Re: [PATCH for-7.2 v2 14/20] qmp/hmp, device_tree.c: introduce dumpdtb

2022-08-15 Thread Daniel Henrique Barboza
On 8/8/22 00:30, David Gibson wrote: On Fri, Aug 05, 2022 at 06:39:42AM -0300, Daniel Henrique Barboza wrote: To save the FDT blob we have the '-machine dumpdtb=' property. With this property set, the machine saves the FDT in and exit. The created file can then be converted to plain text

Re: [BUG] cxl can not create region

2022-08-15 Thread Jonathan Cameron via
On Mon, 15 Aug 2022 18:04:44 +0100 Jonathan Cameron wrote: > On Fri, 12 Aug 2022 16:44:03 +0100 > Jonathan Cameron wrote: > > > On Thu, 11 Aug 2022 18:08:57 +0100 > > Jonathan Cameron via wrote: > > > > > On Tue, 9 Aug 2022 17:08:25 +0100 > > > Jonathan Cameron wrote: > > > > > > >

Re: [BUG] cxl can not create region

2022-08-15 Thread Jonathan Cameron via
On Fri, 12 Aug 2022 16:44:03 +0100 Jonathan Cameron wrote: > On Thu, 11 Aug 2022 18:08:57 +0100 > Jonathan Cameron via wrote: > > > On Tue, 9 Aug 2022 17:08:25 +0100 > > Jonathan Cameron wrote: > > > > > On Tue, 9 Aug 2022 21:07:06 +0800 > > > Bobo WL wrote: > > > > > > > Hi Jonathan

Re: [PATCH 04/20] disas/nanomips: Remove helper methods from class

2022-08-15 Thread Thomas Huth
On 15/08/2022 09.26, Milica Lazarevic wrote: Helper methods from NMD class like NMD::renumber_registers, NMD::decode_gpr_gpr4... etc. are removed from the class. They're now declared global static functions. Following helper methods have been deleted because they're not used by the nanomips

[RFC PATCH 11/13] target/ppc: remove ppc_store_lpcr from CONFIG_USER_ONLY builds

2022-08-15 Thread Matheus Ferst
Writes to LPCR are hypervisor privileged. Signed-off-by: Matheus Ferst --- target/ppc/cpu.c | 2 ++ target/ppc/cpu.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target/ppc/cpu.c b/target/ppc/cpu.c index 401b6f9e63..9f261bde8e 100644 --- a/target/ppc/cpu.c +++

[RFC PATCH 13/13] target/ppc: unify cpu->has_work based on cs->interrupt_request

2022-08-15 Thread Matheus Ferst
Now that cs->interrupt_request indicates if there is any unmasked interrupt, checking if the CPU has work to do can be simplified to a single check that works for all CPU models. Signed-off-by: Matheus Ferst --- target/ppc/cpu_init.c | 212 +- 1 file

[RFC PATCH 12/13] target/ppc: introduce ppc_maybe_interrupt

2022-08-15 Thread Matheus Ferst
This new method will check if any pending interrupt was unmasked and then call cpu_interrupt/cpu_reset_interrupt accordingly. Code that raises/lowers or masks/unmasks interrupts should call this method to keep CPU_INTERRUPT_HARD coherent with env->pending_interrupts. Signed-off-by: Matheus Ferst

[RFC PATCH 09/13] target/ppc: create an interrupt masking method for POWER7

2022-08-15 Thread Matheus Ferst
The new method is based on cpu_has_work_POWER7 and ppc_pending_interrupt_legacy. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 130 +++ 1 file changed, 130 insertions(+) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index

[RFC PATCH 07/13] target/ppc: create an interrupt masking method for POWER8

2022-08-15 Thread Matheus Ferst
Create an interrupt masking method for POWER8. The new method is based on cpu_has_work_POWER8 and ppc_pending_interrupt_legacy. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 138 +++ 1 file changed, 138 insertions(+) diff --git

[RFC PATCH 08/13] target/ppc: remove unused interrupts from ppc_pending_interrupt_p8

2022-08-15 Thread Matheus Ferst
The Hypervisor Virtualization Interrupt was introduced in PowerISA v3.0. Critical Input, Watchdog Timer, and Fixed Interval Timer are only defined for embedded CPUs. The Programmable Interval Timer is 40x-only. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 27

[RFC PATCH 10/13] target/ppc: remove unused interrupts from ppc_pending_interrupt_p7

2022-08-15 Thread Matheus Ferst
The Hypervisor Virtualization Interrupt was introduced in PowerISA v3.0. Critical Input, Watchdog Timer, and Fixed Interval Timer are only defined for embedded CPUs. The Programmable Interval Timer is 40x-only. The Event-Based Branch Facility was added in PowerISA v2.07. Signed-off-by: Matheus

[RFC PATCH 04/13] target/ppc: prepare to split ppc_interrupt_pending by excp_model

2022-08-15 Thread Matheus Ferst
Rename the method to ppc_interrupt_pending_legacy and create a new ppc_interrupt_pending that will call the appropriate interrupt masking method based on env->excp_model. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-)

[RFC PATCH 05/13] target/ppc: create an interrupt masking method for POWER9/POWER10

2022-08-15 Thread Matheus Ferst
Create an interrupt masking method for the POWER9 and POWER10 processors. The new method is based on cpu_has_work_POWER{9,10} and ppc_pending_interrupt_legacy. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 160 +++ 1 file changed, 160

[RFC PATCH 06/13] target/ppc: remove embedded interrupts from ppc_pending_interrupt_p9

2022-08-15 Thread Matheus Ferst
Critical Input, Watchdog Timer, and Fixed Interval Timer are only defined for embedded CPUs. The Programmable Interval Timer is 40x-only. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/target/ppc/excp_helper.c

[RFC PATCH 01/13] target/ppc: define PPC_INTERRUPT_* values directly

2022-08-15 Thread Matheus Ferst
This enum defines the bit positions in env->pending_interrupts for each interrupt. However, except for the comparison in kvmppc_set_interrupt, the values are always used as (1 << PPC_INTERRUPT_*). Define them directly like that to save some clutter. No functional change intended. Signed-off-by:

[RFC PATCH 02/13] target/ppc: always use ppc_set_irq to set env->pending_interrupts

2022-08-15 Thread Matheus Ferst
Use ppc_set_irq to raise/clear interrupts to ensure CPU_INTERRUPT_HARD will be set/reset accordingly. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 17 +++-- target/ppc/misc_helper.c | 9 ++--- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git

[RFC PATCH 03/13] target/ppc: move interrupt masking out of ppc_hw_interrupt

2022-08-15 Thread Matheus Ferst
Move the interrupt masking logic to a new method, ppc_pending_interrupt, and only handle the interrupt processing in ppc_hw_interrupt. Signed-off-by: Matheus Ferst --- target/ppc/excp_helper.c | 228 --- 1 file changed, 141 insertions(+), 87 deletions(-)

[RFC PATCH 00/13] PowerPC interrupt rework

2022-08-15 Thread Matheus Ferst
Currently, PowerPC interrupts are handled as follows: 1) The CPU_INTERRUPT_HARD bit of cs->interrupt_request gates all interrupts; 2) The bits of env->pending_interrupts identify which particular interrupt is raised; 3) ppc_set_irq can be used to set/clear env->pending_interrupt bit and

Re: Bluetooth support in QEMU

2022-08-15 Thread Thomas Huth
On 15/08/2022 13.27, vaishu venkat wrote: Hi team,     We are currently required to use QEMU for virtualization of customized application. The application requires Bluetooth and Wi-fi support, as observed below warning, *qemu-system-aarch64: -bt hci,host: warning: The bluetooth

Re: Bluetooth support in QEMU

2022-08-15 Thread Peter Maydell
On Mon, 15 Aug 2022 at 16:53, vaishu venkat wrote: > > Hi team, > We are currently required to use QEMU for virtualization of > customized application. The application requires Bluetooth and Wi-fi support, > as observed below warning, > qemu-system-aarch64: -bt hci,host: warning:

Bluetooth support in QEMU

2022-08-15 Thread vaishu venkat
Hi team, We are currently required to use QEMU for virtualization of customized application. The application requires Bluetooth and Wi-fi support, as observed below warning, *qemu-system-aarch64: -bt hci,host: warning: The bluetooth subsystem is deprecated and will be removed soon. If

Re: Teensy 4.1 Implementation

2022-08-15 Thread Shiny Saana
Thank you very much for your answer! Apologies if I mess up the process of communicating via mailing lists, it's my first time communicating via this channel. The project that requires me to implement this board in QEMU currently would require full USB interface and flash storage at the end of

Re: [BUG] cxl can not create region

2022-08-15 Thread Peter Maydell
On Mon, 15 Aug 2022 at 15:55, Jonathan Cameron via wrote: > In the interests of defensive / correct handling from QEMU I took a > look into why it was crashing. Turns out that providing a NULL write > callback for > the memory device region (that the above overlarge write was spilling into) >

Re: [PATCH 03/20] disas/nanomips: Delete NMD class fields

2022-08-15 Thread Richard Henderson
On 8/15/22 02:26, Milica Lazarevic wrote: Class fields have been replaced with the public static variables. Therefore, there is no more need for a constructor. The main goal is to remove NMD class completely. Signed-off-by: Milica Lazarevic --- disas/nanomips.cpp | 6 +-

Re: Teensy 4.1 Implementation

2022-08-15 Thread Peter Maydell
On Sat, 13 Aug 2022 at 18:54, Shiny Saana wrote: > I'd like to implement support for emulating the teensy 4.1 board ( > https://www.pjrc.com/store/teensy41.html) to QEMU. > > I'm honestly quite lost as to where to start at the moment, since > I can't really find any emulated Cortex-M7 that would

Re: [BUG] cxl can not create region

2022-08-15 Thread Jonathan Cameron via
On Mon, 15 Aug 2022 15:18:09 +0100 Jonathan Cameron via wrote: > On Fri, 12 Aug 2022 17:15:09 +0100 > Jonathan Cameron wrote: > > > On Fri, 12 Aug 2022 09:03:02 -0700 > > Dan Williams wrote: > > > > > Jonathan Cameron wrote: > > > > On Thu, 11 Aug 2022 18:08:57 +0100 > > > > Jonathan

CAN driver for the MCP2515 IC

2022-08-15 Thread Frank Buss
Hello, I'm using the MCP2515 CAN controller IC with Zephyr. For easier testing, I would like to simulate it with QEMU, forwarding it to the Linux host CAN system. Is there already such an implementation? Otherwise I would write one (probably based on the Xilinx CAN implementation) and send a

  1   2   >