[PULL v2 0/8] Misc patches for QEMU 5.0-rc3

2020-04-13 Thread Paolo Bonzini
The following changes since commit 53ef8a92eb04ee19640f5aad3bff36cd4a36c250: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200406' into staging (2020-04-06 12:36:45 +0100) are available in the Git repository at: git://github.com/bonzini/qemu.git tags/for-upstream fo

Re: [PATCH for-5.0? 0/3] Make docs build work with Sphinx 3

2020-04-13 Thread Paolo Bonzini
On 11/04/20 20:29, Peter Maydell wrote: > > I've marked this up as 'for-5.0?' because I think it would be > nice if at least patch 1 went in. Patch 2 seems uncontroversial > (though I guess we should forward it up to the kernel folks > since kernel-doc is from them originally). Patch 3 is the > ex

[PATCH 0/15] KVM: MIPS: Add Loongson-3 support (Host Side)

2020-04-13 Thread Huacai Chen
We are preparing to add KVM support for Loongson-3. VZ extension is fully supported in Loongson-3A R4+, and we will not care about old CPUs (at least now). We already have a full functional Linux kernel (based on Linux-5.4.x LTS) and QEMU (based on 5.0.0-rc2) and their git repositories are here: Q

[PATCH 01/15] mips: define pud_index() regardless of page table folding

2020-04-13 Thread Huacai Chen
From: Mike Rapoport Commit 31168f033e37 ("mips: drop __pXd_offset() macros that duplicate pXd_index() ones") is correct that pud_index() & __pud_offset() are the same when pud_index() is actually provided, however it does not take into account the __PAGETABLE_PUD_FOLDED case. This has broken MIPS

[PATCH 04/15] KVM: MIPS: Increase KVM_MAX_VCPUS and KVM_USER_MEM_SLOTS to 16

2020-04-13 Thread Huacai Chen
Loongson-3 based machines can have as many as 16 CPUs, and so does memory slots, so increase KVM_MAX_VCPUS and KVM_USER_MEM_SLOTS to 16. Signed-off-by: Huacai Chen Co-developed-by: Jiaxun Yang --- arch/mips/include/asm/kvm_host.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -

qemu-devel@nongnu.org

2020-04-13 Thread Huacai Chen
From: Xing Li The code in decode_config4() of arch/mips/kernel/cpu-probe.c asid_mask = MIPS_ENTRYHI_ASID; if (config4 & MIPS_CONF4_AE) asid_mask |= MIPS_ENTRYHI_ASIDX; set_cpu_asid_mask(c, asid_mask); set asid_mask to cpuinfo->asid_mask. So in order to s

[PATCH 05/15] KVM: MIPS: Add EVENTFD support which is needed by VHOST

2020-04-13 Thread Huacai Chen
Add EVENTFD support for KVM/MIPS, which is needed by VHOST. Tested on Loongson-3 platform. Signed-off-by: Huacai Chen Co-developed-by: Jiaxun Yang --- arch/mips/kvm/Kconfig | 1 + arch/mips/kvm/Makefile| 2 +- arch/mips/kvm/trap_emul.c | 3 +++ arch/mips/kvm/vz.c| 3 +++ 4 files

[PATCH 06/15] KVM: MIPS: Use lddir/ldpte instructions to lookup gpa_mm.pgd

2020-04-13 Thread Huacai Chen
Loongson-3 can use lddir/ldpte instuctions to accelerate page table walking, so use them to lookup gpa_mm.pgd. Signed-off-by: Huacai Chen Co-developed-by: Jiaxun Yang --- arch/mips/kvm/entry.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/arch/mips/kvm/

[PATCH 07/15] KVM: MIPS: Introduce and use cpu_guest_has_ldpte

2020-04-13 Thread Huacai Chen
Loongson-3 has lddir/ldpte instructions and their related CP0 registers are the same as HTW. So we introduce a cpu_guest_has_ldpte flag and use it to indicate whether we need to save/restore HTW related CP0 registers (PWBase, PWSize, PWField and PWCtl). Signed-off-by: Huacai Chen Co-developed-by:

[PATCH 03/15] KVM: MIPS: Fix VPN2_MASK definition for variable cpu_vmbits

2020-04-13 Thread Huacai Chen
From: Xing Li If a CPU support more than 32bit vmbits (which is true for 64bit CPUs), VPN2_MASK set to fixed 0xe000 will lead to a wrong EntryHi in some functions such as _kvm_mips_host_tlb_inv(). The cpu_vmbits definition of 32bit CPU in cpu-features.h is 31, so we still use the old definit

[PATCH 08/15] KVM: MIPS: Use root tlb to control guest's CCA for Loongson-3

2020-04-13 Thread Huacai Chen
KVM guest has two levels of address translation: guest tlb translates GVA to GPA, and root tlb translates GPA to HPA. By default guest's CCA is controlled by guest tlb, but Loongson-3 maintains all cache coherency by hardware (including multi-core coherency and I/O DMA coherency) so it prefers all

[PATCH 09/15] KVM: MIPS: Let indexed cacheops cause guest exit on Loongson-3

2020-04-13 Thread Huacai Chen
Loongson-3's indexed cache operations need a node-id in the address, but in KVM guest the node-id may be incorrect. So, let indexed cache operations cause guest exit on Loongson-3. Signed-off-by: Huacai Chen Co-developed-by: Jiaxun Yang --- arch/mips/kvm/vz.c | 8 ++-- 1 file changed, 6 ins

[PATCH 10/15] KVM: MIPS: Add more types of virtual interrupts

2020-04-13 Thread Huacai Chen
In current implementation, MIPS KVM uses IP2, IP3, IP4 and IP7 for external interrupt, two kinds of IPIs and timer interrupt respectively, but Loongson-3 based machines prefer to use IP2, IP3, IP6 and IP7 for two kinds of external interrupts, IPI and timer interrupt. So we define two priority-irq m

