[PATCH v2 02/12] build: Don't specify -no-pie for --static user-mode programs

2023-02-13 Thread Warner Losh
When building with clang, -no-pie gives a warning on every single build, so remove it. Signed-off-by: Warner Losh --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 64960c6000f..eb284ccf308 100755 --- a/configure +++ b/configure @@

[PATCH v2 00/12] 2023 Q1 bsd-user upstreaming: bugfixes and sysctl

2023-02-13 Thread Warner Losh
This group of patches gets the basic framework for sysctl upstreamed. There's a lot more to translate far too many binary blobs the kernel publishes via sysctls, but I'm leaving those out in the name of simplicity. There's also a bug fix from Doug Rabson that fixes a long int confusion leading to

[PATCH v2 07/12] bsd-user: sysctl helper funtions: sysctl_name2oid and sysctl_oidfmt

2023-02-13 Thread Warner Losh
From: Juergen Lock Helper functions for sysctl implementations. sysctl_name2oid and sysctl_oidfmt convert oids between host and targets Signed-off-by: Juergen Lock Reviewed-by: Warner Losh Signed-off-by: Warner Losh --- bsd-user/freebsd/os-sys.c | 18 ++ 1 file changed, 18

[PATCH 16/18] target/riscv: Drop priv level check in mseccfg predicate()

2023-02-13 Thread Bin Meng
riscv_csrrw_check() already does the generic privilege level check hence there is no need to do the specific M-mode access check in the mseccfg predicate(). With this change debugger can access the mseccfg CSR anytime. Signed-off-by: Bin Meng --- target/riscv/csr.c | 2 +- 1 file changed, 1

[PATCH 15/18] target/riscv: Allow debugger to access sstc CSRs

2023-02-13 Thread Bin Meng
At present with a debugger attached sstc CSRs can only be accssed when CPU is in M-mode, or configured correctly. Fix it by adjusting their predicate() routine logic so that the static config check comes before the run-time check, as well as addding a debugger check. Signed-off-by: Bin Meng ---

[PATCH v2 09/12] bsd-user: Start translation of arch-specific sysctls

