[PULL 120/136] scripts/cocci: Patch to let devices own their MemoryRegions

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé When a device creates a MemoryRegion without setting its ownership, the MemoryRegion is added to the machine "/unattached" container in the QOM tree. Example with the Samsung SMDKC210 board: $ arm-softmmu/qemu-system-arm -M smdkc210 -S -monitor stdio (qemu) info

[PULL 078/136] tests/numa-test: make top level args dynamic and g_autofree(cli) cleanups

2020-02-25 Thread Paolo Bonzini
From: Igor Mammedov Use GString to pass argument to make_cli() so that it would be easy to dynamically change test case arguments from main(). The follow up patch will use it to change RAM size options depending on target. While at it cleanup 'cli' freeing, using g_autofree annotation. Signed-o

[PULL 130/136] hw/block/onenand: Let devices own the MemoryRegion they create

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Avoid orphan memory regions being added in the /unattached QOM container. Note this change break the migration of the nSeries machines. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.23798-33-phi...@redhat.com> Supersedes: <20200221173049.18134-1

[PULL 082/136] exec: Rename ram_ptr variable

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé As we are going to use a different 'ptr' variable, rename the 'ram pointer' variable. Signed-off-by: Philippe Mathieu-Daudé --- exec.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/exec.c b/exec.c index 8e9cc3b..08a30f6

[PULL 103/136] hw/arm: Use memory_region_init_rom() with read-only regions

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.23798-6-phi...@redhat.com> Supersedes: <20200221173049.18134-1-phi...@redhat.com> --- hw/arm/e

RE: [PATCH v4 2/3] acpi:pci-expender-bus: Add pxb support for arm

2020-02-25 Thread miaoyubo
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Tuesday, February 25, 2020 8:27 PM > To: miaoyubo > Cc: Philippe Mathieu-Daudé ; > peter.mayd...@linaro.org; shannon.zha...@gmail.com; > berra...@redhat.com; qemu-devel@nongnu.org; Xiexiangyou > ; imamm...@

[PULL 083/136] exec: Let flatview API take void pointer arguments

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Only flatview_[read/write]_continue use a byte pointer to increment an offset. For the users, we are only dealing with a blob buffer. Use a void pointer argument. This will let us simplify the address_space API in the next commit. Signed-off-by: Philippe Mathieu-Daud

[PULL 132/136] mem-prealloc: optimize large guest startup

2020-02-25 Thread Paolo Bonzini
From: bauerchen [desc]: Large memory VM starts slowly when using -mem-prealloc, and there are some areas to optimize in current method; 1、mmap will be used to alloc threads stack during create page clearing threads, and it will attempt mm->mmap_sem for write lock, but clearin

[PULL 106/136] hw/m68k: Use memory_region_init_rom() with read-only regions

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.23798-9-phi...@redhat.com> Supersedes: <20200221173049.18134-1-phi...@redhat.com> --- hw/m68k/

RE: [PATCH v4 2/3] acpi:pci-expender-bus: Add pxb support for arm

2020-02-25 Thread miaoyubo
> -Original Message- > From: Philippe Mathieu-Daudé [mailto:phi...@redhat.com] > Sent: Tuesday, February 25, 2020 5:48 PM > To: miaoyubo ; peter.mayd...@linaro.org; > shannon.zha...@gmail.com > Cc: berra...@redhat.com; m...@redhat.com; qemu-devel@nongnu.org; > Xiexiangyou ; imamm...@redhat

[PATCH v3 08/19] tests/iotests: be a little more forgiving on the size test

2020-02-25 Thread Alex Bennée
At least on ZFS this was failing as 512 was less than or equal to 512. I suspect the reason is additional compression done by ZFS and however qemu-img gets the actual size. Loosen the criteria to make sure after is not bigger than before and also dump the values in the report. Signed-off-by: Alex

[PULL 087/136] exec: Let the cpu_[physical]_memory API use void pointer arguments

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé As we are only dealing with a blob buffer, use a void pointer argument. This will let us simplify other APIs. Signed-off-by: Philippe Mathieu-Daudé --- exec.c| 8 +--- include/exec/cpu-all.h| 2 +- include/exec/cpu-common.h | 2 +- 3 fil

[PULL 107/136] hw/net: Use memory_region_init_rom() with read-only regions

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.23798-10-phi...@redhat.com> Supersedes: <20200221173049.18134-1-phi...@redhat.com> --- hw/net/

[PATCH v3 12/19] tests/plugin: prevent uninitialized warning

