Re: [PATCH] KVM: x86: do not fail if software breakpoint has already been removed

2021-03-12 Thread Maxim Levitsky
On Fri, 2021-03-12 at 12:59 +0100, Stefano Garzarella wrote: > On Thu, Mar 11, 2021 at 02:53:15PM +0200, Maxim Levitsky wrote: > > On Thu, 2021-03-04 at 11:15 +0100, Stefano Garzarella wrote: > > > On Wed, Mar 03, 2021 at 02:07:24PM +0200, Maxim Levitsky wrote: > > > > On Tue, 2021-03-02 at 15:52 +

[PATCH v3 5/5] tests/tcg/mips: Test user mode DMULT for the R5900

2021-03-12 Thread Philippe Mathieu-Daudé
From: Fredrik Noring The R5900 reports itself as MIPS III but does not implement DMULT. Verify that DMULT is emulated properly in user mode by multiplying two 64-bit numbers to produce a 128-bit number. Signed-off-by: Fredrik Noring Message-Id: [PMD: Moved to tests/tcg/mips/] Signed-off-by: P

[Bug 1918917] Re: synchronous about on accessing unused I/O ports on aarch64

2021-03-12 Thread Dmitry Vyukov
The image is (gunzip it after download): https://storage.googleapis.com/syzkaller/images/buildroot-arm64-2020.11.gz Kernel: https://storage.googleapis.com/syzkaller/temp/arm64-Image qemu command line: qemu-system-aarch64 \ -machine virt,virtualization=on,graphics=on,usb=on -cpu cortex-a5

Re: [PATCH] fdc: fix floppy boot for Red Hat Linux 5.2

2021-03-12 Thread John Snow
On 3/12/21 3:01 AM, Thomas Huth wrote: That whole table-based approach seems quite unreliable to me - I've seen floppy disks with 80, 81, 82 or sometimes even 83 tracks in the past, so I think we would do better with a more flexible way of guessing ... but for the time being, this is certainl

Re: [PATCH v3 5/6] block-coroutine-wrapper: allow non bdrv_ prefix

2021-03-12 Thread Max Reitz
On 05.03.21 18:35, Vladimir Sementsov-Ogievskiy wrote: We are going to reuse the script to generate a qcow2_ function in further commit. Prepare the script now. Signed-off-by: Vladimir Sementsov-Ogievskiy --- scripts/block-coroutine-wrapper.py | 7 --- 1 file changed, 4 insertions(+), 3

Re: all class init functions for all types in QEMU are called in select_machine(). Expected?

