[PATCH 05/11] io: Add support for seekable channels

2022-10-04 Thread Nikolay Borisov
Add a bunch of auxiliarry methods and a feature flag to work with SEEKABLE channels. Currently the only channel considered seekable is QIOChannelFile. Also add a bunch of helper functions to QEMUFile that can make use of this channel feature. All of this is in prepration for supporting

[PULL 12/54] configure: do not invoke as/ld directly for pc-bios/optionrom

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini Just use using the compiler binary, with -nostdlib in the case of the linker; the compiler driver (whether i686-*-gcc, or x86_64-*-gcc with the -m32 option) will then pick the right magic option to as and ld. Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée

[PULL 06/54] target/hexagon: add flex/bison/glib2 to qemu.yml

2022-10-04 Thread Alex Bennée
From: Anton Johansson Note, the glib2-native mapping exists separately from the normal glib2 mapping. The latter uses a `foreign` cross-policy-default, and libvirt-ci is not able to support package mappings for multiple cross-compilation policies. This will probably change in the future.

[PULL 11/54] tests/qtest: bump up QOS_PATH_MAX_ELEMENT_SIZE

2022-10-04 Thread Alex Bennée
It seems the depth of stack we need to support can vary depending on the order of the init constructors getting called. It seems --enable-lto shuffles things around just enough to push you over the limit. Signed-off-by: Alex Bennée Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1186

[PULL 29/54] pc-bios/optionrom: Adopt meson style Make output

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée Message-Id: <20220929114231.583801-30-alex.ben...@linaro.org> diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile index f514e4f84b..b1fff0ba6c 100644 --- a/pc-bios/optionrom/Makefile +++

[PULL 01/54] scripts/ci/setup: ninja missing from build-environment

2022-10-04 Thread Alex Bennée
From: "Lucas Mateus Castro (alqotel)" ninja-build is missing from the RHEL environment, so a system prepared with that script would still fail to compile QEMU. Tested on a Fedora 36 Signed-off-by: Lucas Mateus Castro (alqotel) Message-Id: <20220922135516.33627-2-lucas.ara...@eldorado.org.br>

[PULL 03/54] scripts/ci/setup: spice-server only on x86 aarch64

2022-10-04 Thread Alex Bennée
From: "Lucas Mateus Castro (alqotel)" Changed build-environment.yml to only install spice-server on x86_64 and aarch64 as this package is only available on those architectures. Signed-off-by: Lucas Mateus Castro (alqotel) Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PULL 14/54] pc-bios/s390-ccw: detect CC options just once

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini In preparation for adding Docker container support, detect compiler options just once rather than once per Make run; container startup overhead is substantial and doing the detection just once makes things faster. Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée

[PULL 19/54] tests: simplify Makefile invocation for tests/tcg

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini Remove the DOCKER_SCRIPT and TARGET variable from the Makefile invocation for tests/tcg. For DOCKER_SCRIPT, resolve the path to docker.py in configure; for TARGET, move it to config-$(TARGET).mak and use a symbolic link to break the cycle. The symbolic link is still needed

[PULL 05/54] configure: move detected gdb to TCG's config-host.mak

2022-10-04 Thread Alex Bennée
When tests/tcg gained it's own config-host.mak we forgot to move the GDB detection. Fixes: 544f4a2578 (tests/tcg: isolate from QEMU's config-host.mak) Signed-off-by: Alex Bennée Message-Id: <20220929114231.583801-6-alex.ben...@linaro.org> diff --git a/configure b/configure index

[PULL 00/54] testing, gdbstub, plugin and gitdm updates

2022-10-04 Thread Alex Bennée
The following changes since commit efbf38d73e5dcc4d5f8b98c6e7a12be1f3b91745: Merge tag 'for-upstream' of git://repo.or.cz/qemu/kevin into staging (2022-10-03 15:06:07 -0400) are available in the Git repository at: https://github.com/stsquad/qemu.git

[PULL 34/54] disas: use result of ->read_memory_func

2022-10-04 Thread Alex Bennée
This gets especially confusing if you start plugging in host addresses from a trace and you wonder why the output keeps changing. Report when read_memory_func fails instead of blindly disassembling the buffer contents. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Reviewed-by:

[PULL 52/54] contrib/gitdm: add Simon to individual contributors

2022-10-04 Thread Alex Bennée
Please confirm this is the correct mapping for you. Signed-off-by: Alex Bennée Reviewed-by: Simon Safar Message-Id: <20220926134609.3301945-2-alex.ben...@linaro.org> diff --git a/contrib/gitdm/group-map-individuals b/contrib/gitdm/group-map-individuals index e19d79626c..53883cc526 100644 ---

[PULL 33/54] disas: generalise plugin_printf and use for monitor_disas

