[PULL 17/52] target/arm: Define and use any_predinv isar_feature test

2020-02-21 Thread Peter Maydell
Instead of open-coding "ARM_FEATURE_AARCH64 ? aa64_predinv: aa32_predinv", define and use an any_predinv isar_feature test function. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell Message-id: 20200214175116.9164-5-peter.mayd...@linaro.org --- ta

[PULL 24/52] target/arm: Move DBGDIDR into ARMISARegisters

2020-02-21 Thread Peter Maydell
We're going to want to read the DBGDIDR register from KVM in a subsequent commit, which means it needs to be in the ARMISARegisters sub-struct. Move it. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20200214175116.9164-12-peter.mayd...@linaro.org --- target/arm/cpu.h

[PULL 20/52] target/arm: Use FIELD macros for clearing ID_DFR0 PERFMON field

2020-02-21 Thread Peter Maydell
We already define FIELD macros for ID_DFR0, so use them in the one place where we're doing direct bit value manipulation. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell Message-id: 20200214175116.9164-8-peter.mayd...@linaro.org --- target/arm/cp

[PULL 38/52] target/arm: Vectorize USHL and SSHL

2020-02-21 Thread Peter Maydell
From: Richard Henderson These instructions shift left or right depending on the sign of the input, and 7 bits are significant to the shift. This requires several masks and selects in addition to the actual shifts to form the complete answer. That said, the operation is still a small improvement

[PULL 27/52] target/arm: Implement ARMv8.4-PMU extension

2020-02-21 Thread Peter Maydell
The ARMv8.4-PMU extension adds: * one new required event, STALL * one new system register PMMIR_EL1 (There are also some more L1-cache related events, but since we don't implement any cache we don't provide these, in the same way we don't provide the base-PMUv3 cache events.) The STALL event "c

[PULL 26/52] target/arm: Implement ARMv8.1-PMU extension

2020-02-21 Thread Peter Maydell
The ARMv8.1-PMU extension requires: * the evtCount field in PMETYPER_EL0 is 16 bits, not 10 * MDCR_EL2.HPMD allows event counting to be disabled at EL2 * two new required events, STALL_FRONTEND and STALL_BACKEND * ID register bits in ID_AA64DFR0_EL1 and ID_DFR0 We already implement the 16-bit

[PULL 43/52] sh4: Fix PCI ISA IO memory subregion

2020-02-21 Thread Peter Maydell
From: Guenter Roeck Booting the r2d machine from flash fails because flash is not discovered. Looking at the flattened memory tree, we see the following. FlatView #1 AS "memory", root: system AS "cpu-memory-0", root: system AS "sh_pci_host", root: bus master container Root memory region: sys

[PULL 22/52] target/arm: Add _aa64_ and _any_ versions of pmu_8_1 isar checks

2020-02-21 Thread Peter Maydell
Add the 64-bit version of the "is this a v8.1 PMUv3?" ID register check function, and the _any_ version that checks for either AArch32 or AArch64 support. We'll use this in a later commit. We don't (yet) do any isar_feature checks on ID_AA64DFR1_EL1, but we move id_aa64dfr1 into the ARMISARegister

[PULL 32/52] target/arm: Use isar_feature function for testing AA32HPD feature

2020-02-21 Thread Peter Maydell
Now we have moved ID_MMFR4 into the ARMISARegisters struct, we can define and use an isar_feature for the presence of the ARMv8.2-AA32HPD feature, rather than open-coding the test. While we're here, correct a comment typo which missed an 'A' from the feature name. Signed-off-by: Peter Maydell Re

[PULL 28/52] target/arm: Provide ARMv8.4-PMU in '-cpu max'

2020-02-21 Thread Peter Maydell
Set the ID register bits to provide ARMv8.4-PMU (and implicitly also ARMv8.1-PMU) in the 'max' CPU. Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell Message-id: 20200214175116.9164-16-peter.mayd...@linaro.org --- target/arm/cpu64.c | 8 1 file changed, 8 insertions(+) diff

[PULL 29/52] target/arm: Correct definition of PMCRDP

2020-02-21 Thread Peter Maydell
The PMCR_EL0.DP bit is bit 5, which is 0x20, not 0x10. 0x10 is 'X'. Correct our #define of PMCRDP and add the missing PMCRX. We do have the correct behaviour for handling the DP bit being set, so this fixes a guest-visible bug. Fixes: 033614c47de Reviewed-by: Philippe Mathieu-Daudé Reviewed-by:

Re: [PATCH] hw/char/pl011: Output characters using best-effort mode

2020-02-21 Thread Paolo Bonzini
On 21/02/20 13:44, Peter Maydell wrote: > On Fri, 21 Feb 2020 at 11:44, Paolo Bonzini wrote: >> >> On 21/02/20 11:21, Peter Maydell wrote: >>> Before you do that, I would suggest investigating: >>> * is this a problem we've already had on x86 and that there is a >>>standard solution for >> Di

[PULL 25/52] target/arm: Read debug-related ID registers from KVM

2020-02-21 Thread Peter Maydell
Now we have isar_feature test functions that look at fields in the ID_AA64DFR0_EL1 and ID_DFR0 ID registers, add the code that reads these register values from KVM so that the checks behave correctly when we're using KVM. No isar_feature function tests ID_AA64DFR1_EL1 or DBGDIDR yet, but we add it

[PULL 31/52] target/arm: Test correct register in aa32_pan and aa32_ats1e1 checks

2020-02-21 Thread Peter Maydell
The isar_feature_aa32_pan and isar_feature_aa32_ats1e1 functions are supposed to be testing fields in ID_MMFR3; but a cut-and-paste error meant we were looking at MVFR0 instead. Fix the functions to look at the right register; this requires us to move at least id_mmfr3 to the ARMISARegisters struc

[PULL 35/52] hw: usb: hcd-ohci: Move OHCISysBusState and TYPE_SYSBUS_OHCI to include file

2020-02-21 Thread Peter Maydell
From: Guenter Roeck We need to be able to use OHCISysBusState outside hcd-ohci.c, so move it to its include file. Reviewed-by: Gerd Hoffmann Signed-off-by: Guenter Roeck Tested-by: Niek Linnenbank Message-id: 20200217204812.9857-2-li...@roeck-us.net Signed-off-by: Peter Maydell --- hw/usb/h

Re: [PATCH] hw/char/pl011: Output characters using best-effort mode

2020-02-21 Thread Peter Maydell
On Fri, 21 Feb 2020 at 13:09, Paolo Bonzini wrote: > > On 21/02/20 13:44, Peter Maydell wrote: > > On Fri, 21 Feb 2020 at 11:44, Paolo Bonzini wrote: > >> > >> On 21/02/20 11:21, Peter Maydell wrote: > >>> Before you do that, I would suggest investigating: > >>> * is this a problem we've already

[PULL 34/52] target/arm: Correctly implement ACTLR2, HACTLR2

2020-02-21 Thread Peter Maydell
The ACTLR2 and HACTLR2 AArch32 system registers didn't exist in ARMv7 or the original ARMv8. They were later added as optional registers, whose presence is signaled by the ID_MMFR4.AC2 field. From ARMv8.2 they are mandatory (ie ID_MMFR4.AC2 must be non-zero). We implemented HACTLR2 in commit 0e0

[PULL 33/52] target/arm: Use FIELD_EX32 for testing 32-bit fields

2020-02-21 Thread Peter Maydell
Cut-and-paste errors mean we're using FIELD_EX64() to extract fields from some 32-bit ID register fields. Use FIELD_EX32() instead. (This makes no difference in behaviour, it's just more consistent.) Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20200214175116.9164-21-p