2023-02-13 Thread Warner Losh
From: Juergen Lock Intercept some syscalls that we need to translate (like the archiecture we're running on) and translate them. These are only the simplest ones so far. Signed-off-by: Juergen Lock Co-Authored-by: Stacey Son Signed-off-by: Stacey Son Co-Authored-by: Warner Losh

[PATCH v2 10/12] bsd-user: do_freebsd_sysctl helper for sysctl(2)

2023-02-13 Thread Warner Losh
From: Kyle Evans Implement the wrapper function for sysctl(2). This puts the oid arguments into a standard form and calls the common do_freebsd_sysctl_oid. Signed-off-by: Kyle Evans Co-Authored-by: Juergen Lock Signed-off-by: Juergen Lock Co-Authored-by: Stacey Son Signed-off-by: Stacey Son

Re: [RFC 42/52] hw/machine: Add hybrid_supported in generic topo properties

2023-02-13 Thread wangyanan (Y)
Hi Zhao, 在 2023/2/13 17:50, Zhao Liu 写道: From: Zhao Liu Since hybrid cpu topology configuration can benefit not only x86, but also other architectures/platforms that have supported (in real machines) or will support hybrid CPU topology, "-hybrid" can be generic. So add the generic topology

[PATCH 12/18] target/riscv: Allow debugger to access user timer and counter CSRs

2023-02-13 Thread Bin Meng
At present user timer and counter CSRs are not reported in the CSR XML hence gdb cannot access them. Fix it by addding a debugger check in their predicate() routine. Signed-off-by: Bin Meng --- target/riscv/csr.c | 4 1 file changed, 4 insertions(+) diff --git a/target/riscv/csr.c

[PATCH v2 08/12] bsd-user: common routine do_freebsd_sysctl_oid for all sysctl variants

2023-02-13 Thread Warner Losh
From: Juergen Lock do_freebsd_sysctl_oid filters out some of the binary and special sysctls where host != target. None of the sysctls that have to be translated from host to target are handled here. Signed-off-by: Juergen Lock Co-Authored-by: Stacey Son Signed-off-by: Stacey Son

[PATCH v2 06/12] bsd-user: Helper routines h2t_old_sysctl

2023-02-13 Thread Warner Losh
h2t_old_sysctl does the byte swapping in the data to return it to the target for the 'well known' types. Co-Authored-by: Sean Bruno Signed-off-by: Sean Bruno Co-Authored-by: Juergen Lock Signed-off-by: Juergen Lock Co-Authored-by: Raphael Kubo da Costa Signed-off-by: Raphael Kubo da Costa

Re: [PATCH 9/9] bsd-user: Add -strict

2023-02-13 Thread Warner Losh
On Sat, Feb 11, 2023 at 4:19 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 2/10/23 13:18, Warner Losh wrote: > > Most of the time, it's useful to make our best effort, but sometimes we > > want to know right away when we don't implement something. First place > > we use it is

Re: [PATCH v10 2/9] KVM: Introduce per-page memory attributes

2023-02-13 Thread Isaku Yamahata
On Fri, Feb 10, 2023 at 12:35:30AM +, Sean Christopherson wrote: > On Wed, Feb 08, 2023, Isaku Yamahata wrote: > > On Fri, Dec 02, 2022 at 02:13:40PM +0800, > > Chao Peng wrote: > > > > > +static int kvm_vm_ioctl_set_mem_attributes(struct kvm *kvm, > > > +

Re: [PATCH 4/4] qdev-monitor: Use qdev_get_parent_bus() in bus_print_dev()

2023-02-13 Thread Richard Henderson
On 2/12/23 12:47, Philippe Mathieu-Daudé wrote: No need to pass 'dev' and 'dev->parent_bus' when we can retrieve 'parent_bus' with qdev_get_parent_bus(). Signed-off-by: Philippe Mathieu-Daudé --- softmmu/qdev-monitor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

Re: [PATCH 3/4] hw: Use qdev_get_parent_bus() in qdev_get_own_fw_dev_path_from_handler()

2023-02-13 Thread Richard Henderson
On 2/12/23 12:47, Philippe Mathieu-Daudé wrote: -static char *qdev_get_fw_dev_path_from_handler(BusState *bus, DeviceState *dev) +static char *qdev_get_fw_dev_path_from_handler(DeviceState *dev) { Object *obj = OBJECT(dev); +BusState *bus = qdev_get_parent_bus(dev); char *d =

Re: [PATCH 2/4] hw: Replace dev->parent_bus by qdev_get_parent_bus(dev)

2023-02-13 Thread Richard Henderson
On 2/12/23 13:03, Philippe Mathieu-Daudé wrote: On 12/2/23 23:47, Philippe Mathieu-Daudé wrote: DeviceState::parent_bus is an internal field and should be accessed by the qdev_get_parent_bus() helper. Replace all uses in hw/ except the QDev uses in hw/core/. Signed-off-by: Philippe

Re: [PATCH 1/4] hw/qdev: Constify DeviceState* argument of qdev_get_parent_bus()

2023-02-13 Thread Richard Henderson
On 2/12/23 12:47, Philippe Mathieu-Daudé wrote: The structure is accessed read-only by qdev_get_parent_bus(). Signed-off-by: Philippe Mathieu-Daudé --- hw/core/qdev.c | 2 +- include/hw/qdev-core.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Richard

Re: [PATCH 1/2] log: Add separate debug option for logging invalid memory accesses

2023-02-13 Thread BALATON Zoltan
On Mon, 13 Feb 2023, Peter Xu wrote: On Mon, Feb 13, 2023 at 07:34:55PM +0100, BALATON Zoltan wrote: On Mon, 13 Feb 2023, Peter Xu wrote: On Mon, Feb 13, 2023 at 05:34:04PM +0100, BALATON Zoltan wrote: On Mon, 13 Feb 2023, Peter Xu wrote: On Mon, Feb 13, 2023 at 03:47:42PM +0100, BALATON

Re: [RFC v2 11/13] vdpa: add vdpa net migration state notifier

2023-02-13 Thread Si-Wei Liu
On 2/13/2023 1:47 AM, Eugenio Perez Martin wrote: On Sat, Feb 4, 2023 at 3:04 AM Si-Wei Liu wrote: On 2/2/2023 7:28 AM, Eugenio Perez Martin wrote: On Thu, Feb 2, 2023 at 2:53 AM Si-Wei Liu wrote: On 1/12/2023 9:24 AM, Eugenio Pérez wrote: This allows net to restart the device

Re: [PULL 00/10] xenpvh machine

2023-02-13 Thread Stefano Stabellini
On Mon, 13 Feb 2023, Peter Maydell wrote: > On Fri, 10 Feb 2023 at 22:27, Stefano Stabellini > wrote: > > > > The following changes since commit 90595cc9396bb910b148391fea2e78dd8c6c8b27: > > > > Merge tag 'migration-20230209-pull-request' of > > https://gitlab.com/juan.quintela/qemu into

Re: DMAR fault with qemu 7.2 and Ubuntu 22.04 base image

2023-02-13 Thread Peter Xu
On Mon, Feb 13, 2023 at 10:15:34PM +0530, Major Saheb wrote: > Hi All, Hi, Major, > > I am facing an issue with qemu 7.2 rc2 with nvme. I have a container Is there any known working qemu version? Or should I assume it's failing always? > running Ubuntu 22.04 base image and host is running

Re: [PATCH 1/2] log: Add separate debug option for logging invalid memory accesses

2023-02-13 Thread Peter Xu
On Mon, Feb 13, 2023 at 07:34:55PM +0100, BALATON Zoltan wrote: > On Mon, 13 Feb 2023, Peter Xu wrote: > > On Mon, Feb 13, 2023 at 05:34:04PM +0100, BALATON Zoltan wrote: > > > On Mon, 13 Feb 2023, Peter Xu wrote: > > > > On Mon, Feb 13, 2023 at 03:47:42PM +0100, BALATON Zoltan wrote: > > > > > On

Re: [PATCH v3] tests/docker: Use binaries for debian-tricore-cross

2023-02-13 Thread Alex Bennée
Bastian Koppelmann writes: > since binutils is pretty old, it fails our CI repeatedly during the > compilation of tricore-binutils. We created a precompiled version using > the debian docker image and download it instead of building it ourself. > > We also updated the package to include a

[PATCH v3 08/12] tests/qtest: drive_del-test: Skip tests that require missing devices

2023-02-13 Thread Fabiano Rosas
Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth --- tests/qtest/drive_del-test.c | 65 1 file changed, 65 insertions(+) diff --git a/tests/qtest/drive_del-test.c b/tests/qtest/drive_del-test.c index 9a750395a9..8a6f3ac963 100644 ---

[PATCH v3 05/12] tests/qtest: hd-geo-test: Check for missing devices

2023-02-13 Thread Fabiano Rosas
Don't include tests that require devices not available in the QEMU binary. Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth --- tests/qtest/hd-geo-test.c | 38 +- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/tests/qtest/hd-geo-test.c

[PATCH v3 03/12] tests/qtest: Add dependence on PCIE_PORT for virtio-net-failover.c

2023-02-13 Thread Fabiano Rosas
This test depends on the presence of the pcie-root-port device. Add a build time dependency. Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth --- tests/qtest/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build

[PATCH v3 06/12] tests/qtest: Fix coding style in device-plug-test.c

2023-02-13 Thread Fabiano Rosas
We should not mix declarations and statements in QEMU code. Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth --- tests/qtest/device-plug-test.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c index

[PATCH v3 07/12] tests/qtest: Skip unplug tests that use missing devices

2023-02-13 Thread Fabiano Rosas
Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth --- tests/qtest/device-plug-test.c | 33 +++-- 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c index 4f92617335..01cecd6e20 100644 ---

[PATCH v3 04/12] tests/qtest: Don't build virtio-serial-test.c if device not present

2023-02-13 Thread Fabiano Rosas
The virtconsole device might not be present in the QEMU build that is being tested. Signed-off-by: Fabiano Rosas --- tests/qtest/meson.build | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 5c8b031ce0..84cd07bbb9

[PATCH v3 09/12] tests/qtest: Check for devices in bios-tables-test

2023-02-13 Thread Fabiano Rosas
Do not include tests that require devices that are not available in the QEMU build. Signed-off-by: Fabiano Rosas Acked-by: Michael S. Tsirkin --- tests/qtest/bios-tables-test.c | 75 -- 1 file changed, 71 insertions(+), 4 deletions(-) diff --git

[PATCH v3 11/12] tests/qemu-iotests: Require virtio-scsi-pci

2023-02-13 Thread Fabiano Rosas
Check that virtio-scsi-pci is present in the QEMU build before running the tests. Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth --- tests/qemu-iotests/186 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/186 b/tests/qemu-iotests/186 index 072e54e62b..eaf13c7a33

[PATCH v3 00/12] qtests vs. default devices

2023-02-13 Thread Fabiano Rosas
I based this on master this time, the Kconfig series might take longer. patch 4 - changed conditional to use the same style as surrounding code; v2: patch 3 - fixed typo s/PCIE_ROOT/PCIE_PORT and dropped runtime check; patch 4 - dropped runtime check and added a dep on

[PATCH v3 10/12] tests/qtest: Do not include hexloader-test if loader device is not present

2023-02-13 Thread Fabiano Rosas
Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth --- tests/qtest/meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index 84cd07bbb9..dbe3b1fcc9 100644 --- a/tests/qtest/meson.build +++

[PATCH v3 12/12] tests/qtest: bios-tables-test: Skip if missing configs

2023-02-13 Thread Fabiano Rosas
If we build with --without-default-devices, CONFIG_HPET and CONFIG_PARALLEL are set to N, which makes the respective devices go missing from acpi tables. Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth --- tests/qtest/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

[PATCH v3 01/12] tests/qtest: Skip PXE tests for missing devices

2023-02-13 Thread Fabiano Rosas
Check if the devices we're trying to add are present in the QEMU binary. They could have been removed from the build via Kconfig or the --without-default-devices option. Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth --- tests/qtest/pxe-test.c | 4 1 file changed, 4 insertions(+)

[PATCH v3 02/12] tests/qtest: Do not run lsi53c895a test if device is not present

2023-02-13 Thread Fabiano Rosas
The tests are built once for all the targets, so as long as one QEMU binary is built with CONFIG_LSI_SCSI_PCI=y, this test will run. However some binaries might not include the device. So check this again in runtime. Signed-off-by: Fabiano Rosas Reviewed-by: Thomas Huth ---

[PATCH v3 2/4] cpus: Make {start,end}_exclusive() recursive

2023-02-13 Thread Ilya Leoshkevich
Currently dying to one of the core_dump_signal()s deadlocks, because dump_core_and_abort() calls start_exclusive() two times: first via stop_all_tasks(), and then via preexit_cleanup() -> qemu_plugin_user_exit(). There are a number of ways to solve this: resume after dumping core; check

[PATCH v3 3/4] linux-user/microblaze: Handle privileged exception

2023-02-13 Thread Ilya Leoshkevich
Follow what kernel's full_exception() is doing. Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson --- linux-user/microblaze/cpu_loop.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/linux-user/microblaze/cpu_loop.c b/linux-user/microblaze/cpu_loop.c

[PATCH v3 1/4] linux-user: Always exit from exclusive state in fork_end()

2023-02-13 Thread Ilya Leoshkevich
fork()ed processes currently start with current_cpu->in_exclusive_context set, which is, strictly speaking, not correct, but does not cause problems (even assertion failures). With one of the next patches, the code begins to rely on this value, so fix it by always calling end_exclusive() in

[PATCH v3 0/4] Fix deadlock when dying because of a signal

2023-02-13 Thread Ilya Leoshkevich
Based-on: <20230202005204.2055899-1-richard.hender...@linaro.org> ("[PATCH 00/14] linux-user/sparc: Handle missing traps") v2: https://lists.gnu.org/archive/html/qemu-devel/2023-02/msg03299.html v2 -> v3: Use exclusive_context_count = 1 instead of exclusive_context_count++ in the

[PATCH v3 4/4] tests/tcg/linux-test: Add linux-fork-trap test

2023-02-13 Thread Ilya Leoshkevich
Check that dying due to a signal does not deadlock. Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson --- tests/tcg/multiarch/linux/linux-fork-trap.c | 48 + 1 file changed, 48 insertions(+) create mode 100644 tests/tcg/multiarch/linux/linux-fork-trap.c diff

[PATCH 2/4] sysemu/os-win32: fix setjmp/longjmp on windows-arm64

2023-02-13 Thread Pierrick Bouvier
Windows implementation of setjmp/longjmp is done in C:/WINDOWS/system32/ucrtbase.dll. Alas, on arm64, it seems to *always* perform stack unwinding, which crashes from generated code. By using alternative implementation built in mingw, we avoid doing stack unwinding and this fixes crash when

[PATCH] crypto: allow client/server cert chains

2023-02-13 Thread matoro_mailinglist_qemu--- via
From: matoro The existing implementation assumes that client/server certificates are single individual certificates. If using publicly-issued certificates, or internal CAs that use an intermediate issuer, this is unlikely to be the case, and they will instead be certificate chains. While this

[PATCH 0/4] Adds support for running QEMU natively on windows-arm64

2023-02-13 Thread Pierrick Bouvier
Note: As it's my first submission using git send-email and on QEMU, don't hesitate to report if anything is wrong/missing. To compile this, the fastest route is to use msys2, setup with clangarm64 repository. This way, all dependencies can be installed easily, and clang is available directly.

[PATCH 4/4] target/ppc: fix warning with clang-15

2023-02-13 Thread Pierrick Bouvier
When compiling for windows-arm64 using clang-15, it reports a sometimes uninitialized variable. This seems to be a false positive, as a default case guards switch expressions, preventing to return an uninitialized value, but clang seems unhappy with assert definition. Setting the rnd variable to

[PATCH 3/4] qga/vss-win32: fix warning for clang++-15

2023-02-13 Thread Pierrick Bouvier
Reported when compiling with clang-windows-arm64. ../qga/vss-win32/install.cpp:537:9: error: variable 'hr' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] if (!(ControlService(service, SERVICE_CONTROL_STOP, NULL))) {

[PATCH 1/4] util/cacheflush: fix illegal instruction on windows-arm64

2023-02-13 Thread Pierrick Bouvier
mrs instruction fails as an illegal instruction. For now, no cache information is retrieved for this platform. It could be specialized later, using Windows API. Signed-off-by: Pierrick Bouvier --- util/cacheflush.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH RESEND v5 00/28] target/arm: Allow CONFIG_TCG=n builds

2023-02-13 Thread Fabiano Rosas
Hi, could someone take this? I rebased and put the two series together to simplify. I'm keeping it up-to-date and tested while it doesn't go in. CI run here: https://gitlab.com/farosas/qemu/-/pipelines/776103500 Based on master. Supersedes "target/arm: CONFIG_TCG=n part 1". Thanks! v5:

[PATCH RESEND v5 02/28] target/arm: wrap psci call with tcg_enabled

2023-02-13 Thread Fabiano Rosas
From: Claudio Fontana for "all" builds (tcg + kvm), we want to avoid doing the psci check if tcg is built-in, but not enabled. Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson Signed-off-by: Fabiano Rosas Tested-by: Philippe Mathieu-Daudé --- target/arm/helper.c | 3 ++- 1

[PATCH RESEND v5 13/28] target/arm: Move hflags code into the tcg directory

2023-02-13 Thread Fabiano Rosas
The hflags are used only for TCG code, so introduce a new file hflags.c to keep that code. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé --- target/arm/helper.c| 393 +--- target/arm/internals.h | 2

[PATCH RESEND v5 01/28] target/arm: rename handle_semihosting to tcg_handle_semihosting

2023-02-13 Thread Fabiano Rosas
From: Claudio Fontana make it clearer from the name that this is a tcg-only function. Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- target/arm/helper.c | 4 ++-- 1 file

[PATCH RESEND v5 23/28] tests/qtest: arm-cpu-features: Match tests to required accelerators

2023-02-13 Thread Fabiano Rosas
Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Acked-by: Thomas Huth --- tests/qtest/arm-cpu-features.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index

[PATCH RESEND v5 10/28] target/arm: move helpers to tcg/

2023-02-13 Thread Fabiano Rosas
From: Claudio Fontana Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- target/arm/meson.build | 16 ++-- target/arm/tcg-stubs.c | 23

[PATCH RESEND v5 07/28] target/arm: Move define_debug_regs() to cpregs.c

2023-02-13 Thread Fabiano Rosas
The debug_helper.c file will move into a tcg-specific directory, so take the cpregs code out of it. That code needs to be present in KVM builds as well. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé --- target/arm/cpregs.c | 473

[PATCH RESEND v5 14/28] target/arm: Move regime_using_lpae_format into internal.h

2023-02-13 Thread Fabiano Rosas
This function is needed by common code (ptw.c), so move it along with the other regime_* functions in internal.h. When we enable the build without TCG, the tlb_helper.c file will not be present. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé ---

[PATCH RESEND v5 26/28] arm/Kconfig: Always select SEMIHOSTING when TCG is present

2023-02-13 Thread Fabiano Rosas
We are about to enable the build without TCG, so CONFIG_SEMIHOSTING and CONFIG_ARM_COMPATIBLE_SEMIHOSTING cannot be unconditionally set in default.mak anymore. So reflect the change in a Kconfig. Instead of using semihosting/Kconfig, use a target-specific file, so that the change doesn't affect

[PATCH RESEND v5 24/28] tests/qtest: Restrict tpm-tis-devices-{swtpm}-test to CONFIG_TCG

2023-02-13 Thread Fabiano Rosas
These tests set -accel tcg, so restrict them to when TCG is present. Signed-off-by: Fabiano Rosas Acked-by: Richard Henderson Reviewed-by: Thomas Huth --- Removed unneeded hunk restricting dependencies Use config_all instead of config_devices_all to check for TCG --- tests/qtest/meson.build |

[PATCH RESEND v5 20/28] target/arm: Move 64-bit TCG CPUs into tcg/

2023-02-13 Thread Fabiano Rosas
Move the 64-bit CPUs that are TCG-only: - cortex-a35 - cortex-a55 - cortex-a72 - cortex-a76 - a64fx - neoverse-n1 Keep the CPUs that can be used with KVM: - cortex-a57 - cortex-a53 - max - host For the special case "max" CPU, there's a nuance that while KVM/HVF use the "host" model instead, we

[PATCH RESEND v5 27/28] arm/Kconfig: Do not build TCG-only boards on a KVM-only build

2023-02-13 Thread Fabiano Rosas
Move all the CONFIG_FOO=y from default.mak into "default y if TCG" statements in Kconfig. That way they won't be selected when CONFIG_TCG=n. I'm leaving CONFIG_ARM_VIRT in default.mak because it allows us to keep the two default.mak files not empty and keep aarch64-default.mak including

[PATCH RESEND v5 19/28] tests/avocado: Tag TCG tests with accel:tcg

2023-02-13 Thread Fabiano Rosas
This allows the test to be skipped when TCG is not present in the QEMU binary. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé --- tests/avocado/boot_linux_console.py | 1 + tests/avocado/reverse_debugging.py | 8 2 files changed, 9

[PATCH RESEND v5 25/28] target/avocado: Pass parameters to migration test on aarch64

2023-02-13 Thread Fabiano Rosas
The migration tests are currently broken for an aarch64 host because the tests pass no 'machine' and 'cpu' options on the QEMU command line. Most other architectures define a default value in QEMU for these options, but arm does not. Add these options to the test class in case the test is being

[PATCH RESEND v5 09/28] target/arm: move translate modules to tcg/

2023-02-13 Thread Fabiano Rosas
Introduce the target/arm/tcg directory. Its purpose is to hold the TCG code that is selected by CONFIG_TCG. Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe

[PATCH RESEND v5 16/28] cpu-defs.h: Expose CPUTLBEntryFull to non-TCG code

2023-02-13 Thread Fabiano Rosas
This struct has no dependencies on TCG code and it is being used in target/arm/ptw.c to simplify the passing around of page table walk results. Those routines can be reached by KVM code via the gdbstub breakpoint code, so take the structure out of CONFIG_TCG to make it visible when building with

[PATCH RESEND v5 22/28] target/arm: Use "max" as default cpu for the virt machine with KVM

2023-02-13 Thread Fabiano Rosas
Now that the cortex-a15 is under CONFIG_TCG, use as default CPU for a KVM-only build the 'max' cpu. Note that we cannot use 'host' here because the qtests can run without any other accelerator (than qtest) and 'host' depends on KVM being enabled. Signed-off-by: Fabiano Rosas Acked-by: Richard

[PATCH RESEND v5 21/28] target/arm: move cpu_tcg to tcg/cpu32.c

2023-02-13 Thread Fabiano Rosas
From: Claudio Fontana move the module containing cpu models definitions for 32bit TCG-only CPUs to tcg/ and rename it for clarity. Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson --- First and last hunks are new. --- hw/arm/virt.c

[PATCH RESEND v5 17/28] target/arm: Move cortex sysregs into cpregs.c

2023-02-13 Thread Fabiano Rosas
The file cpu_tcg.c is about to be moved into the tcg/ directory, so move the register definitions into cpregs.c along with all the others. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé --- target/arm/cpregs.c| 59

[PATCH RESEND v5 08/28] target/arm: Wrap breakpoint/watchpoint updates with tcg_enabled

2023-02-13 Thread Fabiano Rosas
This is in preparation for moving debug_helper.c into a TCG-specific directory. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé --- target/arm/cpu.c | 6 -- target/arm/machine.c | 7 +-- 2 files changed, 9 insertions(+), 4 deletions(-)

[PATCH RESEND v5 15/28] target/arm: Don't access TCG code when debugging with KVM

2023-02-13 Thread Fabiano Rosas
When TCG is disabled this part of the code should not be reachable, so wrap it with an ifdef for now. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé --- target/arm/ptw.c | 4 1 file changed, 4 insertions(+) diff --git a/target/arm/ptw.c

[PATCH RESEND v5 28/28] gitlab-ci: Check building KVM-only aarch64 target

2023-02-13 Thread Fabiano Rosas
From: Philippe Mathieu-Daudé Add a manual new job to cross-build the aarch64 target with only the KVM accelerator enabled (in particular, no TCG). Re-enable running the similar job on the project Aarch64 custom runner. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Fabiano Rosas

[PATCH RESEND v5 12/28] target/arm: Wrap arm_rebuild_hflags calls with tcg_enabled

2023-02-13 Thread Fabiano Rosas
This is in preparation to moving the hflags code into its own file under the tcg/ directory. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé --- hw/arm/boot.c | 6 +- hw/intc/armv7m_nvic.c | 20 +---

[PATCH RESEND v5 18/28] tests/avocado: Skip tests that require a missing accelerator

2023-02-13 Thread Fabiano Rosas
If a test was tagged with the "accel" tag and the specified accelerator it not present in the qemu binary, cancel the test. We can now write tests without explicit calls to require_accelerator, just the tag is enough. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by:

[PATCH RESEND v5 11/28] target/arm: Move psci.c into the tcg directory

2023-02-13 Thread Fabiano Rosas
From: Claudio Fontana Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé --- target/arm/meson.build | 1 - target/arm/tcg/meson.build | 4 target/arm/{ => tcg}/psci.c | 0 3 files

[PATCH RESEND v5 03/28] target/arm: wrap call to aarch64_sve_change_el in tcg_enabled()

2023-02-13 Thread Fabiano Rosas
From: Claudio Fontana Signed-off-by: Claudio Fontana Reviewed-by: Richard Henderson Signed-off-by: Fabiano Rosas Tested-by: Philippe Mathieu-Daudé --- target/arm/helper.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/target/arm/helper.c

[PATCH RESEND v5 04/28] target/arm: Move PC alignment check

2023-02-13 Thread Fabiano Rosas
Move this earlier to make the next patch diff cleaner. While here update the comment slightly to not give the impression that the misalignment affects only TCG. Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Fabiano Rosas Tested-by: Philippe Mathieu-Daudé

[PATCH RESEND v5 05/28] target/arm: Move cpregs code out of cpu.h

2023-02-13 Thread Fabiano Rosas
Since commit cf7c6d1004 ("target/arm: Split out cpregs.h") we now have a cpregs.h header which is more suitable for this code. Code moved verbatim. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé ---

Re: [PATCH v6 0/4] memory: prevent dma-reentracy issues

2023-02-13 Thread Michael S. Tsirkin
On Sun, Feb 12, 2023 at 09:11:41PM -0500, Alexander Bulekov wrote: > ping > > On 230204 2307, Alexander Bulekov wrote: > > These patches aim to solve two types of DMA-reentrancy issues: > > > > 1.) mmio -> dma -> mmio case > > To solve this, we track whether the device is engaged in io by > >

Re: [PATCH v2 2/4] cpus: Make {start,end}_exclusive() recursive

2023-02-13 Thread Richard Henderson
On 2/13/23 02:52, Ilya Leoshkevich wrote: Currently dying to one of the core_dump_signal()s deadlocks, because dump_core_and_abort() calls start_exclusive() two times: first via stop_all_tasks(), and then via preexit_cleanup() -> qemu_plugin_user_exit(). There are a number of ways to solve

Re: [PATCH v2 1/4] linux-user: Always exit from exclusive state in fork_end()

2023-02-13 Thread Richard Henderson
On 2/13/23 02:52, Ilya Leoshkevich wrote: fork()ed processes currently start with current_cpu->in_exclusive_context set, which is, strictly speaking, not correct, but does not cause problems (even assertion failures). With one of the next patches, the code begins to rely on this value, so fix

Re: [PATCH v4] hw/arm/smmuv3: Add GBPA register

2023-02-13 Thread Richard Henderson
On 2/13/23 00:57, Peter Maydell wrote: On Sat, 11 Feb 2023 at 23:49, Richard Henderson wrote: On 2/10/23 12:19, Mostafa Saleh wrote: @@ -1512,6 +1553,10 @@ static const VMStateDescription vmstate_smmuv3 = { VMSTATE_END_OF_LIST(), }, +.subsections = (const

Re: [PATCH] MAINTAINERS: update my email address for the clock framework

2023-02-13 Thread Luc Michel
On 10:53 Mon 13 Feb , Damien Hedde wrote: > Also update mailmap > > Signed-off-by: Damien Hedde Reviewed-by: Luc Michel > --- > MAINTAINERS | 2 +- > .mailmap| 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index

Re: [PATCH 00/18] target/riscv: Various fixes to gdbstub and CSR access

2023-02-13 Thread Daniel Henrique Barboza
Bin, I received only patches 1-11. I don't see the remaining patches in patchwork: https://patchwork.kernel.org/project/qemu-devel/list/?series=721372 or in the qemu-devel archives: https://lists.gnu.org/archive/html/qemu-devel/2023-02/msg03461.html Can you please verify? Thanks,

[PATCH] vhost: accept VIRTIO_F_ORDER_PLATFORM as a valid SVQ feature

2023-02-13 Thread Eugenio Pérez
VIRTIO_F_ORDER_PLATFORM indicates that memory accesses by the driver and the device are ordered in a way described by the platform. Since vDPA devices may be backed by a hardware devices, let's allow VIRTIO_F_ORDER_PLATFORM. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-shadow-virtqueue.c |

Re: [RFC PATCH 01/43] target/loongarch: Add vector data type vec_t

2023-02-13 Thread Richard Henderson
On 2/12/23 22:24, gaosong wrote: Hi,  Richard 在 2022/12/25 上午1:32, Richard Henderson 写道: On 12/24/22 00:15, Song Gao wrote: +union vec_t { +    int8_t   B[LSX_LEN / 8]; +    int16_t  H[LSX_LEN / 16]; +    int32_t  W[LSX_LEN / 32]; +    int64_t  D[LSX_LEN / 64]; +    __int128 Q[LSX_LEN / 128];

[PATCH v3 09/14] hw/net/tulip: Finish QOM conversion

2023-02-13 Thread Philippe Mathieu-Daudé
Use the TULIP() and DEVICE() QOM type-checking macros. Remove uses of DO_UPCAST(). Signed-off-by: Philippe Mathieu-Daudé --- hw/net/tulip.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/hw/net/tulip.c b/hw/net/tulip.c index 915e5fb595..990507859d

Re: [PATCH V2 04/10] hw/riscv/virt: virt-acpi-build.c: Add basic ACPI tables

2023-02-13 Thread Daniel Henrique Barboza
Sunil, This patch is a bit confusing to me. You're using functions that doesn't exist in the code base yet (build_madt and build_rhct) because they are introduced in later patches. This also means that this patch is not being compiled tested, because otherwise it would throw a compile error. And

[PATCH v3 08/14] hw/net/ne2000-pci: Replace DO_UPCAST(PCINE2000State) by PCI_NE2000()

2023-02-13 Thread Philippe Mathieu-Daudé
Define TYPE_PCI_NE2000 and the QOM PCI_NE2000() macro. Use PCI_NE2000() instead of DO_UPCAST(). Signed-off-by: Philippe Mathieu-Daudé --- hw/net/ne2000-pci.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/hw/net/ne2000-pci.c b/hw/net/ne2000-pci.c index

[PATCH v3 06/14] hw/ide/qdev: Replace DO_UPCAST(IDEDevice) by IDE_DEVICE()

2023-02-13 Thread Philippe Mathieu-Daudé
Use the IDE_DEVICE() QOM type-checking macro to avoid DO_UPCAST(). Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/qdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 6ae2627a56..1ead62fd18 100644 --- a/hw/ide/qdev.c +++

[PATCH v3 14/14] hw/usb: Replace DO_UPCAST(USBBus) by USB_BUS()

2023-02-13 Thread Philippe Mathieu-Daudé
Use the USB_BUS() QOM type-checking macro to avoid DO_UPCAST(). Signed-off-by: Philippe Mathieu-Daudé --- include/hw/usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/usb.h b/include/hw/usb.h index b2111bb1c7..f743a5e945 100644 --- a/include/hw/usb.h +++

[PATCH v3 11/14] hw/scsi/scsi-bus: Replace DO_UPCAST(SCSIBus) by SCSI_BUS()

2023-02-13 Thread Philippe Mathieu-Daudé
Use the SCSI_BUS() QOM type-checking macro to avoid DO_UPCAST(). Signed-off-by: Philippe Mathieu-Daudé --- hw/scsi/scsi-bus.c | 12 ++-- include/hw/scsi/scsi.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index

[PATCH v3 05/14] hw/char/serial-pci-multi: Replace DO_UPCAST() by PCI_MULTISERIAL()

2023-02-13 Thread Philippe Mathieu-Daudé
Use the PCI_MULTISERIAL() QOM type-checking macro to avoid the few DO_UPCAST(PCIMultiSerialState) calls. Signed-off-by: Philippe Mathieu-Daudé --- hw/char/serial-pci-multi.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/char/serial-pci-multi.c

[PATCH v3 04/14] hw/char/serial-pci-multi: Factor multi_serial_class_initfn() out

2023-02-13 Thread Philippe Mathieu-Daudé
Extract code common to multi_2x_serial_pci_class_initfn() and multi_4x_serial_pci_class_initfn() to multi_serial_class_initfn(). Signed-off-by: Philippe Mathieu-Daudé --- hw/char/serial-pci-multi.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git

[PATCH v3 01/14] hw/char/serial-pci: Replace DO_UPCAST(PCISerialState) by PCI_SERIAL()

2023-02-13 Thread Philippe Mathieu-Daudé
Use the PCI_SERIAL() QOM type-checking macro to avoid DO_UPCAST(). Signed-off-by: Philippe Mathieu-Daudé --- hw/char/serial-pci.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/char/serial-pci.c b/hw/char/serial-pci.c index 801b769aba..9689645cac 100644 ---

[PATCH v3 07/14] hw/ide/qdev: Replace DO_UPCAST(IDEBus) by IDE_BUS()

2023-02-13 Thread Philippe Mathieu-Daudé
Use the IDE_BUS() QOM type-checking macro to avoid DO_UPCAST(). Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/qdev.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 1ead62fd18..a168643266 100644 --- a/hw/ide/qdev.c +++

[PATCH v3 13/14] hw/usb/dev-hub: Use QOM USB_HUB() macro instead of casting

2023-02-13 Thread Philippe Mathieu-Daudé
Use the safer USB_HUB() QOM type-checking macro instead of casts. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/dev-hub.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-hub.c b/hw/usb/dev-hub.c index a6b50dbc8d..4734700e3e 100644 --- a/hw/usb/dev-hub.c

[PATCH v3 12/14] hw/scsi/scsi-bus: Inline two uses of scsi_bus_from_device()

2023-02-13 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Acked-by: Eric Farman --- hw/s390x/ipl.c | 7 ++- hw/scsi/scsi-bus.c | 2 +- include/hw/scsi/scsi.h | 5 - 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index 8612684d48..4f7f4e60d6

[PATCH v3 03/14] hw/char/serial-pci-multi: Introduce PCI_MULTISERIAL QOM abstract parent

2023-02-13 Thread Philippe Mathieu-Daudé
Introduce PCI_MULTISERIAL ("pci-serial"), QOM abstract parent of "pci-serial-2x" and "pci-serial-4x". Signed-off-by: Philippe Mathieu-Daudé --- hw/char/serial-pci-multi.c | 35 --- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git

[PATCH v3 10/14] hw/pci/pci: Replace DO_UPCAST(PCIBus) by PCI_BUS()

2023-02-13 Thread Philippe Mathieu-Daudé
Use the PCI_BUS() QOM type-checking macro to avoid DO_UPCAST(). Signed-off-by: Philippe Mathieu-Daudé --- hw/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 2e785e3aef..ae5c33adb6 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@

[PATCH v3 00/14] hw: Use QOM macros and remove DO_UPCAST() uses

2023-02-13 Thread Philippe Mathieu-Daudé
v3: - Corrected TYPE_PCI_MULTISERIAL string - Split EEPRO100 series out: https://lore.kernel.org/qemu-devel/20230213101048.94519-1-phi...@linaro.org/ - Split VFIO_CCW series out: https://lore.kernel.org/qemu-devel/20230213170145.45666-1-phi...@linaro.org/ - Removed "Inline

[PATCH v3 02/14] hw/char/serial-pci-multi: Batch register types using DEFINE_TYPES macro

2023-02-13 Thread Philippe Mathieu-Daudé
See rationale in commit 38b5d79b2e ("qom: add helper macro DEFINE_TYPES()"). Signed-off-by: Philippe Mathieu-Daudé --- hw/char/serial-pci-multi.c | 52 +- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/hw/char/serial-pci-multi.c

Re: [PATCH v3 5/6] hw/vfio/ccw: Remove pointless S390CCWDevice variable

2023-02-13 Thread Eric Farman
On Mon, 2023-02-13 at 18:01 +0100, Philippe Mathieu-Daudé wrote: > QOM parenthood relationship is: > >   VFIOCCWDevice -> S390CCWDevice -> CcwDevice -> DeviceState > > No need to double-cast, call CCW_DEVICE() on VFIOCCWDevice. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric

  1   2   3   4   5   >