[RFC v13 56/80] target/arm: move kvm post init initialization to kvm cpu accel

2021-04-14 Thread Claudio Fontana
Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- 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 82856ffdb9..11a1e1cb66 100644 --- a/target/arm/cpu.c +++ b/

[RFC v13 38/80] target/arm: rename handle_semihosting to tcg_handle_semihosting

2021-04-14 Thread Claudio Fontana
make it clearer from the name that this is a tcg-only function. Signed-off-by: Claudio Fontana --- target/arm/tcg/tcg-cpu.h| 2 +- target/arm/cpu-sysemu.c | 2 +- target/arm/tcg/sysemu/tcg-cpu.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target/arm/tcg

[RFC v13 54/80] Revert "target/arm: Restrict v8M IDAU to TCG"

2021-04-14 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 v13 46/80] target/arm: cleanup cpu includes

2021-04-14 Thread 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 Acked-by: Richard Henderson --- target/arm/cpu.c| 7 ++- target/arm/cpu32.c | 14 -- target/arm/cpu64.c

[RFC v13 68/80] target/arm: tcg-sve: import narrow_vq and change_el functions

2021-04-14 Thread Claudio Fontana
aarch64_sve_narrow_vq and aarch64_sve_change_el are SVE-related functions only used for TCG, so we can put them in the tcg-sve.c module. Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/arm/cpu.h | 7 --- target/arm/tcg/tcg-sve.h | 5 ++ linux-u

[RFC v13 45/80] MAINTAINERS: update arm kvm maintained files to all in target/arm/kvm/

2021-04-14 Thread Claudio Fontana
Signed-off-by: Claudio Fontana --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7690efff71..10aafbf997 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -399,7 +399,7 @@ ARM KVM CPUs M: Peter Maydell L: qemu-...@nongnu.org S: Main

[RFC v13 64/80] target/arm: restrict rebuild_hflags_a64 to TARGET_AARCH64

2021-04-14 Thread Claudio Fontana
this work is in preparation of making sve_zcr_len_for_el AARCH64-only. Signed-off-by: Claudio Fontana --- target/arm/helper-a64.h | 2 ++ target/arm/helper.h | 1 - target/arm/tcg/helper.c | 12 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/target/arm/helper-a

[RFC v13 50/80] tests: restrict TCG-only arm-cpu-features tests to TCG builds

2021-04-14 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 v13 71/80] cpu-sve: rename sve_zcr_len_for_el to cpu_sve_get_zcr_len_for_el

2021-04-14 Thread Claudio Fontana
use a canonical module prefix followed by the get_zcr_len_for_el() method name. Also rename the static internal auxiliary function, where the module prefix is not necessary. Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/arm/cpu-sve.h | 2 +- target/arm/arch_dump.c

[RFC v13 48/80] target/arm: remove kvm-stub.c

2021-04-14 Thread Claudio Fontana
the functions used in machine.c are now protected via if (kvm_enabled()), so the stub is not needed. Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/arm/kvm-stub.c | 24 1 file changed, 24 deletions(-) delete mode 100644 target/arm/kvm-stub.c

[RFC v13 67/80] target/arm: tcg: restrict ZCR cpregs to TARGET_AARCH64

2021-04-14 Thread Claudio Fontana
restrict zcr_el1, zcr_el2, zcr_no_el2, zcr_el3 reginfo, and the related SVE functions to TARGET_AARCH64. Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/arm/tcg/cpregs.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/target/arm/tcg/cpregs.c

[RFC v13 58/80] target/arm: move TCG gt timer creation code in tcg/

2021-04-14 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 Reviewed-by: Richard Henderson --- target/arm/tcg/tcg-

[RFC v13 70/80] target/arm: move sve_zcr_len_for_el to TARGET_AARCH64-only cpu-sve

2021-04-14 Thread Claudio Fontana
now that we handled the dependency between HELPER(), cpregs defs and functions in tcg/, we can make sve_zcr_len_for_el TARGET_AARCH64-only, and move it to the cpu-sve module. Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/arm/cpu-sve.h| 3 +++ target/arm/cpu.h

[RFC v13 37/80] target/arm: move exception code out of tcg/helper.c

2021-04-14 Thread Claudio Fontana
cpu-sysemu.c: we need this sysemu code for KVM too, so we move the code to cpu-sysemu.c so we can reach a builable state. There will be further split later on in dedicated exception modules for 32 and 64bit, after we make more necessary changes to be able to split TARGET_AARCH64-only code. tcg/s

[RFC v13 57/80] target/arm: add tcg cpu accel class

2021-04-14 Thread Claudio Fontana
move init, realizefn and reset code into it. Signed-off-by: Claudio Fontana Cc: Paolo Bonzini --- target/arm/tcg/tcg-cpu.h| 4 ++- target/arm/cpu.c| 44 ++ target/arm/tcg/sysemu/tcg-cpu.c | 27 target/arm/tcg/tcg-cpu-models.c | 1

