[RFC RESEND PATCH 1/4] pci: Add PCI_BUS_IOMMU property

2021-02-27 Thread Wang Xingang
From: Xingang Wang This Property can be useful to check whether this bus is attached to iommu. Signed-off-by: Xingang Wang Signed-off-by: Jiahui Cen --- include/hw/pci/pci_bus.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/hw/pci/pci_bus.h b/include/hw/pci/pci_bu

[RFC RESEND PATCH 3/4] hw/pci: Add pci_root_bus_max_bus

2021-02-27 Thread Wang Xingang
From: Xingang Wang This helps to find max bus number of a root bus. Signed-off-by: Xingang Wang Signed-off-by: Jiahui Cen --- hw/pci/pci.c | 33 + include/hw/pci/pci.h | 1 + 2 files changed, 34 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c i

[RFC RESEND PATCH 4/4] hw/arm/virt-acpi-build: Add explicit idmap info in IORT table

2021-02-27 Thread Wang Xingang
From: Xingang Wang The idmap of smmuv3 and root complex covers the whole RID space for now, this patch add explicit idmap info according to root bus number range. This add smmuv3 idmap for certain bus which has enabled the iommu property. Signed-off-by: Xingang Wang Signed-off-by: Jiahui Cen -

[RFC RESEND PATCH 0/4] hw/arm/virt-acpi-build: Introduce iommu option for pci root bus

2021-02-27 Thread Wang Xingang
From: Xingang Wang These patches add support for configure iommu on/off for pci root bus, including primary bus and pxb root bus. At present, All root bus will go through iommu when iommu is configured, which is not flexible. So this add option to enable/disable iommu for primary bus and pxb roo

[RFC RESEND PATCH 2/4] hw/pci: Add iommu option for pci root bus

2021-02-27 Thread Wang Xingang
From: Xingang Wang This add iommu option for pci root bus, including primary bus and pxb root bus. Default option is set to true, and the option is valid only if the iommu option for machine is properly set. Signed-off-by: Xingang Wang Signed-off-by: Jiahui Cen --- hw/arm/virt.c

Re: vhost reply_ack negotiation (a.k.a differences in vhost-user behaviour with libvhost-user and vhost-user-backend.rs)

2021-02-27 Thread Alex Bennée
Raphael Norwitz writes: > As an afterthought - if VHOST_USER_F_PROTOCOL_FEATURES is indeed > unset, the issue may well be caused by QEMU reading an uninitialized > value for dev->protocol_features. Some device types like cryptodev > explicitly zero it out. As I said, it isn't set anywhere else

Re: [PATCH v8 35/35] Add Dockerfile for hexagon

2021-02-27 Thread Philippe Mathieu-Daudé
On 2/8/21 6:46 AM, Taylor Simpson wrote: > From: Alessandro Di Federico > > Signed-off-by: Alessandro Di Federico > Tested-by: Taylor Simpson > --- > .../debian-hexagon-cross-build-local.docker| 18 +++ > .../debian-hexagon-cross.build-toolchain.sh| 141 >

RE: [PATCH v8 35/35] Add Dockerfile for hexagon

2021-02-27 Thread Brian Cain
> -Original Message- > From: Philippe Mathieu-Daudé On > Behalf Of Philippe Mathieu-Daudé > Sent: Saturday, February 27, 2021 8:10 AM > To: Taylor Simpson ; qemu-devel@nongnu.org > Cc: richard.hender...@linaro.org; alex.ben...@linaro.org; > laur...@vivier.eu; a...@rev.ng; Brian Cain ; Fam

Re: QEMU Clock record and replay

2021-02-27 Thread Arnabjyoti Kalita
Thank you Pavel. You answered all of my questions. The clock record-replay functionality is much clearer now. Best Regards, Arnab On Fri, Feb 26, 2021 at 11:54 AM Pavel Dovgalyuk wrote: > On 25.02.2021 18:43, Philippe Mathieu-Daudé wrote: > > Cc'ing Pavel/Alex. > > > > On 2/25/21 4:09 PM, Arna

Re: QEMU Clock record and replay