2020-02-25 Thread Alex Bennée
From: Chen Qun According to the glibc function requirements, we need initialise the variable. Otherwise there will be compilation warnings: glib-autocleanups.h:28:3: warning: ‘out’ may be used uninitialized in this function [-Wmaybe-uninitialized] g_free (*pp); ^~~~ Reported-by:

[PATCH v3 00/21] linux-user: generate syscall_nr.sh

2020-02-25 Thread Laurent Vivier
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, ppc, arm, microblaze, sh4, xtensa, m68k, hppa and alpha. tilegx

[PULL 089/136] hw/ide/internal: Remove unused DMARestartFunc typedef

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The IDE DMA restart callback has been removed in commit fe09c7c9f0. Fixes: fe09c7c9f0 Signed-off-by: Philippe Mathieu-Daudé --- include/hw/ide/internal.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index

[PULL 108/136] hw/pci-host: Use memory_region_init_rom() with read-only regions

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.23798-11-phi...@redhat.com> Supersedes: <20200221173049.18134-1-phi...@redhat.com> --- hw/pci-

[PATCH v3 05/21] linux-user, xtensa: add syscall table generation support

2020-02-25 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/xtensa/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier --- configure | 3 +- linux-user/Makefile.objs| 1 + linux-user/xtensa/Makefile.objs | 5 + linux-us

[PULL 091/136] hw/virtio: Let virtqueue_map_iovec() use a boolean 'is_write' argument

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The 'is_write' argument is either 0 or 1. Convert it to a boolean type. Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/virtio.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 2c5410e..9d

[PULL 112/136] hw/sparc: Use memory_region_init_rom() with read-only regions

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.23798-15-phi...@redhat.com> Supersedes: <20200221173049.18134-1-phi...@redhat.com> --- hw/spar

[PATCH v3 10/21] linux-user, s390x: remove syscall definitions for !TARGET_S390X

2020-02-25 Thread Laurent Vivier
We don't support other 32bit architecture. Update file to comply with coding style (TAB). Signed-off-by: Laurent Vivier --- linux-user/s390x/syscall_nr.h | 313 +- 1 file changed, 123 insertions(+), 190 deletions(-) diff --git a/linux-user/s390x/syscall_nr.h b/li

[PULL 092/136] hw/virtio: Let vhost_memory_map() use a boolean 'is_write' argument

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The 'is_write' argument is either 0 or 1. Convert it to a boolean type. Signed-off-by: Philippe Mathieu-Daudé --- hw/virtio/vhost.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index 9edfadc..0d22

[PULL 113/136] scripts/cocci: Patch to detect potential use of memory_region_init_rom

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Add a semantic patch to detect potential replacement of memory_region_init_ram(readonly) by memory_region_init_rom(). Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.23798-16-phi...@redhat.com> Supersedes: <20200221173049.18134-1-phi...@redhat.com>

[PATCH v3 19/21] linux-user: update syscall.tbl from linux 0bf999f9c5e7

2020-02-25 Thread Laurent Vivier
Run scripts/update-syscalltbl.sh with linux commit 0bf999f9c5e7 Signed-off-by: Laurent Vivier --- linux-user/arm/syscall.tbl| 2 ++ linux-user/hppa/syscall.tbl | 2 ++ linux-user/i386/syscall_32.tbl| 2 ++ linux-user/m68k/syscall.tbl | 4 +++- linux-user/microblaze/syscal