[PATCH v8] introduce vfio-user protocol specification

2021-04-14 Thread Thanos Makatos
This patch introduces the vfio-user protocol specification (formerly known as VFIO-over-socket), which is designed to allow devices to be emulated outside QEMU, in a separate process. vfio-user reuses the existing VFIO defines, structs and concepts. It has been earlier discussed as an RFC in: "RFC

[RFC v13 76/80] target/arm: cpu64: rename arm_cpu_finalize_features

2021-04-14 Thread Claudio Fontana
also remove the now useless ifdef TARGET_AARCH64 from the function Signed-off-by: Claudio Fontana --- target/arm/cpu-sve.h | 2 +- target/arm/cpu.h | 2 +- target/arm/tcg/cpu-pauth.h | 2 +- target/arm/cpu.c | 2 +- target/arm/cpu64.c | 4 +--- target/arm/monito

[RFC v13 49/80] tests/qtest: skip bios-tables-test test_acpi_oem_fields_virt for KVM

2021-04-14 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 156d4174aa..d5ff6c5260 100644 --- a/tests/qtest/bios-ta

[RFC v13 60/80] target/arm: cpu-sve: rename functions according to module prefix

2021-04-14 Thread Claudio Fontana
external functions have the cpu_sve prefix, while for static functions it can be omitted. Signed-off-by: Claudio Fontana --- target/arm/cpu-sve.h | 6 +++--- target/arm/cpu-sve.c | 32 target/arm/cpu.c | 2 +- target/arm/cpu64.c | 4 ++--

[RFC v13 77/80] target/arm: cpu64: some final cleanup on aarch64_cpu_finalize_features

2021-04-14 Thread Claudio Fontana
bail out immediately if ARM_FEATURE_AARCH64 is not set, and add an else statement when checking for accelerators. Signed-off-by: Claudio Fontana --- target/arm/cpu64.c | 33 - 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/target/arm/cpu64.c b/tar

[RFC v13 53/80] tests: do not run qom-test on all machines for ARM KVM-only

2021-04-14 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é

[RFC v13 59/80] target/arm: cpu-sve: new module

2021-04-14 Thread Claudio Fontana
extract the SVE-related cpu object properties and functions, and move them to a separate module. Signed-off-by: Claudio Fontana --- target/arm/cpu-sve.h | 37 target/arm/cpu.h | 14 +- target/arm/cpu-sve.c | 358 +++ target/arm/cpu.c

[RFC v13 55/80] target/arm: create kvm cpu accel class

2021-04-14 Thread Claudio Fontana
move init, realizefn and reset code into it. Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/arm/internals.h | 1 - target/arm/cpu-sysemu.c| 32 -- target/arm/cpu.c | 49 +++--- target/arm/kvm/kvm-cpu.c | 128 +

[RFC v13 78/80] XXX target/arm: experiment refactoring cpu "max"

2021-04-14 Thread Claudio Fontana
XXX Someone who really understands which properties should be added where should review this attentively. What goes into cpu leaf class initialization? What goes into arm_post_init / accel_cpu? What goes into arm_cpu_finalize_features / aarch64_cpu_finalize_features? Should there be shift of more

[RFC v13 63/80] target/arm: make is_aa64 and arm_el_is_aa64 a macro for !TARGET_AARCH64

2021-04-14 Thread Claudio Fontana
when TARGET_AARCH64 is not defined, it is helpful to make is_aa64() and arm_el_is_aa64 macros defined to "false". This way we can make more code TARGET_AARCH64-only. Signed-off-by: Claudio Fontana --- target/arm/cpu.h | 37 - 1 file changed, 24 insertions(+),

[RFC v13 61/80] target/arm: cpu-sve: split TCG and KVM functionality

2021-04-14 Thread Claudio Fontana
put the KVM-specific and TCG-specific functionality in the respective subdirectories kvm/ and tcg/ Signed-off-by: Claudio Fontana --- target/arm/kvm/kvm-sve.h | 28 +++ target/arm/tcg/tcg-sve.h | 24 ++ target/arm/cpu-sve.c | 155 ++--- target/

[RFC v13 65/80] target/arm: arch_dump: restrict ELFCLASS64 to AArch64

2021-04-14 Thread Claudio Fontana
this will allow us to restrict more code to TARGET_AARCH64 Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/arm/arch_dump.c | 12 +++- target/arm/cpu.c | 1 - target/arm/cpu64.c | 4 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a

[RFC v13 62/80] target/arm: cpu-sve: make cpu_sve_finalize_features return bool

2021-04-14 Thread Claudio Fontana
return false on error, true on success. Signed-off-by: Claudio Fontana --- target/arm/cpu-sve.h | 2 +- target/arm/cpu-sve.c | 17 + target/arm/cpu.c | 3 +-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/target/arm/cpu-sve.h b/target/arm/cpu-sve.h index