[PATCH 11/15] KVM: MIPS: Add Loongson-3 Virtual IPI interrupt support

2020-04-13 Thread Huacai Chen
This patch add Loongson-3 Virtual IPI interrupt support in the kernel, because emulate it in QEMU is too expensive for performance. Signed-off-by: Huacai Chen Co-developed-by: Jiaxun Yang --- arch/mips/include/asm/kvm_host.h | 32 ++ arch/mips/kvm/Makefile | 3 + arch/mips/kvm/

[PATCH 12/15] KVM: MIPS: Add CPUCFG emulation for Loongson-3

2020-04-13 Thread Huacai Chen
Loongson-3 overrides lwc2 instructions to implement CPUCFG and CSR read/write functions. These instructions all cause guest exit so CSR doesn't benifit KVM guest (and there are always legacy methods to provide the same functions as CSR). So, we only emulate CPUCFG and let it return 0 (which means t

[PATCH 13/15] KVM: MIPS: Add CONFIG6 and DIAG registers emulation

2020-04-13 Thread Huacai Chen
Loongson-3 has CONFIG6 and DIAG registers which need to be emulate. CONFIG6 is mostly used to enable/disable FTLB and SFB, while DIAG is mostly used to flush BTB, ITLB, DTLB, VTLB and FTLB. Signed-off-by: Huacai Chen Co-developed-by: Jiaxun Yang --- arch/mips/include/asm/kvm_host.h | 5 a

[PATCH 14/15] KVM: MIPS: Add more MMIO load/store instructions emulation

2020-04-13 Thread Huacai Chen
This patch add more MMIO load/store instructions emulation, which can be observed in QXL and some other device drivers: 1, LWL, LWR, LDW, LDR, SWL, SWR, SDL and SDR for all MIPS; 2, GSLBX, GSLHX, GSLWX, GSLDX, GSSBX, GSSHX, GSSWX and GSSDX for Loongson-3. Signed-off-by: Huacai Chen Co-develop

[PATCH 15/15] KVM: MIPS: Enable KVM support for Loongson-3

2020-04-13 Thread Huacai Chen
This patch enable KVM support for Loongson-3 by selecting HAVE_KVM, but only enable KVM/VZ on Loongson-3A R4+ (because VZ of early processors are incomplete). Besides, Loongson-3 support SMP guests, so we clear the linked load bit of LLAddr in kvm_vz_vcpu_load() if the guest has more than one VCPUs

Re: [PATCH 0/15] KVM: MIPS: Add Loongson-3 support (Host Side)

2020-04-13 Thread Jiaxun Yang
On Mon, 13 Apr 2020 15:30:09 +0800 Huacai Chen wrote: > We are preparing to add KVM support for Loongson-3. VZ extension is > fully supported in Loongson-3A R4+, and we will not care about old > CPUs (at least now). We already have a full functional Linux kernel > (based on Linux-5.4.x LTS) and Q

[PATCH] hw/rdma: Destroy list mutex when list is destroyed

2020-04-13 Thread Yuval Shaia
List mutex should be destroyed when gs list gets destroyed. Reported-by: Peter Maydell Signed-off-by: Yuval Shaia --- hw/rdma/rdma_utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/rdma/rdma_utils.c b/hw/rdma/rdma_utils.c index 73f279104c..698ed4716c 100644 --- a/hw/rdma/rdma_utils

Re: [PATCH 0/15] KVM: MIPS: Add Loongson-3 support (Host Side)

2020-04-13 Thread Huacai Chen
Hi, Jiaxun, On Mon, Apr 13, 2020 at 4:19 PM Jiaxun Yang wrote: > > On Mon, 13 Apr 2020 15:30:09 +0800 > Huacai Chen wrote: > > > We are preparing to add KVM support for Loongson-3. VZ extension is > > fully supported in Loongson-3A R4+, and we will not care about old > > CPUs (at least now). We

Re: [PATCH] lockable: Replace locks with lock guard macros

2020-04-13 Thread Yuval Shaia
For the hw/rdma stuff: Reviewed-by: Yuval Shaia Tested-by: Yuval Shaia Thanks, Yuval On Wed, 1 Apr 2020 at 19:20, Simran Singhal wrote: > Replace manual lock()/unlock() calls with lock guard macros > (QEMU_LOCK_GUARD/WITH_QEMU_LOCK_GUARD). > > Signed-off-by: Simran Singhal > --- > hw/hyper

[PATCH 0/3] Some trivial fixes

2020-04-13 Thread Keqian Zhu
Hi all, This patch-set contains trivial bugfix and typo fix. Thanks, Keqian Keqian Zhu (3): bugfix: Use gicr_typer in arm_gicv3_icc_reset intc/gicv3_kvm: use kvm_gicc_access to get ICC_CTLR_EL1 Typo: Correct the name of CPU hotplug memory region hw/acpi/cpu.c | 2 +- hw/intc/ar

[PATCH 3/3] Typo: Correct the name of CPU hotplug memory region

2020-04-13 Thread Keqian Zhu
Replace "acpi-mem-hotplug" with "acpi-cpu-hotplug" Signed-off-by: Keqian Zhu --- hw/acpi/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index e2c957ce00..3d6a500fb7 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -222,7 +222,7 @@ void cp

[PATCH 2/3] intc/gicv3_kvm: use kvm_gicc_access to get ICC_CTLR_EL1

2020-04-13 Thread Keqian Zhu
Replace kvm_device_access with kvm_gicc_access to simplify code. Signed-off-by: Keqian Zhu --- hw/intc/arm_gicv3_kvm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/intc/arm_gicv3_kvm.c b/hw/intc/arm_gicv3_kvm.c index ca43bf87ca..85f6420498 100644 --- a/hw/intc/arm_