[PULL 114/136] hw/arm/stm32: Use memory_region_init_rom() with read-only regions

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The scripts/coccinelle/memory-region-housekeeping.cocci reported: * TODO [[view:./hw/arm/stm32f205_soc.c::face=ovl-face1::linb=96::colb=4::cole=26][potential use of memory_region_init_rom*() in ./hw/arm/stm32f205_soc.c::96]] * TODO [[view:./hw/arm/stm32f405_soc.c:

[PULL 094/136] Let address_space_rw() calls pass a boolean 'is_write' argument

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Since its introduction in commit ac1970fbe8, address_space_rw() takes a boolean 'is_write' argument. Fix the codebase by using an explicit boolean type. This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Inspired-by: Peter

[PULL 097/136] Let cpu_[physical]_memory() calls pass a boolean 'is_write' argument

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Use an explicit boolean type. This commit was produced with the included Coccinelle script scripts/coccinelle/exec_rw_const. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/exynos4210_fimd.c | 3 ++- hw/display/milkymist-tmu2.c| 8

[PATCH v3 04/21] linux-user, m68k: add syscall table generation support

2020-02-25 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/m68k/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier --- configure | 3 +- linux-user/Makefile.objs | 1 + linux-user/m68k/Makefile.objs | 5 + linux-user/m68k/

[PULL 115/136] hw/ppc/ppc405: Use memory_region_init_rom() with read-only regions

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The scripts/coccinelle/memory-region-housekeeping.cocci reported: * TODO [[view:./hw/ppc/ppc405_boards.c::face=ovl-face1::linb=195::colb=8::cole=30][potential use of memory_region_init_rom*() in ./hw/ppc/ppc405_boards.c::195]] * TODO [[view:./hw/ppc/ppc405_boards.

[PULL 100/136] memory: Simplify memory_region_init_rom_nomigrate() to ease review

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé memory_region_init_rom_nomigrate() has the same content than memory_region_init_ram_shared_nomigrate(), with setting the readonly mode. The code is easier to review as creating a readonly ram/shared/nomigrate region. Signed-off-by: Philippe Mathieu-Daudé Message-Id:

[PULL 116/136] hw/i386/pc_sysfw: Simplify using memory_region_init_alias()

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé The scripts/coccinelle/memory-region-housekeeping.cocci reported: * TODO [[view:hw/i386/pc_sysfw.c::face=ovl-face1::linb=67::colb=4::cole=26][potential use of memory_region_init_rom*() in hw/i386/pc_sysfw.c::67]] pc_isa_bios_init() does a manual copy of a part of

[PULL 095/136] Avoid address_space_rw() with a constant is_write argument

2020-02-25 Thread Paolo Bonzini
From: Peter Maydell The address_space_rw() function allows either reads or writes depending on the is_write argument passed to it; this is useful when the direction of the access is determined programmatically (as for instance when handling the KVM_EXIT_MMIO exit reason). Under the hood it just c

[PULL 121/136] hw/arm: Let devices own the MemoryRegion they create

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Avoid orphan memory regions being added in the /unattached QOM container. This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.23798-24-phi...@redh

Re: [PATCH v3 0/3] Fix number of priority bits for arm boards

2020-02-25 Thread Peter Maydell
On Mon, 24 Feb 2020 at 09:44, Sai Pavan Boddu wrote: > > This patch series implements the mask for unimplemented priority bits in > arm-gic. Which will return the expected number of priority bits on read. > > Changes for V2: > Followed gicv3 code for defining mask for unimplemented bits >

[PULL 101/136] scripts/cocci: Rename memory-region-{init-ram -> housekeeping}

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé As we are going to add various semantic changes related to the memory region API, rename this script to be more generic. Add a 'usage' header, and an entry in MAINTAINERS to avoid checkpatch warning. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.

Re: [PATCH RESEND 3/3] .travis.yml: Test building with Xcode 11.3

2020-02-25 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > We currently run a CI job on macOS Mojave with Xcode 10. > > QEMU policy is to support the two last major OS releases. > Add a job building on macOS Catalina, which comes with Xcode 11. > > Split the target list in two, as we don't need to cover twice the > same

[PULL 126/136] hw/riscv: Let devices own the MemoryRegion they create

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Avoid orphan memory regions being added in the /unattached QOM container. This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.23798-29-phi...@redh

[PULL 102/136] scripts/cocci: Patch to replace memory_region_init_{ram, readonly -> rom}

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Add a semantic patch to replace memory_region_init_ram(readonly) by memory_region_init_rom(). Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.23798-5-phi...@redhat.com> Supersedes: <20200221173049.18134-1-phi...@redhat.com> --- scripts/coccinelle/

Re: [PATCH RESEND v2 18/32] hw/i386/pc_sysfw: Simplify using memory_region_init_alias()

2020-02-25 Thread Paolo Bonzini
On 25/02/20 11:05, Philippe Mathieu-Daudé wrote: >> >> pc_isa_bios_init() does a manual copy of a part of the BIOS, >> from a read-only region. We can simplify by directly aliasing >> the same part. >> >> Before: >> >>    (qemu) info mtree >>    memory-region: system >> -ff

[PULL 123/136] hw/core: Let devices own the MemoryRegion they create

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Avoid orphan memory regions being added in the /unattached QOM container. This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.23798-26-phi...@redh

[PULL 103/136] hw/arm: Use memory_region_init_rom() with read-only regions

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.23798-6-phi...@redhat.com> Supersedes: <20200221173049.18134-1-phi...@redhat.com> --- hw/arm/e

[PULL v2 000/104] Misc patches for 2020-02-25 (refactoring and Coccinelle edition)

2020-02-25 Thread Paolo Bonzini
The following changes since commit c1e667d2598b9b3ce62b8e89ed22dd38dfe9f57f: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2020-02-24 11:38:54 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you

[PULL 127/136] hw/input/milkymist-softusb: Remove unused 'pmem_ptr' field

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé In commit 029ad4bcf3 we removed softusb_{read, write}_pmem(), we can also remove the 'pmem_ptr' field. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.23798-30-phi...@redhat.com> Supersedes: <20200221173049.18134-1-phi...@redhat.com> --- hw/input/

[PATCH v3 00/19] testing & plugin updates

2020-02-25 Thread Alex Bennée
Hi, Nothing over v2 apart from signoffs. It would be nice to get the last one reviewed before I roll the PR. - tests/iotests: be a little more forgiving on the size test Alex Bennée (13): tests/tcg: include a skip runner for pauth3 with plugins tests/rcutorture: update usage hint tests/rc

[PULL 133/136] qdev-monitor: Forbid repeated device_del

2020-02-25 Thread Paolo Bonzini
From: Julia Suvorova 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: Julia Suvorova Reviewed-by: Stefan Hajnoczi Message-Id:

Re: [PATCH v3 6/7] target/arm: Honor the HCR_EL2.TPU bit

2020-02-25 Thread Peter Maydell
On Tue, 18 Feb 2020 at 19:10, Richard Henderson wrote: > > This bit traps EL1 access to cache maintenance insns that operate > to the point of unification. There are no longer any references to > plain aa64_cacheop_access, so remove it. > > Signed-off-by: Richard Henderson > --- > target/arm/he

[PATCH v3 04/19] tests/rcutorture: mild documenting refactor of update thread

2020-02-25 Thread Alex Bennée
This is mainly to help with reasoning what the test is trying to do. We can move rcu_stress_idx to a local variable as there is only ever one updater thread. I've also added an assert to catch the case where we end up updating the current structure to itself which is the only way I can see the mber

[PULL 134/136] target/i386: check for empty register in FXAM

2020-02-25 Thread Paolo Bonzini
The fxam instruction returns the wrong result after fdecstp or after an underflow. Check fptags to handle this. Reported-by: Signed-off-by: Paolo Bonzini --- target/i386/fpu_helper.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/i386/fpu_helper.c b/target/i386

[PATCH v2 1/4] Acceptance test: adds param 'address' in _get_free_port

2020-02-25 Thread Oksana Vohchana
In the migration test function _get_free_port works only for localhost, but in the case to use migration through an RDMA we need to get a free port on the configured network RDMA-interface. This patch is the start for another migration option Signed-off-by: Oksana Vohchana --- tests/acceptance/m

[PATCH v3 07/19] travis.yml: single-thread build-tcg stages

2020-02-25 Thread Alex Bennée
This still seems to be a problem for Travis. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0612998958b..f4020dcc6c8 100644 --- a/.travis.yml +++ b/.travis.yml

Re: [RFC PATCH v2] target/ppc: Enable hardfloat for PPC

2020-02-25 Thread BALATON Zoltan
On Mon, 24 Feb 2020, Programmingkid wrote: Intel Core i5-2500S CPU @ 2.70GHz. [...] Ok, I did test on the G4, here are my results: Git commit: c1e667d2598b9b3ce62b8e89ed22dd38dfe9f57f Mac OS 10.4.3 VM -cpu G4 -USB audio device Hardfloat=false Audio sounds bad when playing midi file. Extractio

Re: [PATCH v3 7/7] target/arm: Honor the HCR_EL2.TTLB bit

2020-02-25 Thread Peter Maydell
On Tue, 18 Feb 2020 at 19:10, Richard Henderson wrote: > > This bit traps EL1 access to tlb maintenance insns. > > Signed-off-by: Richard Henderson > --- > target/arm/helper.c | 85 + > 1 file changed, 55 insertions(+), 30 deletions(-) > > diff --git a

[PATCH v2 2/4] Acceptance test: EXEC migration

2020-02-25 Thread Oksana Vohchana
Improves EXEC migration to run whole test stage Signed-off-by: Oksana Vohchana --- tests/acceptance/migration.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py index e4c39b85a1..8209dcf71d 100644 --- a/tests/acceptance/migratio

[PATCH v3 11/19] plugins/core: add missing break in cb_to_tcg_flags

2020-02-25 Thread Alex Bennée
From: "Emilio G. Cota" Fixes: 54cb65d8588 Reported-by: Robert Henry Signed-off-by: Emilio G. Cota Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200105072940.32204-1-c...@braap.org> Cc: qemu-sta...@nongnu.org --- plugins/core.c |

Re: QAPI schema for desired state of LUKS keyslots (was: [PATCH 02/13] qcrypto-luks: implement encryption key management)

2020-02-25 Thread Max Reitz
On 15.02.20 15:51, Markus Armbruster wrote: > Review of this patch led to a lengthy QAPI schema design discussion. > Let me try to condense it into a concrete proposal. > > This is about the QAPI schema, and therefore about QMP. The > human-friendly interface is out of scope. Not because it's no

[PULL 104/136] hw/display: Use memory_region_init_rom() with read-only regions

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.23798-7-phi...@redhat.com> Supersedes: <20200221173049.18134-1-phi...@redhat.com> --- hw/displ

[PULL 105/136] hw/mips: Use memory_region_init_rom() with read-only regions

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.23798-8-phi...@redhat.com> Supersedes: <20200221173049.18134-1-phi...@redhat.com> --- hw/mips/

Re: [RFC PATCH v2 2/2] hw/arm/integratorcp: Map a CFI parallel flash

2020-02-25 Thread Peter Maydell
On Sun, 23 Feb 2020 at 23:30, Philippe Mathieu-Daudé wrote: > > The Linux kernel displays errors why trying to detect the flash: > > Linux version 4.16.0 (linus@genomnajs) (gcc version 7.2.1 20171011 (Linaro > GCC 7.2-2017.11)) #142 PREEMPT Wed May 9 13:24:55 CEST 2018 > CPU: ARM926EJ-S [4106

[PATCH v8 2/9] hw/core/clock-vmstate: define a vmstate entry for clock state

2020-02-25 Thread Damien Hedde
Signed-off-by: Damien Hedde Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis -- v7: remove leading underscores in macro args --- include/hw/clock.h | 9 + hw/core/clock-vmstate.c | 25 + hw/core/Makefile.objs

[PATCH v3 13/21] linux-user, x86_64, i386: cleanup TARGET_NR_arch_prctl

2020-02-25 Thread Laurent Vivier
Define do_arch_prctl() for i386 and x86_64, but return -TARGET_ENOSYS for i386. Signed-off-by: Laurent Vivier --- linux-user/i386/target_cpu.h | 4 ++-- linux-user/syscall.c | 19 +++ 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/linux-user/i386/target

Re: [PULL 0/3] docs queue

2020-02-25 Thread Peter Maydell
On Tue, 25 Feb 2020 at 11:02, Peter Maydell wrote: > > > Just the "create the tools manual" patches; I'd like to > get this into master because it'll be a dependency for > some other stuff (even if only textually due to Makefile > changes). > > thanks > -- PMM Applied, thanks. Please update the

[PULL 124/136] hw/display: Let devices own the MemoryRegion they create

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Avoid orphan memory regions being added in the /unattached QOM container. This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.23798-27-phi...@redh

[PATCH v3 12/21] linux-user, sparc, sparc64: add syscall table generation support

2020-02-25 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/sparc/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier --- configure| 6 +- linux-user/Makefile.objs | 2 + linux-user/sparc/Makefile.objs | 5 + linux-

Re: [PATCH 8/9] virStorageFileGetMetadataRecurse: Allow format probing under special circumstances

2020-02-25 Thread Daniel P . Berrangé
On Mon, Feb 24, 2020 at 06:10:46PM +0100, Peter Krempa wrote: > On Mon, Feb 24, 2020 at 14:24:15 +, Daniel Berrange wrote: > > On Mon, Feb 24, 2020 at 02:34:16PM +0100, Peter Krempa wrote: > > > On Wed, Feb 19, 2020 at 13:12:53 -0600, Eric Blake wrote: > > [...] > > > > I'll reiterate the his

[PULL 125/136] hw/dma: Let devices own the MemoryRegion they create

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Avoid orphan memory regions being added in the /unattached QOM container. This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200224205533.23798-28-phi...@redh

[PATCH v3 14/21] linux-user, i386: add syscall table generation support

2020-02-25 Thread Laurent Vivier
Copy syscall_32.tbl and syscallhdr.sh from linux/arch/x86/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier --- configure | 3 +- linux-user/Makefile.objs | 1 + linux-user/i386/Makefile.objs | 5 + linux-user/

Re: [PATCH v24 02/10] hw/arm/virt: Introduce a RAS machine option

2020-02-25 Thread gengdongjiu
> > On Tue, 25 Feb 2020 08:54:07 + > Peter Maydell wrote: > > > On Tue, 25 Feb 2020 at 08:34, Igor Mammedov wrote: > > > > > > On Mon, 17 Feb 2020 21:12:40 +0800 > > > Dongjiu Geng wrote: > > > > > > > RAS Virtualization feature is not supported now, so add a RAS > > > > machine > > > > >

[PULL 131/136] memory: batch allocate ioeventfds[] in address_space_update_ioeventfds()

2020-02-25 Thread Paolo Bonzini
From: Stefan Hajnoczi Reallocing the ioeventfds[] array each time an element is added is very expensive as the number of ioeventfds increases. Batch allocate instead to amortize the cost of realloc. This patch reduces Linux guest boot times from 362s to 140s when there are 2 virtio-blk devices

[PATCH v3 08/21] linux-user, arm: add syscall table generation support

2020-02-25 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/arm/tools/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Update syscall.c to manage TARGET_NR_arm_sync_file_range as it has replaced TARGET_NR_sync_file_range2 Move existing stuff from linux-user/Makefile.objs to linux-user/arm/

Re: [PATCH v7 03/11] scripts: add coccinelle script to use auto propagated errp

2020-02-25 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 23.02.2020 11:55, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> Script adds ERRP_AUTO_PROPAGATE macro invocation where appropriate and >>> does corresponding changes in code (look for details in >>> include/qapi/error.h) >>> >>> Us

[PATCH v8 1/9] hw/core/clock: introduce clock object

2020-02-25 Thread Damien Hedde
This object may be used to represent a clock inside a clock tree. A clock may be connected to another clock so that it receives update, through a callback, whenever the source/parent clock is updated. Although only the root clock of a clock tree controls the values (represented as periods) of all

[PULL 135/136] accel/kvm: Check ioctl(KVM_SET_USER_MEMORY_REGION) return value

2020-02-25 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé kvm_vm_ioctl() can fail, check its return value, and log an error when it failed. This fixes Coverity CID 1412229: Unchecked return value (CHECKED_RETURN) check_return: Calling kvm_vm_ioctl without checking return value Reported-by: Coverity (CID 1412229) Fixes

[PATCH v3 06/21] linux-user, sh4: add syscall table generation support

2020-02-25 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/sh/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier --- configure| 3 +- linux-user/Makefile.objs | 1 + linux-user/sh4/Makefile.objs | 5 + linux-user/sh4/syscal

[PATCH v3 18/21] linux-user, scripts: add a script to update syscall.tbl

2020-02-25 Thread Laurent Vivier
scripts/update-syscalltbl.sh has the list of syscall.tbl to update and can copy them from the linux source directory Signed-off-by: Laurent Vivier --- MAINTAINERS | 1 + scripts/update-syscalltbl.sh | 49 2 files changed, 50 insertions(+) c

Re: [PATCH] pc-bios/s390x: Pack ResetInfo struct

2020-02-25 Thread Jason J. Herne
On 2/25/20 6:13 AM, Christian Borntraeger wrote: On 25.02.20 11:23, Jason J. Herne wrote: On 2/13/20 1:24 PM, Christian Borntraeger wrote: ... diff --git a/pc-bios/s390-ccw/jump2ipl.c b/pc-bios/s390-ccw/jump2ipl.c index da13c43cc0..8839226803 100644 --- a/pc-bios/s390-ccw/jump2ipl.c +++ b/pc-

[PATCH v3 15/21] linux-user, x86_64: add syscall table generation support

2020-02-25 Thread Laurent Vivier
Copy syscall_64.tbl and syscallhdr.sh from linux/arch/x86/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier --- configure| 3 +- linux-user/Makefile.objs | 1 + linux-user/x86_64/Makefile.objs | 5 + linux

[PATCH v3 02/21] linux-user, alpha: add syscall table generation support

2020-02-25 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/alpha/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier --- configure | 3 +- linux-user/Makefile.objs | 2 + linux-user/alpha/Makefile.objs | 5 + linux-user/a

[PATCH v3 07/21] linux-user, microblaze: add syscall table generation support

2020-02-25 Thread Laurent Vivier
Copy syscall.tbl and syscallhdr.sh from linux/arch/microblaze/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Signed-off-by: Laurent Vivier --- configure | 3 +- linux-user/Makefile.objs| 1 + linux-user/microblaze/Makefile.objs

Re: [PATCH v4 2/3] acpi:pci-expender-bus: Add pxb support for arm

2020-02-25 Thread Michael S. Tsirkin
On Tue, Feb 25, 2020 at 12:44:15PM +, miaoyubo wrote: > > > > -Original Message- > > From: Michael S. Tsirkin [mailto:m...@redhat.com] > > Sent: Tuesday, February 25, 2020 8:27 PM > > To: miaoyubo > > Cc: Philippe Mathieu-Daudé ; > > peter.mayd...@linaro.org; shannon.zha...@gmail.com

[PATCH v8 7/9] hw/char/cadence_uart: add clock support

2020-02-25 Thread Damien Hedde
Switch the cadence uart to multi-phase reset and add the reference clock input. The input clock frequency is added to the migration structure. The reference clock controls the baudrate generation. If it disabled, any input characters and events are ignored. If this clock remains unconnected, the

[PATCH v3 17/21] linux-user, mips64: add syscall table generation support

2020-02-25 Thread Laurent Vivier
Copy syscall_n32.tbl, syscall_n64.tbl and syscallhdr.sh from linux/arch/parisc/kernel/syscalls v5.5 Update syscallhdr.sh to generate QEMU syscall_nr.h Move the offsets (6000 for n32 and 5000 for n64) from the file to the Makefile.objs to be passed to syscallhdr.sh Signed-off-by: Laurent Vivier -

[PATCH v2 4/4] Acceptance test: provides to use RDMA transport for migration test

2020-02-25 Thread Oksana Vohchana
Adds test for RDMA migration check Signed-off-by: Oksana Vohchana --- tests/acceptance/migration.py | 9 + 1 file changed, 9 insertions(+) diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py index 5632d74f14..9b58b5a629 100644 --- a/tests/acceptance/migration.py +

[PATCH v3 11/21] linux-user, s390x: add syscall table generation support

2020-02-25 Thread Laurent Vivier
Copy syscall.tbl from linux/arch/s390x/kernel/syscalls v5.5 Copy syscallhdr.sh from m68k. Signed-off-by: Laurent Vivier --- configure | 3 +- linux-user/Makefile.objs | 1 + linux-user/s390x/Makefile.objs | 5 + linux-user/s390x/syscall.tbl | 440 ++

[PATCH v2 3/4] Acceptance test: provides new functions

2020-02-25 Thread Oksana Vohchana
Provides new functions related to the rdma migration test Adds functions to check if service RDMA is enabled and gets the ip address on the interface where it was configured Signed-off-by: Oksana Vohchana --- tests/acceptance/migration.py | 26 ++ 1 file changed, 26 inser

[PATCH v3 20/21] linux-user,mips: move content of mips_syscall_args

2020-02-25 Thread Laurent Vivier
Move content of mips_syscall_args to mips-syscall-args-o32.c.inc to ease automatic update. No functionnal change Signed-off-by: Laurent Vivier --- linux-user/mips/cpu_loop.c | 440 + linux-user/mips/syscall-args-o32.c.inc | 438 2 file

RE: [PATCH v4 3/3] ACPI/unit-test: Add a new test for pxb-pcie for arm

2020-02-25 Thread miaoyubo
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Tuesday, February 25, 2020 7:25 PM > To: miaoyubo > Cc: peter.mayd...@linaro.org; shannon.zha...@gmail.com; Xiexiangyou > ; imamm...@redhat.com; qemu- > de...@nongnu.org; berra...@redhat.com > Subject: Re: [

Re: [PATCH v2 04/17] target/arm: Add isar_feature_aa64_fp_simd, isar_feature_aa32_vfp

2020-02-25 Thread Peter Maydell
On Mon, 24 Feb 2020 at 22:22, Richard Henderson wrote: > > We cannot easily create "any" functions for these, because the > ID_AA64PFR0 fields for FP and SIMD signal "enabled" with zero. > Which means that an aarch32-only cpu will return incorrect results > when testing the aarch64 registers. > >

[PATCH v8 0/9] Clock framework API

2020-02-25 Thread Damien Hedde
This series aims to add a way to model clock distribution in qemu. The proposed objet and qdev API allows to model the clock tree of a platform allowing us to inspect clock configuration and detect problems such as disabled clock or bad configured pll. This fast v8 fixes the documentation rst patc

Re: [PATCH v4 2/3] acpi:pci-expender-bus: Add pxb support for arm

2020-02-25 Thread Michael S. Tsirkin
On Tue, Feb 25, 2020 at 12:12:12PM +, miaoyubo wrote: > > > -Original Message- > > From: Philippe Mathieu-Daudé [mailto:phi...@redhat.com] > > Sent: Tuesday, February 25, 2020 5:48 PM > > To: miaoyubo ; peter.mayd...@linaro.org; > > shannon.zha...@gmail.com > > Cc: berra...@redhat.com;

Re: [PATCH 8/9] virStorageFileGetMetadataRecurse: Allow format probing under special circumstances

2020-02-25 Thread Peter Krempa
On Tue, Feb 25, 2020 at 12:50:21 +, Daniel Berrange wrote: > On Mon, Feb 24, 2020 at 06:10:46PM +0100, Peter Krempa wrote: > > On Mon, Feb 24, 2020 at 14:24:15 +, Daniel Berrange wrote: > > > On Mon, Feb 24, 2020 at 02:34:16PM +0100, Peter Krempa wrote: [...] > > > Would there be any down

[PATCH v3 02/19] tests/rcutorture: update usage hint

2020-02-25 Thread Alex Bennée
Although documented in the comments we don't display all the various invocations we can in the usage. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- tests/rcutorture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/rcutorture.c b/tests/rcutorture

Re: [PATCH v24 05/10] ACPI: Build Hardware Error Source Table

2020-02-25 Thread Igor Mammedov
On Mon, 17 Feb 2020 21:12:43 +0800 Dongjiu Geng wrote: > This patch builds Hardware Error Source Table(HEST) via fw_cfg blobs. > Now it only supports ARMv8 SEA, a type of Generic Hardware Error > Source version 2(GHESv2) error source. Afterwards, we can extend > the supported types if needed. For

[PATCH v3 01/19] tests/tcg: include a skip runner for pauth3 with plugins

2020-02-25 Thread Alex Bennée
If we have plugins enabled we still need to have built the test to be able to run it. Signed-off-by: Alex Bennée Reviewed-by: Robert Foley --- tests/tcg/aarch64/Makefile.softmmu-target | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/tcg/aarch64/Makefile.softmmu-target b/tests/tcg/a

[PATCH v3 09/19] tracing: only allow -trace to override -D if set

2020-02-25 Thread Alex Bennée
Otherwise any -D settings the user may have made get ignored. Signed-off-by: Alex Bennée Tested-by: Laurent Vivier Reviewed-by: Robert Foley --- trace/control.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/trace/control.c b/trace/control.c index 6c775e68eba..

[PATCH v8 8/9] hw/arm/xilinx_zynq: connect uart clocks to slcr

2020-02-25 Thread Damien Hedde
Add the connection between the slcr's output clocks and the uarts inputs. Also add the main board clock 'ps_clk', which is hard-coded to 33.33MHz (the default frequency). This clock is used to feed the slcr's input clock. Signed-off-by: Damien Hedde --- v7 + update ClockIn/ClockOut types + si

[PATCH v3 03/19] tests/rcutorture: better document locking of stats

2020-02-25 Thread Alex Bennée
This is pure code motion with no functional effect. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- tests/rcutorture.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tests/rcutorture.c b/tests/rcutorture.c index e8b2169e7dd..256d24ed5ba

[PATCH v3 06/19] travis.yml: Fix Travis YAML configuration warnings

2020-02-25 Thread Alex Bennée
From: Wainer dos Santos Moschetta This fixes the following warnings Travis has detected on the YAML configuration: - 'on root: missing os, using the default "linux"' - 'on root: the key matrix is an alias for jobs, using jobs' - 'on jobs.include.python: unexpected sequence, using the first value

[PATCH v3 10/19] docs/devel: document query handle lifetimes

2020-02-25 Thread Alex Bennée
I forgot to document the lifetime of handles in the developer documentation. Do so now. Signed-off-by: Alex Bennée Reviewed-by: Robert Foley Reviewed-by: Robert Foley --- docs/devel/tcg-plugins.rst | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/devel/tc

[PATCH v3 05/19] travis.yml: Test the s390-ccw build, too

2020-02-25 Thread Alex Bennée
From: Thomas Huth Since we can now use a s390x host on Travis, we can also build and test the s390-ccw bios images there. For this we have to make sure that roms/SLOF is checked out, too, and then move the generated *.img files to the right location before running the tests. Signed-off-by: Thoma

Re: [PATCH v2 0/2] hw/arm/integratorcp: Map Audio controller and parallel flash

2020-02-25 Thread Peter Maydell
On Sun, 23 Feb 2020 at 23:30, Philippe Mathieu-Daudé wrote: > > While looking whether Thomas's test patch [*] requires a respin > or not, I noticed we could complete the integrator model. > Thomas patch still applies properly ;) > > Since v1: > - Added uncommitted Kconfig > - Use hobbyist git-iden

<    1   2   3   4   5   6   >