[RFC v13 69/80] target/arm: tcg-sve: rename the narrow_vq and change_el functions

2021-04-14 Thread Claudio Fontana
make them canonical for the module name. Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/arm/tcg/tcg-sve.h | 6 +++--- linux-user/syscall.c | 2 +- target/arm/cpu-exceptions-aa64.c | 2 +- target/arm/tcg/cpregs.c | 2 +- target/arm/tcg/helpe

[RFC v13 74/80] target/arm: cpu-pauth: change arm_cpu_pauth_finalize name and sig

2021-04-14 Thread Claudio Fontana
make arm_cpu_pauth_finalize return a bool, and make the name canonical for the module (cpu_pauth_finalize). Signed-off-by: Claudio Fontana --- target/arm/tcg/cpu-pauth.h | 2 +- target/arm/cpu.c | 3 +-- target/arm/tcg/cpu-pauth.c | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-

[RFC v13 72/80] target/arm: cpu-common: wrap a64-only check with is_a64

2021-04-14 Thread Claudio Fontana
now that is_a64() is just always false when !TARGET_AARCH64, we can just use that instead of introducing a new ifdef. Signed-off-by: Claudio Fontana --- target/arm/cpu-common.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/target/arm/cpu-common.c b/target/arm/cpu

Re: [PULL v2 0/3] osdep.h + QOM changes for QEMU 6.0-rc3

2021-04-14 Thread Peter Maydell
On Tue, 13 Apr 2021 at 21:15, Peter Maydell wrote: > > On Tue, 13 Apr 2021 at 17:18, Paolo Bonzini wrote: > > > > The following changes since commit c1e90def01bdb8fcbdbebd9d1eaa8e4827ece620: > > > > Merge remote-tracking branch > > 'remotes/pmaydell/tags/pull-target-arm-20210412' into staging

[RFC v13 79/80] target/arm: tcg: remove superfluous CONFIG_TCG check

2021-04-14 Thread Claudio Fontana
modules under tcg/ are only built for CONFIG_TCG anyway. Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson --- target/arm/tcg/vfp_helper.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/target/arm/tcg/vfp_helper.c b/target/arm/tcg/vfp_helper.c index 521719f327..0cc6c85270

[RFC v13 66/80] target/arm: cpu-exceptions, cpu-exceptions-aa64: new modules

2021-04-14 Thread Claudio Fontana
after restricting AArch64-specific code to TARGET_AARCH64 builds, we can now extract the exception handling code from cpu-sysemu, and split its AArch64-specific part into its own module. Signed-off-by: Claudio Fontana --- target/arm/cpu-exceptions-aa64.h | 28 ++ target/arm/cpu-exceptions-aa64.

[RFC v13 73/80] target/arm: cpu-pauth: new module for ARMv8.3 Pointer Authentication

2021-04-14 Thread Claudio Fontana
Pointer Authentication is an AARCH64-only ARMv8.3 optional extension, whose cpu properties can be separated out in its own module. Signed-off-by: Claudio Fontana --- target/arm/cpu.h | 3 -- target/arm/tcg/cpu-pauth.h | 34 target/arm/cpu.c | 1 + targe

[RFC v13 75/80] target/arm: move arm_cpu_finalize_features into cpu64

2021-04-14 Thread Claudio Fontana
all the features in arm_cpu_finalize_features are actually TARGET_AARCH64-only now, since KVM is now only supported on 64bit. Therefore move the function to cpu64. Signed-off-by: Claudio Fontana --- target/arm/cpu.c | 36 ++-- target/arm/cpu64.c | 34 ++

Re: [PATCH for-6.1 2/4] migration: Move populate_vfio_info() into a separate file

2021-04-14 Thread Dr. David Alan Gilbert
* Thomas Huth (th...@redhat.com) wrote: > The CONFIG_VFIO switch only works in target specific code. Since > migration/migration.c is common code, the #ifdef does not have > the intended behavior here. Move the related code to a separate > file now which gets compiled via specific_ss instead. > >

[RFC v13 80/80] target/arm: remove v7m stub function for !CONFIG_TCG

2021-04-14 Thread Claudio Fontana
it is needed just once, so just move the CONFIG_TCG check in place. Signed-off-by: Claudio Fontana --- target/arm/cpu-mmu.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/target/arm/cpu-mmu.c b/target/arm/cpu-mmu.c index c6ac90a61e..e1bebbf73e 100644 --- a/tar

Re: [PATCH] hw/block/nvme: remove redundant invalid_lba_range trace

2021-04-14 Thread Philippe Mathieu-Daudé
On 4/14/21 9:04 AM, Gollu Appalanaidu wrote: > Currently pci_nvme_err_invalid_lba_range tace being called indvidually Typos "trace", "individually". > at each function, add this in nvme_check_bounds and remove redundant > usage of it. > > Signed-off-by: Gollu Appalanaidu > --- > hw/block/nvme.