[PATCH 1/3] bugfix: Use gicr_typer in arm_gicv3_icc_reset

2020-04-13 Thread Keqian Zhu
The KVM_VGIC_ATTR macro expect the second parameter as gicr_typer, of which high 32bit is constructed by mp_affinity. For most case, the high 32bit of mp_affinity is zero, so it will always access the ICC_CTLR_EL1 of CPU0. Signed-off-by: Keqian Zhu --- hw/intc/arm_gicv3_kvm.c | 4 +--- 1 file ch

Re: [PATCH v2] lockable: Replace locks with lock guard macros

2020-04-13 Thread Yuval Shaia
On Thu, 2 Apr 2020 at 09:50, Simran Singhal wrote: > Replace manual lock()/unlock() calls with lock guard macros > (QEMU_LOCK_GUARD/WITH_QEMU_LOCK_GUARD). > > Signed-off-by: Simran Singhal > --- > Changes in v2: > -Drop changes in file hw/rdma/rdma_utils.c > So i guess we are expected t

Re: [PATCH 0/7] hw/sparc/leon3: Few fixes and disable HelenOS test

2020-04-13 Thread KONRAD Frederic
Le 4/11/20 à 7:30 PM, Philippe Mathieu-Daudé a écrit : On 3/31/20 12:50 PM, Philippe Mathieu-Daudé wrote: Philippe Mathieu-Daudé (7): hw/misc/grlib_ahb_apb_pnp: Avoid crash when writing to AHB PnP registers hw/misc/grlib_ahb_apb_pnp: Fix AHB PnP 8-bit accesses Ping ^^^ for 5.0?

[PATCH v3] migration/throttle: Add cpu-throttle-tailslow migration parameter

2020-04-13 Thread Keqian Zhu
At the tail stage of throttling, the Guest is very sensitive to CPU percentage while the @cpu-throttle-increment is excessive usually at tail stage. If this parameter is true, we will compute the ideal CPU percentage used by the Guest, which may exactly make the dirty rate match the dirty rate thr

Re: [PATCH] hw/pci/pcie: Forbid hot-plug via QMP if it's disabled on the slot

2020-04-13 Thread Michael S. Tsirkin
On Wed, Apr 08, 2020 at 12:51:20PM +0200, Igor Mammedov wrote: > On Tue, 7 Apr 2020 16:50:17 +0200 > Julia Suvorova wrote: > > > Raise an error when trying to hot-plug/unplug a device through QMP to a > > device > > with disabled hot-plug capability. This makes the device behaviour more > > con

Re: [PATCH-for-5.0 0/3] virtio, vhost-gpu: Release memory returned by malloc() with free()

2020-04-13 Thread Michael S. Tsirkin
On Mon, Mar 23, 2020 at 09:41:20AM -0400, Michael S. Tsirkin wrote: > On Mon, Mar 23, 2020 at 12:29:40PM +0100, Philippe Mathieu-Daudé wrote: > > Coverity reported a ALLOC_FREE_MISMATCH in vg_handle_cursor(), > > because the memory returned by vu_queue_pop() is allocated with > > malloc(). Fix it.

Re: [PATCH v4 10/30] qcow2: Add offset_to_sc_index()

2020-04-13 Thread Vladimir Sementsov-Ogievskiy
17.03.2020 21:16, Alberto Garcia wrote: For a given offset, return the subcluster number within its cluster (i.e. with 32 subclusters per cluster it returns a number between 0 and 31). Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best rega

Re: [PATCH v2] gdbstub: Fix segment fault for i386 target

2020-04-13 Thread Laurent Vivier
Le 13/04/2020 à 01:32, Changbin Du a écrit : > With GByteArray, we should pass the object itself but not to plus an offset. > > gdb log: > Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault. > __memmove_avx_unaligned_erms () at > ../sysdeps/x86_64/multiarch/memmove-vec-unalign

[PULL 0/4] pc: bugfixes, maintainers