2021-03-12 Thread Paolo Bonzini
On 12/03/21 14:40, Claudio Fontana wrote: /* * double dispatch. The first callback allows the accel cpu * to run initializations for the CPU, * the second one allows the CPU to customize the accel cpu * behavior according to the CPU. * * The second is curr

Re: [RFC PATCH 32/42] docker: Add gentoo-mipsr5900el-cross image

2021-03-12 Thread Maciej W. Rozycki
On Fri, 12 Mar 2021, Philippe Mathieu-Daudé wrote: > >>> Is there any way we can do this with a distro that isn't Gentoo > >>> so that we can get a container build that is fast enough to be > >>> useful for CI ? > > Using the Debian cross image I get: > > /home/phil/source/qemu/tests/docker/dock

Re: [PATCH v6 0/5] Enable plugin support on msys2/mingw

2021-03-12 Thread Alex Bennée
Yonggang Luo writes: > V5-V6=0D > Skip merged patches=0D Queued to 1 and 2 into plugins/next, thanks. > =0D > V3-V4=0D > Split plugin: Fixes typo in qemu-plugin.h out=0D > Trying to explain the design of=0D > plugin: Getting qemu-plugin works under win32.=0D > =0D > V1-V2=0D > 1. Fixes revie

Re: just a thank you for the TCG tests in tests/tcg

2021-03-12 Thread Alex Bennée
Claudio Fontana writes: > Hi Alex, > > just wanted to say thanks for the TCG tests in tests/tcg. > > They caught things during my work that nothing else was catching. > > In particular, the test-armv6m-undef test: > > qemu/tests/tcg/arm/test-armv6m-undef.S > > caught a nasty bug that I risked i

[RFC v7 03/42] arm: tcg: only build under CONFIG_TCG

2021-03-12 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/arm/tcg/meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build index 0bd4e9d954..3b4146d079 100644 --- a/target/arm/tcg/meson.build +++

[RFC v7 02/42] target/arm: move helpers to tcg/

2021-03-12 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson [claudio: moved vec_internal.h and op_addsub.h to tcg/ too] Signed-off-by: Claudio Fontana --- meson.build | 1 + target/arm/{ => tcg}/op_addsub.h | 0 target/arm/tcg/trace.h | 1 + tar

[RFC v7 04/42] target/arm: tcg: add sysemu and user subsirs

2021-03-12 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/arm/tcg/meson.build| 3 +++ target/arm/tcg/sysemu/meson.build | 3 +++ target/arm/tcg/user/meson.build | 3 +++ 3 files changed, 9 insertions(+) create mode 100644 target/arm/tcg/sysemu/meson.build create mode 100644 target/arm/tcg/user/meson.

[RFC v7 06/42] target/arm: split off cpu-sysemu.c

2021-03-12 Thread Claudio Fontana
move work is needed later on to split things into tcg-specific portions and kvm-specific portions of this Signed-off-by: Claudio Fontana --- target/arm/internals.h | 8 ++- target/arm/cpu-sysemu.c | 105 target/arm/cpu.c| 83 --

[RFC v7 05/42] target/arm: only build psci for TCG

2021-03-12 Thread Claudio Fontana
We do not move psci.c to tcg/ because we expect other hypervisors to use it (waiting for HVF enablement). Signed-off-by: Claudio Fontana Cc: Alexander Graf --- target/arm/meson.build | 4 1 file changed, 4 insertions(+) diff --git a/target/arm/meson.build b/target/arm/meson.build index 01

[RFC v7 00/42] arm cleanup experiment for kvm-only build

2021-03-12 Thread Claudio Fontana
Here a new version of the series that enables kvm-only builds. The goal here is to enable the KVM-only build. All tests are ok, so I added also some patches to start adding the kvm cpu accel and the tcg cpu accel. In this iteration, I added a mechanism to deal with the need to adapt the TCGOps to

[RFC v7 01/42] target/arm: move translate modules to tcg/

2021-03-12 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/arm/{ => tcg}/translate-a64.h | 0 target/arm/{ => tcg}/translate.h | 0 target/arm/{ => tcg}/a32-uncond.decode| 0 target/arm/{ => tcg}/a32.decode | 0 target/arm/{ => tcg}/m-nocp.decode

[RFC v7 17/42] target/arm: move arm_mmu_idx* to cpu-mmu

2021-03-12 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/arm/cpu-mmu.c| 95 + target/arm/tcg/helper.c | 95 - 2 files changed, 95 insertions(+), 95 deletions(-) diff --git a/target/arm/cpu-mmu.c b/target/arm/cpu-mmu.c index f46

[RFC v7 12/42] target/arm: only perform TCG cpu and machine inits if TCG enabled

2021-03-12 Thread Claudio Fontana
of note, cpreg lists were previously initialized by TCG first, and then thrown away and replaced with the data coming from KVM. Now we just initialize once, either for TCG or for KVM. Signed-off-by: Claudio Fontana --- target/arm/cpu.c | 32 ++-- target/arm/kvm.c

[RFC v7 11/42] target/arm: move cpu definitions to common cpu module

2021-03-12 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/arm/cpu-common.c | 41 + target/arm/tcg/helper.c | 29 - target/arm/meson.build | 1 + 3 files changed, 42 insertions(+), 29 deletions(-) create mode 100644 target/arm/cpu-common.c di

[RFC v7 28/42] target/arm: move kvm-const.h, kvm.c, kvm64.c, kvm_arm.h to kvm/

2021-03-12 Thread Claudio Fontana
From: Claudio Fontana and adapt the code including the header references, and trace-events / trace.h Signed-off-by: Claudio Fontana --- meson.build | 2 +- target/arm/cpu.h | 2 +- target/arm/{ => kvm}/kvm-consts.h | 0 target/arm/{ => kvm}/kvm_arm.h

[RFC v7 15/42] target/arm: add temporary stub for arm_rebuild_hflags

2021-03-12 Thread Claudio Fontana
this should go away once the configuration and hw/arm is clean Signed-off-by: Claudio Fontana --- hw/arm/boot.c | 5 - target/arm/arm-powerctl.c | 8 +--- target/arm/kvm/helper-stubs.c | 6 ++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/hw/arm/

[RFC v7 16/42] target/arm: split vfp state setting from tcg helpers

2021-03-12 Thread Claudio Fontana
cpu-vfp.c: vfp_get_fpsr and vfp_set_fpsr are needed also for KVM, so create a new cpu-vfp.c tcg/cpu-vfp.c: vfp_get_fpscr_from_host and vv are TCG-only, so we move the implementation to tcg/cpu-vfp.c kvm/helper-stubs.c: vfp_get_fpscr_from_host and vv stubs for KVM. Signe

[RFC v7 08/42] target/arm: cpu-mmu: fix comment style

2021-03-12 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/arm/cpu-mmu.h| 3 +- target/arm/cpu-mmu-sysemu.c | 149 2 files changed, 101 insertions(+), 51 deletions(-) diff --git a/target/arm/cpu-mmu.h b/target/arm/cpu-mmu.h index fdedc8fb92..01b060613a 100644 --- a/

[RFC v7 18/42] target/arm: move sve_zcr_len_for_el to common_cpu

2021-03-12 Thread Claudio Fontana
it is required by arch-dump.c and cpu.c, so apparently we need this for KVM too Signed-off-by: Claudio Fontana --- target/arm/cpu-common.c | 43 + target/arm/tcg/helper.c | 33 --- 2 files changed, 43 insertions(+), 33 deletions

[RFC v7 10/42] target/arm: cpregs: fix style (mostly just comments)

2021-03-12 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/arm/cpregs.h | 54 ++--- target/arm/cpregs.c | 60 ++ target/arm/tcg/cpregs.c | 253 ++-- 3 files changed, 241 insertions(+), 126 deletions(-) diff --git a/target/arm/cpregs.h b/target/arm/cpregs.

[RFC v7 13/42] target/arm: kvm: add stubs for some helpers

2021-03-12 Thread Claudio Fontana
at least the armv7m one should go away with proper configuration changes (only enabling possible boards for KVM). Signed-off-by: Claudio Fontana --- target/arm/kvm/helper-stubs.c | 27 +++ target/arm/kvm/meson.build| 3 +++ target/arm/meson.build| 1 + 3 fil

[RFC v7 36/42] Revert "target/arm: Restrict v8M IDAU to TCG"

2021-03-12 Thread Claudio Fontana
This reverts commit 6e937ba7f8fb90d66cb3781f7fed32fb4239556a This change breaks quickly at startup, as all interfaces in boards are checked in vl.c in select_machine(): { GSList *machines = object_class_get_list(TYPE_MACHINE, false); } In order to restrict v8M IDAU to TCG, we need to first disa

[RFC v7 23/42] target/arm: move sve_exception_el out of TCG helpers

2021-03-12 Thread Claudio Fontana
we need this for KVM too. Signed-off-by: Claudio Fontana --- target/arm/cpu-sysemu.c | 60 target/arm/cpu-user.c | 5 target/arm/tcg/helper.c | 61 - 3 files changed, 65 insertions(+), 61 deletions(-) diff

[RFC v7 20/42] target/arm: move arm_cpu_list to common_cpu

2021-03-12 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/arm/cpu-common.c | 42 + target/arm/tcg/helper.c | 41 2 files changed, 42 insertions(+), 41 deletions(-) diff --git a/target/arm/cpu-common.

[RFC v7 14/42] target/arm: move cpsr_read, cpsr_write to cpu_common

2021-03-12 Thread Claudio Fontana
we need as a result to move switch_mode too, so we put an implementation into cpu_user and cpu_sysemu. Signed-off-by: Claudio Fontana --- target/arm/cpu.h| 2 + target/arm/cpu-common.c | 192 +++ target/arm/cpu-sysemu.c | 30 ++ target/arm/cpu-user.

[RFC v7 40/42] accel: add double dispatch mechanism for class initialization

2021-03-12 Thread Claudio Fontana
while on x86 all CPU classes can use the same set of TCGCPUOps, on ARM the right accel behavior depends on the type of the CPU. So we need a way to specialize the accel behavior according to the CPU. Therefore, add a second initialization, after the accel_cpu->cpu_class_init, that allows to do thi

[RFC v7 26/42] target/arm: wrap call to aarch64_sve_change_el in tcg_enabled()

2021-03-12 Thread Claudio Fontana
After this patch it is possible to build only kvm: ./configure --disable-tcg --enable-kvm Signed-off-by: Claudio Fontana --- target/arm/cpu-sysemu.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/target/arm/cpu-sysemu.c b/target/arm/cpu-sysemu.c index eb928832a

[RFC v7 22/42] target/arm: split a15 cpu model and 32bit class functions to cpu32.c

2021-03-12 Thread Claudio Fontana
provide helper functions there to initialize 32bit models, and export the a15 cpu model. We still need to keep around a15 until we sort out the board configurations. cpu.c will continue to contain the common parts between 32 and 64. Note that we need to build cpu32 also for TARGET_AARCH64, becau

[RFC v7 19/42] target/arm: move arm_sctlr away from tcg helpers

2021-03-12 Thread Claudio Fontana
this function is used for kvm too, add it to the cpu-common module. Signed-off-by: Claudio Fontana --- target/arm/cpu-common.c | 11 +++ target/arm/tcg/helper.c | 11 --- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/target/arm/cpu-common.c b/target/arm/cpu-com

[RFC v7 42/42] target/arm: move TCG gt timer creation code in tcg/

2021-03-12 Thread Claudio Fontana
we need to be careful not to use if (tcg_enabled()) here, because of the VMSTATE definitions in machine.c, which are only protected by CONFIG_TCG, and thus it would break the --enable-tcg --enable-kvm build. Signed-off-by: Claudio Fontana --- target/arm/tcg/tcg-cpu.h| 1 + target/arm/

[RFC v7 21/42] target/arm: move aarch64_sync_32_to_64 (and vv) to cpu code

2021-03-12 Thread Claudio Fontana
and arm_phys_excp_target_el since it is tied up inside the same #ifdef block. aarch64_sync_32_to_64 and aarch64_sync_64_to_32 are mixed in with the TCG helpers, but they shouldn't, as they are needed for KVM too. kvm_arch_get_registers() { if (!is_a64(env)) { aarch64_sync_64_to_32(env

[RFC v7 24/42] target/arm: refactor exception and cpu code

2021-03-12 Thread Claudio Fontana
move exception code out of tcg/ as we need part of it for KVM too. put the exception code into separate cpu modules as appropriate, including: cpu-sysemu.c tcg/tcg-cpu.c tcg/sysemu/tcg-cpu.c to avoid naming confusion with the existing cpu_tcg.c, containg cpu models definitions for 32bit TCG-only

[RFC v7 25/42] target/arm: cpu: fix style

2021-03-12 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Philippe Mathieu-Daudé --- target/arm/cpu-sysemu.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/target/arm/cpu-sysemu.c b/target/arm/cpu-sysemu.c index 126263dbf4..eb928832a9 100644 --- a/target/arm/cpu-sysemu.

[RFC v7 37/42] target/arm: create kvm cpu accel class

2021-03-12 Thread Claudio Fontana
start by moving minimal init and realizefn code. Signed-off-by: Claudio Fontana --- target/arm/internals.h | 1 - target/arm/cpu-sysemu.c| 32 -- target/arm/cpu.c | 43 +++-- target/arm/kvm/kvm-cpu.c | 122 + target/arm/

[RFC v7 31/42] tests/qtest: skip bios-tables-test test_acpi_oem_fields_virt for KVM

2021-03-12 Thread Claudio Fontana
test is TCG-only. Signed-off-by: Claudio Fontana Cc: Philippe Mathieu-Daudé --- tests/qtest/bios-tables-test.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index e020c83d2a..bd7b85909c 100644 --- a/tests/qtest/bios-ta

[RFC v7 29/42] target/arm: cleanup cpu includes

2021-03-12 Thread Claudio Fontana
From: Claudio Fontana cpu.c, cpu32.c, cpu64.c, tcg/sysemu/tcg-cpu.c, all need a good cleanup when it comes to included header files. Signed-off-by: Claudio Fontana --- target/arm/cpu.c| 8 ++-- target/arm/cpu32.c | 14 -- target/arm/cpu64.c

[RFC v7 27/42] target/arm: remove kvm include file for PSCI and arm-powerctl

2021-03-12 Thread Claudio Fontana
From: Claudio Fontana The QEMU PSCI implementation is not used for KVM, we do not need the kvm constants header. Signed-off-by: Claudio Fontana --- target/arm/arm-powerctl.h | 2 -- target/arm/psci.c | 1 - 2 files changed, 3 deletions(-) diff --git a/target/arm/arm-powerctl.h b/targe

[RFC v7 32/42] tests: restrict TCG-only arm-cpu-features tests to TCG builds

2021-03-12 Thread Claudio Fontana
sve_tests_sve_max_vq_8, sve_tests_sve_off, test_query_cpu_model_expansion all require TCG to run. Skip them for KVM-only builds. Signed-off-by: Claudio Fontana --- tests/qtest/arm-cpu-features.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/tests/qtest/arm-cpu-features.c

[RFC v7 30/42] target/arm: remove broad "else" statements when checking accels

2021-03-12 Thread Claudio Fontana
There might be more than just KVM and TCG in the future, so where appropriate, replace broad "else" statements with the appropriate if (accel_enabled()) check. Also invert some checks for !kvm_enabled() or !tcg_enabled() where it seems appropriate to do so. Note that to make qtest happy we need t

[RFC v7 33/42] tests: do not run test-hmp on all machines for ARM KVM-only

2021-03-12 Thread Claudio Fontana
on ARM we currently list and build all machines, even when building KVM-only, without TCG. Until we fix this (and we only list and build machines that are compatible with KVM), only test specifically using the "virt" machine in this case. Signed-off-by: Claudio Fontana Cc: Philippe Mathieu-Daudé

[PULL 6/9] gitlab-ci.yml: Merge check-crypto-old jobs into the build-crypto-old jobs

2021-03-12 Thread Thomas Huth
Both, the build-crypto-old and the check-crypto-old jobs finish reasonably fast, and the build artifacts are only used for the single corresponding check jobs, so there is no reason for doing the check step in a separate job here. Thus let's stop wasting artifacts space and job scheduler over- head

[RFC v7 39/42] accel: move call to accel_init_interfaces

2021-03-12 Thread Claudio Fontana
move the call for sysemu specifically in machine_run_board_init, mirror the calling sequence for user mode too. Suggested-by: Paolo Bonzini Signed-off-by: Claudio Fontana --- bsd-user/main.c | 2 +- hw/core/machine.c | 1 + linux-user/main.c | 2 +- softmmu/vl.c | 1 - 4 files changed, 3

[RFC v7 38/42] target/arm: move kvm cpu properties setting to kvm-cpu

2021-03-12 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- target/arm/cpu.c | 4 target/arm/kvm/kvm-cpu.c | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 3d6501c2c5..ac01fa0bae 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -786,10 +786

[RFC v7 35/42] tests: do not run qom-test on all machines for ARM KVM-only

2021-03-12 Thread Claudio Fontana
on ARM we currently list and build all machines, even when building KVM-only, without TCG. Until we fix this (and we only list and build machines that are compatible with KVM), only test specifically using the "virt" machine in this case. Signed-off-by: Claudio Fontana Cc: Philippe Mathieu-Daudé

[PULL 5/9] gitlab-ci.yml: Merge one of the coroutine jobs with the tcg-disabled job

2021-03-12 Thread Thomas Huth
Our gitlab-ci got quite slow in the past weeks, due to the immense amount of jobs that we have, so we should try to reduce the number of jobs. Since we already have a job that builds without TCG, we can merge one of the "build-coroutine" jobs with it to get rid of at least one job. Message-Id: <20

[PULL 2/9] tests: Move benchmarks into a separate folder

2021-03-12 Thread Thomas Huth
Make it clear that these files are related to benchmarks by moving them into a new folder called "bench". Message-Id: <20210312092238.79509-1-th...@redhat.com> Acked-by: Paolo Bonzini Signed-off-by: Thomas Huth --- MAINTAINERS | 2 +- tests/{ => bench}/atomic64-

[RFC v7 34/42] tests: device-introspect-test: cope with ARM TCG-only devices

2021-03-12 Thread Claudio Fontana
Skip the test_device_intro_concrete for now for ARM KVM-only build, as on ARM we currently build devices for ARM that are not compatible with a KVM-only build. We can remove this workaround when we fix this in KConfig etc, and we only list and build machines that are compatible with KVM for KVM-on

[RFC v7 41/42] target/arm: add tcg cpu accel class

2021-03-12 Thread Claudio Fontana
start by moving minimal init and realizefn code. Signed-off-by: Claudio Fontana Cc: Paolo Bonzini --- target/arm/tcg/tcg-cpu.h| 4 ++- target/arm/cpu.c| 38 +++ target/arm/tcg/sysemu/tcg-cpu.c | 27 +++ target/arm/tcg/tcg-cpu-mode

[PULL 8/9] MAINTAINERS: Merge the Gitlab-CI section into the generic CI section

2021-03-12 Thread Thomas Huth
The status of the gitlab-CI files is currently somewhat confusing, and it is often not quite clear whether a patch should go via my tree or via the testing tree of Alex. That situation has grown historically... Initially, I was the only one using the gitlab-CI, just for my private repository there.

[PULL 0/9] Gitlab-CI, tests and docs

2021-03-12 Thread Thomas Huth
The following changes since commit 363fc963054d8e82cfd55fa9b9aa130692a8dbd7: Merge remote-tracking branch 'remotes/legoater/tags/pull-aspeed-20210309' into staging (2021-03-11 11:18:27 +) are available in the Git repository at: https://gitlab.com/thuth/qemu.git tags/pull-request-2021-03

[PULL 3/9] gitlab-ci.yml: Move build-tools-and-docs-debian to a better place

2021-03-12 Thread Thomas Huth
The "build-tools-and-docs-debian" job had been added in between the "check-system-debian" and the "accepance-system-debian" jobs and thus separates the jobs that belong together. Move it away, to the end of the file, next to the "pages" job that depends on it. And while we're at it, also add a prop

[PULL 4/9] gitlab-ci.yml: Add some missing dependencies to the jobs

2021-03-12 Thread Thomas Huth
Let's make sure that all jobs have proper "needs:" statements so that they can start as soon as possible, without having to wait for the previous pipeline stage to finish. Message-Id: <20210311142211.1547864-3-th...@redhat.com> Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- .gitl

[PULL 9/9] README: Add Documentation blurb

2021-03-12 Thread Thomas Huth
From: John Snow Add it in a prominent place: Right after figuring out what QEMU is, users may wish to know how to use it more than they want to know how to build their own version of it. Signed-off-by: John Snow Message-Id: <20201104193032.1319248-1-js...@redhat.com> Signed-off-by: Thomas Huth

[PULL 1/9] tests: Move unit tests into a separate directory

2021-03-12 Thread Thomas Huth
The main tests directory still looks very crowded, and it's not clear which files are part of a unit tests and which belong to a different test subsystem. Let's clean up the mess and move the unit tests to a separate directory. Message-Id: <20210310063314.1049838-1-th...@redhat.com> Acked-by: Paol

[PULL 7/9] tests: remove "make check-speed" in favor of "make bench"

2021-03-12 Thread Thomas Huth
From: Paolo Bonzini "make check-speed" has been broken since the removal of ninja2make last October. It was just a backwards-compatibility alias for "make bench-speed", which in turn is in principle a subset of "make bench". Advertise the latter and drop "make check-speed" completely since no o

[PATCH v1 03/14] docs/devel: include the plugin API information from the headers

2021-03-12 Thread Alex Bennée
We have kerneldoc tags for the headers so we might as well extract them into our developer documentation whilst we are at it. Signed-off-by: Alex Bennée --- docs/devel/tcg-plugins.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst

Re: all class init functions for all types in QEMU are called in select_machine(). Expected?

2021-03-12 Thread Claudio Fontana
On 3/12/21 6:04 PM, Paolo Bonzini wrote: > On 12/03/21 14:40, Claudio Fontana wrote: >> /* >> * double dispatch. The first callback allows the accel cpu >> * to run initializations for the CPU, >> * the second one allows the CPU to customize the accel cpu >> * behavior

[PATCH v2 0/3] vl: QAPIfy -object

2021-03-12 Thread Paolo Bonzini
This is a replacement for -object QAPIfication that keeps QemuOpts in order to not break some of the CLI parsing extensions that OptsVisitor includes. Since keyval is not used, support for directly passing JSON syntax to the option must be added manually, which is what patch 3 does. However, both

[PATCH v1 08/14] plugins: add qemu_plugin_cb_flags to kernel-doc

2021-03-12 Thread Alex Bennée
Also add a note to explain currently they are unused. Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 9ae3940d89..c98866a637 100644 --- a/

[PATCH v1 00/14] plugins/next (phys addr, syscalls, lots of docs)

2021-03-12 Thread Alex Bennée
Hi, This is rolling up the plugins changes for 6.0. A couple of fixes and I've also spent some time cleaning up the kernel-doc comments for the developer manual. The following need review: - plugins: expand kernel-doc for memory query and instrumentation - plugins: expand kernel-doc for inst

[PATCH v1 01/14] plugins: new syscalls plugin

2021-03-12 Thread Alex Bennée
From: Matthias Weckbecker This commit adds a new syscalls plugin that displays the syscalls as they are executed and returned. This plugin outputs the number of the syscall as well as the syscall return value. Works in *-user only. Essentially, this commit restores: https://lists.gnu.org/arc

[PATCH v2 1/3] tests: convert check-qom-proplist to keyval

2021-03-12 Thread Paolo Bonzini
The command-line creation test is using QemuOpts. Switch it to keyval, since the emulator has some special needs and thus the last user of user_creatable_add_opts will go away with the next patch. Reviewed-by: Kevin Wolf Signed-off-by: Paolo Bonzini --- tests/check-qom-proplist.c | 77

[PATCH v1 12/14] plugins: expand kernel-doc for memory query and instrumentation

2021-03-12 Thread Alex Bennée
Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 35 --- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index d4adce730a..aed868d42a 100644 --- a/include/qemu/qemu-plugin.h +++ b/inc

[PATCH v1 07/14] plugins: expand the typedef kernel-docs for translation

2021-03-12 Thread Alex Bennée
Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 09b235f0b4..9ae3940d89 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plu

[PATCH v1 02/14] plugins: Expose physical addresses instead of device offsets

2021-03-12 Thread Alex Bennée
From: Aaron Lindsay This allows plugins to query for full virtual-to-physical address translation for a given `qemu_plugin_hwaddr` and stops exposing the offset within the device itself. As this change breaks the API, QEMU_PLUGIN_VERSION is incremented. Signed-off-by: Aaron Lindsay Signed-off-b

[PATCH v2 2/3] qom: move user_creatable_add_opts logic to vl.c and QAPIfy it

2021-03-12 Thread Paolo Bonzini
Emulators are currently using OptsVisitor (via user_creatable_add_opts) to parse the -object command line option. This has one extra feature, compared to keyval, which is automatic conversion of integers to lists as well as support for lists as repeated options: -object memory-backend-ram,id=pc

[PATCH v1 13/14] plugins: getting qemu_plugin_get_hwaddr only expose one function prototype

2021-03-12 Thread Alex Bennée
From: Yonggang Luo This is used for counting how much function are export to qemu plugin. Signed-off-by: Yonggang Luo Reviewed-by: Alex Bennée Signed-off-by: Alex Bennée Message-Id: <20201013002806.1447-2-luoyongg...@gmail.com> --- plugins/api.c | 8 +++- 1 file changed, 3 insertions(+),

[PATCH v1 06/14] plugins: expand the callback typedef kernel-docs

2021-03-12 Thread Alex Bennée
Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index ac1bb318da..09b235f0b4 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/

[PATCH v1 05/14] plugins: cleanup kernel-doc for qemu_plugin_install

2021-03-12 Thread Alex Bennée
kernel-doc doesn't like multiple Note sections. Also add an explicit Return. Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 4b84c6c293..ac1bb3

Re: [RFC v7 41/42] target/arm: add tcg cpu accel class

2021-03-12 Thread Claudio Fontana
On 3/12/21 6:22 PM, Claudio Fontana wrote: > start by moving minimal init and realizefn code. > > Signed-off-by: Claudio Fontana > Cc: Paolo Bonzini > --- > target/arm/tcg/tcg-cpu.h| 4 ++- > target/arm/cpu.c| 38 +++ > target/arm/tcg/sysemu/tcg-

Re: all class init functions for all types in QEMU are called in select_machine(). Expected?

2021-03-12 Thread Paolo Bonzini
On 12/03/21 18:24, Claudio Fontana wrote: Ah, just saw this. I already sent the series, but we can rework and rethink this. No big deal; since you have the assertion it's okay as you posted, too. Paolo

[PATCH v1 10/14] plugins: expand inline exec kernel-doc documentation.

2021-03-12 Thread Alex Bennée
Remove the extraneous @cb parameter and document the non-atomic nature of the INLINE_ADD_U64 operation. Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin

[PATCH v1 09/14] plugins: add qemu_plugin_id_t to kernel-doc

2021-03-12 Thread Alex Bennée
Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index c98866a637..5ac6fe5f02 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -32,6 +32,9 @@ #defi

[PATCH v1 14/14] plugins: Fixes typo in qemu-plugin.h

2021-03-12 Thread Alex Bennée
From: Yonggang Luo Getting the comment consistence with the function name Signed-off-by: Yonggang Luo Signed-off-by: Alex Bennée Message-Id: <20201013002806.1447-3-luoyongg...@gmail.com> --- include/qemu/qemu-plugin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc

[PATCH v1 04/14] plugins: expand kernel-doc for qemu_info_t

2021-03-12 Thread Alex Bennée
It seems kernel-doc struggles a bit with typedef structs but with enough encouragement we can get something out of it. Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/include/qemu/qemu-plugin.h

[PATCH for-6.0 1/2] memory: Add offset_in_region to flatview_cb arguments

2021-03-12 Thread Peter Maydell
The function flatview_for_each_range() calls a callback for each range in a FlatView. Currently the callback gets the start and length of the range and the MemoryRegion involved, but not the offset within the MemoryRegion. Add this to the callback's arguments; we're going to want it for a new use

[PATCH v1 11/14] plugins: expand kernel-doc for instruction query and instrumentation

2021-03-12 Thread Alex Bennée
Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 52 -- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index dc05fc1932..d4adce730a 100644 --- a/include/qemu/qemu-plugin.h +++ b/

Re: [RFC PATCH 32/42] docker: Add gentoo-mipsr5900el-cross image

2021-03-12 Thread Philippe Mathieu-Daudé
Hi Maciej, On 3/12/21 6:05 PM, Maciej W. Rozycki wrote: > On Fri, 12 Mar 2021, Philippe Mathieu-Daudé wrote: > > Is there any way we can do this with a distro that isn't Gentoo > so that we can get a container build that is fast enough to be > useful for CI ? >> >> Using the Debian cr

[PATCH 1/5] hw/arm/aspeed: Do not directly map ram container onto main address bus

2021-03-12 Thread Philippe Mathieu-Daudé
The RAM container is exposed as an AddressSpace. AddressSpaces root MemoryRegion must not be mapped into other MemoryRegion, therefore map the RAM container using an alias. Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/aspeed.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff

[PATCH for-6.0 0/2] arm: Make M-profile VTOR loads on reset handle memory aliasing

2021-03-12 Thread Peter Maydell
For Arm M-profile CPUs, on reset the CPU must load its initial PC and SP from a vector table in guest memory. Because we can't guarantee reset ordering, we have to handle the possibility that the ROM blob loader's reset function has not yet run when the CPU resets, in which case the data in an ELF

[PATCH for-6.0 2/2] target/arm: Make M-profile VTOR loads on reset handle memory aliasing

2021-03-12 Thread Peter Maydell
For Arm M-profile CPUs, on reset the CPU must load its initial PC and SP from a vector table in guest memory. Because we can't guarantee reset ordering, we have to handle the possibility that the ROM blob loader's reset function has not yet run when the CPU resets, in which case the data in an ELF

[PATCH 3/5] hw/pci-host/prep: Remove unuseful memory region mapping

2021-03-12 Thread Philippe Mathieu-Daudé
The pci_io_non_contiguous region is mapped on top of pci_io with higher priority, but simply dispatch into this region address space. Simplify by directly registering the former region in place, and adapt the address space dispatch offsets. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/p

[PATCH v2 3/3] vl: allow passing JSON to -object

2021-03-12 Thread Paolo Bonzini
Extend the ObjectOption code that was added in the previous patch to enable passing JSON to -object. Even though we cannot yet add non-scalar properties with the human-friendly comma-separated syntax, they can now be added as JSON. Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by:

Re: [PATCH v1 03/14] docs/devel: include the plugin API information from the headers

2021-03-12 Thread Aaron Lindsay via
On Mar 12 17:28, Alex Bennée wrote: > We have kerneldoc tags for the headers so we might as well extract > them into our developer documentation whilst we are at it. > > Signed-off-by: Alex Bennée Reviewed-by: Aaron Lindsay > --- > docs/devel/tcg-plugins.rst | 5 + > 1 file changed, 5 ins

Re: [PATCH v1 04/14] plugins: expand kernel-doc for qemu_info_t

2021-03-12 Thread Aaron Lindsay via
On Mar 12 17:28, Alex Bennée wrote: > It seems kernel-doc struggles a bit with typedef structs but with > enough encouragement we can get something out of it. > > Signed-off-by: Alex Bennée Reviewed-by: Aaron Lindsay > --- > include/qemu/qemu-plugin.h | 22 +++--- > 1 file cha

Re: [PATCH v1 05/14] plugins: cleanup kernel-doc for qemu_plugin_install

2021-03-12 Thread Aaron Lindsay via
On Mar 12 17:28, Alex Bennée wrote: > kernel-doc doesn't like multiple Note sections. Also add an explicit > Return. > > Signed-off-by: Alex Bennée Reviewed-by: Aaron Lindsay > --- > include/qemu/qemu-plugin.h | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --gi

Re: [PATCH] Use identical prototype for tcg_out_vec_op and tcg_out_op function

2021-03-12 Thread Philippe Mathieu-Daudé
Cc'ing TCG maintainer ;) On 3/12/21 1:14 PM, mreza...@redhat.com wrote: > From: Miroslav Rezanina > > There are two different versions of prototype for tcg_out_op and > tcg_out_vec_op functions: > > 1) using const TCGArg *args and const int *const_args arguments > 2) using const TCGArg args[TCG

Re: [PATCH v1 07/14] plugins: expand the typedef kernel-docs for translation

2021-03-12 Thread Aaron Lindsay via
On Mar 12 17:28, Alex Bennée wrote: > Signed-off-by: Alex Bennée Reviewed-by: Aaron Lindsay > --- > include/qemu/qemu-plugin.h | 17 ++--- > 1 file changed, 10 insertions(+), 7 deletions(-) > > diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h > index 09b235f0b4

[PATCH 0/5] memory: Forbid mapping AddressSpace root MemoryRegion

2021-03-12 Thread Philippe Mathieu-Daudé
Hi, This series is the result of a long thread with Peter: https://www.mail-archive.com/qemu-devel@nongnu.org/msg788366.html AddressSpace are physical address view and shouldn't be using non-zero base address. The correct way to map a MR used as AS root is to use a MR alias. Fix the current inco

Re: [PATCH v3 6/6] block/qcow2: use seqcache for compressed writes

2021-03-12 Thread Vladimir Sementsov-Ogievskiy
12.03.2021 21:15, Max Reitz wrote: @@ -1834,6 +1835,10 @@ static int coroutine_fn qcow2_do_open(BlockDriverState *bs, QDict *options,   s->inflight_writes_counters =   g_hash_table_new_full(g_int64_hash, g_int64_equal, g_free, g_free); +    if (!has_data_file(bs) && (bs->file->bs->op

Re: [PULL 0/8] Ui 20210311 patches

2021-03-12 Thread Peter Maydell
On Thu, 11 Mar 2021 at 12:34, Gerd Hoffmann wrote: > > The following changes since commit 821e7ed167f11f482d2d1a8eaf114a667295a581: > > Merge remote-tracking branch 'remotes/thuth-gitlab/tags/pull-request-2021-0= > 3-09' into staging (2021-03-10 17:22:45 +) > > are available in the Git repos

[PATCH 5/5] memory: Make sure root MR won't be added as subregion

2021-03-12 Thread Philippe Mathieu-Daudé
From: Peter Xu Add a bool for MR to mark whether this MR is a root MR of an AS. We bail out asap if this MR is added as a subregion of another MR. Signed-off-by: Peter Xu --- include/exec/memory.h | 1 + softmmu/memory.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/exec

[PATCH 4/5] hw/pci-host/prep: Do not directly map bus-master region onto main bus

2021-03-12 Thread Philippe Mathieu-Daudé
The raven bus-master memory region is exposed as an AddressSpace. AddressSpaces root MemoryRegion must not be mapped into other MemoryRegion, therefore map the region using its alias. Signed-off-by: Philippe Mathieu-Daudé --- hw/pci-host/prep.c | 6 -- 1 file changed, 4 insertions(+), 2 dele

Re: [PATCH v3 6/6] block/qcow2: use seqcache for compressed writes

2021-03-12 Thread Vladimir Sementsov-Ogievskiy
12.03.2021 21:15, Max Reitz wrote: On 05.03.21 18:35, Vladimir Sementsov-Ogievskiy wrote: Compressed writes are unaligned to 512, which works very slow in O_DIRECT mode. Let's use the cache. Signed-off-by: Vladimir Sementsov-Ogievskiy ---   block/coroutines.h |   3 +   block/qcow2.h   

Re: [PATCH v1 10/14] plugins: expand inline exec kernel-doc documentation.

2021-03-12 Thread Aaron Lindsay via
On Mar 12 17:28, Alex Bennée wrote: > Remove the extraneous @cb parameter and document the non-atomic nature > of the INLINE_ADD_U64 operation. > > Signed-off-by: Alex Bennée Reviewed-by: Aaron Lindsay > --- > include/qemu/qemu-plugin.h | 12 +++- > 1 file changed, 11 insertions(+), 1

<    1   2   3   4   5   >