RE: [PATCH 1/4] target/ppc: Code motion required to build disabling tcg

2021-04-14 Thread Bruno Piazera Larsen
> > * move gen_write_xer and gen_read_xer into cpu_init.c, as they're > > used for some sprs, and whatever needs to be moved with it > > I'd leave them where they are currently. Instead what I think we should > do is to find a way to not need the uea/oea/hea|read/write callbacks > with KVM. so we'

Re: any remaining for-6.0 issues?

2021-04-14 Thread Thomas Huth
On 12/04/2021 17.32, Peter Maydell wrote: Last call to note anything we need to fix for 6.0 on https://wiki.qemu.org/Planning/6.0#Known_issues please. The schedule is to tag rc3 tomorrow, which I would ideally like to be the last rc before release. After rc3 I will only be taking fixes for bugs w

Re: [PATCH] hw/elf_ops: clear uninitialized segment space

2021-04-14 Thread Philippe Mathieu-Daudé
On 4/14/21 12:58 PM, Laurent Vivier wrote: > When the mem_size of the segment is bigger than the file_size, > and if this space doesn't overlap another segment, it needs > to be cleared. > > This bug is very similar to the one we had for linux-user, > 22d113b52f41 ("linux-user: Fix loading of BSS

RE: [PATCH 5/5] target/ppc: Implement paddi and replace addi insns

2021-04-14 Thread Luis Fernando Fujita Pires
Hi Phil, > > + > > +%p_D8_SI32:s18 0:16 > > + > > +# Fixed-Point Facility Instructions > > +&addi r rt ra si > > + > > +paddi 01 10 0 -- r:1 -- .. 001110 rt:5 ra:5 > > > si=%p_D8_SI &addi > > IIUC you should be able to do something like catch ra=0

Re: [PATCH for-6.1 2/4] migration: Move populate_vfio_info() into a separate file

2021-04-14 Thread Philippe Mathieu-Daudé
On 4/14/21 1:20 PM, Thomas Huth wrote: > The CONFIG_VFIO switch only works in target specific code. Since > migration/migration.c is common code, the #ifdef does not have > the intended behavior here. Move the related code to a separate > file now which gets compiled via specific_ss instead. > > F

Re: [PATCH] hw/elf_ops: clear uninitialized segment space

2021-04-14 Thread Laurent Vivier
Le 14/04/2021 à 14:16, Philippe Mathieu-Daudé a écrit : > On 4/14/21 12:58 PM, Laurent Vivier wrote: >> When the mem_size of the segment is bigger than the file_size, >> and if this space doesn't overlap another segment, it needs >> to be cleared. >> >> This bug is very similar to the one we had fo

Re: any remaining for-6.0 issues?

2021-04-14 Thread Bin Meng
On Wed, Apr 14, 2021 at 5:35 PM Peter Maydell wrote: > > On Wed, 14 Apr 2021 at 09:31, Bin Meng wrote: > > > > Hi Stefan, > > > > On Tue, Apr 13, 2021 at 2:19 PM Stefan Weil wrote: > > > That patch is based on an older version of my personal QEMU sources and > > > not required for 6.0. > > > > I

set qemu support serial crtscts

2021-04-14 Thread 付小明
HI, I have find qemu serial not support crtscts. This result some machine not communication, because this machine need crtscts set_seial_crtscts.patch Description: Binary data

Re: set qemu support serial crtscts

2021-04-14 Thread Peter Maydell
On Wed, 14 Apr 2021 at 14:18, 付小明 wrote: > > HI, I have find qemu serial not support crtscts. This result some > machine not communication, because this machine need crtscts Could you provide more detail, please? For a bug report it is useful to know: * what you were trying to do * what happene

Re: [PATCH 1/2] qdev: Separate implementations of qdev_get_machine() for user and system

2021-04-14 Thread Eduardo Habkost
On Fri, Apr 09, 2021 at 06:03:38PM +0200, Greg Kurz wrote: > Despite its simple name and common usage of "getting a pointer to > the machine" in system-mode emulation, qdev_get_machine() has some > subtilities. > > First, it can be called when running user-mode emulation : this is > because user-m

Re: [PATCH v2] i386: Make 'hv-reenlightenment' require explicit 'tsc-frequency' setting