2022-10-04 Thread Alex Bennée
Rather than assembling our output piecemeal lets use the same approach as the plugin disas interface to build the disassembly string before printing it. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20220929114231.583801-34-alex.ben...@linaro.org> diff --git a/disas.c

[PULL 15/54] vof: add distclean target

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini Signed-off-by: Paolo Bonzini [AJB: add clean dep to distclean] Signed-off-by: Alex Bennée Message-Id: <20220929114231.583801-16-alex.ben...@linaro.org> diff --git a/pc-bios/vof/Makefile b/pc-bios/vof/Makefile index 8809c82768..4e59009e67 100644 --- a/pc-bios/vof/Makefile

[PULL 30/54] pc-bios/s390-ccw: Adopt meson style Make output

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée Message-Id: <20220929114231.583801-31-alex.ben...@linaro.org> diff --git a/pc-bios/s390-ccw/netboot.mak b/pc-bios/s390-ccw/netboot.mak index ee59a5f4de..046aa35587 100644 --- a/pc-bios/s390-ccw/netboot.mak +++

[PULL 18/54] configure: store container engine in config-host.mak

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini In preparation for removing $(DOCKER_SCRIPT) from the tests/tcg configuration files, have Make use the same container engine that had been probed at configure time. Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée Message-Id:

[PULL 31/54] pc-bios/vof: Adopt meson style Make output

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée Message-Id: <20220929114231.583801-32-alex.ben...@linaro.org> diff --git a/pc-bios/vof/Makefile b/pc-bios/vof/Makefile index 4e59009e67..d1eb6ced7e 100644 --- a/pc-bios/vof/Makefile +++ b/pc-bios/vof/Makefile @@ -2,19

[PULL 37/54] docs/devel: clean-up qemu invocations in tcg-plugins

2022-10-04 Thread Alex Bennée
We currently have the final binaries in the root of the build dir so the build prefix is superfluous. Additionally add a shell prompt to be more in line with the rest of the code. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id:

Re: [PATCH v10 4/5] target/riscv: smstateen check for fcsr

2022-10-04 Thread weiwei
On 2022/10/4 14:51, mchit...@ventanamicro.com wrote: On Mon, 2022-10-03 at 21:02 +0800, weiwei wrote: On 2022/10/3 19:47, Mayuresh Chitale wrote: If smstateen is implemented and sstateen0.fcsr is clear then the floating point operations must return illegal instruction exception or virtual

[PULL 27/54] configure: cleanup creation of tests/tcg target config

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini Remove the symlink to tests/tcg/config-*.mak, which is possible now that unused target config files are not created either. Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée Message-Id: <20220929114231.583801-28-alex.ben...@linaro.org> diff --git a/configure

[PULL 47/54] contrib/gitdm: add mapping for Loongson Technology

2022-10-04 Thread Alex Bennée
Please confirm you are happy with this mapping. Signed-off-by: Alex Bennée Acked-by: Song Gao Message-Id: <20220929114231.583801-48-alex.ben...@linaro.org> diff --git a/contrib/gitdm/domain-map b/contrib/gitdm/domain-map index 2800d9f986..434ef53afc 100644 --- a/contrib/gitdm/domain-map +++

[PATCH v7 01/18] cpu: cache CPUClass in CPUState for hot code paths