2020-04-13 Thread Michael S. Tsirkin
The following changes since commit f3bac27cc1e303e1860cc55b9b6889ba39dee587: Update version for v5.0.0-rc2 release (2020-04-07 23:13:37 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for you to fetch changes up to ce4adc0b

[PULL 1/4] MAINTAINERS: Add myself as vhost-user-blk maintainer

2020-04-13 Thread Michael S. Tsirkin
From: Raphael Norwitz As suggested by Michael, let's add me as a maintainer of vhost-user-blk and vhost-user-scsi. CC: Michael S. Tsirkin CC Peter Maydell Signed-off-by: Raphael Norwitz Message-Id: <1585213047-20089-1-git-send-email-raphael.norw...@nutanix.com> Reviewed-by: Michael S. Tsirkin

[PULL 2/4] acpi: Use macro for table-loader file name

2020-04-13 Thread Michael S. Tsirkin
From: Shameer Kolothum Use macro for "etc/table-loader" and move it to the header file similar to ACPI_BUILD_TABLE_FILE/ACPI_BUILD_RSDP_FILE etc. Signed-off-by: Shameer Kolothum Reviewed-by: Igor Mammedov Message-Id: <20200403101827.30664-2-shameerali.kolothum.th...@huawei.com> Reviewed-by: Mi

[PULL 3/4] fw_cfg: Migrate ACPI table mr sizes separately

2020-04-13 Thread Michael S. Tsirkin
From: Shameer Kolothum Any sub-page size update to ACPI MRs will be lost during migration, as we use aligned size in ram_load_precopy() -> qemu_ram_resize() path. This will result in inconsistency in FWCfgEntry sizes between source and destination. In order to avoid this, save and restore them se

[PULL 4/4] exec: Fix for qemu_ram_resize() callback

2020-04-13 Thread Michael S. Tsirkin
From: David Hildenbrand Summarizing the issue: 1. Memory regions contain ram blocks with a different size, if the size is not properly aligned. While memory regions can have an unaligned size, ram blocks can't. This is true when creating resizable memory region with an unaligned size.

[RFC patch v1 0/3] qemu-file writing performance improving

2020-04-13 Thread Denis Plotnikov
Problem description: qcow2 internal snapshot saving time is too big on HDD ~ 25 sec When a qcow2 image is placed on a regular HDD and the image is openned with O_DIRECT the snapshot saving time is around 26 sec. The snapshot saving time can be 4 times sorter. The patch series propose the way to a

[RFC patch v1 3/3] migration/savevm: use qemu-file buffered mode for non-cached bdrv

2020-04-13 Thread Denis Plotnikov
This makes internal snapshots of HDD placed qcow2 images opened with O_DIRECT flag 4 times faster. The test: creates 500M internal snapshot for a cow2 image placed on HDD Result times: with the patch: ~6 sec without patch: ~24 sec This happens because the internal snapshot saving produce

[RFC patch v1 2/3] qemu-file: add buffered mode

2020-04-13 Thread Denis Plotnikov
The patch adds ability to qemu-file to write the data asynchronously to improve the performance on writing. Before, only synchronous writing was supported. Enabling of the asyncronous mode is managed by new "enabled_buffered" callback. Signed-off-by: Denis Plotnikov --- include/qemu/typedefs.h

[RFC patch v1 1/3] qemu-file: introduce current buffer

2020-04-13 Thread Denis Plotnikov
To approach async wrtiting in the further commits, the buffer allocated in QEMUFile struct is replaced with the link to the current buffer. We're going to use many buffers to write the qemu file stream to the unerlying storage asynchronously. The current buffer points out to the buffer is currently

Re: [PATCH 13/15] KVM: MIPS: Add CONFIG6 and DIAG registers emulation

2020-04-13 Thread Jiaxun Yang
On Mon, 13 Apr 2020 15:30:22 +0800 Huacai Chen wrote: > Loongson-3 has CONFIG6 and DIAG registers which need to be emulate. > CONFIG6 is mostly used to enable/disable FTLB and SFB, while DIAG is > mostly used to flush BTB, ITLB, DTLB, VTLB and FTLB. > > Signed-off-by: Huacai Chen > Co-developed

Re: [PULL for-5.0 0/1] tcg patch queue

2020-04-13 Thread Peter Maydell
On Sun, 12 Apr 2020 at 22:11, Richard Henderson wrote: > > The following changes since commit 17e1e49814096a3daaa8e5a73acd56a0f30bdc18: > > Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' > into staging (2020-04-09 19:00:41 +0100) > > are available in the Git repository

Re: [RFC patch v1 0/3] qemu-file writing performance improving

2020-04-13 Thread Denis V. Lunev
On 4/13/20 2:12 PM, Denis Plotnikov wrote: > Problem description: qcow2 internal snapshot saving time is too big on HDD ~ > 25 sec > > When a qcow2 image is placed on a regular HDD and the image is openned with > O_DIRECT the snapshot saving time is around 26 sec. > The snapshot saving time can be

Re: [PATCH v2 0/6] Automation of Coverity Scan uploads (via Docker)

2020-04-13 Thread Peter Maydell
What's your view on this series, Paolo? Personally I'd like to put it into master, because at least then we have something that we can do Coverity runs on, whereas AIUI at the moment we don't. But I'd rather not put it in after rc3, which is tomorrow... thanks -- PMM On Thu, 19 Mar 2020 at 19:33,

Re: [PATCH v18 0/4] qcow2: Implement zstd cluster compression method

2020-04-13 Thread Denis Plotnikov
Ping! Is there something to be fixed in the series? Thanks, Denis On 02.04.2020 09:36, Denis Plotnikov wrote: v18: * 04: add quotes to all file name variables [Vladimir] * 04: add Vladimir's comment according to "qemu-io write -s" option issue. v17: * 03: remove incorrect

Re: [PATCH v2 0/6] Automation of Coverity Scan uploads (via Docker)

2020-04-13 Thread Paolo Bonzini
Yes, go ahead. I would like to add a docker-coverity Makefile target but I can do that later. Il lun 13 apr 2020, 14:13 Peter Maydell ha scritto: > What's your view on this series, Paolo? Personally I'd like > to put it into master, because at least then we have something > that we can do Coveri

Re: colo: qemu 4.2.0 vs. qemu 5.0.0-rc2 performance regression

2020-04-13 Thread Lukas Straub
On Sat, 11 Apr 2020 19:16:54 +0200 Lukas Straub wrote: > Hello Everyone, > I did some Benchmarking with iperf3 and memtester (to dirty some guest memory) > of colo performance in qemu 4.2.0 and in qemu 5.0.0-rc2 > with my bugfixes on top.( > https://lists.nongnu.org/archive/html/qemu-devel/2020-

Re: [RFC patch v1 0/3] qemu-file writing performance improving

2020-04-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/1586776334-641239-1-git-send-email-dplotni...@virtuozzo.com/ Hi, This series failed the asan build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN ==

Re: [PULL v2 0/8] Misc patches for QEMU 5.0-rc3

2020-04-13 Thread Peter Maydell
On Mon, 13 Apr 2020 at 08:05, Paolo Bonzini wrote: > > The following changes since commit 53ef8a92eb04ee19640f5aad3bff36cd4a36c250: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20200406' into staging (2020-04-06 > 12:36:45 +0100) > > are available in the Git reposi

Re: [PATCH v2] gdbstub: Fix segment fault for i386 target

2020-04-13 Thread Alex Bennée
Changbin Du writes: > With GByteArray, we should pass the object itself but not to plus an offset. > > gdb log: > Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault. > __memmove_avx_unaligned_erms () at > ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:384 > 384

Re: [PATCH 09/31] target/arm: Implement SVE2 integer pairwise arithmetic

2020-04-13 Thread Laurent Desnogues
On Fri, Mar 27, 2020 at 12:16 AM Richard Henderson wrote: [...] > diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c > index 5d75aed7b7..d7c181ddb8 100644 > --- a/target/arm/sve_helper.c > +++ b/target/arm/sve_helper.c > @@ -681,6 +681,73 @@ DO_ZPZZ_D(sve2_uhsub_zpzz_d, uint64_t, DO_HS

Re: [PATCH-for-5.1 v3 01/24] various: Remove suspicious '\' character outside of #define in C code

2020-04-13 Thread Alistair Francis
On Sun, Apr 12, 2020 at 3:38 PM Philippe Mathieu-Daudé wrote: > > Fixes the following coccinelle warnings: > > $ spatch --sp-file --verbose-parsing ... \ > scripts/coccinelle/remove_local_err.cocci > ... > SUSPICIOUS: a \ character appears outside of a #define at > ./target/ppc/trans

Re: [PATCH-for-5.1 v3 06/23] hw/arm/msf2-soc: Add missing error-propagation code

2020-04-13 Thread Alistair Francis
On Sun, Apr 12, 2020 at 3:53 PM Philippe Mathieu-Daudé wrote: > > Patch created mechanically by running: > > $ spatch \ > --macro-file scripts/cocci-macro-file.h --include-headers \ > --sp-file scripts/coccinelle/use-error_propagate-in-realize.cocci \ > --keep-comments --smpl-spacing

Re: [PATCH 11/31] target/arm: Implement SVE2 integer add/subtract long

2020-04-13 Thread Laurent Desnogues
On Fri, Mar 27, 2020 at 12:09 AM Richard Henderson wrote: [...] > diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c > index bee00eaa44..7d7a59f620 100644 > --- a/target/arm/sve_helper.c > +++ b/target/arm/sve_helper.c > @@ -1088,6 +1088,49 @@ DO_ZZW(sve_lsl_zzw_s, uint32_t, uint64_t,

Re: [PATCH 13/31] target/arm: Implement SVE2 integer add/subtract wide

2020-04-13 Thread Laurent Desnogues
On Fri, Mar 27, 2020 at 12:17 AM Richard Henderson wrote: [...] > diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c > index 7d7a59f620..44503626e4 100644 > --- a/target/arm/sve_helper.c > +++ b/target/arm/sve_helper.c > @@ -1131,6 +1131,36 @@ DO_ZZZ_TB(sve2_uabdl_d, uint64_t, uint32_t

Re: [PATCH 21/31] target/arm: Implement SVE2 integer absolute difference and accumulate long

2020-04-13 Thread Laurent Desnogues
On Fri, Mar 27, 2020 at 12:18 AM Richard Henderson wrote: [...] > diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c > index a3653007ac..a0995d95c7 100644 > --- a/target/arm/sve_helper.c > +++ b/target/arm/sve_helper.c > @@ -1216,6 +1216,30 @@ DO_ZZZ_NTB(sve2_eoril_d, uint64_t, , D

Re: [PATCH 22/31] target/arm: Implement SVE2 integer add/subtract long with carry

2020-04-13 Thread Laurent Desnogues
On Fri, Mar 27, 2020 at 12:17 AM Richard Henderson wrote: [...] > diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c > index a0995d95c7..aa330f75c3 100644 > --- a/target/arm/sve_helper.c > +++ b/target/arm/sve_helper.c [...] > +void HELPER(sve2_adcl_d)(void *vd, void *va, void *vn, voi

Re: [PATCH 20/31] target/arm: Implement SVE2 complex integer add

2020-04-13 Thread Laurent Desnogues
On Fri, Mar 27, 2020 at 12:20 AM Richard Henderson wrote: [...] > diff --git a/target/arm/sve_helper.c b/target/arm/sve_helper.c > index b5afa34efe..a3653007ac 100644 > --- a/target/arm/sve_helper.c > +++ b/target/arm/sve_helper.c > @@ -1289,6 +1289,48 @@ DO_BITPERM(sve2_bgrp_d, uint64_t, bitgroup

[PATCH] .gitignore: include common build sub-directories

2020-04-13 Thread Alex Bennée
As out-of-tree builds become more common (or rather building in a subdir) we can add a lot of load to "git ls-files" as it hunts down sub-directories that are irrelevant to the source tree. This is especially annoying if you have a prompt that attempts to summarise the current git status on command

Re: [PATCH v4 30/30] iotests: Add tests for qcow2 images with extended L2 entries

2020-04-13 Thread Alberto Garcia
On Thu 09 Apr 2020 02:22:37 PM CEST, Max Reitz wrote: >> +### Write subcluster #31-#34 (cluster overlap) ### > > #31-#34, I think. That's what I wrote :-? >> +### Partially zeroize an unallocated cluster (#3) >> +if [ "$use_backing_file" = "yes" ]; then >> +alloc="`seq 0 15`";

[Bug 1872237] Re: SysTick reload behavior emulated incorrectly

2020-04-13 Thread Bryan Cantrill
@pmaydell: Thanks for the quick response! For whatever it's worth, I think that there's definitely a bunch of interest in the M-profile work: in the embedded Rust space (for example) Cortex-M is very much the reference platform. Viz. the Embedded Rust Book: https://rust-embedded.github.io/bo

Re: [Qemu-devel] [PATCH v3] net: cadence_gem: fix compilation error when debug is on

2020-04-13 Thread Ramon Fried
Hi. Just noticed that this patch didn't hit master. Got lost ? Thanks, Ramon. On Sat, Jun 15, 2019 at 9:16 AM Ramon Fried wrote: > > > > On June 15, 2019 8:38:35 AM GMT+03:00, "Philippe Mathieu-Daudé" > wrote: > >Hi Ramon, > > > >On 6/15/19 7:15 AM, Ramon Fried wrote: > >> defining CADENCE_GEM

Re: [PATCH v2] net: cadence_gem: clear RX control descriptor

2020-04-13 Thread Ramon Fried
Hi. Just noticed that this patch didn't hit master. Got lost ? Thanks, Ramon. On Tue, Jul 16, 2019 at 2:58 PM Jason Wang wrote: > > > On 2019/7/16 下午6:59, Ramon Fried wrote: > > The RX ring descriptors control field is used for setting > > SOF and EOF (start of frame and end of frame). > > The S

Re: Domain backup file explodes on s3fs

2020-04-13 Thread Leo Luan
Hi Eric and all, When invoking "virsh backup-begin" to do a full backup using qcow2 driver to a new backup target file that does not have a backing chain, is it safe to not zero the unallocated parts of the virtual disk? Do we still depend on SEEK_DATA support in this case to avoid forcing ze

Supported Sphinx Versions (was: Re: [PATCH for-5.0? 0/3] Make docs build work with Sphinx 3)

2020-04-13 Thread John Snow
On 4/11/20 2:29 PM, Peter Maydell wrote: > Our current docs don't build with Sphinx 3, as noted in > https://bugs.launchpad.net/bugs/1872113 -- this is a combination of: > (1) we are using the sphinx-build -W option so warnings are treated > as errors > (3) a kernel-doc script bug meant i

Re: [Qemu-devel] [PATCH v3] net: cadence_gem: fix compilation error when debug is on

2020-04-13 Thread Ramon Fried
False alarm, exact same patch was merged by someone else. On Mon, Apr 13, 2020 at 8:55 PM Ramon Fried wrote: > > Hi. > Just noticed that this patch didn't hit master. > Got lost ? > > Thanks, > Ramon. > > On Sat, Jun 15, 2019 at 9:16 AM Ramon Fried wrote: > > > > > > > > On June 15, 2019 8:38:35

Re: [PATCH for-5.0] qcow2: Add incompatibility note between backing files and raw external data files

2020-04-13 Thread Eric Blake
On 4/10/20 7:18 AM, Alberto Garcia wrote: Backing files and raw external data files are mutually exclusive. The documentation of the raw external data bit (in autoclear_features) already indicates that, but we should also mention it on the other side. Suggested-by: Eric Blake Signed-off-by: Alb

Re: [PATCH] hax: Windows doesn't like posix device names

2020-04-13 Thread Volker Rümelin
> On 22/03/20 22:02, Volker Rümelin wrote: >> Patch acb9f95a7c "i386: Fix GCC warning with snprintf when HAX >> is enabled" replaced Windows device names with posix device >> names. Revert this. >> >> Fixes: acb9f95a7c "i386: Fix GCC warning with snprintf when HAX is enabled" >> Queued, thanks. >>

[Bug 1872237] Re: SysTick reload behavior emulated incorrectly

2020-04-13 Thread Peter Maydell
Other than the systick issue, I think the core M-profile emulation should be pretty solid (bugs are always possible, of course). We have support for v6M (cortex-m0), v7M (cortex-m3, m4) and v8M (cortex-m33, including the security extension) and at least some board models for all of those. No v8.1M

Re: Supported Sphinx Versions (was: Re: [PATCH for-5.0? 0/3] Make docs build work with Sphinx 3)

2020-04-13 Thread Peter Maydell
On Mon, 13 Apr 2020 at 19:08, John Snow wrote: > I was curious about our actual version compatibility, so I did some testing. Thanks for doing the testing. > 1.6.1 through 2.2.2 all appear to work just fine, but produce a lot of > warnings about a coming incompatibility with Docutils > 0.16. FW

Re: [PATCH] .gitignore: include common build sub-directories

2020-04-13 Thread Eric Blake
On 4/13/20 11:29 AM, Alex Bennée wrote: As out-of-tree builds become more common (or rather building in a subdir) we can add a lot of load to "git ls-files" as it hunts down sub-directories that are irrelevant to the source tree. This is especially annoying if you have a prompt that attempts to s

Re: Supported Sphinx Versions (was: Re: [PATCH for-5.0? 0/3] Make docs build work with Sphinx 3)

2020-04-13 Thread John Snow
On 4/13/20 2:22 PM, Peter Maydell wrote: > On Mon, 13 Apr 2020 at 19:08, John Snow wrote: >> I was curious about our actual version compatibility, so I did some testing. > > Thanks for doing the testing. > >> 1.6.1 through 2.2.2 all appear to work just fine, but produce a lot of >> warnings a

Re: [PULL 0/4] pc: bugfixes, maintainers

2020-04-13 Thread Peter Maydell
On Mon, 13 Apr 2020 at 12:09, Michael S. Tsirkin wrote: > > The following changes since commit f3bac27cc1e303e1860cc55b9b6889ba39dee587: > > Update version for v5.0.0-rc2 release (2020-04-07 23:13:37 +0100) > > are available in the Git repository at: > > git://git.kernel.org/pub/scm/virt/kvm/m

[PATCH-for-5.1 v3 6/7] hw/mips/mips_malta: Use &error_abort in MachineClass::init -> create_cps

2020-04-13 Thread Philippe Mathieu-Daudé
Running the coccinelle script produced: $ spatch \ --macro-file scripts/cocci-macro-file.h --include-headers \ --sp-file scripts/coccinelle/find-missing-error_propagate.cocci \ --keep-comments --smpl-spacing --dir . HANDLING: ./hw/mips/mips_malta.c [[manual check required: error_

[PATCH] spapr_nvdimm.c: make 'label-size' mandatory

2020-04-13 Thread Daniel Henrique Barboza
The pseries machine does not support NVDIMM modules without label. Attempting to do so, even if the overall block size is aligned with 256MB, will seg fault the guest kernel during NVDIMM probe. This can be avoided by forcing 'label-size' to always be present for sPAPR NVDIMMs. The verification wa

[PATCH-for-5.1 v3 7/7] qga/commands-win32: Add missing error-propagation code

2020-04-13 Thread Philippe Mathieu-Daudé
Running the coccinelle script produced: $ spatch \ --macro-file scripts/cocci-macro-file.h --include-headers \ --sp-file scripts/coccinelle/find-missing-error_propagate.cocci \ --keep-comments --smpl-spacing --dir . HANDLING: ./qga/commands-win32.c [[manual check required: error_

[PATCH-for-5.1 v3 1/7] scripts/coccinelle: Use &error_abort in TypeInfo::instance_init()

2020-04-13 Thread Philippe Mathieu-Daudé
The instance_init() calls are not suppose to fail. Add a Coccinelle script to use &error_abort instead of ignoring errors by using a NULL Error*. Signed-off-by: Philippe Mathieu-Daudé --- v3: Improved script (Vladimir Sementsov-Ogievskiy suggestions) .../use-error_abort-in-instance_init.cocci

[PATCH-for-5.1 v3 3/7] scripts/coccinelle: Find eventually missing error_propagate() calls

2020-04-13 Thread Philippe Mathieu-Daudé
In some places in we put an error into a local Error*, but forget to use it. Add a Coccinelle patch to find such cases and report them. Inspired-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- .../find-missing-error_propagate.cocci| 53 +++ MAINTAINERS

[PATCH-for-5.1 v3 5/7] hw/mips/boston: Add missing error-propagation code

2020-04-13 Thread Philippe Mathieu-Daudé
Running the coccinelle script produced: $ spatch \ --macro-file scripts/cocci-macro-file.h --include-headers \ --sp-file scripts/coccinelle/find-missing-error_propagate.cocci \ --keep-comments --smpl-spacing --dir . HANDLING: ./hw/mips/boston.c [[manual check required: error_prop

[PATCH-for-5.1 v3 4/7] migration/colo: Add missing error-propagation code

2020-04-13 Thread Philippe Mathieu-Daudé
Running the coccinelle script produced: $ spatch \ --macro-file scripts/cocci-macro-file.h --include-headers \ --sp-file scripts/coccinelle/find-missing-error_propagate.cocci \ --keep-comments --smpl-spacing --dir . HANDLING: ./migration/colo.c [[manual check required: error_prop

Re: [PATCH-for-5.1 v3 03/24] hw/arm/allwinner-a10: Move some code from realize() to init()

2020-04-13 Thread Philippe Mathieu-Daudé
On 4/13/20 12:35 AM, Philippe Mathieu-Daudé wrote: > Coccinelle reported: > > $ spatch ... --timeout 60 --sp-file \ > scripts/coccinelle/simplify-init-realize-error_propagate.cocci > HANDLING: ./hw/arm/allwinner-a10.c > >>> possible moves from aw_a10_init() to aw_a10_realize() in > ./hw

Re: [PATCH 0/7] hw/sparc/leon3: Few fixes and disable HelenOS test

2020-04-13 Thread Philippe Mathieu-Daudé
[Cc'ing Peter] On 4/13/20 12:12 PM, KONRAD Frederic wrote: > Le 4/11/20 à 7:30 PM, Philippe Mathieu-Daudé a écrit : >> On 3/31/20 12:50 PM, Philippe Mathieu-Daudé wrote: >>> Philippe Mathieu-Daudé (7): >>>    hw/misc/grlib_ahb_apb_pnp: Avoid crash when writing to AHB PnP >>> registers >>>   

Re: [PATCH-for-5.1 1/3] hw/ide/ahci: Use qdev gpio rather than qemu_allocate_irqs()

2020-04-13 Thread Philippe Mathieu-Daudé
[sending again as my previous mail was rejected, sorry if you get this twice] On 4/12/20 11:29 PM, Philippe Mathieu-Daudé wrote: > Switch to using the qdev gpio API which is preferred over > qemu_allocate_irqs(). One step to eventually deprecate and > remove qemu_allocate_irqs() one day. > > Patc

Re: [PATCH-for-5.0? 3/3] hw/openrisc/pic_cpu: Use qdev gpio rather than qemu_allocate_irqs()

2020-04-13 Thread Philippe Mathieu-Daudé
Hi Stafford, On 4/13/20 1:33 AM, Stafford Horne wrote: > On Sun, Apr 12, 2020 at 11:29:43PM +0200, Philippe Mathieu-Daudé wrote: >> Switch to using the qdev gpio API which is preferred over >> qemu_allocate_irqs(). Doing so we also stop leaking the >> allocated memory. One step to eventually depre

Re: [PATCH] .gitignore: include common build sub-directories

2020-04-13 Thread Alex Bennée
Eric Blake writes: > On 4/13/20 11:29 AM, Alex Bennée wrote: >> As out-of-tree builds become more common (or rather building in a >> subdir) we can add a lot of load to "git ls-files" as it hunts down >> sub-directories that are irrelevant to the source tree. This is >> especially annoying if y

[PATCH-for-5.1 v3 2/7] various: Use &error_abort in instance_init()

2020-04-13 Thread Philippe Mathieu-Daudé
Patch created mechanically by running: $ spatch \ --macro-file scripts/cocci-macro-file.h \ --include-headers --keep-comments --in-place \ --sp-file \ scripts/coccinelle/use-error_abort-in-instance_init.cocci Reviewed-by: Cédric Le Goater Acked-by: Cornelia Huck Signed-off-b

Re: [PATCH] .gitignore: include common build sub-directories

2020-04-13 Thread Eric Blake
On 4/13/20 4:32 PM, Alex Bennée wrote: Eric Blake writes: On 4/13/20 11:29 AM, Alex Bennée wrote: As out-of-tree builds become more common (or rather building in a subdir) we can add a lot of load to "git ls-files" as it hunts down sub-directories that are irrelevant to the source tree. This

Re: [PATCH] .gitignore: include common build sub-directories

2020-04-13 Thread Philippe Mathieu-Daudé
On 4/13/20 11:42 PM, Eric Blake wrote: > On 4/13/20 4:32 PM, Alex Bennée wrote: >> >> Eric Blake writes: >> >>> On 4/13/20 11:29 AM, Alex Bennée wrote: As out-of-tree builds become more common (or rather building in a subdir) we can add a lot of load to "git ls-files" as it hunts down >>

[PATCH-for-5.0 v2] hw/display/sm501: Avoid heap overflow in sm501_2d_operation()

2020-04-13 Thread Philippe Mathieu-Daudé
Zhang Zi Ming reported a heap overflow in the Drawing Engine of the SM501 companion chip model, in particular in the COPY_AREA() macro in sm501_2d_operation(). Add a simple check to avoid the heap overflow. This fixes: = ==20518

Re: [PATCH 3/3] MAINTAINERS: Add myself as fulong2e co-maintainer

2020-04-13 Thread Philippe Mathieu-Daudé
On 4/10/20 4:37 PM, Aleksandar Markovic wrote: > 04:39 Čet, 09.04.2020. Jiaxun Yang > је написао/ла: >> >> On Thu, 9 Apr 2020 10:17:46 +0800 >> Huacai Chen mailto:che...@lemote.com>> wrote: >> >> > Hi, Aleksandar, >> > >> > On Wed, Apr 8, 2020 at 11:30 PM Aleksandar

Re: [PATCH-for-5.1 v3 11/24] hw/arm/msf2-soc: Store MemoryRegion in MSF2State

2020-04-13 Thread Alistair Francis
On Sun, Apr 12, 2020 at 3:40 PM Philippe Mathieu-Daudé wrote: > > Coccinelle reported: > > $ spatch ... --timeout 60 --sp-file \ > scripts/coccinelle/simplify-init-realize-error_propagate.cocci > HANDLING: ./hw/arm/msf2-soc.c > >>> possible moves from m2sxxx_soc_initfn() to m2sxxx_soc_re

Re: [PATCH-for-5.1 v3 12/24] hw/arm/stm32f205_soc: Store MemoryRegion in STM32F205State

2020-04-13 Thread Alistair Francis
On Sun, Apr 12, 2020 at 3:41 PM Philippe Mathieu-Daudé wrote: > > Coccinelle reported: > > $ spatch ... --timeout 60 --sp-file \ > scripts/coccinelle/simplify-init-realize-error_propagate.cocci > HANDLING: ./hw/arm/stm32f205_soc.c > >>> possible moves from stm32f205_soc_initfn() to stm32

Re: [PATCH] MAINTAINERS: Add myself as vhost-user-blk maintainer

2020-04-13 Thread Philippe Mathieu-Daudé
On 4/10/20 2:28 AM, Raphael Norwitz wrote: > Ping FYI this patch has been recently merged as commit b372d79b236a4e07eaa3ce65ee0543569b712326. > > On Thu, Mar 26, 2020 at 04:47:35AM -0400, Raphael Norwitz wrote: >> As suggested by Michael, let's add me as a maintainer of >> vhost-user-blk and vho

Re: [PATCH-for-5.1 v3 13/24] hw/arm/stm32f205_soc: Move some code from realize() to init()

2020-04-13 Thread Alistair Francis
On Sun, Apr 12, 2020 at 3:42 PM Philippe Mathieu-Daudé wrote: > > Coccinelle reported: > > $ spatch ... --timeout 60 --sp-file \ > scripts/coccinelle/simplify-init-realize-error_propagate.cocci > HANDLING: ./hw/arm/stm32f205_soc.c > >>> possible moves from stm32f205_soc_initfn() to stm32

Re: [PATCH-for-5.1 v3 14/24] hw/arm/xlnx-zynqmp: Use single propagate_error() call

2020-04-13 Thread Alistair Francis
On Sun, Apr 12, 2020 at 3:45 PM Philippe Mathieu-Daudé wrote: > > Coccinelle failed at processing this file: > > $ spatch ... --timeout 60 --sp-file \ > scripts/coccinelle/simplify-init-realize-error_propagate.cocci > HANDLING: ./hw/arm/xlnx-zynqmp.c > EXN: Coccinelle_modules.Common.Time

Re: [PATCH-for-5.1 v3 16/24] hw/arm/xlnx-zynqmp: Move some code from realize() to init()

2020-04-13 Thread Alistair Francis
On Sun, Apr 12, 2020 at 3:41 PM Philippe Mathieu-Daudé wrote: > > Coccinelle failed at processing this file: > > $ spatch ... --timeout 60 --sp-file \ > scripts/coccinelle/simplify-init-realize-error_propagate.cocci > HANDLING: ./hw/arm/xlnx-zynqmp.c > EXN: Coccinelle_modules.Common.Time

Re: [PATCH-for-5.1 v3 20/24] hw/riscv/sifive_u: Use single type_init()

2020-04-13 Thread Alistair Francis
On Sun, Apr 12, 2020 at 3:48 PM Philippe Mathieu-Daudé wrote: > > We can use a single type_init() to call multiple type_register*(). > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Alistair > --- > hw/riscv/sifive_u.c | 12 +++- > 1 file changed, 3 insertions(

Re: [PATCH-for-5.1 v3 08/23] hw/arm/armv7m: Add missing error-propagation code

2020-04-13 Thread Alistair Francis
On Sun, Apr 12, 2020 at 3:54 PM Philippe Mathieu-Daudé wrote: > > Patch created mechanically by running: > > $ spatch \ > --macro-file scripts/cocci-macro-file.h --include-headers \ > --sp-file scripts/coccinelle/use-error_propagate-in-realize.cocci \ > --keep-comments --smpl-spacing

  1   2   >