2021-04-14 Thread Eduardo Habkost
My apologies, this was lost under the noise in my mail inbox. (I promise I'm trying to improve) On Wed, Mar 31, 2021 at 01:39:48PM +0200, Vitaly Kuznetsov wrote: > Commit 561dbb41b1d7 "i386: Make migration fail when Hyper-V reenlightenment > was enabled but 'user_tsc_khz' is unset" forbade migrati

Re: [PATCH 0/1] libbpf dependecy for docker containers.

2021-04-14 Thread Alex Bennée
Andrew Melnychenko writes: > For eBPF RSS steering, qemu required to be built with libbpf. > (https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg08887.html) > So, for few docker containers there was added libbpf. > Some docker containers doesn't have that library, g.e. Ubuntu 20.04. > On

[PATCH v3 0/3] accel/tcg: Make sure that tb->size != 0 after translation

2021-04-14 Thread Ilya Leoshkevich
If arch-specific code generates a translation block of size 0, tb_gen_code() may generate a spurious exception. Fix s390x (patch 1) and ARM (patch 2) and add an assertion in order to catch such situations early (patch 3). v1: https://lists.nongnu.org/archive/html/qemu-devel/2021-04/msg02037.html

[PATCH v3 2/3] target/arm: Make sure that commpage's tb->size != 0

2021-04-14 Thread Ilya Leoshkevich
tb_gen_code() assumes that tb->size must never be zero, otherwise it may produce spurious exceptions. For ARM this may happen when creating a translation block for the commpage. Fix by pretending that commpage translation blocks have at least one instruction. Signed-off-by: Ilya Leoshkevich ---

[PATCH v3 3/3] accel/tcg: Assert that tb->size != 0 after translation

2021-04-14 Thread Ilya Leoshkevich
If arch-specific code generates a translation block of size 0, tb_gen_code() may generate a spurious exception. Add an assertion in order to catch such situations early. Signed-off-by: Ilya Leoshkevich --- accel/tcg/translate-all.c | 1 + 1 file changed, 1 insertion(+) diff --git a/accel/tcg/tr

[PATCH v3 1/3] target/s390x: Fix translation exception on illegal instruction

2021-04-14 Thread Ilya Leoshkevich
Hitting an uretprobe in a s390x TCG guest causes a SIGSEGV. What happens is: * uretprobe maps a userspace page containing an invalid instruction. * uretprobe replaces the target function's return address with the address of that page. * When tb_gen_code() is called on that page, tb->size ends up

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

2021-04-14 Thread Mauro Matteo Cascella
Patchset v4: https://lists.gnu.org/archive/html/qemu-devel/2021-04/msg01000.html Upstream commits: https://git.qemu.org/?p=qemu.git;a=commit;h=0db895361b8a82e1114372ff9f4857abea605701 https://git.qemu.org/?p=qemu.git;a=commit;h=e392255766071c8cac480da3a9ae4f94e56d7cbc https://git.qemu.org/?p=qemu.

[Bug 1919036] Re: Assertion failure in fifo8_push_all() through am53c974

2021-04-14 Thread Mauro Matteo Cascella
This is fixed now, thank you Mark. Patchset v4: https://lists.gnu.org/archive/html/qemu-devel/2021-04/msg01000.html Upstream commits: https://git.qemu.org/?p=qemu.git;a=commit;h=0db895361b8a82e1114372ff9f48 https://git.qemu.org/?p=qemu.git;a=commit;h=e392255766071c8cac480da3a9ae https://git.qemu.

[Bug 1919035] Re: Assertion failure in fifo8_pop_buf() through am53c974

2021-04-14 Thread Mauro Matteo Cascella
This is fixed now, thank you Mark. Patchset v4: https://lists.gnu.org/archive/html/qemu-devel/2021-04/msg01000.html Upstream commits: https://git.qemu.org/?p=qemu.git;a=commit;h=0db895361b8a82e1114372ff9f48 https://git.qemu.org/?p=qemu.git;a=commit;h=e392255766071c8cac480da3a9ae https://git.qemu.

Re: [PATCH v3 01/15] tests/tcg: Add docker_as and docker_ld cmds

2021-04-14 Thread Alex Bennée
Bastian Koppelmann writes: > At least for the TriCore target no easily available c compiler exists. > Thus we need to rely on "as" and "ld". This allows us to run them > through the docker image as well as with locally installed tools. > > Signed-off-by: Bastian Koppelmann > --- > v2 -> v3: >

[Bug 1909247] Re: QEMU: use after free vulnerability in esp_do_dma() in hw/scsi/esp.c

2021-04-14 Thread Mauro Matteo Cascella
This is fixed now, thank you Mark. Patchset v4: https://lists.gnu.org/archive/html/qemu-devel/2021-04/msg01000.html Upstream commits: https://git.qemu.org/?p=qemu.git;a=commit;h=0db895361b8a82e1114372ff9f48 https://git.qemu.org/?p=qemu.git;a=commit;h=e392255766071c8cac480da3a9ae https://git.qemu.

Re: [PATCH v2] i386: Make 'hv-reenlightenment' require explicit 'tsc-frequency' setting

2021-04-14 Thread Vitaly Kuznetsov
Eduardo Habkost writes: > My apologies, this was lost under the noise in my mail inbox. > (I promise I'm trying to improve) > > On Wed, Mar 31, 2021 at 01:39:48PM +0200, Vitaly Kuznetsov wrote: >> Commit 561dbb41b1d7 "i386: Make migration fail when Hyper-V reenlightenment >> was enabled but 'user

Re: [PATCH for-6.1 3/4] qapi/qom.json: Do not use CONFIG_VIRTIO_CRYPTO in common code

2021-04-14 Thread Markus Armbruster
Thomas Huth writes: > The ObjectType enum and ObjectOptions are included from qapi-types-qom.h > into common code. We should not use target-specific config switches like > CONFIG_VIRTIO_CRYPTO here, since this is not defined in common code and > thus the enum will look differently between common

Re: any remaining for-6.0 issues?

2021-04-14 Thread Mark Cave-Ayland
On 14/04/2021 13:48, Thomas Huth wrote: On 12/04/2021 17.32, Peter Maydell wrote: Last call to note anything we need to fix for 6.0 on https://wiki.qemu.org/Planning/6.0#Known_issues please. The schedule is to tag rc3 tomorrow, which I would ideally like to be the last rc before release. After

Re: Mac OS real USB device support issue

2021-04-14 Thread Programmingkid
> On Apr 9, 2021, at 4:08 AM, Gerd Hoffmann wrote: > > Hi, > >> The questions that come to mind are: >> - Does libusb_detach_kernel_driver() work on Mac OS? >> - Is libusb_detach_kernel_driver() called on Mac OS in QEMU? >> >> The only mention of this function in QEMU comes from host-libusb

Re: [PATCH v3] qapi: introduce 'query-cpu-model-cpuid' action

2021-04-14 Thread Vladimir Sementsov-Ogievskiy
26.03.2021 20:30, Valeriy Vdovin wrote: Introducing new qapi method 'query-cpu-model-cpuid'. This method can be used to get virtualized cpu model info generated by QEMU during VM initialization in the form of cpuid representation. Diving into more details about virtual cpu generation: QEMU first

Re: any remaining for-6.0 issues?

2021-04-14 Thread Mark Cave-Ayland
On 14/04/2021 14:57, Mark Cave-Ayland wrote: I've definitely seen the same issue as Cornelia in my Gitlab CI builds for the ESP security fixes (first version of which appeared just before rc0). The user builds always fail on "run-tcg-tests-s390x-linux-user" for me. Commit 23fff7a17f lies with

[Bug 1909247] Re: QEMU: use after free vulnerability in esp_do_dma() in hw/scsi/esp.c

2021-04-14 Thread Mauro Matteo Cascella
** Changed in: qemu Status: Fix Released => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1909247 Title: QEMU: use after free vulnerability in esp_do_dma() in hw/scsi/esp.c St

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

2021-04-14 Thread Mauro Matteo Cascella
** Changed in: qemu Status: Fix Released => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1910723 Title: NULL pointer dereference issues in am53c974 SCSI host bus adapter Stat

[Bug 1914849] Re: mprotect fails after MacOS 11.2 on arm mac

2021-04-14 Thread Roman Bolshakov
** Changed in: qemu Status: Confirmed => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1914849 Title: mprotect fails after MacOS 11.2 on arm mac Status in QEMU: Fix Committe

[Bug 1919035] Re: Assertion failure in fifo8_pop_buf() through am53c974

2021-04-14 Thread Mauro Matteo Cascella
I'm not able to change the status of this bug anymore. It should have been closed as "Fix committed" - QEMU 6.0.0 is not yet released. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1919035 Title: A

[Bug 1919036] Re: Assertion failure in fifo8_push_all() through am53c974

2021-04-14 Thread Mauro Matteo Cascella
I'm not able to change the status of this bug anymore. It should have been closed as "Fix committed" - QEMU 6.0.0 is not yet released. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1919036 Title: A

Re: any remaining for-6.0 issues?

2021-04-14 Thread Cornelia Huck
On Wed, 14 Apr 2021 15:15:04 +0100 Mark Cave-Ayland wrote: > On 14/04/2021 14:57, Mark Cave-Ayland wrote: > > > I've definitely seen the same issue as Cornelia in my Gitlab CI builds for > > the ESP > > security fixes (first version of which appeared just before rc0). The user > > builds > >

Re: [PATCH v2] i386: Make 'hv-reenlightenment' require explicit 'tsc-frequency' setting

2021-04-14 Thread Eduardo Habkost
On Wed, Apr 14, 2021 at 03:51:37PM +0200, Vitaly Kuznetsov wrote: > Eduardo Habkost writes: > > > My apologies, this was lost under the noise in my mail inbox. > > (I promise I'm trying to improve) > > > > On Wed, Mar 31, 2021 at 01:39:48PM +0200, Vitaly Kuznetsov wrote: > >> Commit 561dbb41b1d7

Re: [PATCH v3 3/3] accel/tcg: Assert that tb->size != 0 after translation

2021-04-14 Thread David Hildenbrand
On 14.04.21 15:41, Ilya Leoshkevich wrote: If arch-specific code generates a translation block of size 0, tb_gen_code() may generate a spurious exception. Add an assertion in order to catch such situations early. Signed-off-by: Ilya Leoshkevich --- accel/tcg/translate-all.c | 1 + 1 file cha

Re: [PATCH v3 1/3] target/s390x: Fix translation exception on illegal instruction

2021-04-14 Thread David Hildenbrand
On 14.04.21 15:41, Ilya Leoshkevich wrote: Hitting an uretprobe in a s390x TCG guest causes a SIGSEGV. What happens is: * uretprobe maps a userspace page containing an invalid instruction. * uretprobe replaces the target function's return address with the address of that page. * When tb_gen_c

Re: [PATCH v3 01/15] tests/tcg: Add docker_as and docker_ld cmds

2021-04-14 Thread Alex Bennée
Bastian Koppelmann writes: > At least for the TriCore target no easily available c compiler exists. > Thus we need to rely on "as" and "ld". This allows us to run them > through the docker image as well as with locally installed tools. > > Signed-off-by: Bastian Koppelmann > --- > v2 -> v3: >

[PATCH v3] target/ppc: code motion from translate_init.c.inc to gdbstub.c

2021-04-14 Thread Bruno Larsen (billionai)
All the code related to gdb has been moved from translate_init.c.inc file to the gdbstub.c file, where it makes more sense. This new version puts the prototypes in internal.h, to not expose them unnecessarily. Signed-off-by: Bruno Larsen (billionai) Suggested-by: Fabiano Rosas --- target/ppc/g

Re: [PATCH v4 16/19] qapi/expr.py: Add docstrings

2021-04-14 Thread Markus Armbruster
John Snow writes: > Signed-off-by: John Snow > --- > scripts/qapi/expr.py | 213 ++- > 1 file changed, 208 insertions(+), 5 deletions(-) > > diff --git a/scripts/qapi/expr.py b/scripts/qapi/expr.py > index 1869ddf815..adc5b903bc 100644 > --- a/scripts/qap

Re: [EXTERNAL] [RFC PATCH 1/2] target/ppc: rework AIL logic in interrupt delivery

2021-04-14 Thread Cédric Le Goater
On 4/14/21 5:23 AM, Nicholas Piggin wrote: > The AIL logic is becoming unmanageable spread all over powerpc_excp(), > and it is slated to get even worse with POWER10 support. > > Move it all to a new helper function. Reviewed-by: Cédric Le Goater Tested-by: Cédric Le Goater Thanks for the effo

Re: [PATCH 4/5] target/ppc: Base changes to allow 32/64-bit insns

2021-04-14 Thread Richard Henderson
On 4/13/21 2:11 PM, Luis Pires wrote: if (ctx->exception == POWERPC_EXCP_NONE) { -gen_update_nip(ctx, ctx->base.pc_next - 4); +gen_update_nip(ctx, ctx->base.pc_next - ctx->insn_size); It appears as if the major (only?) use of insn_size is this subtraction? It looks like

Re: [PATCH v3 00/15] tests/tcg: Add TriCore tests

2021-04-14 Thread Alex Bennée
Bastian Koppelmann writes: > Hi Alex, > > after a long while and thanks to Thomas reminder, I finally came back to this > series. I addressed most of your comments except for the timeout --foreground > problem (see > https://lists.gnu.org/archive/html/qemu-devel/2020-06/msg00921.html). > I ju

[Bug 1923861] [NEW] Hardfault when accessing FPSCR register

2021-04-14 Thread ml-0
Public bug reported: QEMU release version: v6.0.0-rc2 command line: qemu-system-arm -machine mps3-an547 -nographic -kernel .elf -semihosting -semihosting-config enable=on,target=native host operating system: Linux ISCNR90TMR1S 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x

[PATCH v2 01/25] DAX: vhost-user: Rework slave return values

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" All the current slave handlers on the qemu side generate an 'int' return value that's squashed down to a bool (!!ret) and stuffed into a uint64_t (field of a union) to be returned. Move the uint64_t type back up through the individual handlers so that we can make o

[PATCH v2 03/25] DAX: libvhost-user: Route slave message payload

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Route the uint64 payload from message replies on the slave back up through vu_process_message_reply and to the callers. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi --- subprojects/libvhost-user/libvhost-user.c | 14 +++--- 1 file c

[PATCH v2 00/25] virtiofs dax patches

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" This series adds support for acceleration of virtiofs via DAX mapping, using features added in the 5.11 Linux kernel. DAX originally existed in the kernel for mapping real storage devices directly into memory, so that reads/writes turn into reads/writes directl

[PATCH v2 02/25] virtiofsd: Don't assume header layout

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" virtiofsd incorrectly assumed a fixed set of header layout in the virt queue; assuming that the fuse and write headers were conveniently separated from the data; the spec doesn't allow us to take that convenience, so fix it up to deal with it the hard way. Signed-

[PATCH v2 04/25] DAX: libvhost-user: Allow popping a queue element with bad pointers

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Allow a daemon implemented with libvhost-user to accept an element with pointers to memory that aren't in the mapping table. The daemon might have some special way to deal with some special cases of this. The default behaviour doesn't change. Signed-off-by: Dr. Da

[PATCH v2 05/25] DAX subprojects/libvhost-user: Add virtio-fs slave types

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add virtio-fs definitions to libvhost-user Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi --- subprojects/libvhost-user/libvhost-user.c | 48 +++ subprojects/libvhost-user/libvhost-user.h | 40 +++ 2 files

[PATCH v2 06/25] DAX: virtio: Add shared memory capability

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Define a new capability type 'VIRTIO_PCI_CAP_SHARED_MEMORY_CFG' and the data structure 'virtio_pci_cap64' to go with it. They allow defining shared memory regions with sizes and offsets of 2^32 and more. Multiple instances of the capability are allowed and distingui

[PATCH v2 07/25] DAX: virtio-fs: Add cache BAR

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a cache BAR into which files will be directly mapped. The size can be set with the cache-size= property, e.g. -device vhost-user-fs-pci,chardev=char0,tag=myfs,cache-size=16G The default is no cache. Signed-off-by: Dr. David Alan Gilbert with PPC fixes by:

[PATCH v2 10/25] DAX: virtiofsd Add cache accessor functions

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add low level functions that the clients can use to map/unmap cache areas. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi --- tools/virtiofsd/fuse_lowlevel.h | 21 + tools/virtiofsd/fuse_virtio.c | 18 ++

[PATCH v2 08/25] DAX: virtio-fs: Add vhost-user slave commands for mapping

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The daemon may request that fd's be mapped into the virtio-fs cache visible to the guest. These mappings are triggered by commands sent over the slave fd from the daemon. Signed-off-by: Dr. David Alan Gilbert --- docs/interop/vhost-user.rst | 21 +++

[PATCH v2 09/25] DAX: virtio-fs: Fill in slave commands for mapping

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Fill in definitions for map, unmap and sync commands. Signed-off-by: Dr. David Alan Gilbert with fix by misono.tomoh...@fujitsu.com --- hw/virtio/vhost-user-fs.c | 117 -- 1 file changed, 113 insertions(+), 4 deletions(-) diff

[PATCH v2 12/25] DAX: virtiofsd: Add setup/remove mapping handlers to passthrough_ll

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi --- tools/virtiofsd/passthrough_ll.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c index 1553d2ef45..a

[PATCH v2 14/25] DAX: virtiofsd: Make lo_removemapping() work

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: Vivek Goyal Let guest pass in the offset in dax window a mapping is currently mapped at and needs to be removed. Vivek added the initial support to remove single mapping and later Peng added patch to support removing multiple mappings in single command. Signed-off-by: Vivek Goyal Signed-

[PATCH v2 20/25] DAX/unmap virtiofsd: Route unmappable reads

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" When a read with unmappable buffers is found, map it to a slave read command. Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/fuse_virtio.c | 37 +++ 1 file changed, 37 insertions(+) diff --git a/tools/virtiofsd/fuse_vir

[PATCH v2 13/25] DAX: virtiofsd: Wire up passthrough_ll's lo_setupmapping

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Wire up passthrough_ll's setupmapping to allocate, send to virtio and then reply OK. Guest might not pass file pointer. In that case using inode info, open the file again, mmap() and close fd. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Vivek Goyal With

[PATCH v2 18/25] DAX/unmap virtiofsd: Add wrappers for VHOST_USER_SLAVE_FS_IO

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add a wrapper to send VHOST_USER_SLAVE_FS_IO commands and a further wrapper for sending a fuse_buf write using the FS_IO slave command. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi --- tools/virtiofsd/fuse_lowlevel.h | 25 ++

[PATCH v2 16/25] DAX: virtiofsd: Perform an unmap on destroy

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Force unmap all remaining dax cache entries on a destroy. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Stefan Hajnoczi --- tools/virtiofsd/passthrough_ll.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tools/virtiofsd/passthrough_ll.c

[PATCH v2 22/25] DAX:virtiofsd: implement FUSE_INIT map_alignment field

2021-04-14 Thread Dr. David Alan Gilbert (git)
From: Stefan Hajnoczi Communicate the host page size to the FUSE client so that FUSE_SETUPMAPPING/FUSE_REMOVEMAPPING requests are aware of our alignment constraints. Signed-off-by: Stefan Hajnoczi --- tools/virtiofsd/fuse_lowlevel.c | 8 1 file changed, 8 insertions(+) diff --git a/t

<    1   2   3   4   >