[PULL 45/52] target/arm: Use isar_feature_aa32_simd_r32 more places

2020-02-21 Thread Peter Maydell
From: Richard Henderson Many uses of ARM_FEATURE_VFP3 are testing for the number of simd registers implemented. Use the proper test vs MVFR0.SIMDReg. Signed-off-by: Richard Henderson Message-id: 20200214181547.21408-4-richard.hender...@linaro.org [PMM: fix typo in commit message] Reviewed-by:

[PULL 39/52] target/arm: Convert PMUL.8 to gvec

2020-02-21 Thread Peter Maydell
From: Richard Henderson The gvec form will be needed for implementing SVE2. Extend the implementation to operate on uint64_t instead of uint32_t. Use a counted inner loop instead of terminating when op1 goes to zero, looking toward the required implementation for ARMv8.4-DIT. Tested-by: Alex Be

[PULL 36/52] hcd-ehci: Introduce "companion-enable" sysbus property

2020-02-21 Thread Peter Maydell
From: Guenter Roeck We'll use this property in a follow-up patch to insantiate an EHCI bus with companion support. Reviewed-by: Gerd Hoffmann Signed-off-by: Guenter Roeck Tested-by: Niek Linnenbank Message-id: 20200217204812.9857-3-li...@roeck-us.net Signed-off-by: Peter Maydell --- hw/usb/

[PULL 46/52] target/arm: Set MVFR0.FPSP for ARMv5 cpus

2020-02-21 Thread Peter Maydell
From: Richard Henderson We are going to convert FEATURE tests to ISAR tests, so FPSP needs to be set for these cpus, like we have already for FPDP. Signed-off-by: Richard Henderson Message-id: 20200214181547.21408-5-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter M

[PULL 2/6] tools/virtiofsd/passthrough_ll: Remove unneeded variable assignment

2020-02-21 Thread Dr. David Alan Gilbert (git)
From: Philippe Mathieu-Daudé Fix warning reported by Clang static code analyzer: CC tools/virtiofsd/passthrough_ll.o tools/virtiofsd/passthrough_ll.c:1083:5: warning: Value stored to 'saverr' is never read saverr = ENOMEM; ^~~ Fixes: 7c6b66027 Reported-by: Cl

[PULL 37/52] arm: allwinner: Wire up USB ports

2020-02-21 Thread Peter Maydell
From: Guenter Roeck Instantiate EHCI and OHCI controllers on Allwinner A10. OHCI ports are modeled as companions of the respective EHCI ports. With this patch applied, USB controllers are discovered and instantiated when booting the cubieboard machine with a recent Linux kernel. ehci-platform 1

[PULL 4/6] tools/virtiofsd/fuse_lowlevel: Fix fuse_out_header::error value

2020-02-21 Thread Dr. David Alan Gilbert (git)
From: Philippe Mathieu-Daudé Fix warning reported by Clang static code analyzer: CC tools/virtiofsd/fuse_lowlevel.o tools/virtiofsd/fuse_lowlevel.c:195:9: warning: Value stored to 'error' is never read error = -ERANGE; ^ ~~~ Fixes: 3db2876 Reported-by:

[PATCH 1/3] hw/dma/sparc32_dma: Make espdma_memory_[read/write] static