2022-10-04 Thread Richard Henderson
From: Alex Bennée The class cast checkers are quite expensive and always on (unlike the dynamic case who's checks are gated by CONFIG_QOM_CAST_DEBUG). To avoid the overhead of repeatedly checking something which should never change we cache the CPUClass reference for use in the hot code paths.

[PATCH v7 00/18] tcg: CPUTLBEntryFull and TARGET_TB_PCREL

2022-10-04 Thread Richard Henderson
Changes for v7: * Added stub for --disable-tcg (stsquad) * Re-worded the commit for patch 13 (stsquad) * Split out some more helpers around ifdefs in patch 18 (stsquad) Patches needing review: 13-accel-tcg-Do-not-align-tb-page_addr-0.patch 17-accel-tcg-Introduce-tb_pc-and-log_pc.patch

[PATCH v7 02/18] hw/core/cpu-sysemu: used cached class in cpu_asidx_from_attrs

2022-10-04 Thread Richard Henderson
From: Alex Bennée This is a heavily used function so lets avoid the cost of CPU_GET_CLASS. On the romulus-bmc run it has a modest effect: Before: 36.812 s ± 0.506 s After: 35.912 s ± 0.168 s Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id:

[PATCH v7 14/18] accel/tcg: Inline tb_flush_jmp_cache

2022-10-04 Thread Richard Henderson
This function has two users, who use it incompatibly. In tlb_flush_page_by_mmuidx_async_0, when flushing a single page, we need to flush exactly two pages. In tlb_flush_range_by_mmuidx_async_0, when flushing a range of pages, we need to flush N+1 pages. This avoids double-flushing of jmp cache

Re: [RFC v2 13/15] vfio/iommufd: Implement the iommufd backend

2022-10-04 Thread Alistair Popple
Yi Liu writes: [...] > +static int vfio_get_devicefd(const char *sysfs_path, Error **errp) > +{ > +long int ret = -ENOTTY; > +char *path, *vfio_dev_path = NULL, *vfio_path = NULL; > +DIR *dir; > +struct dirent *dent; > +gchar *contents; > +struct stat st; > +gsize

Re: [PATCH] target/arm: Implement FEAT_E0PD

2022-10-04 Thread Richard Henderson
On 10/4/22 04:05, Peter Maydell wrote: FEAT_E0PD adds new bits E0PD0 and E0PD1 to TCR_EL1, which allow the OS to forbid EL0 access to half of the address space. Since this is an EL0-specific variation on the existing TCR_ELx.{EPD0,EPD1}, we can implement it entirely in aa64_va_parameters().

Re: [PATCH v3] tcg/ppc: Optimize 26-bit jumps

2022-10-04 Thread Richard Henderson
On 10/3/22 11:32, Leandro Lupori wrote: On 9/19/22 14:56, Leandro Lupori wrote: PowerPC64 processors handle direct branches better than indirect ones, resulting in less stalled cycles and branch misses. However, PPC's tb_target_set_jmp_target() was only using direct branches for 16-bit jumps,

Re: [PATCH] target/arm: allow setting SCR_EL3.EnTP2 when FEAT_SME is implemented

2022-10-04 Thread Richard Henderson
On 10/4/22 00:23, Jerome Forissier wrote: Updates write_scr() to allow setting SCR_EL3.EnTP2 when FEAT_SME is implemented. SCR_EL3 being a 64-bit register, valid_mask is changed to uint64_t and the SCR_* constants in target/arm/cpu.h are extended to 64-bit so that masking and bitwise not (~)

Re: [PATCH] Revert "qapi: fix examples of blockdev-add with qcow2"

2022-10-04 Thread Victor Toso
Hi, Sorry taking some time to reply. On Fri, Sep 30, 2022 at 07:19:08PM +0200, Markus Armbruster wrote: > This reverts commit b6522938327141235b97ab38e40c6c4512587373. Which is: ``` qapi: fix examples of blockdev-add with qcow2 The examples use "qcow2" driver with the wrong member name for

Re: [PATCH v2 0/5] pci-ids: virtio cleanup

2022-10-04 Thread David Hildenbrand
On 04.10.22 09:44, Gerd Hoffmann wrote: On Fri, Sep 30, 2022 at 04:22:21PM +0200, David Hildenbrand wrote: On 30.09.22 15:58, Gerd Hoffmann wrote: Drop legacy ids for virtio 1.0 devices, they are not needed and will be overridden anyway by generic virtio pci code. Improve modern virtio id

[PATCH 4/4] linux-user: drop conditionals for obsolete kernel header versions

2022-10-04 Thread Daniel P . Berrangé
Given our newly enforced 4.18 baseline for the kernel headers version, we can drop any conditional checks for older versions. Signed-off-by: Daniel P. Berrangé --- linux-user/linux_loop.h| 4 linux-user/syscall.c | 14 ++ tests/tcg/i386/test-i386.c | 10 +++--- 3

[PATCH 2/4] linux-user: remove conditionals for many fs.h ioctls

2022-10-04 Thread Daniel P . Berrangé
These ioctls have been defined in linux/fs.h for a long time * BLKGETSIZE64 - <2.6.12 (linux.git epoch) * BLKDISCARD - 2.6.28 (d30a2605be9d5132d95944916e8f578fcfe4f976) * BLKIOMIN - 2.6.32 (ac481c20ef8f6c6f2be75d581863f40c43874ef7) * BLKIOOPT - 2.6.32

Re: [PATCH v4 3/6] hw/arm/virt: Introduce variable region_base in virt_set_high_memmap()

2022-10-04 Thread Cornelia Huck
On Tue, Oct 04 2022, Gavin Shan wrote: > This introduces variable 'region_base' for the base address of the > specific high memory region. It's the preparatory work to optimize > high memory region address assignment. > > No functional change intended. > > Signed-off-by: Gavin Shan >

Re: [PATCH 03/14] migration: Trivial cleanup save_page_header() on same block check

2022-10-04 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > The 2nd check on RAM_SAVE_FLAG_CONTINUE is a bit redundant. Use a boolean > to be clearer. > > Signed-off-by: Peter Xu Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff

Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var

2022-10-04 Thread Jason A. Donenfeld
On Tue, Oct 4, 2022 at 12:53 PM Peter Maydell wrote: > > On Tue, 4 Oct 2022 at 11:40, Jason A. Donenfeld wrote: > > > > And just to give you some idea that this truly is possible from firmware > > and I'm not just making it up, consider this patch to U-Boot: > > > > u-boot: > > diff --git

[PATCH] target/arm: Implement FEAT_E0PD

2022-10-04 Thread Peter Maydell
FEAT_E0PD adds new bits E0PD0 and E0PD1 to TCR_EL1, which allow the OS to forbid EL0 access to half of the address space. Since this is an EL0-specific variation on the existing TCR_ELx.{EPD0,EPD1}, we can implement it entirely in aa64_va_parameters(). This requires moving the existing

Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var

2022-10-04 Thread Jason A. Donenfeld
On Tue, Oct 4, 2022 at 1:03 PM Peter Maydell wrote: > What I'm asking, I guess, is why you're messing with this board > model at all if you haven't added this functionality to u-boot. > This is just an emulation of an ancient bit of MIPS hardware, which > nobody really cares about very much I

Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var

2022-10-04 Thread BALATON Zoltan
On Tue, 4 Oct 2022, Jason A. Donenfeld wrote: On Tue, Oct 4, 2022 at 1:03 PM Peter Maydell wrote: What I'm asking, I guess, is why you're messing with this board model at all if you haven't added this functionality to u-boot. This is just an emulation of an ancient bit of MIPS hardware, which

Re: [PATCH v2] mips/malta: pass RNG seed to to kernel via env var

2022-10-04 Thread Jason A. Donenfeld
On Tue, Oct 4, 2022 at 1:39 PM BALATON Zoltan wrote: > > On Tue, 4 Oct 2022, Jason A. Donenfeld wrote: > > On Tue, Oct 4, 2022 at 1:03 PM Peter Maydell > > wrote: > >> What I'm asking, I guess, is why you're messing with this board > >> model at all if you haven't added this functionality to

Re: [PATCH] linux-user,bsd-user: re-exec with G_SLICE=always-malloc

2022-10-04 Thread Peter Maydell
On Tue, 4 Oct 2022 at 13:00, Daniel P. Berrangé wrote: > > The g_slice custom allocator is not async signal safe with its > mutexes. When a multithreaded program running in the qemu user > emulator forks, it can end up deadlocking in the g_slice > allocator > > Thread 1: > #0 syscall () at

[PATCH 06/11] io: Add preadv support to QIOChannelFile

2022-10-04 Thread Nikolay Borisov
preadv is going to be needed when 'fixed-ram'-enabled stream are to be restored. Simply add a wrapper around preadv that's specific to QIOChannelFile. Signed-off-by: Nikolay Borisov --- include/io/channel-file.h | 5 + io/channel-file.c | 26 ++ 2 files

[PULL 10/54] tests/docker: move alpine from edge to tagged release

2022-10-04 Thread Alex Bennée
Tracking alpine-edge like debian-sid is a moving target. Usually such rolling releases are marked as "allow_failure: true" in our CI. However as alpine presents a musl based distro and provides useful extra coverage lets track a release branch instead to avoid random breakages. Signed-off-by:

[PULL 07/54] target/hexagon: regenerate docker/cirrus files

2022-10-04 Thread Alex Bennée
From: Anton Johansson This patch updates the docker and cirrus files with the new packages by running tests/lcitool/refresh Signed-off-by: Anton Johansson Signed-off-by: Alex Bennée Message-Id: <20220804115548.13024-10-a...@rev.ng> Message-Id: <20220929114231.583801-8-alex.ben...@linaro.org>

[PULL 45/54] gdbstub: move guest debug support check to ops

2022-10-04 Thread Alex Bennée
This removes the final hard coding of kvm_enabled() in gdbstub and moves the check to an AccelOps. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Reviewed-by: Mads Ynddal Message-Id: <20220929114231.583801-46-alex.ben...@linaro.org> diff --git a/accel/kvm/kvm-cpus.h

[PULL 50/54] contrib/gitdm: add ISCAS to the academics group

2022-10-04 Thread Alex Bennée
The English website (http://english.is.cas.cn/) in on a slightly different domain but has the same logo as http://www.iscas.ac.cn/. Signed-off-by: Alex Bennée Reviewed-by: Weiwei Li Message-Id: <20220929114231.583801-51-alex.ben...@linaro.org> diff --git a/contrib/gitdm/group-map-academics

Re: [PATCH 05/14] migration: Yield bitmap_mutex properly when sending/sleeping

2022-10-04 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Don't take the bitmap mutex when sending pages, or when being throttled by > migration_rate_limit() (which is a bit tricky to call it here in ram code, > but seems still helpful). > > It prepares for the possibility of concurrently sending pages in >1

[PATCH v7 12/18] accel/tcg: Use DisasContextBase in plugin_gen_tb_start

2022-10-04 Thread Richard Henderson
Use the pc coming from db->pc_first rather than the TB. Use the cached host_addr rather than re-computing for the first page. We still need a separate lookup for the second page because it won't be computed for DisasContextBase until the translator actually performs a read from the page.

[PATCH v7 10/18] accel/tcg: Remove PageDesc code_bitmap

2022-10-04 Thread Richard Henderson
This bitmap is created and discarded immediately. We gain nothing by its existence. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson Message-Id: <20220822232338.1727934-2-richard.hender...@linaro.org> --- accel/tcg/translate-all.c | 78 ++- 1 file

[PATCH v7 17/18] accel/tcg: Introduce tb_pc and log_pc

2022-10-04 Thread Richard Henderson
The availability of tb->pc will shortly be conditional. Introduce accessor functions to minimize ifdefs. Pass around a known pc to places like tcg_gen_code, where the caller must already have the value. Signed-off-by: Richard Henderson --- accel/tcg/internal.h| 6

Re: [PATCH 04/14] migration: Remove RAMState.f references in compression code

2022-10-04 Thread Peter Xu
On Tue, Oct 04, 2022 at 11:54:02AM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > Removing referencing to RAMState.f in compress_page_with_multi_thread() and > > flush_compressed_data(). > > > > Compression code by default isn't compatible with having >1 channels

Re: [PATCH 1/5] migration: Fix possible deadloop of ram save process

2022-10-04 Thread Peter Xu
On Thu, Sep 22, 2022 at 05:41:30PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Thu, Sep 22, 2022 at 03:49:38PM +0100, Dr. David Alan Gilbert wrote: > > > * Peter Xu (pet...@redhat.com) wrote: > > > > When starting ram saving procedure (especially at the

Re: [PATCH 1/5] migration: Fix possible deadloop of ram save process

2022-10-04 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > On Thu, Sep 22, 2022 at 05:41:30PM +0100, Dr. David Alan Gilbert wrote: > > * Peter Xu (pet...@redhat.com) wrote: > > > On Thu, Sep 22, 2022 at 03:49:38PM +0100, Dr. David Alan Gilbert wrote: > > > > * Peter Xu (pet...@redhat.com) wrote: > > > > > When

Re: [PATCH v7 17/18] accel/tcg: Introduce tb_pc and log_pc

2022-10-04 Thread Alex Bennée
Richard Henderson writes: > The availability of tb->pc will shortly be conditional. > Introduce accessor functions to minimize ifdefs. > > Pass around a known pc to places like tcg_gen_code, > where the caller must already have the value. > > Signed-off-by: Richard Henderson Reviewed-by:

[PATCH 09/11] migration: Refactor precopy ram loading code

2022-10-04 Thread Nikolay Borisov
To facilitate easier implementaiton of the 'fixed-ram' migration restore factor out the code responsible for parsing the ramblocks headers. This also makes ram_load_precopy easier to comprehend. Signed-off-by: Nikolay Borisov --- migration/ram.c | 142

Re: [PATCH v6] 9pfs: use GHashTable for fid table

2022-10-04 Thread Christian Schoenebeck
On Dienstag, 4. Oktober 2022 12:41:21 CEST Linus Heckemann wrote: > The previous implementation would iterate over the fid table for > lookup operations, resulting in an operation with O(n) complexity on > the number of open files and poor cache locality -- for every open, > stat, read, write, etc

[PULL 04/54] tests/docker: run script use realpath instead of readlink

2022-10-04 Thread Alex Bennée
From: "Lucas Mateus Castro (alqotel)" The alpine docker image only comes with busybox, which doesn't have the '-e' option on its readlink, so change it to 'realpath' to avoid that problem. Suggested-by: Daniel P. Berrangé Signed-off-by: Lucas Mateus Castro (alqotel) Message-Id:

[PULL 44/54] gdbstub: move breakpoint logic to accel ops

2022-10-04 Thread Alex Bennée
As HW virtualization requires specific support to handle breakpoints lets push out special casing out of the core gdbstub code and into AccelOpsClass. This will make it easier to add other accelerator support and reduces some of the stub shenanigans. Reviewed-by: Richard Henderson Signed-off-by:

[PULL 38/54] docs/devel: move API to end of tcg-plugins.rst

2022-10-04 Thread Alex Bennée
The API documentation is quite dry and doesn't flow nicely with the rest of the document. Move it to its own section at the bottom along with a little leader text to remind people to update it. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PULL 49/54] contrib/gitdm: add WANG Xuerui to individual contributers

2022-10-04 Thread Alex Bennée
His blog confirms he is not affiliated with Loongson. Signed-off-by: Alex Bennée Reviewed-by: WANG Xuerui Message-Id: <20220929114231.583801-50-alex.ben...@linaro.org> diff --git a/contrib/gitdm/group-map-individuals b/contrib/gitdm/group-map-individuals index 6322b3476d..e19d79626c 100644

[PULL 32/54] monitor: expose monitor_puts to rest of code

2022-10-04 Thread Alex Bennée
This helps us construct strings elsewhere before echoing to the monitor. It avoids having to jump through hoops like: monitor_printf(mon, "%s", s->str); It will be useful in following patches but for now convert all existing plain "%s" printfs to use the _puts api. Signed-off-by: Alex Bennée

[PULL 23/54] tests/tcg: clean up calls to run-test

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini Almost all invocations of run-test have either "$* on $(TARGET_NAME)" or "$< on $(TARGET_NAME)" as the last argument. So provide a default test name, while allowing an escape hatch for custom names. As an additional simplification, remove the need to do shell quoting.

[PULL 21/54] tests/tcg: add distclean rule

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée Message-Id: <20220929114231.583801-22-alex.ben...@linaro.org> diff --git a/tests/Makefile.include b/tests/Makefile.include index caef287957..9ed67721e2 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include

[PULL 24/54] tests/tcg: move compiler tests to Makefiles

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini Further decoupling of tests/tcg from the main QEMU Makefile, and making the build more similar between the cross compiler case and the vetted container images. Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée Message-Id:

[PULL 28/54] configure: build ROMs with container-based cross compilers

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini s390-ccw remains a bit more complex, because the -march=z900 test is done only for the native cross compiler. Otherwise, all that is needed is to pass the (now mandatory) target argument to write_target_makefile. Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée

Re: ublk-qcow2: ublk-qcow2 is available

2022-10-04 Thread Stefan Hajnoczi
On Tue, 4 Oct 2022 at 05:44, Ming Lei wrote: > > On Mon, Oct 03, 2022 at 03:53:41PM -0400, Stefan Hajnoczi wrote: > > On Fri, Sep 30, 2022 at 05:24:11PM +0800, Ming Lei wrote: > > > ublk-qcow2 is available now. > > > > Cool, thanks for sharing! > > > > > > > > So far it provides basic read/write

[PATCH v7 13/18] accel/tcg: Do not align tb->page_addr[0]

2022-10-04 Thread Richard Henderson
Let tb->page_addr[0] contain the address of the first byte of the translated block, rather than the address of the page containing the start of the translated block. We need to recover this value anyway at various points, and it is easier to discard a page offset when it is not needed, which

[PATCH v7 15/18] include/hw/core: Create struct CPUJumpCache

2022-10-04 Thread Richard Henderson
Wrap the bare TranslationBlock pointer into a structure. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/tb-hash.h | 1 + accel/tcg/tb-jmp-cache.h | 24 include/exec/cpu-common.h | 1 +

[PATCH v7 16/18] hw/core: Add CPUClass.get_pc

2022-10-04 Thread Richard Henderson
Populate this new method for all targets. Always match the result that would be given by cpu_get_tb_cpu_state, as we will want these values to correspond in the logs. Reviewed-by: Taylor Simpson Reviewed-by: Alex Bennée Reviewed-by: Mark Cave-Ayland (target/sparc) Signed-off-by: Richard

[PATCH v7 08/18] accel/tcg: Introduce tlb_set_page_full

2022-10-04 Thread Richard Henderson
Now that we have collected all of the page data into CPUTLBEntryFull, provide an interface to record that all in one go, instead of using 4 arguments. This interface allows CPUTLBEntryFull to be extended without having to change the number of arguments. Reviewed-by: Alex Bennée Reviewed-by:

[PATCH v7 11/18] accel/tcg: Use bool for page_find_alloc

2022-10-04 Thread Richard Henderson
Bool is more appropriate type for the alloc parameter. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- accel/tcg/translate-all.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/accel/tcg/translate-all.c

Re: [PATCH] ui/cocoa: Support hardware cursor interface

2022-10-04 Thread Peter Maydell
Ccing Akihiko to see if he wants to review this cocoa ui frontend patch. also available at: https://lore.kernel.org/qemu-devel/54930451-d85f-4ce0-9a45-b3478c5a6...@www.fastmail.com/ I can confirm that the patch does build, but I don't have any interesting graphics-using test images to hand to

[PULL 02/54] scripts/ci/setup: Fix libxen requirements

2022-10-04 Thread Alex Bennée
From: "Lucas Mateus Castro (alqotel)" XEN hypervisor is only available in ARM and x86, but the yaml only checked if the architecture is different from s390x, changed it to a more accurate test. Tested this change on a Ubuntu 20.04 ppc64le. Signed-off-by: Lucas Mateus Castro (alqotel)

[PULL 08/54] target/hexagon: manually add flex/bison/glib2 to remaining containers

2022-10-04 Thread Alex Bennée
From: Anton Johansson Adds our build-time dependencies to containers which build qemu-hexagon, but aren't covered by libvirt-ci. Signed-off-by: Anton Johansson Signed-off-by: Alex Bennée Message-Id: <20220804115548.13024-11-a...@rev.ng> Message-Id:

[PULL 51/54] contrib/gitdm: add China Telecom to the domain map

2022-10-04 Thread Alex Bennée
Signed-off-by: Alex Bennée Acked-by: Hyman Huang(黄勇) Message-Id: <20220929114231.583801-52-alex.ben...@linaro.org> diff --git a/contrib/gitdm/domain-map b/contrib/gitdm/domain-map index 434ef53afc..3727918641 100644 --- a/contrib/gitdm/domain-map +++ b/contrib/gitdm/domain-map @@ -10,6 +10,7 @@

[PULL 13/54] pc-bios/optionrom: detect CC options just once

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini In preparation for adding Docker container support, detect compiler options just once rather than once per Make run; container startup overhead is substantial and doing the detection just once makes things faster. Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée

[PULL 09/54] tests/docker: update fedora-win[32|64]-cross with lcitool

2022-10-04 Thread Alex Bennée
Convert another two dockerfiles to lcitool and update. I renamed the helper because it is not Debian specific. Signed-off-by: Alex Bennée Message-Id: <20220929114231.583801-10-alex.ben...@linaro.org> diff --git a/tests/docker/dockerfiles/fedora-win32-cross.docker

[PULL 36/54] plugins: Assert mmu_idx in range before use in qemu_plugin_get_hwaddr

2022-10-04 Thread Alex Bennée
From: Richard Henderson Coverity reports out-of-bound accesses here. This should be a false positive due to how the index is decoded from MemOpIdx. Fixes: Coverity CID 1487201 Signed-off-by: Richard Henderson Reviewed-by: Damien Hedde Message-Id:

[PULL 35/54] plugins: extend execlog to filter matches

2022-10-04 Thread Alex Bennée
Sometimes the whole execlog is just two much so add the ability to filter by instruction opcode or address. [AJB: this shows for example qemu-system-aarch64 -display none -serial mon:stdio \ -M virt -cpu max \ -semihosting-config enable=on \ -kernel

[PULL 40/54] docs/devel: document the test plugins

2022-10-04 Thread Alex Bennée
Although the test plugins are fairly basic they are still useful for some things so we should document their existence. Signed-off-by: Alex Bennée Message-Id: <20220929114231.583801-41-alex.ben...@linaro.org> diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index

[PULL 25/54] configure: move tests/tcg/Makefile.prereqs to root build directory

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini It will not be specific to tests/tcg anymore, since it will be possible to build firmware using container-based cross compilers too. Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée Message-Id: <20220929114231.583801-26-alex.ben...@linaro.org> diff --git

[PULL 41/54] semihosting: update link to spec

2022-10-04 Thread Alex Bennée
The old link has moved but it seems the document is now hosted on Arm's github along with a license update to CC-BY-SA-4.0. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20220929114231.583801-42-alex.ben...@linaro.org> diff --git a/semihosting/arm-compat-semi.c

[PULL 54/54] plugins: add [pre|post]fork helpers to linux-user

2022-10-04 Thread Alex Bennée
Special care needs to be taken in ensuring locks are in a consistent state across fork events. Add helpers so the plugin system can ensure that. Signed-off-by: Alex Bennée Fixes: https://gitlab.com/qemu-project/qemu/-/issues/358 Reviewed-by: Daniel P. Berrangé Tested-by: Daniel P. Berrangé

[PATCH v7 03/18] cputlb: used cached CPUClass in our hot-paths

2022-10-04 Thread Richard Henderson
From: Alex Bennée Before: 35.912 s ± 0.168 s After: 35.565 s ± 0.087 s Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20220811151413.3350684-5-alex.ben...@linaro.org> Signed-off-by: Cédric Le Goater Message-Id: <20220923084803.498337-5-...@kaod.org> Signed-off-by:

[PATCH v7 05/18] accel/tcg: Drop addr member from SavedIOTLB

2022-10-04 Thread Richard Henderson
This field is only written, not read; remove it. Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/hw/core/cpu.h | 1 - accel/tcg/cputlb.c| 7 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff

[PATCH v7 09/18] include/exec: Introduce TARGET_PAGE_ENTRY_EXTRA

2022-10-04 Thread Richard Henderson
Allow the target to cache items from the guest page tables. Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/cpu-defs.h | 9 + 1 file changed, 9 insertions(+) diff --git

[PATCH v7 18/18] accel/tcg: Introduce TARGET_TB_PCREL

2022-10-04 Thread Richard Henderson
Prepare for targets to be able to produce TBs that can run in more than one virtual context. Signed-off-by: Richard Henderson --- accel/tcg/internal.h | 4 +++ accel/tcg/tb-jmp-cache.h | 41 + include/exec/cpu-defs.h | 3 ++ include/exec/exec-all.h | 32

Re: [PATCH] linux-user,bsd-user: re-exec with G_SLICE=always-malloc

2022-10-04 Thread Richard Henderson
On 10/4/22 05:00, Daniel P. Berrangé wrote: g_slice uses a one-time initializer to check the G_SLICE env variable making it hard for QEMU to set the env before any GLib API call has triggered the initializer. Even attribute((constructor)) is not sufficient as QEMU has many constructors and there

[PATCH 07/11] migration: add qemu_get_buffer_at

2022-10-04 Thread Nikolay Borisov
Restoring a 'fixed-ram' enabled migration stream would require reading from specific offsets in the file so add a helper to QEMUFile that uses the newly introduced qio_channel_file_preadv. Signed-off-by: Nikolay Borisov --- migration/qemu-file.c | 23 +++

[PULL 53/54] contrib/gitdm: add Université Grenoble Alpes

2022-10-04 Thread Alex Bennée
again to the academic group map. Signed-off-by: Alex Bennée Cc: Frédéric Pétrot Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20220926134609.3301945-7-alex.ben...@linaro.org> diff --git a/contrib/gitdm/group-map-academics b/contrib/gitdm/group-map-academics index 877a11e69b..082458e1bd

[PULL 16/54] build: add recursive distclean rules

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée Message-Id: <20220929114231.583801-17-alex.ben...@linaro.org> diff --git a/Makefile b/Makefile index b576cba5a8..0fcde48bec 100644 --- a/Makefile +++ b/Makefile @@ -186,7 +186,7 @@ include

[PULL 17/54] configure: return status code from probe_target_compiler

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini For now, return 1 for container-based compilers. This will change as soon as ROMs will be buildable with them. Signed-off-by: Paolo Bonzini Signed-off-by: Alex Bennée Message-Id: <20220929114231.583801-18-alex.ben...@linaro.org> diff --git a/configure b/configure index

[PULL 42/54] gdbstub: move into its own sub directory

2022-10-04 Thread Alex Bennée
This is in preparation of future refactoring as well as cleaning up the source tree. Aside from the minor tweaks to meson and trace.h this is pure code motion. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20220929114231.583801-43-alex.ben...@linaro.org> diff --git

[PULL 48/54] contrib/gitdm: add Paul to individual contributors

2022-10-04 Thread Alex Bennée
Also map his old codesourcery address to his canonical address. Signed-off-by: Alex Bennée Cc: Paul Brook Message-Id: <20220929114231.583801-49-alex.ben...@linaro.org> diff --git a/.mailmap b/.mailmap index 8c326709cf..1f7319b70b 100644 --- a/.mailmap +++ b/.mailmap @@ -65,6 +65,7 @@ James

[PULL 22/54] tests/tcg: unify ppc64 and ppc64le Makefiles

2022-10-04 Thread Alex Bennée
From: Paolo Bonzini Make tests/tcg/ppc64le include tests/tcg/ppc64 instead of duplicating the rules. Because the ppc64le vpath includes tests/tcg/ppc64 but not vice versa, the tests have to be moved from tests/tcg/ppc64le/ to tests/tcg/ppc64. Signed-off-by: Paolo Bonzini Signed-off-by: Alex

[PULL 39/54] contrib/plugins: reset skip when matching in execlog

2022-10-04 Thread Alex Bennée
The purpose of the matches was to only track the execution of instructions we care about. Without resetting skip to the value at the start of the block we end up dumping all instructions after the match with the consequent load on the instrumentation. Signed-off-by: Alex Bennée Cc: Alexandre

[PULL 46/54] accel/kvm: move kvm_update_guest_debug to inline stub

2022-10-04 Thread Alex Bennée
Signed-off-by: Alex Bennée Message-Id: <20220929114231.583801-47-alex.ben...@linaro.org> diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 6e1bd01725..790d35ef78 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -247,7 +247,23 @@ int kvm_on_sigbus(int code, void

[PATCH v7 06/18] accel/tcg: Suppress auto-invalidate in probe_access_internal

2022-10-04 Thread Richard Henderson
When PAGE_WRITE_INV is set when calling tlb_set_page, we immediately set TLB_INVALID_MASK in order to force tlb_fill to be called on the next lookup. Here in probe_access_internal, we have just called tlb_fill and eliminated true misses, thus the lookup must be valid. This allows us to remove a

Re: [PATCH v3 01/15] hw: encode accessing CPU index in MemTxAttrs

2022-10-04 Thread Peter Maydell
On Tue, 4 Oct 2022 at 14:33, Alex Bennée wrote: > > > Peter Maydell writes: > > The MSC is in the address map like most other stuff, and thus there is > > no restriction on whether it can be accessed by other things than CPUs > > (DMAing to it would be silly but is perfectly possible). > > > >

  1   2   3   >