2021-02-27 Thread Arnabjyoti Kalita
The host clock refers to one of the clock types used by QEMU - ``` @QEMU_CLOCK_HOST: host clock * * The host clock should be used for device models that emulate accurate * real time sources. It will continue to run when the virtual machine * is suspended, and it will reflect system time changes th

[Bug 1917161] [NEW] Parameter 'type' expects a netdev backend type

2021-02-27 Thread John Arbuckle
Public bug reported: When using QEMU on an M1 Mac with Mac OS 11.1, I see this error message when trying to enable networking for a guest: Parameter 'type' expects a netdev backend type Example command: qemu-system-i386 -m 700 -hda -netdev user,id=n0 -device rtl8139,netdev=n0 What should happ

Re: [PATCH 07/16] cpu: Introduce CPUSystemOperations structure

2021-02-27 Thread Claudio Fontana
On 2/26/21 5:32 PM, Philippe Mathieu-Daudé wrote: > Introduce a structure to hold handler specific to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/core/cpu.h | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h >

Re: [PATCH 07/16] cpu: Introduce CPUSystemOperations structure

2021-02-27 Thread Claudio Fontana
On 2/26/21 5:32 PM, Philippe Mathieu-Daudé wrote: > Introduce a structure to hold handler specific to sysemu. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/core/cpu.h | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h >

Re: [RFC PATCH] cpu: system_ops: move to cpu-system-ops.h, keep a pointer in CPUClass

2021-02-27 Thread Richard Henderson
On 2/26/21 8:40 AM, Philippe Mathieu-Daudé wrote: > +++ b/include/hw/core/cpu-system-ops.h > @@ -0,0 +1,89 @@ > +/* > + * CPU operations specific to system emulation > + * > + * Copyright (c) 2012 SUSE LINUX Products GmbH > + * > + * This work is licensed under the terms of the GNU GPL, version 2 o

Re: [PATCH 1/2] i386/acpi: fix inconsistent QEMU/OVMF device paths

2021-02-27 Thread Thomas Lamprecht
On 30.07.20 17:58, Michael S. Tsirkin wrote: > macOS uses ACPI UIDs to build the DevicePath for NVRAM boot options, > while OVMF firmware gets them via an internal channel through QEMU. > Due to a bug in QEMU ACPI currently UEFI firmware and ACPI have > different values, and this makes the underlyi

issue with meson and recursion: negation missing in add?

2021-02-27 Thread Claudio Fontana
Hi Paolo, I don't know how to handle an issue in the current way we are using meson with recursion, ie always recursing, and testing multiple options inside the recursed directory. In the case of ARM, we have: target/arm/tcg/meson.build, where I need to check all the time for TCG, given our cu

[PATCH 0/2] Fix mips jazz vs constant TCGCPUOps

2021-02-27 Thread Richard Henderson
We can implement the jazz behaviour with a flag on MIPSCPUClass, rather than by adjusting the do_transaction_failed callback. r~ Richard Henderson (2): target/mips: Fold jazz behaviour into mips_cpu_do_transaction_failed hw/core: Constify TCGCPUOps include/hw/core/cpu.h | 2 +-

[PATCH 1/2] target/mips: Fold jazz behaviour into mips_cpu_do_transaction_failed

2021-02-27 Thread Richard Henderson
Add a flag to MIPSCPUClass in order to avoid needing to replace mips_tcg_ops.do_transaction_failed. Signed-off-by: Richard Henderson --- target/mips/cpu-qom.h | 3 +++ hw/mips/jazz.c | 35 +++ target/mips/op_helper.c | 3 ++- 3 files changed, 8 insert

[PATCH 2/2] hw/core: Constify TCGCPUOps

2021-02-27 Thread Richard Henderson
We no longer have any runtime modifications to this struct, so declare them all const. Signed-off-by: Richard Henderson --- include/hw/core/cpu.h | 2 +- target/alpha/cpu.c | 2 +- target/arm/cpu.c| 2 +- target/arm/cpu_tcg.c| 2 +- target/avr/c

[Bug 1917184] [NEW] qemu-user vm86() segfaults handling interrupt with ss:sp in same page as cs:ip

2021-02-27 Thread Jeffrey
Public bug reported: When using qemu-i386 to run a program that uses vm86(), if the vm86 code calls an interrupt while cs:ip and ss:sp both point within the same page, do_int tries to write to the page while it is not writable, causing a segfault. qemu version 5.2.0, x86-64 host. ** Affects: qem

[PATCH] net: Fix build error when DEBUG_NET is on

2021-02-27 Thread Bin Meng
From: Bin Meng "qemu-common.h" should be included to provide the forward declaration of qemu_hexdump() when DEBUG_NET is on. Signed-off-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé --- Changes in v2: - add "Reviewed-By" tag net/net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/

[PATCH] hw/net: fsl_etsec: Fix build error when HEX_DUMP is on

2021-02-27 Thread Bin Meng
From: Bin Meng "qemu-common.h" should be included to provide the forward declaration of qemu_hexdump() when HEX_DUMP is on. Signed-off-by: Bin Meng --- hw/net/fsl_etsec/etsec.c | 1 + hw/net/fsl_etsec/rings.c | 1 + 2 files changed, 2 insertions(+) diff --git a/hw/net/fsl_etsec/etsec.c b/hw/

[PATCH] hw/sd: sd: Fix build error when DEBUG_SD is on

2021-02-27 Thread Bin Meng
From: Bin Meng "qemu-common.h" should be included to provide the forward declaration of qemu_hexdump() when DEBUG_SD is on. Signed-off-by: Bin Meng --- hw/sd/sd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 8b397effbc..7b09ce9c2e 100644 --- a/hw/sd/sd.c +

Re: [PATCH] Make ram_addr_t 64 bits unconditionally

2021-02-27 Thread Bin Meng
Hi Peter, On Fri, Feb 19, 2021 at 9:11 PM Peter Maydell wrote: > > On Fri, 19 Feb 2021 at 12:52, Bin Meng wrote: > > > > From: Bin Meng > > > > Currently machine->ram_size is a ram_addr_t, whose size is 64 bits > > if either (a) the host is 64 bits or (b) CONFIG_XEN_BACKEND is > > enabled, so i

Re: [PATCH v3 0/4] hw/riscv: Clean-ups and map high mmio for PCIe of 'virt' machine

2021-02-27 Thread Bin Meng
On Sat, Feb 20, 2021 at 10:48 PM Bin Meng wrote: > > From: Bin Meng > > This series does the following clean-ups: > - Drop 'struct MemmapEntry' > - virt: Drop the 'link_up' parameter of gpex_pcie_init() > > It also adds the following small enhancement to 'virt' machine: > - Limit RAM size in a 32

Re: [PATCH v2 1/2] hw/riscv: Add fw_cfg support to virt

2021-02-27 Thread Bin Meng
On Fri, Feb 26, 2021 at 12:31 PM Asherah Connor wrote: > > Provides fw_cfg for the virt machine on riscv. This enables > using e.g. ramfb later. > > Signed-off-by: Asherah Connor > --- > > Changes in v2: > * Add DMA support (needed for writes). > > hw/riscv/Kconfig| 1 + > hw/riscv/vi

Re: [PATCH v2 2/2] hw/riscv: allow ramfb on virt

2021-02-27 Thread Bin Meng
On Fri, Feb 26, 2021 at 12:34 PM Asherah Connor wrote: > > Allow ramfb on virt. This lets `-device ramfb' work. > > Signed-off-by: Asherah Connor > --- > > Changes in v2: > * Add DMA interface support. > * Add ramfb as allowed on riscv virt machine class. > > hw/riscv/virt.c | 3 +++ > 1 file c

Re: [PATCH] hw/net: fsl_etsec: Fix build error when HEX_DUMP is on

2021-02-27 Thread David Gibson
On Sun, Feb 28, 2021 at 01:04:31PM +0800, Bin Meng wrote: > From: Bin Meng > > "qemu-common.h" should be included to provide the forward declaration > of qemu_hexdump() when HEX_DUMP is on. Applied to ppc-for-6.0, thanks. > > Signed-off-by: Bin Meng > --- > > hw/net/fsl_etsec/etsec.c | 1 +

Re: [PATCH] hw/ppc: e500: Add missing in the eTSEC node

2021-02-27 Thread Bin Meng
On Wed, Feb 24, 2021 at 5:28 PM Bin Meng wrote: > > From: Bin Meng > > The eTSEC node should provide an empty property in the > eTSEC node, otherwise of_translate_address() in the Linux kernel > fails to get the eTSEC register base, reporting: > > OF: ** translation for device /platform@f0