Re: VirtioSound device emulation implementation

2021-01-08 Thread Gerd Hoffmann
Hi, > >> Are you planning to make it an in-QEMU device or maybe a external > >> vhost-user daemon? > > > > The project page states that we need to use the QEMU audio subsystem > > for playing and capturing audio samples. > > Is this one of the QEMU internship projects? one of last years gsoc p

[Bug 1910696] [NEW] Qemu fails to start with error " There is no option group 'spice'"

2021-01-08 Thread Edvinas Valatka
Public bug reported: After upgrade from 5.1.0 to 5.2.0, qemu fails on start with error: ` /usr/bin/qemu-system-x86_64 -S -name trinti -uuid f8ad2ff6-8808-4f42-8f0b-9e23acd20f84 -daemonize -cpu host -nographic -serial chardev:console -nodefaults -no-reboot -no-user-config -sandbox on,obsolete=de

Re: [PATCH v1] s390x/tcg: Fix RISBHG

2021-01-08 Thread David Hildenbrand
/bash export ARCH=s390; export CROSS_COMPILE=s390x-linux-gnu- export LLVM=1 make distclean make defconfig # Make F32 initrd boot without inserting modules ./scripts/config -e CONFIG_SCSI_ISCSI_ATTRS ./scripts/config -e CONFIG_ISCSI_TCP make -j40 > /dev/null --- 3. Run it via QEMU. I boot a fu

Re: What's the correct way to implement rfi and related instruction.

2021-01-08 Thread Cédric Le Goater
On 1/8/21 5:21 AM, 罗勇刚(Yonggang Luo) wrote: > > > On Fri, Jan 8, 2021 at 5:54 AM Cédric Le Goater > wrote: >> >> On 1/7/21 8:14 PM, 罗勇刚(Yonggang Luo) wrote: >> > This is the first patch,: >> > It's store MSR bits differntly for different rfi instructions: >> > [Qemu-devel]

Re: [RFC PATCH] ci: ensure that all jobs use a shallow clone

2021-01-08 Thread Daniel P . Berrangé
On Thu, Jan 07, 2021 at 08:23:49PM +0100, Paolo Bonzini wrote: > Il gio 7 gen 2021, 20:05 Thomas Huth ha scritto: > > > on travis-ci.com you can > > only get free CI minutes for non-sponsored FOSS projects. > > So let's simply not worry about Travis-CI anymore. > > > > Maybe we could rather disab

Re: [PATCH v1] s390x/tcg: Fix RISBHG

2021-01-08 Thread David Hildenbrand
On 08.01.21 10:44, David Hildenbrand wrote: > On 08.01.21 03:20, Nick Desaulniers wrote: >> On Thu, Jan 7, 2021 at 3:27 PM David Hildenbrand wrote: >>> >>> Am 08.01.2021 um 00:21 schrieb Nick Desaulniers : On Thu, Jan 7, 2021 at 3:13 PM David Hildenbrand wrote: > > RISBHG

Re: [PATCH v15 00/13] Apply COR-filter to the block-stream permanently

2021-01-08 Thread Vladimir Sementsov-Ogievskiy
05.01.2021 19:08, Max Reitz wrote: On 16.12.20 07:16, Vladimir Sementsov-Ogievskiy wrote: Hi all! Here is a new version of cor-filter in block-stream series. Main change is freezing the chain in cor-filter itself. Thanks, applied to my block branch: https://git.xanclic.moe/XanClic/qemu/commi

Re: [PULL 00/47] tcg patch queue

2021-01-08 Thread Peter Maydell
On Thu, 7 Jan 2021 at 20:14, Richard Henderson wrote: > > The following changes since commit 470dd6bd360782f5137f7e3376af6a44658eb1d3: > > Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-060121-4' > into staging (2021-01-06 22:18:36 +) > > are available in the Git repository

Re: [PULL 00/66] MIPS patches for 2021-01-07

2021-01-08 Thread Peter Maydell
On Thu, 7 Jan 2021 at 22:25, Philippe Mathieu-Daudé wrote: > > The following changes since commit 470dd6bd360782f5137f7e3376af6a44658eb1d3: > > Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-060121-4' > into staging (2021-01-06 22:18:36 +) > > are available in the Git repos

Re: [PATCH v1] s390x/tcg: Fix RISBHG

2021-01-08 Thread David Hildenbrand
On 08.01.21 11:19, David Hildenbrand wrote: > On 08.01.21 10:44, David Hildenbrand wrote: >> On 08.01.21 03:20, Nick Desaulniers wrote: >>> On Thu, Jan 7, 2021 at 3:27 PM David Hildenbrand >>> wrote: > Am 08.01.2021 um 00:21 schrieb Nick Desaulniers : > > On Thu, Jan 7, 202

[Bug 1910723] [NEW] NULL pointer dereference issues in am53c974 SCSI host bus adapter

2021-01-08 Thread Mauro Matteo Cascella
Public bug reported: Two NULL pointer dereference issues were found in the am53c974 SCSI host bus adapter emulation of QEMU. They could occur while handling the 'Information Transfer' command (CMD_TI) in function handle_ti() in hw/scsi/esp.c, and could be abused by a malicious guest to crash the Q

Re: [PATCH 4/4] block: introduce BDRV_MAX_LENGTH

2021-01-08 Thread Vladimir Sementsov-Ogievskiy
07.01.2021 12:58, Richard W.M. Jones wrote: On Fri, Dec 04, 2020 at 01:27:13AM +0300, Vladimir Sementsov-Ogievskiy wrote: Finally to be safe with calculations, to not calculate different maximums for different nodes (depending on cluster size and request_alignment), let's simply set QEMU_ALIGN_D

Re: [PATCH 4/4] block: introduce BDRV_MAX_LENGTH

2021-01-08 Thread Richard W.M. Jones
On Fri, Jan 08, 2021 at 01:51:35PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 07.01.2021 12:58, Richard W.M. Jones wrote: > >On Fri, Dec 04, 2020 at 01:27:13AM +0300, Vladimir Sementsov-Ogievskiy wrote: > >>Finally to be safe with calculations, to not calculate different > >>maximums for differen

Re: [RFC PATCH] ci: ensure that all jobs use a shallow clone

2021-01-08 Thread Thomas Huth
On 08/01/2021 11.16, Daniel P. Berrangé wrote: IOW, despite travis giving us non-x86 builders, it is doomed to be unusuable, unless we can convince them to give us a *massively* larger free credit allowance on the qemu account. I think convincing them to do this will be very hard. I've tried to

Re: [RFC PATCH] ci: ensure that all jobs use a shallow clone

2021-01-08 Thread Daniel P . Berrangé
On Fri, Jan 08, 2021 at 12:06:01PM +0100, Thomas Huth wrote: > On 08/01/2021 11.16, Daniel P. Berrangé wrote: > > > IOW, despite travis giving us non-x86 builders, it is doomed to be > > unusuable, unless we can convince them to give us a *massively* > > larger free credit allowance on the qemu ac

Re: [PATCH 4/4] block: introduce BDRV_MAX_LENGTH

2021-01-08 Thread Vladimir Sementsov-Ogievskiy
07.01.2021 15:20, Richard W.M. Jones wrote: On Thu, Jan 07, 2021 at 10:56:12AM +, Richard W.M. Jones wrote: On Thu, Jan 07, 2021 at 09:58:17AM +, Richard W.M. Jones wrote: On Fri, Dec 04, 2020 at 01:27:13AM +0300, Vladimir Sementsov-Ogievskiy wrote: Finally to be safe with calculations

Re: [PATCH 4/4] block: introduce BDRV_MAX_LENGTH

2021-01-08 Thread Daniel P . Berrangé
On Fri, Jan 08, 2021 at 02:14:30PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 07.01.2021 15:20, Richard W.M. Jones wrote: > > On Thu, Jan 07, 2021 at 10:56:12AM +, Richard W.M. Jones wrote: > > > On Thu, Jan 07, 2021 at 09:58:17AM +, Richard W.M. Jones wrote: > > > > On Fri, Dec 04, 2020

Re: [PULL 00/66] MIPS patches for 2021-01-07

2021-01-08 Thread Philippe Mathieu-Daudé
Hi Peter, Le ven. 8 janv. 2021 11:35, Peter Maydell a écrit : > On Thu, 7 Jan 2021 at 22:25, Philippe Mathieu-Daudé > wrote: > > > > The following changes since commit > 470dd6bd360782f5137f7e3376af6a44658eb1d3: > > > > Merge remote-tracking branch > 'remotes/stsquad/tags/pull-testing-060121-

Re: [PATCH v2 0/7] Fix some memleaks caused by ptimer_init

2021-01-08 Thread Peter Maydell
On Thu, 17 Dec 2020 at 11:32, Gan Qixin wrote: > > v1->v2: > Changes suggested by Peter Maydell: > Delete the modification of unrelated whitespace. > > Gan Qixin (7): > allwinner-a10-pit: Use ptimer_free() in the finalize function to avoid > memleaks > digic-timer: Use ptimer_free() in

Re: [PULL 00/66] MIPS patches for 2021-01-07

2021-01-08 Thread Peter Maydell
On Fri, 8 Jan 2021 at 11:28, Philippe Mathieu-Daudé wrote: > Le ven. 8 janv. 2021 11:35, Peter Maydell a écrit : >> Looks like decodetree fails to cope with non-ASCII characters in >> its input file -- probably this depends on the host locale settings: >> I think these hosts run in the 'C' locale

Re: [PATCH 3/3] pvpanic : update pvpanic spec document

2021-01-08 Thread Peter Maydell
On Fri, 18 Dec 2020 at 13:36, Mihai Carabas wrote: > > Add pvpanic PCI device support details in docs/specs/pvpanic.txt. > > Signed-off-by: Mihai Carabas > --- > docs/specs/pvpanic.txt | 13 - > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/docs/specs/pvpanic.txt b

Re: [PATCH] hw/virtio-pci: Replace error_report() by qemu_log_mask(GUEST_ERROR)

2021-01-08 Thread Stefano Garzarella
On Thu, Dec 10, 2020 at 06:28:34PM +0100, Philippe Mathieu-Daudé wrote: Replace I/O write error reported with error_report() by qemu_log_mask(GUEST_ERROR) which allow filtering. Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/virtio-pci.c | 6 -- 1 file changed, 4 insertions(+), 2 dele

Re: [PATCH] virtio-mmio: fix guest kernel crash with SHM regions

2021-01-08 Thread Stefano Garzarella
On Sun, Dec 20, 2020 at 05:35:39PM +0100, Laurent Vivier wrote: In the kernel, virtio_gpu_init() uses virtio_get_shm_region() since commit 6076a9711dc5 ("drm/virtio: implement blob resources: probe for host visible region") but vm_get_shm_region() unconditionally uses VIRTIO_MMIO_SHM_SEL to get

Re: [PATCH 1/3] hw/misc/pvpanic: split-out generic and bus dependent code

2021-01-08 Thread Peter Maydell
On Fri, 18 Dec 2020 at 13:36, Mihai Carabas wrote: > > To ease the PCI device addition in next patches, split the code as follows: > - generic code (read/write/setup) is being kept in pvpanic.c > - ISA dependent code moved to pvpanic-isa.c > > Also, rename: > - ISA_PVPANIC_DEVICE -> PVPANIC_ISA_DE

[RFC PATCH] Makefile: add GNU global tags support

2021-01-08 Thread Alex Bennée
GNU Global is another tags engine which is more like cscope in being able to support finding both references and definitions. You will be un-surprised to know it also integrates well with Emacs. The main benefit of integrating it into find-src-path is it takes less time to rebuild the database fro

Re: [PATCH 2/3] hw/misc/pvpanic: add PCI interface support

2021-01-08 Thread Peter Maydell
On Fri, 18 Dec 2020 at 13:36, Mihai Carabas wrote: > > Add PCI interface support for PVPANIC device. Create a new file pvpanic-pci.c > where the PCI specific routines reside and update the build system with the > new > files and config structure. > > Signed-off-by: Mihai Carabas > --- > docs/sp

Re: [PATCH v3 0/4] hw/arm: sabrelite: Improve emulation fidelity to allow booting upstream U-Boot

2021-01-08 Thread Peter Maydell
On Wed, 6 Jan 2021 at 06:35, Bin Meng wrote: > > From: Bin Meng > > > At present the upstream U-Boot (as of today, v2021.01-rc3) does not > boot on QEMU sabrelite machine. > > This fixes several issues to improve emulation fidelity of the i.MX6 > sabrelite board. With this series, upstream U-Boot

Re: [PATCH] gdbstub.c uses incorrect check for active gdb in use_gdb_syscalls

2021-01-08 Thread Alex Bennée
Keith Packard writes: > When checking whether there is a live gdb connection, code shouldn't > use 'gdbserver_state.init' as that value is set when the > gdbserver_state structure is initialized in init_gdbserver_state, not > when the gdb socket has a valid connection. > > The 'handle_detach' f

[PATCH v2 2/4] s390x/tcg: Fix RISBHG

2021-01-08 Thread David Hildenbrand
RISBHG is broken and currently hinders clang-11 builds of upstream kernels from booting: the kernel crashes early, while decompressing the image. [...] Kernel fault: interruption code 0005 ilc:2 Kernel random base: PSW : 20018000 00017a1e R:0 T:

[PATCH v2 1/4] s390x/tcg: Fix ALGSI

2021-01-08 Thread David Hildenbrand
Looks like something went wrong whiel touching that line. Instead of "r1" we need a new temporary. Also, we have to pass MO_TEQ, to indicate that we are working with 64-bit values. Let's revert these changes. Fixes: ff26d287bddc ("target/s390x: Improve cc computation for ADD LOGICAL") Signed-off-b

[PATCH v2 0/4] s390x/tcg: fix booting Linux kernels compiled with clang-11 and clang-12

2021-01-08 Thread David Hildenbrand
This series fixes booting current upstream Linux kernel compiled by clang-11 and clang-12 under TCG. Decided to pull in already separatly sent patches. The last patch is not required to fix the boot issues, but related to patch #3. Latest version of the patches available at: g...@github.com:david

[PATCH v2 4/4] s390x/tcg: Ignore register content if b1/b2 is zero when handling EXECUTE

2021-01-08 Thread David Hildenbrand
In our EXECUTE fast path, we have to ignore the content of r0, if specified by b1 or b2. Fixes: d376f123c7de ("target/s390x: Re-implement a few EXECUTE target insns directly") Signed-off-by: David Hildenbrand --- target/s390x/mem_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-

[PATCH v2 3/4] s390x/tcg: Only ignore content in r0 when specified via "b" or "x"

2021-01-08 Thread David Hildenbrand
Using get_address() with register identifiers comming from an "r" field is wrong: if the "r" field designates "r0", we don't read the content and instead assume 0 - which should only be applied when the register was specified via "b" or "x". PoP 5-11 "Operand-Address Generation": "A zero in any

Re: [PATCH v2] ui/cocoa: Fix openFile: deprecation on Big Sur

2021-01-08 Thread Peter Maydell
On Sat, 2 Jan 2021 at 15:14, Roman Bolshakov wrote: > > ui/cocoa.m:1188:44: warning: 'openFile:' is deprecated: first deprecated in > macOS 11.0 - Use -[NSWorkspace openURL:] instead. > [-Wdeprecated-declarations] > if ([[NSWorkspace sharedWorkspace] openFile: full_file_path] == YES

Re: [PATCH v4 1/3] target/arm: Implement an IMPDEF pauth algorithm

2021-01-08 Thread Peter Maydell
On Wed, 16 Dec 2020 at 22:12, Richard Henderson wrote: > > Without hardware acceleration, a cryptographically strong > algorithm is too expensive for pauth_computepac. > > Even with hardware accel, we are not currently expecting > to link the linux-user binaries to any crypto libraries, > and doin

Re: [PATCH v4 2/3] target/arm: Add cpu properties to control pauth

2021-01-08 Thread Peter Maydell
On Wed, 16 Dec 2020 at 22:12, Richard Henderson wrote: > > The crypto overhead of emulating pauth can be significant for > some workloads. Add two boolean properties that allows the > feature to be turned off, on with the architected algorithm, > or on with an implementation defined algorithm. >

Re: [PATCHv3] arm-virt: add secure pl061 for reset/power down

2021-01-08 Thread Peter Maydell
On Wed, 6 Jan 2021 at 16:34, Maxim Uvarov wrote: > > Add secure pl061 for reset/power down machine from > the secure world (Arm Trusted Firmware). > Use the same gpio 3 and gpio 4 which were used by > non acpi variant of linux power control gpios. > > Signed-off-by: Maxim Uvarov > --- > v3: adde

Re: [PATCH v2 2/2] hw/ssi: imx_spi: Disable chip selects in imx_spi_reset()

2021-01-08 Thread Peter Maydell
On Wed, 2 Dec 2020 at 14:45, Bin Meng wrote: > > From: Xuzhou Cheng > > When a write to ECSPI_CONREG register to disable the SPI controller, > imx_spi_reset() is called to reset the controller, during which CS > lines should have been disabled, otherwise the state machine of any > devices (e.g.:

Re: [PATCH 2/2] hw/ssi: imx_spi: Correct tx and rx fifo endianness

2021-01-08 Thread Peter Maydell
On Thu, 17 Dec 2020 at 05:28, Bin Meng wrote: > > From: Bin Meng > > The endianness of data exchange between tx and rx fifo is incorrect. > Earlier bytes are supposed to show up on MSB and later bytes on LSB, > ie: in big endian. The manual does not explicitly say this, but the > U-Boot and Linux

[PATCH] shippable.yml: Remove jobs duplicated on Gitlab-CI

2021-01-08 Thread Philippe Mathieu-Daudé
The following jobs are duplicated on Gitlab-CI since commit 6bcb5fc0f7a ("gitlab-ci: Add cross-compiling build tests"): - IMAGE=debian-armel-cross TARGET_LIST=arm-softmmu -> cross-armel-system TARGET_LIST=arm-linux-user-> cross-armel-user TARGET_LIST=armeb-linux-us

Re: [PATCH v2] ui/cocoa: Fix openFile: deprecation on Big Sur

2021-01-08 Thread Peter Maydell
On Fri, 8 Jan 2021 at 13:50, Peter Maydell wrote: > > On Sat, 2 Jan 2021 at 15:14, Roman Bolshakov wrote: > > > > ui/cocoa.m:1188:44: warning: 'openFile:' is deprecated: first deprecated in > > macOS 11.0 - Use -[NSWorkspace openURL:] instead. > > [-Wdeprecated-declarations] > > if

Re: [PATCH] hw/virtio-pci: Replace error_report() by qemu_log_mask(GUEST_ERROR)

2021-01-08 Thread Philippe Mathieu-Daudé
On 1/8/21 1:02 PM, Stefano Garzarella wrote: > On Thu, Dec 10, 2020 at 06:28:34PM +0100, Philippe Mathieu-Daudé wrote: >> Replace I/O write error reported with error_report() by >> qemu_log_mask(GUEST_ERROR) which allow filtering. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> hw/virt

Re: [PATCH v2] ui/cocoa: Fix openFile: deprecation on Big Sur

2021-01-08 Thread Peter Maydell
On Fri, 8 Jan 2021 at 15:00, Peter Maydell wrote: > > On Fri, 8 Jan 2021 at 13:50, Peter Maydell wrote: > > > > On Sat, 2 Jan 2021 at 15:14, Roman Bolshakov wrote: > > > > > > ui/cocoa.m:1188:44: warning: 'openFile:' is deprecated: first deprecated > > > in macOS 11.0 - Use -[NSWorkspace openUR

Re: [PATCH] hw/virtio-pci: Replace error_report() by qemu_log_mask(GUEST_ERROR)

2021-01-08 Thread Stefano Garzarella
On Fri, Jan 08, 2021 at 04:00:21PM +0100, Philippe Mathieu-Daudé wrote: On 1/8/21 1:02 PM, Stefano Garzarella wrote: On Thu, Dec 10, 2020 at 06:28:34PM +0100, Philippe Mathieu-Daudé wrote: Replace I/O write error reported with error_report() by qemu_log_mask(GUEST_ERROR) which allow filterin

Re: [PATCH] shippable.yml: Remove jobs duplicated on Gitlab-CI

2021-01-08 Thread Paolo Bonzini
On 08/01/21 15:51, Philippe Mathieu-Daudé wrote: The following jobs are duplicated on Gitlab-CI since commit 6bcb5fc0f7a ("gitlab-ci: Add cross-compiling build tests"): - IMAGE=debian-armel-cross TARGET_LIST=arm-softmmu -> cross-armel-system TARGET_LIST=arm-linux-user

[PATCH] decodetree: Open files with encoding='utf-8'

2021-01-08 Thread Philippe Mathieu-Daudé
When decodetree.py was added in commit 568ae7efae7, QEMU was using Python 2 which happily reads UTF-8 files in text mode. Python 3 requires either UTF-8 locale or an explicit encoding passed to open(). Now that Python 3 is required, explicit UTF-8 encoding for decodetree sources. This fixes: $

Re: [PATCH] shippable.yml: Remove jobs duplicated on Gitlab-CI

2021-01-08 Thread Daniel P . Berrangé
On Fri, Jan 08, 2021 at 04:14:30PM +0100, Paolo Bonzini wrote: > On 08/01/21 15:51, Philippe Mathieu-Daudé wrote: > > The following jobs are duplicated on Gitlab-CI since commit > > 6bcb5fc0f7a ("gitlab-ci: Add cross-compiling build tests"): > > > > - IMAGE=debian-armel-cross > > > >TARGET_LI

Re: [PULL 00/66] MIPS patches for 2021-01-07

2021-01-08 Thread Yonggang Luo
On Fri, Jan 8, 2021 at 3:31 AM Philippe Mathieu-Daudé wrote: > > Hi Peter, > > Le ven. 8 janv. 2021 11:35, Peter Maydell a écrit : >> >> On Thu, 7 Jan 2021 at 22:25, Philippe Mathieu-Daudé wrote: >> > >> > The following changes since commit 470dd6bd360782f5137f7e3376af6a44658eb1d3: >> > >> > M

Re: [PATCH] decodetree: Open files with encoding='utf-8'

2021-01-08 Thread Yonggang Luo
On Fri, Jan 8, 2021 at 7:18 AM Philippe Mathieu-Daudé wrote: > > When decodetree.py was added in commit 568ae7efae7, QEMU was > using Python 2 which happily reads UTF-8 files in text mode. > Python 3 requires either UTF-8 locale or an explicit encoding > passed to open(). Now that Python 3 is requ

[PULL 00/23] target-arm queue

2021-01-08 Thread Peter Maydell
ailable in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20210108 for you to fetch changes up to c9f8511ea8d2b80723af0fea1f716d752c1b5208: docs/system: arm: Add sabrelite board description (2021-01-08 15:1

[PULL 05/23] target/arm: Correct store of FPSCR value via FPCXT_S

2021-01-08 Thread Peter Maydell
In commit 64f863baeedc8659 we implemented the v8.1M FPCXT_S register, but we got the write behaviour wrong. On read, this register reads bits [27:0] of FPSCR plus the CONTROL.SFPA bit. On write, it doesn't just write back those bits -- it writes a value to the whole FPSCR, whose upper 4 bits are ze

[PULL 01/23] intc/arm_gic: Fix gic_irq_signaling_enabled() for vCPUs

2021-01-08 Thread Peter Maydell
From: "Edgar E. Iglesias" Correct the indexing into s->cpu_ctlr for vCPUs. Signed-off-by: Edgar E. Iglesias Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Luc Michel Message-id: 20201214222154.3480243-2-edgar.igles...@gmail.com Signed-off-by: Peter Maydell --- hw/intc/arm_gic.c | 4 +++-

[PULL 02/23] hw/arm/virt: Remove virt machine state 'smp_cpus'

2021-01-08 Thread Peter Maydell
From: Andrew Jones virt machine's 'smp_cpus' and machine->smp.cpus must always have the same value. And, anywhere we have virt machine state we have machine state. So let's remove the redundancy. Also, to make it easier to see that machine->smp is the true source for "smp_cpus" and "max_cpus", av

[PULL 03/23] target/arm: Fix MTE0_ACTIVE

2021-01-08 Thread Peter Maydell
From: Richard Henderson In 50244cc76abc we updated mte_check_fail to match the ARM pseudocode, using the correct EL to select the TCF field. But we failed to update MTE0_ACTIVE the same way, which led to g_assert_not_reached(). Cc: qemu-sta...@nongnu.org Buglink: https://bugs.launchpad.net/bugs/

[PULL 04/23] hw/intc/armv7m_nvic: Correct handling of CCR.BFHFNMIGN

2021-01-08 Thread Peter Maydell
The CCR is a register most of whose bits are banked between security states but where BFHFNMIGN is not, and we keep it in the non-secure entry of the v7m.ccr[] array. The logic which tries to handle this bit fails to implement the "RAZ/WI from Nonsecure if AIRCR.BFHFNMINS is zero" requirement; cor

[PULL 16/23] exynos4210_pwm: Use ptimer_free() in the finalize function to avoid memleaks

2021-01-08 Thread Peter Maydell
From: Gan Qixin When running device-introspect-test, a memory leak occurred in the exynos4210_pwm_init function, so use ptimer_free() in the finalize function to avoid it. ASAN shows memory leak stack: Indirect leak of 240 byte(s) in 5 object(s) allocated from: #0 0xab97e1f0 in __interc

[PULL 08/23] hw/arm/highbank: Drop dead KVM support code

2021-01-08 Thread Peter Maydell
Support for running KVM on 32-bit Arm hosts was removed in commit 82bf7ae84ce739e. You can still run a 32-bit guest on a 64-bit Arm host CPU, but because Arm KVM requires the host and guest CPU types to match, it is not possible to run a guest that requires a Cortex-A9 or Cortex-A15 CPU there. Th

[PULL 06/23] target/arm: Implement FPCXT_NS fp system register

2021-01-08 Thread Peter Maydell
Implement the v8.1M FPCXT_NS floating-point system register. This is a little more complicated than FPCXT_S, because it has specific handling for "current FP state is inactive", and it only wants to do PreserveFPState(), not the full set of actions done by ExecuteFPCheck() which vfp_access_check()

[PULL 09/23] util/qemu-timer: Make timer_free() imply timer_del()

2021-01-08 Thread Peter Maydell
Currently timer_free() is a simple wrapper for g_free(). This means that the timer being freed must not be currently active, as otherwise QEMU might crash later when the active list is processed and still has a pointer to freed memory on it. As a result almost all calls to timer_free() are preced

[PULL 10/23] scripts/coccinelle: New script to remove unnecessary timer_del() calls

2021-01-08 Thread Peter Maydell
Now that timer_free() implicitly calls timer_del(), sequences timer_del(mytimer); timer_free(mytimer); can be simplified to just timer_free(mytimer); Add a Coccinelle script to do this transformation. Signed-off-by: Peter Maydell Acked-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daud

[PULL 07/23] target/arm: Implement Cortex-M55 model

2021-01-08 Thread Peter Maydell
Now that we have implemented all the features needed by the v8.1M architecture, we can add the model of the Cortex-M55. This is the configuration without MVE support; we'll add MVE later. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20201210201433.26262-5-peter.mayd..

[PULL 11/23] Remove superfluous timer_del() calls

2021-01-08 Thread Peter Maydell
This commit is the result of running the timer-del-timer-free.cocci script on the whole source tree. Signed-off-by: Peter Maydell Acked-by: Corey Minyard Acked-by: Paolo Bonzini Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-id: 20201215154107.3255-4-peter.mayd...@

[PULL 12/23] target/arm: Remove timer_del()/timer_deinit() before timer_free()

2021-01-08 Thread Peter Maydell
The Arm CPU finalize function uses a sequence of timer_del(), timer_deinit(), timer_free() to free the timer. The timer_deinit() step in this was always unnecessary, and now the timer_del() is implied by timer_free(), so we can collapse this down to simply calling timer_free(). Signed-off-by: Pete

[PULL 14/23] allwinner-a10-pit: Use ptimer_free() in the finalize function to avoid memleaks

2021-01-08 Thread Peter Maydell
From: Gan Qixin When running device-introspect-test, a memory leak occurred in the a10_pit_init function, so use ptimer_free() in the finalize function to avoid it. ASAN shows memory leak stack: Indirect leak of 288 byte(s) in 6 object(s) allocated from: #0 0xab97e1f0 in __interceptor_c

[PULL 13/23] digic-timer: Use ptimer_free() in the finalize function to avoid memleaks

2021-01-08 Thread Peter Maydell
From: Gan Qixin When running device-introspect-test, a memory leak occurred in the digic_timer_init function, so use ptimer_free() in the finalize function to avoid it. ASAN shows memory leak stack: Indirect leak of 288 byte(s) in 3 object(s) allocated from: #0 0xab97e1f0 in __intercept

[PULL 17/23] mss-timer: Use ptimer_free() in the finalize function to avoid memleaks

2021-01-08 Thread Peter Maydell
From: Gan Qixin When running device-introspect-test, a memory leak occurred in the mss_timer_init function, so use ptimer_free() in the finalize function to avoid it. ASAN shows memory leak stack: Indirect leak of 192 byte(s) in 2 object(s) allocated from: #0 0xab97e1f0 in __interceptor

[PULL 18/23] musicpal: Use ptimer_free() in the finalize function to avoid memleaks

2021-01-08 Thread Peter Maydell
From: Gan Qixin When running device-introspect-test, a memory leak occurred in the mv88w8618_pit_init function, so use ptimer_free() in the finalize function to avoid it. ASAN shows memory leak stack: Indirect leak of 192 byte(s) in 4 object(s) allocated from: #0 0xab97e1f0 in __interce

[PULL 15/23] exynos4210_rtc: Use ptimer_free() in the finalize function to avoid memleaks

2021-01-08 Thread Peter Maydell
From: Gan Qixin When running device-introspect-test, a memory leak occurred in the exynos4210_rtc_init function, so use ptimer_free() in the finalize function to avoid it. ASAN shows memory leak stack: Indirect leak of 96 byte(s) in 1 object(s) allocated from: #0 0xab97e1f0 in __interce

[PULL 21/23] hw/msic: imx6_ccm: Correct register value for silicon type

2021-01-08 Thread Peter Maydell
From: Bin Meng Currently when U-Boot boots, it prints "??" for i.MX processor: CPU: Freescale i.MX?? rev1.0 at 792 MHz The register that was used to determine the silicon type is undocumented in the latest IMX6DQRM (Rev. 6, 05/2020), but we can refer to get_cpu_rev() in arch/arm/mach-imx/mx

[PULL 19/23] exynos4210_mct: Use ptimer_free() in the finalize function to avoid memleaks

2021-01-08 Thread Peter Maydell
From: Gan Qixin When running device-introspect-test, a memory leak occurred in the exynos4210_mct_init function, so use ptimer_free() in the finalize function to avoid it. ASAN shows memory leak stack: Indirect leak of 96 byte(s) in 1 object(s) allocated from: #0 0xab97e1f0 in __interce

Re: [PATCH] shippable.yml: Remove jobs duplicated on Gitlab-CI

2021-01-08 Thread Paolo Bonzini
On 08/01/21 16:21, Daniel P. Berrangé wrote: On Fri, Jan 08, 2021 at 04:14:30PM +0100, Paolo Bonzini wrote: On 08/01/21 15:51, Philippe Mathieu-Daudé wrote: The following jobs are duplicated on Gitlab-CI since commit 6bcb5fc0f7a ("gitlab-ci: Add cross-compiling build tests"): - IMAGE=debian-ar

[PULL 20/23] hw/misc: imx6_ccm: Update PMU_MISC0 reset value

2021-01-08 Thread Peter Maydell
From: Bin Meng U-Boot expects PMU_MISC0 register bit 7 is set (see init_bandgap() in arch/arm/mach-imx/mx6/soc.c) during boot. This bit indicates the bandgap has stabilized. With this change, the latest upstream U-Boot (v2021.01-rc3) for imx6 sabrelite board (mx6qsabrelite_defconfig), with a sli

[PULL 22/23] hw/arm: sabrelite: Connect the Ethernet PHY at address 6

2021-01-08 Thread Peter Maydell
From: Bin Meng At present, when booting U-Boot on QEMU sabrelite, we see: Net: Board Net Initialization Failed No ethernet found. U-Boot scans PHY at address 4/5/6/7 (see board_eth_init() in the U-Boot source: board/boundary/nitrogen6x/nitrogen6x.c). On the real board, the Ethernet PHY is

[PULL 23/23] docs/system: arm: Add sabrelite board description

2021-01-08 Thread Peter Maydell
From: Bin Meng This adds the target guide for SABRE Lite board, and documents how to boot a Linux kernel and U-Boot bootloader. Signed-off-by: Bin Meng Reviewed-by: Alex Bennée Message-id: 20210106063504.10841-5-bmeng...@gmail.com Signed-off-by: Peter Maydell --- docs/system/arm/sabrelite.rs

Re: [PATCH v2 2/2] hw/ssi: imx_spi: Disable chip selects in imx_spi_reset()

2021-01-08 Thread Peter Maydell
On Fri, 8 Jan 2021 at 15:55, Bin Meng wrote: > > On Fri, Jan 8, 2021 at 10:40 PM Peter Maydell > wrote: > > Calling qemu_set_irq() in a device reset function is a bad > > idea, because you don't know whether the thing on the other > > end of the IRQ line (a) has already reset before you or > > (

Re: [PATCH] decodetree: Open files with encoding='utf-8'

2021-01-08 Thread Peter Maydell
On Fri, 8 Jan 2021 at 15:16, Philippe Mathieu-Daudé wrote: > > When decodetree.py was added in commit 568ae7efae7, QEMU was > using Python 2 which happily reads UTF-8 files in text mode. > Python 3 requires either UTF-8 locale or an explicit encoding > passed to open(). Now that Python 3 is requir

Re: [PATCH v3] hw/core/qdev-properties-system: Rewrite set_pci_host_devaddr using GLib

2021-01-08 Thread Philippe Mathieu-Daudé
Ping? On 11/25/20 9:33 AM, Philippe Mathieu-Daudé wrote: > set_pci_host_devaddr() is hard to follow, thus bug-prone. > > For example, a bug was introduced in commit bccb20c49df, as > the same line might be used to parse a bus (up to 0xff) or > a slot (up to 0x1f). > > Instead of making things wo

Re: [PATCH v2 2/2] hw/ssi: imx_spi: Disable chip selects in imx_spi_reset()

2021-01-08 Thread Bin Meng
On Fri, Jan 8, 2021 at 10:40 PM Peter Maydell wrote: > > On Wed, 2 Dec 2020 at 14:45, Bin Meng wrote: > > > > From: Xuzhou Cheng > > > > When a write to ECSPI_CONREG register to disable the SPI controller, > > imx_spi_reset() is called to reset the controller, during which CS > > lines should ha

Re: [PATCH] decodetree: Open files with encoding='utf-8'

2021-01-08 Thread Yonggang Luo
On Sat, Jan 9, 2021 at 12:05 AM Peter Maydell wrote: > > On Fri, 8 Jan 2021 at 15:16, Philippe Mathieu-Daudé wrote: > > > > When decodetree.py was added in commit 568ae7efae7, QEMU was > > using Python 2 which happily reads UTF-8 files in text mode. > > Python 3 requires either UTF-8 locale or an

[PATCH v2 0/2] Build all docs in a single manual

2021-01-08 Thread Peter Maydell
Changes from v1 up top since they're minor: * rebase to account for two new manpages * patch 1 fixes the accidental omission of one of the new manpages from the meson.build list * patch 2 has been reviewed already Summary of the patchset: When we first converted our documentation to Sphinx,

[PATCH v2 1/2] docs: Add qemu-storage-daemon(1) manpage to meson.build

2021-01-08 Thread Peter Maydell
In commit 1982e1602d15 we added a new qemu-storage-daemon(1) manpage. At the moment new manpages have to be listed both in the conf.py for Sphinx and also in docs/meson.build for Meson. We forgot the second of those -- correct the omission. Signed-off-by: Peter Maydell --- docs/meson.build | 1 +

[PATCH v2 2/2] docs: Build and install all the docs in a single manual

2021-01-08 Thread Peter Maydell
When we first converted our documentation to Sphinx, we split it into multiple manuals (system, interop, tools, etc), which are all built separately. The primary driver for this was wanting to be able to avoid shipping the 'devel' manual to end-users. However, this is working against the grain of

Re: [PATCH] shippable.yml: Remove jobs duplicated on Gitlab-CI

2021-01-08 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > The following jobs are duplicated on Gitlab-CI since commit > 6bcb5fc0f7a ("gitlab-ci: Add cross-compiling build tests"): > > - IMAGE=debian-armel-cross > > TARGET_LIST=arm-softmmu -> cross-armel-system > TARGET_LIST=arm-linux-user-

Re: [PATCH] decodetree: Open files with encoding='utf-8'

2021-01-08 Thread Eduardo Habkost
On Sat, Jan 09, 2021 at 12:13:31AM +0800, 罗勇刚(Yonggang Luo) wrote: > On Sat, Jan 9, 2021 at 12:05 AM Peter Maydell > wrote: > > > > On Fri, 8 Jan 2021 at 15:16, Philippe Mathieu-Daudé > wrote: > > > > > > When decodetree.py was added in commit 568ae7efae7, QEMU was > > > using Python 2 which happ

Re: [PATCH v2 1/2] docs: Add qemu-storage-daemon(1) manpage to meson.build

2021-01-08 Thread Philippe Mathieu-Daudé
On 1/8/21 5:14 PM, Peter Maydell wrote: > In commit 1982e1602d15 we added a new qemu-storage-daemon(1) manpage. > At the moment new manpages have to be listed both in the conf.py for > Sphinx and also in docs/meson.build for Meson. We forgot the second > of those -- correct the omission. > > Signe

[PATCH v4 03/13] memory: Introduce log_sync_global() to memory listener

2021-01-08 Thread Peter Xu
Some of the memory listener may want to do log synchronization without being able to specify a range of memory to sync but always globally. Such a memory listener should provide this new method instead of the log_sync() method. Obviously we can also achieve similar thing when we put the global syn

[PATCH v4 01/13] update-linux-headers: Include const.h

2021-01-08 Thread Peter Xu
From: Eric Farman Kernel commit a85cbe6159ff ("uapi: move constants from to ") breaks our script because of the unrecognized include. Let's add that to our processing. Signed-off-by: Eric Farman --- scripts/update-linux-headers.sh | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) dif

Re: [PATCH] decodetree: Open files with encoding='utf-8'

2021-01-08 Thread Philippe Mathieu-Daudé
On 1/8/21 4:38 PM, Peter Maydell wrote: > On Fri, 8 Jan 2021 at 15:16, Philippe Mathieu-Daudé wrote: >> >> When decodetree.py was added in commit 568ae7efae7, QEMU was >> using Python 2 which happily reads UTF-8 files in text mode. >> Python 3 requires either UTF-8 locale or an explicit encoding >

[PATCH v4 06/13] KVM: Create the KVMSlot dirty bitmap on flag changes

2021-01-08 Thread Peter Xu
Previously we have two places that will create the per KVMSlot dirty bitmap: 1. When a newly created KVMSlot has dirty logging enabled, 2. When the first log_sync() happens for a memory slot. The 2nd case is lazy-init, while the 1st case is not (which is a fix of what the 2nd case missed). T

[PATCH v4 02/13] Update linux headers to 5.11-rc2

2021-01-08 Thread Peter Xu
From: Eric Farman Signed-off-by: Eric Farman --- .../infiniband/hw/vmw_pvrdma/pvrdma_ring.h| 14 +- .../infiniband/hw/vmw_pvrdma/pvrdma_verbs.h | 2 +- include/standard-headers/drm/drm_fourcc.h | 175 +- include/standard-headers/linux/const.h| 36 incl

[PATCH v4 07/13] KVM: Provide helper to get kvm dirty log

2021-01-08 Thread Peter Xu
Provide a helper kvm_slot_get_dirty_log() to make the function kvm_physical_sync_dirty_bitmap() clearer. We can even cache the as_id into KVMSlot when it is created, so that we don't even need to pass it down every time. Since at it, remove return value of kvm_physical_sync_dirty_bitmap() because

[PATCH v4 05/13] KVM: Use a big lock to replace per-kml slots_lock

2021-01-08 Thread Peter Xu
Per-kml slots_lock will bring some trouble if we want to take all slots_lock of all the KMLs, especially when we're in a context that we could have taken some of the KML slots_lock, then we even need to figure out what we've taken and what we need to take. Make this simple by merging all KML slots

[PATCH v4 00/13] KVM: Dirty ring support (QEMU part)

2021-01-08 Thread Peter Xu
This is v4 of the qemu dirty ring interface support. It is merely the same as v3 content-wise, but there're a few things to mention besides the rebase itself: - I picked up two patches from Eric Farman for the linux-header updates (from Eric's v3 series) for convenience just in case any of

[PATCH v4 08/13] KVM: Provide helper to sync dirty bitmap from slot to ramblock

2021-01-08 Thread Peter Xu
kvm_physical_sync_dirty_bitmap() calculates the ramblock offset in an awkward way from the MemoryRegionSection that passed in from the caller. The truth is for each KVMSlot the ramblock offset never change for the lifecycle. Cache the ramblock offset for each KVMSlot into the structure when the K

[PATCH v4 10/13] KVM: Cache kvm slot dirty bitmap size

2021-01-08 Thread Peter Xu
Cache it too because we'll reference it more frequently in the future. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- accel/kvm/kvm-all.c | 1 + include/sysemu/kvm_int.h | 1 + 2 files changed, 2 insertions(+) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 9

[PATCH v4 04/13] KVM: Fixup kvm_log_clear_one_slot() ioctl return check

2021-01-08 Thread Peter Xu
kvm_vm_ioctl() handles the errno trick already for ioctl() on returning -1 for errors. Fix this. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Peter Xu --- accel/kvm/kvm-all.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/acc

[PATCH v4 11/13] KVM: Add dirty-gfn-count property

2021-01-08 Thread Peter Xu
Add a parameter for dirty gfn count for dirty rings. If zero, dirty ring is disabled. Otherwise dirty ring will be enabled with the per-vcpu gfn count as specified. If dirty ring cannot be enabled due to unsupported kernel or illegal parameter, it'll fallback to dirty logging. By default, dirty

[PATCH v4 09/13] KVM: Simplify dirty log sync in kvm_set_phys_mem

2021-01-08 Thread Peter Xu
kvm_physical_sync_dirty_bitmap() on the whole section is inaccurate, because the section can be a superset of the memslot that we're working on. The result is that if the section covers multiple kvm memslots, we could be doing the synchronization for multiple times for each kvmslot in the section.

[PATCH v4 12/13] KVM: Disable manual dirty log when dirty ring enabled

2021-01-08 Thread Peter Xu
KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2 is for KVM_CLEAR_DIRTY_LOG, which is only useful for KVM_GET_DIRTY_LOG. Skip enabling it for kvm dirty ring. More importantly, KVM_DIRTY_LOG_INITIALLY_SET will not wr-protect all the pages initially, which is against how kvm dirty ring is used - there's no way fo

[PATCH v2 2/4] hw/ppc: Delete unused ppc405cr_init() code

2021-01-08 Thread Peter Maydell
The function ppc405cr_init() has apparently been unused since it was added in commit 8ecc7913525ecb in 2007. Remove this dead code, so we don't have to convert it away from using ppcuic_init(). Signed-off-by: Peter Maydell --- hw/ppc/ppc405.h| 6 - hw/ppc/ppc405_uc.c | 345 ---

  1   2   3   >