2020-02-21 Thread Philippe Mathieu-Daudé
No code use the espdma_memory_[read/write] functions outside of hw/dma/sparc32_dma.c, make them static. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sparc/sparc32_dma.h | 2 -- hw/dma/sparc32_dma.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/include

[PULL 40/52] target/arm: Convert PMULL.64 to gvec

2020-02-21 Thread Peter Maydell
From: Richard Henderson The gvec form will be needed for implementing SVE2. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-id: 20200216214232.4230-4-richard.hender...@linaro.org Signed-off-by: Peter Maydell --- target/arm/helper.h| 4 +---

[PULL 47/52] target/arm: Add isar_feature_aa32_simd_r16

2020-02-21 Thread Peter Maydell
From: Richard Henderson Use this in the places that were checking ARM_FEATURE_VFP, and are obviously testing for the existance of the register set as opposed to testing for some particular instruction extension. Signed-off-by: Richard Henderson Message-id: 20200214181547.21408-6-richard.hender.

[PULL 51/52] target/arm: Replace ARM_FEATURE_VFP3 checks with fp{sp, dp}_v3

2020-02-21 Thread Peter Maydell
From: Richard Henderson Sort this check to the start of a trans_* function. Merge this with any existing test for fpdp_v2. Signed-off-by: Richard Henderson Message-id: 20200214181547.21408-10-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/

[PATCH 3/3] hw/net/pcnet: Let phys_mem_read/write take void pointer and boolean

2020-02-21 Thread Philippe Mathieu-Daudé
Both PCNetState::phys_mem_read/write handlers end calling dma_memory_read/write, which both take void pointers (since introduced in commit d86a77f8). The PCNetState phys_mem_read/write handlers can take a void pointer too. As the length is always a sizeof(), use a size_t type. The 'do_bswap' is use

[PULL 42/52] xilinx_spips: Correct the number of dummy cycles for the FAST_READ_4 cmd

2020-02-21 Thread Peter Maydell
From: Francisco Iglesias Correct the number of dummy cycles required by the FAST_READ_4 command (to be eight, one dummy byte). Fixes: ef06ca3946 ("xilinx_spips: Add support for RX discard and RX drain") Suggested-by: Cédric Le Goater Signed-off-by: Francisco Iglesias Reviewed-by: Edgar E. Igle

[PULL 5/6] virtiofsd: Remove fuse.h and struct fuse_module

2020-02-21 Thread Dr. David Alan Gilbert (git)
From: Xiao Yang All code in fuse.h and struct fuse_module are not used by virtiofsd so removing them is safe. Signed-off-by: Xiao Yang Reviewed-by: Stefan Hajnoczi Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/fuse.h | 1229 -

[PULL 41/52] target/arm: Convert PMULL.8 to gvec

2020-02-21 Thread Peter Maydell
From: Richard Henderson We still need two different helpers, since NEON and SVE2 get the inputs from different locations within the source vector. However, we can convert both to the same internal form for computation. The sve2 helper is not used yet, but adding it with this patch helps illustr

[PULL 1/6] virtiofsd: Help message fix for 'seconds'

2020-02-21 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" second should be seconds. Reported-by: Christophe de Dinechin Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/virtiofsd/helper.c b/tools/virtiofsd/helper.c index 0801cf7

Re: [PATCH 1/3] hw/dma/sparc32_dma: Make espdma_memory_[read/write] static

2020-02-21 Thread Peter Maydell
On Fri, 21 Feb 2020 at 13:25, Philippe Mathieu-Daudé wrote: > > No code use the espdma_memory_[read/write] functions outside > of hw/dma/sparc32_dma.c, make them static. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell thanks -- PMM

[PULL 44/52] target/arm: Rename isar_feature_aa32_simd_r32

2020-02-21 Thread Peter Maydell
From: Richard Henderson The old name, isar_feature_aa32_fp_d32, does not reflect the MVFR0 field name, SIMDReg. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20200214181547.21408-3-richard.hender...@linaro.org Reviewed-by: Peter Maydell [PMM: wrapped one lon

[PULL 3/6] tools/virtiofsd/passthrough_ll: Remove unneeded variable assignment

2020-02-21 Thread Dr. David Alan Gilbert (git)
From: Philippe Mathieu-Daudé Fix warning reported by Clang static code analyzer: CC tools/virtiofsd/passthrough_ll.o tools/virtiofsd/passthrough_ll.c:925:9: warning: Value stored to 'newfd' is never read newfd = -1; ^ ~~ tools/virtiofsd/passthrough_ll.c:94

[PATCH 0/3] hw: More dma_memory_read/write() API cleanup

2020-02-21 Thread Philippe Mathieu-Daudé
Following up "global exec/memory/dma APIs cleanup" https://www.mail-archive.com/qemu-devel@nongnu.org/msg681475.html Few more cleanups in PCNET & SCSI ESP devices. Philippe Mathieu-Daudé (3): hw/dma/sparc32_dma: Make espdma_memory_[read/write] static hw/scsi/esp: Let ESPDMAMemoryReadWriteFunc

[PULL 49/52] target/arm: Add isar_feature_aa32_{fpsp_v2, fpsp_v3, fpdp_v3}

2020-02-21 Thread Peter Maydell
From: Richard Henderson We will shortly use these to test for VFPv2 and VFPv3 in different situations. Signed-off-by: Richard Henderson Message-id: 20200214181547.21408-8-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/cpu.h | 18 ++

Re: [PATCH] aio-posix: avoid reacquiring rcu_read_lock() when polling

2020-02-21 Thread Stefan Hajnoczi
On Tue, Feb 18, 2020 at 06:27:08PM +, Stefan Hajnoczi wrote: > The first rcu_read_lock/unlock() is expensive. Nested calls are cheap. > > This optimization increases IOPS from 73k to 162k with a Linux guest > that has 2 virtio-blk,num-queues=1 and 99 virtio-blk,num-queues=32 > devices. > > S

[PATCH 2/3] hw/scsi/esp: Let ESPDMAMemoryReadWriteFunc take void pointer and size_t

2020-02-21 Thread Philippe Mathieu-Daudé
The ESPDMAMemoryReadWriteFunc handlers end calling dma_memory_read/write, which both take void pointers (since introduced in commit d86a77f8). The ESPDMAMemoryReadWriteFunc handlers can take a void pointer too. All calls to these handlers in hw/scsi/esp.c use an unsigned length. Use size_t type.

[PULL 48/52] target/arm: Rename isar_feature_aa32_fpdp_v2

2020-02-21 Thread Peter Maydell
From: Richard Henderson The old name, isar_feature_aa32_fpdp, does not reflect that the test includes VFPv2. We will introduce further feature tests for VFPv3. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-id: 20200214181547.21408-7-richard.hender...@linaro.org

Re: [RFC PATCH v3 14/27] qcow2: Add subcluster support to calculate_l2_meta()

2020-02-21 Thread Max Reitz
On 22.12.19 12:36, Alberto Garcia wrote: > If an image has subclusters then there are more copy-on-write > scenarios that we need to consider. Let's say we have a write request > from the middle of subcluster #3 until the end of the cluster: > >- If the cluster is new, then subclusters #0 to #

[PULL 50/52] target/arm: Perform fpdp_v2 check first

2020-02-21 Thread Peter Maydell
From: Richard Henderson Shuffle the order of the checks so that we test the ISA before we test anything else, such as the register arguments. Signed-off-by: Richard Henderson Message-id: 20200214181547.21408-9-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell

Re: [PATCH v2 00/20] linux-user: generate syscall_nr.sh

2020-02-21 Thread Peter Maydell
On Wed, 19 Feb 2020 at 22:07, Laurent Vivier wrote: > > This series copies the files syscall.tbl from linux v5.5 and generates > the file syscall_nr.h from them. > > This is done for all the QEMU targets that have a syscall.tbl > in the linux source tree: mips, mips64, i386, x86_64, sparc, s390x,

[PULL 52/52] target/arm: Add missing checks for fpsp_v2

2020-02-21 Thread Peter Maydell
From: Richard Henderson We will eventually remove the early ARM_FEATURE_VFP test, so add a proper test for each trans_* that does not already have another ISA test. Signed-off-by: Richard Henderson Message-id: 20200214181547.21408-11-richard.hender...@linaro.org Reviewed-by: Peter Maydell Sign

Re: [PATCH v1] block/nvme: introduce PMR support from NVMe 1.4 spec

2020-02-21 Thread Stefan Hajnoczi
On Tue, Feb 18, 2020 at 03:48:11PM -0700, Andrzej Jakowski wrote: > This patch introduces support for PMR that has been defined as part of NVMe > 1.4 > spec. User can now specify a pmr_file which will be mmap'ed into qemu address > space and subsequently in PCI BAR 2. Guest OS can perform mmio rea

Re: [PATCH] util/async: make bh_aio_poll() O(1)

2020-02-21 Thread Stefan Hajnoczi
On Wed, Feb 19, 2020 at 08:05:12PM +0100, Paolo Bonzini wrote: > Il mer 19 feb 2020, 18:58 Stefan Hajnoczi ha scritto: > > > On Wed, Feb 19, 2020 at 12:09:48PM +0100, Paolo Bonzini wrote: > > > Really a great idea, though I have some remarks on the implementation > > below. > > > > > > On 19/02/2

Re: [RFC PATCH v3 07/27] qcow2: Add subcluster-related fields to BDRVQcow2State

2020-02-21 Thread Alberto Garcia
On Thu 20 Feb 2020 05:48:25 PM CET, Eric Blake wrote: >>> The qcow2 spec changes earlier in the series made it sound like your >>> choices are exactly 1 or 32, >> +#define QCOW_MAX_SUBCLUSTERS_PER_CLUSTER 32 + >>> >>> ...but this name sounds like other values (2, 4, 8, 16) might be >>> p

[Bug 1863601] Re: unable to type "|" character in french keyboard.

2020-02-21 Thread Laurent Vivier
Check you have selected the french keymap in virt-manager (see attached picture) ** Attachment added: "keymap.png" https://bugs.launchpad.net/qemu/+bug/1863601/+attachment/5330070/+files/keymap.png -- You received this bug notification because you are a member of qemu- devel-ml, which is sub

Re: Race condition in overlayed qcow2?

2020-02-21 Thread Vladimir Sementsov-Ogievskiy
21.02.2020 15:35, dovgaluk wrote: Vladimir Sementsov-Ogievskiy писал 2020-02-21 13:09: 21.02.2020 12:49, dovgaluk wrote: Vladimir Sementsov-Ogievskiy писал 2020-02-20 12:36: 1 or 2 are ok, and 4 or 8 lead to the failures. That is strange. I could think, that it was caused by the bugs in dete

[PULL 0/6] virtiofs queue

2020-02-21 Thread Dr. David Alan Gilbert (git)
ository at: https://gitlab.com/dagrh/qemu.git tags/pull-virtiofs-20200221 for you to fetch changes up to 5bb8e8beedb47fc0d0a44957a154918c4f4afc80: docs: Fix virtiofsd.1 location (2020-02-21 13:05:27 +) ---- virtiofs pull 20200221 M

Re: [PATCH] rcu_queue: add QSLIST functions

2020-02-21 Thread Stefan Hajnoczi
On Thu, Feb 20, 2020 at 11:38:28AM +0100, Paolo Bonzini wrote: > QSLIST is the only family of lists for which we do not have RCU-friendly > accessors, > add them. > > Signed-off-by: Paolo Bonzini > --- > include/qemu/queue.h | 15 +++-- > include/qemu/rcu_queue.h | 47 ++

[PULL 6/6] docs: Fix virtiofsd.1 location

2020-02-21 Thread Dr. David Alan Gilbert (git)
From: Miroslav Rezanina Patch 6a7e2bbee5 docs: add virtiofsd(1) man page introduced new man page virtiofsd.1. Unfortunately, wrong file location is used as source for install command. This cause installation of docs fail. Fixing wrong location so installation is successful. Signed-off-by: Miros

Re: [PATCH] qdev-monitor: Forbid repeated device_del

2020-02-21 Thread Stefan Hajnoczi
On Thu, Feb 20, 2020 at 05:55:56PM +0100, Julia Suvorova wrote: > Device unplug can be done asynchronously. Thus, sending the second > device_del before the previous unplug is complete may lead to > unexpected results. On PCIe devices, this cancels the hot-unplug > process. > > Signed-off-by: Juli

Re: [PATCH v3] util/async: make bh_aio_poll() O(1)

2020-02-21 Thread Stefan Hajnoczi
On Fri, Feb 21, 2020 at 09:39:51AM +, Stefan Hajnoczi wrote: > The ctx->first_bh list contains all created BHs, including those that > are not scheduled. The list is iterated by the event loop and therefore > has O(n) time complexity with respected to the number of created BHs. > > Rewrite BH

Re: [PATCH v10 01/22] softmmu: move vl.c to softmmu/

2020-02-21 Thread Stefan Hajnoczi
On Wed, Feb 19, 2020 at 11:10:57PM -0500, Alexander Bulekov wrote: > Move vl.c to a separate directory, similar to linux-user/ > Update the chechpatch and get_maintainer scripts, since they relied on > /vl.c for top_of_tree checks. > > Signed-off-by: Alexander Bulekov > --- > MAINTAINERS

Re: [PATCH v2 00/20] linux-user: generate syscall_nr.sh

2020-02-21 Thread Peter Maydell
On Fri, 21 Feb 2020 at 13:45, Peter Maydell wrote: > > On Wed, 19 Feb 2020 at 22:07, Laurent Vivier wrote: > > > > This series copies the files syscall.tbl from linux v5.5 and generates > > the file syscall_nr.h from them. > > > > This is done for all the QEMU targets that have a syscall.tbl > >

Re: [PATCH v10 21/22] fuzz: add virtio-scsi fuzz target

2020-02-21 Thread Stefan Hajnoczi
On Wed, Feb 19, 2020 at 11:11:17PM -0500, Alexander Bulekov wrote: > The virtio-scsi fuzz target sets up and fuzzes the available virtio-scsi > queues. After an element is placed on a queue, the fuzzer can select > whether to perform a kick, or continue adding elements. > > Signed-off-by: Alexande

Re: [RFC PATCH v3 10/27] qcow2: Update get/set_l2_entry() and add get/set_l2_bitmap()

2020-02-21 Thread Alberto Garcia
On Thu 20 Feb 2020 05:27:28 PM CET, Max Reitz wrote: >> +static inline uint64_t get_l2_bitmap(BDRVQcow2State *s, uint64_t *l2_slice, >> + int idx) >> +{ >> +if (has_subclusters(s)) { >> +idx *= l2_entry_size(s) / sizeof(uint64_t); >> +return b

Re: [PATCH] qdev-monitor: Forbid repeated device_del

2020-02-21 Thread Paolo Bonzini
On 21/02/20 14:53, Stefan Hajnoczi wrote: > On Thu, Feb 20, 2020 at 05:55:56PM +0100, Julia Suvorova wrote: >> Device unplug can be done asynchronously. Thus, sending the second >> device_del before the previous unplug is complete may lead to >> unexpected results. On PCIe devices, this cancels the

Re: [PATCH v24 09/10] target-arm: kvm64: handle SIGBUS signal from kernel or KVM

2020-02-21 Thread Peter Maydell
On Mon, 17 Feb 2020 at 13:10, Dongjiu Geng wrote: > > Add a SIGBUS signal handler. In this handler, it checks the SIGBUS type, > translates the host VA delivered by host to guest PA, then fills this PA > to guest APEI GHES memory, then notifies guest according to the SIGBUS > type. > > When guest

Re: [PATCH v24 01/10] acpi: nvdimm: change NVDIMM_UUID_LE to a common macro

2020-02-21 Thread Peter Maydell
On Mon, 17 Feb 2020 at 13:10, Dongjiu Geng wrote: > > The little end UUID is used in many places, so make > NVDIMM_UUID_LE to a common macro to convert the UUID > to a little end array. > > Signed-off-by: Dongjiu Geng > Reviewed-by: Xiang Zheng > --- > hw/acpi/nvdimm.c| 8 ++-- > includ

Re: [PATCH] target: i386: Check float overflow about register stack

2020-02-21 Thread Chen Gang
On 2020/2/21 下午4:58, Paolo Bonzini wrote: > On 21/02/20 04:45, cheng...@emindsoft.com.cn wrote: >> static inline void fpush(CPUX86State *env) >> { >> -env->fpstt = (env->fpstt - 1) & 7; >> -env->fptags[env->fpstt] = 0; /* validate stack entry */ >> +set_fpstt(env, env->fpstt - 1, fals

Re: [PATCH v24 00/10] Add ARMv8 RAS virtualization support in QEMU

2020-02-21 Thread Peter Maydell
On Mon, 17 Feb 2020 at 13:10, Dongjiu Geng wrote: > > In the ARMv8 platform, the CPU error types includes synchronous external > abort(SEA) and SError Interrupt (SEI). If exception happens in guest, host > does not know the detailed information of guest, so it is expected that guest > can do th

[Bug 1863601] Re: unable to type "|" character in french keyboard.

2020-02-21 Thread Daniel Berrange
Actually you explicitly do *NOT* want to select any keymap in virt- manager in general. Picking a keymap disables the VNC protocol extension for raw scancodes. This means that QEMU has to do keymap <-> scancode conversion. In such a setup the host OS desktop keymap, the QEMU keymap and the guest OS

Re: [PULL 00/52] target-arm queue

2020-02-21 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200221130740.7583-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PULL 00/52] target-arm queue Message-id: 20200221130740.7583-1-peter.mayd...@linaro.org Type: series

Re: [PULL 00/18] Block patches

2020-02-21 Thread Peter Maydell
On Thu, 20 Feb 2020 at 16:07, Max Reitz wrote: > > The following changes since commit 672f9d0df10a68a5c5f2b32cbc8284abf9f5ee18: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2020-02-18 14:23:43 +) > > are available in the Git repository at: > > https:/

Re: [RFC PATCH v3 15/27] qcow2: Add subcluster support to qcow2_get_cluster_offset()

2020-02-21 Thread Max Reitz
On 22.12.19 12:36, Alberto Garcia wrote: > The logic of this function remains pretty much the same, except that > it uses count_contiguous_subclusters(), which combines the logic of > count_contiguous_clusters() / count_contiguous_clusters_unallocated() > and checks individual subclusters. > > Sig

[Bug 1863601] Re: unable to type "|" character in french keyboard.

2020-02-21 Thread Laurent Vivier
Yes, it works without selecting a keyboard on my machine with a french keyboard. But perhaps Aditya has explicitly selected another keyboard than "fr" or "Auto"? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.

Re: [PATCH v16 09/10] hw/arm/virt: Add the virtio-iommu device tree mappings

2020-02-21 Thread Peter Maydell
On Fri, 14 Feb 2020 at 13:29, Eric Auger wrote: > > Adds the "virtio,pci-iommu" node in the host bridge node and > the RID mapping, excluding the IOMMU RID. > > This is done in the virtio-iommu-pci hotplug handler which > gets called only if no firmware is loaded or if -no-acpi is > passed on the

Re: [PATCH v16 10/10] MAINTAINERS: add virtio-iommu related files

2020-02-21 Thread Peter Maydell
On Fri, 14 Feb 2020 at 13:29, Eric Auger wrote: > > Add a new "virtio-iommu" section with the new files > related to this device. > > Signed-off-by: Eric Auger > --- > MAINTAINERS | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index c7717df720..b7a7a18

Re: [PATCH v16 00/10] VIRTIO-IOMMU device

2020-02-21 Thread Peter Maydell
On Fri, 14 Feb 2020 at 13:28, Eric Auger wrote: > > This series implements the QEMU virtio-iommu device. > > This matches the v0.12 spec (voted) and the corresponding > virtio-iommu driver upstreamed in 5.3. All kernel dependencies > are resolved for DT integration. The virtio-iommu can be > insta

Re: [PATCH v2 00/20] linux-user: generate syscall_nr.sh

2020-02-21 Thread Laurent Vivier
Le 21/02/2020 à 14:45, Peter Maydell a écrit : > On Wed, 19 Feb 2020 at 22:07, Laurent Vivier wrote: >> >> This series copies the files syscall.tbl from linux v5.5 and generates >> the file syscall_nr.h from them. >> >> This is done for all the QEMU targets that have a syscall.tbl >> in the linux

Re: [RFC PATCH v3 16/27] qcow2: Add subcluster support to zero_in_l2_slice()

2020-02-21 Thread Max Reitz
On 22.12.19 12:36, Alberto Garcia wrote: > Setting the QCOW_OFLAG_ZERO bit of the L2 entry is forbidden if an > image has subclusters. Instead, the individual 'all zeroes' bits must > be used. > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cluster.c | 14 ++ > 1 file changed,

Re: [PATCH v2 00/20] linux-user: generate syscall_nr.sh

2020-02-21 Thread Laurent Vivier
Le 21/02/2020 à 14:56, Peter Maydell a écrit : > On Fri, 21 Feb 2020 at 13:45, Peter Maydell wrote: >> >> On Wed, 19 Feb 2020 at 22:07, Laurent Vivier wrote: >>> >>> This series copies the files syscall.tbl from linux v5.5 and generates >>> the file syscall_nr.h from them. >>> >>> This is done fo

Re: [PATCH 5/5] aio-posix: make AioHandler dispatch O(1) with epoll

2020-02-21 Thread Stefan Hajnoczi
On Fri, Feb 21, 2020 at 02:06:26PM +0100, Paolo Bonzini wrote: > On 21/02/20 13:59, Stefan Hajnoczi wrote: > > 1. It doesn't crash if the node is currently not on a list. > > 2. It clears the node's linked list pointers so that future linked > >list operations (like QLIST_SAFE_REMOVE()) aren't

Re: [RFC PATCH v3 17/27] qcow2: Add subcluster support to discard_in_l2_slice()

2020-02-21 Thread Max Reitz
On 22.12.19 12:36, Alberto Garcia wrote: > Setting the QCOW_OFLAG_ZERO bit of the L2 entry is forbidden if an > image has subclusters. Instead, the individual 'all zeroes' bits must > be used. > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cluster.c | 6 +- > 1 file changed, 5 inserti

Re: [PATCH 5/5] aio-posix: make AioHandler dispatch O(1) with epoll

2020-02-21 Thread Stefan Hajnoczi
On Fri, Feb 21, 2020 at 02:06:26PM +0100, Paolo Bonzini wrote: > On 21/02/20 13:59, Stefan Hajnoczi wrote: > > /* Add a handler to a ready list */ > > static void add_ready_handler(AioHandlerList *ready_list, > > AioHandler *node, > >

Re: [RFC PATCH v3 18/27] qcow2: Add subcluster support to check_refcounts_l2()

2020-02-21 Thread Max Reitz
On 22.12.19 12:36, Alberto Garcia wrote: > Setting the QCOW_OFLAG_ZERO bit of the L2 entry is forbidden if an > image has subclusters. Instead, the individual 'all zeroes' bits must > be used. > > Signed-off-by: Alberto Garcia > --- > block/qcow2-refcount.c | 9 +++-- > 1 file changed, 7 ins

Re: [RFC PATCH v3 19/27] qcow2: Add subcluster support to expand_zero_clusters_in_l1()

2020-02-21 Thread Max Reitz
On 22.12.19 12:37, Alberto Garcia wrote: > Two changes are needed in order to add subcluster support to this > function: deallocated clusters must have their bitmaps cleared, and > expanded clusters must have all the "subcluster allocated" bits set. Not really, to have real subcluster support it w

Re: [RFC PATCH v3 20/27] qcow2: Fix offset calculation in handle_dependencies()

2020-02-21 Thread Max Reitz
On 22.12.19 12:37, Alberto Garcia wrote: > l2meta_cow_start() and l2meta_cow_end() are not necessarily > cluster-aligned if the image has subclusters, so update the > calculation of old_start and old_end to guarantee that no two requests > try to write on the same cluster. > > Signed-off-by: Alber

Re: [PATCH 5/5] aio-posix: make AioHandler dispatch O(1) with epoll

2020-02-21 Thread Paolo Bonzini
On 21/02/20 15:47, Stefan Hajnoczi wrote: >>> QLIST_SAFE_REMOVE(node, node_ready); /* remove from nested parent's >>> list */ >>> ^ would cause corruption if node->node_ready was stale! >>> >>> Would you like me to add a comment? >> No, it's okay. > Are you happy with this series?

Re: [RFC PATCH v3 12/27] qcow2: Replace QCOW2_CLUSTER_* with QCOW2_SUBCLUSTER_*

2020-02-21 Thread Alberto Garcia
On Fri 21 Feb 2020 12:35:55 PM CET, Max Reitz wrote: >> @@ -2223,22 +2227,23 @@ static coroutine_fn int >> qcow2_co_preadv_part(BlockDriverState *bs, >> } >> >> qemu_co_mutex_lock(&s->lock); >> -ret = qcow2_get_cluster_offset(bs, offset, &cur_bytes, >> &cluster_offset)

Re: [PATCH v1 05/13] migrate/ram: Handle RAM block resizes during precopy

2020-02-21 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > Resizing while migrating is dangerous and does not work as expected. > The whole migration code works on the usable_length of ram blocks and does > not expect this to change at random points in time. > > In the case of precopy, the ram block size mus

Re: [PATCH v3 1/2] docs: Convert qemu-cpu-models.texi to rST

2020-02-21 Thread Peter Maydell
On Thu, 20 Feb 2020 at 14:20, Kashyap Chamarthy wrote: > > This doc was originally written by Daniel P. Berrangé > , introduced via commit[1]: 2544e9e4aa (docs: add > guidance on configuring CPU models for x86, 2018-06-27). > > In this patch: > > - 1-1 conversion of Texinfo to rST, besides a cou

Re: [PATCH v10 00/22] Add virtual device fuzzing support

2020-02-21 Thread Stefan Hajnoczi
On Wed, Feb 19, 2020 at 11:10:56PM -0500, Alexander Bulekov wrote: > Hello, > > This series adds a framework for coverage-guided fuzzing of > virtual-devices. Fuzzing targets are based on qtest and can make use of > libqos. Fuzzing can help discover device bugs, such as > assertion-failures, timeo

Re: [PATCH v1 05/13] migrate/ram: Handle RAM block resizes during precopy

2020-02-21 Thread David Hildenbrand
On 21.02.20 16:14, Dr. David Alan Gilbert wrote: > * David Hildenbrand (da...@redhat.com) wrote: >> Resizing while migrating is dangerous and does not work as expected. >> The whole migration code works on the usable_length of ram blocks and does >> not expect this to change at random points in tim

Re: [PULL 00/20] ppc-for-5.0 queue 20200221

2020-02-21 Thread Peter Maydell
> > are available in the Git repository at: > > git://github.com/dgibson/qemu.git tags/ppc-for-5.0-20200221 > > for you to fetch changes up to 438bafcac55308eef4f9029c94dbadd2c7ac3bb7: > > hw/ppc/virtex_ml507:fix lea

Re: [PATCH 0/5] aio-posix: towards an O(1) event loop

2020-02-21 Thread Stefan Hajnoczi
On Fri, Feb 14, 2020 at 05:17:07PM +, Stefan Hajnoczi wrote: > This patch series makes AioHandler deletion and dispatch O(1) with respect to > the total number of registered handlers. The event loop has scalability > problems when many AioHandlers are registered because it is O(n). Linux > ep

Re: [PATCH 5/5] aio-posix: make AioHandler dispatch O(1) with epoll

2020-02-21 Thread Stefan Hajnoczi
On Fri, Feb 21, 2020 at 04:04:10PM +0100, Paolo Bonzini wrote: > On 21/02/20 15:47, Stefan Hajnoczi wrote: > >>> QLIST_SAFE_REMOVE(node, node_ready); /* remove from nested parent's > >>> list */ > >>> ^ would cause corruption if node->node_ready was stale! > >>> > >>> Would you lik

Re: [PATCH v2 1/3] arm_gic: Mask the un-supported priority bits

2020-02-21 Thread Peter Maydell
On Fri, 21 Feb 2020 at 07:46, Sai Pavan Boddu wrote: > > Priority bits implemented in arm-gic can be 8 to 4, un-implemented bits > are read as zeros(RAZ). > > Signed-off-by: Sai Pavan Boddu > --- > hw/intc/arm_gic.c| 26 -- > hw/intc/arm_gic_common.c

Re: [PATCH v2 2/3] cpu/a9mpcore: Set number of GIC priority bits to 5

2020-02-21 Thread Peter Maydell
On Fri, 21 Feb 2020 at 07:46, Sai Pavan Boddu wrote: > > All A9 CPUs have a GIC with 5 bits of priority. > > Signed-off-by: Sai Pavan Boddu > Suggested-by: Peter Maydell > --- > hw/cpu/a9mpcore.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/hw/cpu/a9mpcore.c b/hw/cpu/a9mpcore.c

Re: [PATCH v3 1/2] docs: Convert qemu-cpu-models.texi to rST

2020-02-21 Thread Daniel P . Berrangé
On Fri, Feb 21, 2020 at 03:16:29PM +, Peter Maydell wrote: > On Thu, 20 Feb 2020 at 14:20, Kashyap Chamarthy wrote: > > > > This doc was originally written by Daniel P. Berrangé > > , introduced via commit[1]: 2544e9e4aa (docs: add > > guidance on configuring CPU models for x86, 2018-06-27). >

Re: [PATCH rc4 06/29] target/avr: Add defintions of AVR core types

2020-02-21 Thread Aleksandar Markovic
On Fri, Feb 21, 2020 at 12:04 PM Michael Rolnik wrote: > > Hi all. > > How is it going? > > Regards, > Michael. > Michael, I think we are very close to merging. There is absolutely no need to support ALL AVR mcus or AVR core types in the first version that will be merged. But this issue (recen

Re: [PATCH v2 3/3] cpu/arm11mpcore: Set number of GIC priority bits to 4

2020-02-21 Thread Peter Maydell
On Fri, 21 Feb 2020 at 07:46, Sai Pavan Boddu wrote: > > ARM11MPCore GIC is implemented with 4 priority bits. > > Signed-off-by: Sai Pavan Boddu > Suggested-by: Peter Maydell > --- > hw/cpu/arm11mpcore.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/hw/cpu/arm11mpcore.c b/hw/cpu

Re: [PATCH v3 1/2] docs: Convert qemu-cpu-models.texi to rST

2020-02-21 Thread Peter Maydell
On Fri, 21 Feb 2020 at 15:31, Daniel P. Berrangé wrote: > > On Fri, Feb 21, 2020 at 03:16:29PM +, Peter Maydell wrote: > > On Thu, 20 Feb 2020 at 14:20, Kashyap Chamarthy wrote: > > > diff --git a/docs/system/conf.py b/docs/system/conf.py > > > index 7ca115f5e0..7cc9da9508 100644 > > > --- a/

Re: [PATCH v1] block/nvme: introduce PMR support from NVMe 1.4 spec

2020-02-21 Thread Andrzej Jakowski
On 2/21/20 6:45 AM, Stefan Hajnoczi wrote: > Why is msync(2) done on memory loads instead of stores? This is my interpretation of NVMe spec wording with regards to PMRWBM field which says: "The completion of a memory read from any Persistent Memory Region address ensures that all prior writes to

Re: [PATCH 5/5] aio-posix: make AioHandler dispatch O(1) with epoll

2020-02-21 Thread Paolo Bonzini
On 21/02/20 16:29, Stefan Hajnoczi wrote: >> Yes. Let's keep the Q*_REMOVE cleanup on the todo list. I'd keep >> Q*_SAFE_REMOVE, but clear the pointer unconditionally in Q*_REMOVE so >> that we can have something like Q*_IN_LIST too. > QLIST_IS_INSERTED() is part of this patch series, although I

Re: [PATCH v1 05/13] migrate/ram: Handle RAM block resizes during precopy

2020-02-21 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > On 21.02.20 16:14, Dr. David Alan Gilbert wrote: > > * David Hildenbrand (da...@redhat.com) wrote: > >> Resizing while migrating is dangerous and does not work as expected. > >> The whole migration code works on the usable_length of ram blocks and doe

<    1   2   3   4   >