Re: [PATCH] acpi/tests/bios-tables-test: add an environment variable for iasl location

2023-05-17 Thread Ani Sinha
> On 17-May-2023, at 10:13 PM, Bernhard Beschow wrote: > > > > Am 17. Mai 2023 12:07:51 UTC schrieb Ani Sinha : >> Currently the meson based QEMU build process locates the iasl binary from the >> current PATH and other locations [1] and uses that to set CONFIG_IASL which >> is >> then used

Re: [PATCH v3 5/5] vdpa: move CVQ isolation check to net_init_vhost_vdpa

2023-05-17 Thread Jason Wang
On Wed, May 17, 2023 at 2:30 PM Eugenio Perez Martin wrote: > > On Wed, May 17, 2023 at 5:59 AM Jason Wang wrote: > > > > On Tue, May 9, 2023 at 11:44 PM Eugenio Pérez wrote: > > > > > > Evaluating it at start time instead of initialization time may make the > > > guest capable of dynamically

Re: [PATCH v2 2/2] vdpa: send CVQ state load commands in parallel

2023-05-17 Thread Jason Wang
On Wed, May 17, 2023 at 11:02 PM Hawkins Jiawei wrote: > > Sorry for forgetting cc when replying to the email. > > On Wed, 17 May 2023 at 16:22, Eugenio Perez Martin > wrote: > > > > On Wed, May 17, 2023 at 7:22 AM Jason Wang wrote: > > > > > > On Sat, May 6, 2023 at 10:07 PM Hawkins Jiawei

Re: [PULL 00/68] i386, build system, KVM changes for 2023-05-18

2023-05-17 Thread Paolo Bonzini
Il mer 17 mag 2023, 22:31 Richard Henderson ha scritto: > https://gitlab.com/qemu-project/qemu/-/jobs/4304958487#L1887 > > Warning, treated as error: > the sphinx_rtd_theme extension does not declare if it is safe for parallel > reading, > assuming it isn't - please ask the extension author to

Re: [PULL 63/68] configure: remove compiler sanity check

2023-05-17 Thread Paolo Bonzini
Il mer 17 mag 2023, 20:48 Peter Maydell ha scritto: > On Wed, 17 May 2023 at 18:50, Paolo Bonzini wrote: > > > > The comment is not correct anymore, in that the usability test for > > the compiler and linker are done after probing $cpu, and Meson will > > redo them anyway. > > The other thing

Re: [PATCH v2] hw/riscv: virt: Assume M-mode FW in pflash0 only when "-bios none"

2023-05-17 Thread Alistair Francis
On Wed, May 17, 2023 at 10:48 PM Philippe Mathieu-Daudé wrote: > > On 8/5/23 12:00, Andrea Bolognani wrote: > > On Mon, May 08, 2023 at 11:37:43AM +0530, Sunil V L wrote: > >> On Mon, May 08, 2023 at 07:37:23AM +0200, Heinrich Schuchardt wrote: > >>> On 4/25/23 12:25, Sunil V L wrote: >

Re: [PATCH v2] hw/riscv: virt: Assume M-mode FW in pflash0 only when "-bios none"

2023-05-17 Thread Alistair Francis
On Wed, May 17, 2023 at 6:45 PM Andrea Bolognani wrote: > > On Wed, May 17, 2023 at 02:57:12PM +1000, Alistair Francis wrote: > > On Mon, May 8, 2023 at 9:45 PM Andrea Bolognani wrote: > > > > > Taking a step back, what is even the use case for having M-mode code > > > > > in pflash0? If you

Re: [PATCH v9 11/11] target/riscv: rework write_misa()

2023-05-17 Thread Alistair Francis
On Wed, May 17, 2023 at 11:58 PM Daniel Henrique Barboza wrote: > > write_misa() must use as much common logic as possible. We want to open > code just the bits that are exclusive to the CSR write operation and TCG > internals. > > Our validation is done with riscv_cpu_validate_set_extensions(),

Re: [PATCH v4 1/3] target/riscv: smstateen check for fcsr

2023-05-17 Thread Alistair Francis
On Thu, May 18, 2023 at 12:49 PM Mayuresh Chitale wrote: > > On Wed, May 17, 2023 at 8:42 AM Alistair Francis wrote: > > > > On Tue, May 2, 2023 at 12:00 AM Mayuresh Chitale > > wrote: > > > > > > If smstateen is implemented and smtateen0.fcsr is clear and misa.F > > > is off then the floating

[PATCH 3/9] util: Add i386 CPUINFO_ATOMIC_VMOVDQU

2023-05-17 Thread Richard Henderson
Add a bit to indicate when VMOVDQU is also atomic if aligned. Signed-off-by: Richard Henderson --- include/host/i386/cpuinfo.h | 1 + util/cpuinfo-i386.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/host/i386/cpuinfo.h b/include/host/i386/cpuinfo.h

[PATCH 1/9] util: Introduce host-specific cpuinfo.h

2023-05-17 Thread Richard Henderson
The entire contents of the header is host-specific, but the existence of such a header is not, which could prevent some host specific ifdefs at the top of the file for the include. Add include/host/{arch,generic} to the project arguments. Signed-off-by: Richard Henderson --- Cc: Paolo Bonzini

[PATCH 4/9] tcg/i386: Use cpuinfo.h

2023-05-17 Thread Richard Henderson
Use the CPUINFO_* bits instead of the individual boolean variables that we had been using. Remove all of the init code that was moved over to cpuinfo-i386.c. Note that have_avx512* check both AVX512{F,VL}, as we had previously done during tcg_target_init. Signed-off-by: Richard Henderson ---

[PATCH 9/9] util: Add cpuinfo-aarch64.c

2023-05-17 Thread Richard Henderson
Move the code from tcg/. The only use of these bits so far is with respect to the atomicity of tcg operations. Signed-off-by: Richard Henderson --- include/host/aarch64/cpuinfo.h | 22 +++ tcg/aarch64/tcg-target.h | 4 +- util/cpuinfo-aarch64.c | 67

[PATCH 7/9] migration/xbzrle: Use i386 cacheinfo.h

2023-05-17 Thread Richard Henderson
Perform the function selection once, and only if CONFIG_AVX512_OPT is enabled. Centralize the selection to xbzrle.c, instead of spreading the init across 3 files. Remove xbzrle-bench.c. The benefit of being able to benchmark the different implementations is less important than peeking into the

[PATCH 6/9] migration/xbzrle: Shuffle function order

2023-05-17 Thread Richard Henderson
Place the CONFIG_AVX512BW_OPT block at the top, which will aid function selection in the next patch. Signed-off-by: Richard Henderson --- Cc: Juan Quintela Cc: Peter Xu Cc: Leonardo Bras --- migration/xbzrle.c | 244 ++--- 1 file changed, 122

[PATCH 5/9] util/bufferiszero: Use i386 cpuinfo.h

2023-05-17 Thread Richard Henderson
Use cpuinfo_init() during init_accel(), and the variable cpuinfo during test_buffer_is_zero_next_accel(). Adjust the logic that cycles through the set of accelerators for testing. Signed-off-by: Richard Henderson --- util/bufferiszero.c | 126 1

[PATCH 2/9] util: Add cpuinfo-i386.c

2023-05-17 Thread Richard Henderson
Add cpuinfo.h for i386 and x86_64, and the initialization for that in util/. Populate that with a slightly altered copy of the tcg host probing code. Other uses of cpuid.h will be adjusted one patch at a time. Signed-off-by: Richard Henderson --- include/host/i386/cpuinfo.h | 38

[PATCH 8/9] migration: Build migration_files once

2023-05-17 Thread Richard Henderson
The items in migration_files are built for libmigration and included info softmmu_ss from there; no need to also include them directly. Signed-off-by: Richard Henderson --- Cc: Juan Quintela Cc: Peter Xu Cc: Leonardo Bras --- migration/meson.build | 1 - 1 file changed, 1 deletion(-)

[PATCH 0/9] Host-specific includes, begin cpuinfo.h

2023-05-17 Thread Richard Henderson
Hiya. This is looking toward cleaning up a couple of things: (1) There are 5 bits of x86 host detection, 3 of them for xbzrle. Unify this down to one, with additional cleanups for xbzrle. (2) Provides a host-specific include path for splitting atomic128.h and probably other stuff so as

Re: Multiple vIOMMU instance support in QEMU?

2023-05-17 Thread Nicolin Chen
Hi Peter, Eric previously mentioned that you might not like the idea. Before we start this big effort, would it possible for you to comment a word or two on this topic? Thanks! On Mon, Apr 24, 2023 at 04:42:57PM -0700, Nicolin Chen wrote: > Hi all, > > (Please feel free to include related

Re: [PATCH v4 1/3] target/riscv: smstateen check for fcsr

2023-05-17 Thread Mayuresh Chitale
On Wed, May 17, 2023 at 8:42 AM Alistair Francis wrote: > > On Tue, May 2, 2023 at 12:00 AM Mayuresh Chitale > wrote: > > > > If smstateen is implemented and smtateen0.fcsr is clear and misa.F > > is off then the floating point operations must return illegal > > instruction exception or virtual

[PATCH RFC 3/5] hw/cxl: Derive a CXL accelerator device from Type-3

2023-05-17 Thread Ira Weiny
It is desirable to have a test accelerator device to present various accelerator features such as Back-Invalidate (BI) registers to OS software for testing. BI accelerator devices require memory that can be easily modeled as a sub-class of Type-3 device. Derive 'cxl-accel' from cxl-type3. Add

[PATCH RFC 4/5] hw/cxl/accel: Add Back-Invalidate decoder capbility structure

2023-05-17 Thread Ira Weiny
The presence of the Back-Invalidate (BI) decoder capability structure indicates a CXL downstream port, root port, or device supports the BI messages. Add the BI capability structure to the accelerator device. Not-Yet-Signed-off-by: Ira Weiny --- hw/cxl/cxl-component-utils.c | 5 +

[PATCH RFC 5/5] hw/cxl: Add UIO HDM decoder register fields

2023-05-17 Thread Ira Weiny
HDM decoders optionally support Unordered IO (UIO) access. Devices indicate UIO support by setting the capable bit. Software can then set up to UIO decoder count HDM's as UIO enabled when configuring the HDMs on the device. Define the UIO capable bit and decoder count. Default type 2 devices

[PATCH RFC 1/5] hw/cxl: Use define for build bug detection

2023-05-17 Thread Ira Weiny
Magic numbers can be confusing. Use the range size define for CXL.cachemem rather than a magic number. Update/add spec references. Signed-off-by: Ira Weiny --- include/hw/cxl/cxl_component.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH RFC 2/5] hw/cxl: Refactor component register initialization

2023-05-17 Thread Ira Weiny
CXL 3.0 8.2.4 Table 8-22 defines which capabilities are mandatory, not permitted, or optional for each type of device. cxl_component_register_init_common() uses a rather odd 'fall through' mechanism to define each component register set. This assumes that any device or capability being added

[PATCH RFC 0/5] hw/cxl: Type 2 Device RFC

2023-05-17 Thread Ira Weiny
insertions(+), 57 deletions(-) --- base-commit: 8eb2a03258313f404ca0c8609a8f9009b9b4318c change-id: 20230517-rfc-type2-dev-c2d661a29d96 Best regards, -- Ira Weiny

Re: [PATCH v7 3/7] igb: RX descriptors guest writting refactoring

2023-05-17 Thread Akihiko Odaki
On 2023/05/18 0:46, Tomasz Dzieciol wrote: Refactoring is done in preparation for support of multiple advanced descriptors RX modes, especially packet-split modes. Signed-off-by: Tomasz Dzieciol --- hw/net/igb_core.c | 176 ++-- hw/net/igb_regs.h

Re: [PATCH] xen: Fix host pci for stubdom

2023-05-17 Thread Jason Andryuk
On Mon, May 15, 2023 at 11:04 AM Anthony PERARD wrote: > > On Sun, Mar 19, 2023 at 08:05:54PM -0400, Jason Andryuk wrote: > > diff --git a/hw/xen/xen-host-pci-device.c b/hw/xen/xen-host-pci-device.c > > index 8c6e9a1716..51a72b432d 100644 > > --- a/hw/xen/xen-host-pci-device.c > > +++

Re: [PATCH v3 1/3] migration: Add documentation for backwards compatiblity

2023-05-17 Thread Xiaoyao Li
On 5/17/2023 7:39 AM, Peter Xu wrote: On Mon, May 15, 2023 at 10:31:59AM +0200, Juan Quintela wrote: State what are the requeriments to get migration working between qemu versions. And once there explain how one is supposed to implement a new feature/default value and not break migration.

[PATCH v1 1/2] hw/loongarch/virt: Add cpu arch_id support

2023-05-17 Thread Song Gao
With acpi madt table, there is cpu physical coreid, which may be different with logical id in qemu. This patch adds cpu arch_id support, and fill madt table with arch_id. For the present cpu arch_id is still equal to logical id. Signed-off-by: Song Gao --- hw/loongarch/acpi-build.c | 20

[PATCH v1 0/2] Add LoongArch cpu arch_id support

2023-05-17 Thread Song Gao
1 Add LoongArch cpu arch_id support; 2 Fill Acpi table with arch_id; 3 set physical cpuid route for LoongArch ipi device. Song Gao (2): hw/loongarch/virt: Add cpu arch_id support hw/intc: Set physical cpuid route for LoongArch ipi device hw/intc/loongarch_ipi.c | 44

[PATCH v1 2/2] hw/intc: Set physical cpuid route for LoongArch ipi device

2023-05-17 Thread Song Gao
LoongArch ipi device uses physical cpuid to route to different vcpus rather logical cpuid, and the physical cpuid is the same with cpuid in acpi dsdt and srat table. Signed-off-by: Song Gao --- hw/intc/loongarch_ipi.c | 44 ++--- hw/loongarch/virt.c | 1

[PATCH 4/6] block/io_uring: convert to blk_io_plug_call() API

2023-05-17 Thread Stefan Hajnoczi
Stop using the .bdrv_co_io_plug() API because it is not multi-queue block layer friendly. Use the new blk_io_plug_call() API to batch I/O submission instead. Signed-off-by: Stefan Hajnoczi --- include/block/raw-aio.h | 7 --- block/file-posix.c | 10 - block/io_uring.c

[PATCH 2/6] block/nvme: convert to blk_io_plug_call() API

2023-05-17 Thread Stefan Hajnoczi
Stop using the .bdrv_co_io_plug() API because it is not multi-queue block layer friendly. Use the new blk_io_plug_call() API to batch I/O submission instead. Signed-off-by: Stefan Hajnoczi --- block/nvme.c | 44 1 file changed, 12 insertions(+), 32

[PATCH 6/6] block: remove bdrv_co_io_plug() API

2023-05-17 Thread Stefan Hajnoczi
No block driver implements .bdrv_co_io_plug() anymore. Get rid of the function pointers. Signed-off-by: Stefan Hajnoczi --- include/block/block-io.h | 3 --- include/block/block_int-common.h | 11 -- block/io.c | 37 3

[PATCH 3/6] block/blkio: convert to blk_io_plug_call() API

2023-05-17 Thread Stefan Hajnoczi
Stop using the .bdrv_co_io_plug() API because it is not multi-queue block layer friendly. Use the new blk_io_plug_call() API to batch I/O submission instead. Signed-off-by: Stefan Hajnoczi --- block/blkio.c | 40 +--- 1 file changed, 21 insertions(+), 19

[PATCH 1/6] block: add blk_io_plug_call() API

2023-05-17 Thread Stefan Hajnoczi
Introduce a new API for thread-local blk_io_plug() that does not traverse the block graph. The goal is to make blk_io_plug() multi-queue friendly. Instead of having block drivers track whether or not we're in a plugged section, provide an API that allows them to defer a function call until we're

[PATCH 0/6] block: add blk_io_plug_call() API

2023-05-17 Thread Stefan Hajnoczi
The existing blk_io_plug() API is not block layer multi-queue friendly because the plug state is per-BlockDriverState. Change blk_io_plug()'s implementation so it is thread-local. This is done by introducing the blk_io_plug_call() function that block drivers use to batch calls while plugged. It

[PATCH 5/6] block/linux-aio: convert to blk_io_plug_call() API

2023-05-17 Thread Stefan Hajnoczi
Stop using the .bdrv_co_io_plug() API because it is not multi-queue block layer friendly. Use the new blk_io_plug_call() API to batch I/O submission instead. Signed-off-by: Stefan Hajnoczi --- include/block/raw-aio.h | 7 --- block/file-posix.c | 28

Re: [PATCH] hw/ide: Remove unuseful IDE_DMA__COUNT definition

2023-05-17 Thread John Snow
On Fri, Feb 24, 2023 at 10:34 AM Philippe Mathieu-Daudé wrote: > > First, IDE_DMA__COUNT represents the number of enumerated > values, but is incorrectly listed as part of the enum. > > Second, IDE_DMA_CMD_str() is internal to core.c and only > takes sane enums from ide_dma_cmd. So no need to

Re: [PATCH 1/1] hw/ide/core.c: fix handling of unsupported commands

2023-05-17 Thread John Snow
On Sun, Apr 16, 2023 at 6:29 PM Mateusz Albecki wrote: > > From: Mateusz Albecki > > Current code will not call ide_cmd_done when aborting the unsupported > command which will lead to the command timeout on the driver side instead > of getting a D2H FIS with ABRT indication. This can lead to

Re: [PATCH 9/9] hw/ide/ahci: fix broken SError handling

2023-05-17 Thread John Snow
On Fri, Apr 28, 2023 at 9:23 AM Niklas Cassel wrote: > > From: Niklas Cassel > > When encountering an NCQ error, you should not write the NCQ tag to the > SError register. This is completely wrong. Mea culpa ... ! > > The SError register has a clear definition, where each bit represents a >

Re: [PATCH 7/9] hw/ide/ahci: trigger either error IRQ or regular IRQ, not both

2023-05-17 Thread John Snow
On Fri, Apr 28, 2023 at 9:23 AM Niklas Cassel wrote: > > From: Niklas Cassel > > According to AHCI 1.3.1, 5.3.8.1 RegFIS:Entry, if ERR_STAT is set, > we jump to state ERR:FatalTaskfile, which will raise a TFES IRQ > unconditionally, regardless if the I bit is set in the FIS or not. > > Thus, we

Re: [PATCH 6/9] hw/ide/ahci: PxSACT and PxCI is cleared when PxCMD.ST is cleared

2023-05-17 Thread John Snow
On Fri, Apr 28, 2023 at 9:23 AM Niklas Cassel wrote: > > From: Niklas Cassel > > According to AHCI 1.3.1 definition of PxSACT: > This field is cleared when PxCMD.ST is written from a '1' to a '0' by > software. This field is not cleared by a COMRESET or a software reset. > > According to AHCI

Re: [PATCH 3/9] hw/ide/ahci: write D2H FIS on when processing NCQ command

2023-05-17 Thread John Snow
On Fri, Apr 28, 2023 at 9:22 AM Niklas Cassel wrote: > > From: Niklas Cassel > > The way that BUSY + PxCI is cleared for NCQ (FPDMA QUEUED) commands is > described in SATA 3.5a Gold: > > 11.15 FPDMA QUEUED command protocol > DFPDMAQ2: ClearInterfaceBsy > "Transmit Register Device to Host FIS

Re: [PATCH 2/9] hw/ide/core: set ERR_STAT in unsupported command completion

2023-05-17 Thread John Snow
On Fri, Apr 28, 2023 at 9:22 AM Niklas Cassel wrote: > > From: Niklas Cassel > > Currently, the first time sending an unsupported command > (e.g. READ LOG DMA EXT) will not have ERR_STAT set in the completion. > Sending the unsupported command again, will correctly have ERR_STAT set. > > When

Re: [PULL 00/68] i386, build system, KVM changes for 2023-05-18

2023-05-17 Thread Richard Henderson
On 5/17/23 10:44, Paolo Bonzini wrote: The following changes since commit ab4c44d657aeca7e1da6d6dcb1741c8e7d357b8b: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2023-05-15 13:54:33 -0700) are available in the Git repository at:

Re: [PATCH 1/5] gitlab: centralize the container tag name

2023-05-17 Thread Richard Henderson
On 5/17/23 06:54, Daniel P. Berrangé wrote: We use a fixed container tag of 'latest' so that contributors' forks don't end up with an ever growing number of containers as they work on throwaway feature branches. This fixed tag causes problems running CI upstream in stable staging branches,

Re: [PATCH v2] target/arm: allow DC CVA[D]P in user mode emulation

2023-05-17 Thread Richard Henderson
On 5/17/23 10:31, Zhuojia Shen wrote: DC CVAP and DC CVADP instructions can be executed in EL0 on Linux, either directly when SCTLR_EL1.UCI == 1 or emulated by the kernel (see user_cache_maint_handler() in arch/arm64/kernel/traps.c). This patch enables execution of the two instructions in user

Re: [PATCH] xen/pt: fix igd passthrough for pc machine with xen accelerator

2023-05-17 Thread Stefano Stabellini
On Wed, 17 May 2023, Michael Tokarev wrote: > 17.05.2023 12:47, Chuck Zmudzinski wrote: > > On 5/17/2023 2:39 AM, Michael Tokarev wrote: > > > 08.02.2023 05:03, Chuck Zmudzinski wrote:... > > > > Fixes: 998250e97661 ("xen, gfx passthrough: register host bridge > > > > specific to passthrough") > >

Re: [PATCH] migration: for snapshots, hold the BQL during setup callbacks

2023-05-17 Thread Peter Xu
On Wed, May 10, 2023 at 08:31:13AM +0200, Juan Quintela wrote: > Peter Xu wrote: > > Hi > > [Adding Kevin to the party] > > > On Fri, May 05, 2023 at 03:46:52PM +0200, Fiona Ebner wrote: > >> To fix it, ensure that the BQL is held during setup. To avoid changing > >> the behavior for migration

Re: [PULL 00/80] tcg patch queue

2023-05-17 Thread Richard Henderson
On 5/17/23 08:11, Peter Maydell wrote: On Tue, 16 May 2023 at 20:48, Richard Henderson wrote: The following changes since commit 8844bb8d896595ee1d25d21c770e6e6f29803097: Merge tag 'or1k-pull-request-20230513' of https://github.com/stffrdhrn/qemu into staging (2023-05-13 11:23:14 +0100)

Re: [PULL 18/18] tested: add test for nested aio_poll() in poll handlers

2023-05-17 Thread Richard Henderson
On 5/17/23 09:51, Kevin Wolf wrote: From: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Message-Id: <20230502184134.534703-3-stefa...@redhat.com> Tested-by: Kevin Wolf Signed-off-by: Kevin Wolf --- tests/unit/test-nested-aio-poll.c | 130 ++

Re: [PULL 63/68] configure: remove compiler sanity check

2023-05-17 Thread Peter Maydell
On Wed, 17 May 2023 at 18:50, Paolo Bonzini wrote: > > The comment is not correct anymore, in that the usability test for > the compiler and linker are done after probing $cpu, and Meson will > redo them anyway. The other thing this check is useful for, though, is providing a helpful error

Re: [PULL 0/5] QAPI patches patches for 2023-05-17

2023-05-17 Thread Peter Maydell
On Wed, 17 May 2023 at 18:16, Richard Henderson wrote: > https://gitlab.com/qemu-project/qemu/-/jobs/4303506102#L3766 > https://gitlab.com/qemu-project/qemu/-/jobs/4303506050#L5856 > https://gitlab.com/qemu-project/qemu/-/jobs/4303506047#L3654 > >

Re: [PATCH v2] target/arm: allow DC CVA[D]P in user mode emulation

2023-05-17 Thread Zhuojia Shen
On 05/17/2023 10:31 AM -0700, Zhuojia Shen wrote: > DC CVAP and DC CVADP instructions can be executed in EL0 on Linux, > either directly when SCTLR_EL1.UCI == 1 or emulated by the kernel (see > user_cache_maint_handler() in arch/arm64/kernel/traps.c). > > This patch enables execution of the two

Re: [PATCH] python: honour message limit when using pre-opened socket

2023-05-17 Thread John Snow
On Mon, May 15, 2023 at 5:14 PM John Snow wrote: > > On Mon, Mar 20, 2023 at 8:27 PM John Snow wrote: > > > > On Mon, Mar 20, 2023 at 8:20 AM Vladimir Sementsov-Ogievskiy > > wrote: > > > > > > On 20.03.23 13:54, Daniel P. Berrangé wrote: > > > > The default message recv limit in asyncio is

[PULL 31/68] tests/vm: add py310-expat to NetBSD

2023-05-17 Thread Paolo Bonzini
From: John Snow NetBSD cannot successfully run "ensurepip" without access to the pyexpat module, which NetBSD debundles. Like the Debian patch, it would be strictly faster long term to install pip/setuptools, and I recommend developers at their workstations take that approach instead. For the

[PULL 51/68] build: move glib detection and workarounds to meson

2023-05-17 Thread Paolo Bonzini
QEMU adds the path to glib.h to all compilation commands. This is simpler due to the pervasive use of static_library, and was grandfathered in from the previous Make-based build system. Until Meson 0.63 the only way to do this was to detect glib in configure and use add_project_arguments, but

[PULL 49/68] meson: add more version numbers to the summary

2023-05-17 Thread Paolo Bonzini
Whenever declare_dependency is used to add some compile flags or dependent libraries to the outcome of dependency(), the version of the original dependency is dropped in the summary. Make sure that declare_dependency() has a version argument in those cases. Reviewed-by: Philippe Mathieu-Daudé

[PULL 33/68] configure: create a python venv unconditionally

2023-05-17 Thread Paolo Bonzini
From: John Snow This patch changes the configure script so that it always creates and uses a python virtual environment unconditionally. Meson bootstrapping is temporarily altered to force the use of meson from git or vendored source (as packaged in our source tarballs). A subsequent commit

[PULL 37/68] tests: Use configure-provided pyvenv for tests

2023-05-17 Thread Paolo Bonzini
From: John Snow This patch changes how the avocado tests are provided, ever so slightly. Instead of creating a new testing venv, use the configure-provided 'pyvenv' instead, and install optional packages into that. Signed-off-by: John Snow Message-Id:

[PULL 15/68] coverity: the definitive COMPONENTS.md update

2023-05-17 Thread Paolo Bonzini
The ordering here tries to be logical and matches the one in the website. Signed-off-by: Paolo Bonzini --- scripts/coverity-scan/COMPONENTS.md | 45 +++-- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/scripts/coverity-scan/COMPONENTS.md

[PULL 66/68] configure: reorder option parsing code

2023-05-17 Thread Paolo Bonzini
Move some variable assignments around for clarity and to remove one of three loops on the command line arguments. Signed-off-by: Paolo Bonzini --- configure | 121 ++ 1 file changed, 58 insertions(+), 63 deletions(-) diff --git a/configure

[PULL 34/68] python/wheels: add vendored meson package

2023-05-17 Thread Paolo Bonzini
From: John Snow In preference to vendoring meson source, vendor a built distributable ("bdist" in python parlance). This has some benefits: (1) We can get rid of a git submodule, (2) Installing built meson into a venv doesn't require any extra dependencies (the python "wheel" package,

[PULL 64/68] configure: do not rerun the tests with -Werror

2023-05-17 Thread Paolo Bonzini
Tests run in configure are pretty trivial at this point, so do not bother with the extra complication of running tests both with and without -Werror. Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- configure | 35 +-- 1 file changed, 1

[PULL 44/68] python: bump some of the dependencies

2023-05-17 Thread Paolo Bonzini
The version of pyflakes that is listed in python/tests/minreqs.txt breaks on Python 3.8 with the following message: AttributeError: 'FlakesChecker' object has no attribute 'CONSTANT' Now that we do not support EOL'd Python versions anymore, we can update to newer, fixed versions. It is a good

[PULL 56/68] build: move SafeStack tests to meson

2023-05-17 Thread Paolo Bonzini
This disables the old behavior of detecting SafeStack from environment CFLAGS. SafeStack is now enabled purely based on the configure arguments. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Paolo Bonzini --- configure | 73 ---

[PULL 67/68] configure: remove unnecessary check

2023-05-17 Thread Paolo Bonzini
All calls to probe_target_compiler are conditioned on some "have_target" invocation, or inside a loop on target_list. Therefore there is no issue with building unnecessary firmware images and tests. Signed-off-by: Paolo Bonzini --- configure | 7 --- 1 file changed, 7 deletions(-) diff

[PULL 29/68] tests/docker: add python3-venv dependency

2023-05-17 Thread Paolo Bonzini
From: John Snow Several debian-based tests need the python3-venv dependency as a consequence of Debian debundling the "ensurepip" module normally included with Python. As mkvenv.py stands as of this commit, Debian requires EITHER: (A) setuptools and pip, or (B) ensurepip mkvenv is a few

[PULL 17/68] make: clean after distclean deletes source files

2023-05-17 Thread Paolo Bonzini
From: Steve Sistare Run 'make distclean' in a tree, and GNUmakefile is removed. But, GNUmakefile is where we change directory to build. Run 'make distclean' or 'make clean' again, and Makefile applies the clean actions, such as this one, at the top level of the tree. For example, it removes the

[PULL 55/68] build: move sanitizer tests to meson

2023-05-17 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- configure | 147 - docs/devel/build-system.rst| 4 - meson.build| 56 - meson_options.txt | 4 + scripts/meson-buildoptions.sh | 6 ++

[PULL 41/68] Python: Drop support for Python 3.6

2023-05-17 Thread Paolo Bonzini
Python 3.6 was EOL 2021-12-31. Newer versions of upstream libraries have begun dropping support for this version and it is becoming more cumbersome to support. Avocado-framework and qemu.qmp each have their own reasons for wanting to drop Python 3.6, but won't until QEMU does. Versions of Python

[PULL 62/68] build: move --disable-debug-info to meson

2023-05-17 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- configure | 5 - scripts/meson-buildoptions.py | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 0dc0395a848f..b2172b7b938e 100755 --- a/configure +++

[PULL 59/68] build: move warning flag selection to meson

2023-05-17 Thread Paolo Bonzini
Meson already knows to test with the positive form of the flag, which simplifies the test. Warnings are now tested explicitly for the C++ compiler, instead of hardcoding those that are only available for the C language. At this point all compiler flags in QEMU_CFLAGS are global and only depend

[PULL 16/68] scsi-generic: fix buffer overflow on block limits inquiry

2023-05-17 Thread Paolo Bonzini
Using linux 6.x guest, at boot time, an inquiry on a scsi-generic device makes qemu crash. This is caused by a buffer overflow when scsi-generic patches the block limits VPD page. Do the operations on a temporary on-stack buffer that is guaranteed to be large enough. Reported-by: Théo Maillart

[PULL 45/68] meson: regenerate meson-buildoptions.sh

2023-05-17 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- scripts/meson-buildoptions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index fedb93ada69e..10c4969a013e 100644 --- a/scripts/meson-buildoptions.sh +++

[PULL 57/68] build: move coroutine backend selection to meson

2023-05-17 Thread Paolo Bonzini
To simplify the code, rename coroutine-win32.c to match the option passed to configure. Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- configure | 62 --- meson.build | 32 +-

[PULL 68/68] docs/devel: update build system docs

2023-05-17 Thread Paolo Bonzini
configure is only doing compiler and host setup now, so adjust the relevant documentation. It is also possible to build emulators with ninja directly if one is so inclined, so mention that as well. The Python virtual environment set up is a new major task of configure as well. Mention it in the

[PULL 40/68] configure: add --enable-pypi and --disable-pypi

2023-05-17 Thread Paolo Bonzini
From: John Snow In the event that there's no vendored source present and no sufficient version of $package can be found, we will attempt to connect to PyPI to install the package if '--disable-pypi' was not passed. This means that PyPI access is "enabled by default", but there are some

[PULL 63/68] configure: remove compiler sanity check

2023-05-17 Thread Paolo Bonzini
The comment is not correct anymore, in that the usability test for the compiler and linker are done after probing $cpu, and Meson will redo them anyway. Signed-off-by: Paolo Bonzini --- configure | 14 -- 1 file changed, 14 deletions(-) diff --git a/configure b/configure index

[PULL 50/68] meson: drop unnecessary declare_dependency()

2023-05-17 Thread Paolo Bonzini
The libvfio_user_dep variable of subprojects/libvfio-user/lib/meson.build is already a dependency, so there is no need to wrap it with another declare_dependency(). Signed-off-by: Paolo Bonzini --- meson.build | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/meson.build

[PULL 48/68] meson: remove static_kwargs

2023-05-17 Thread Paolo Bonzini
After static_kwargs has been changed to an empty dictionary, it has no functional effect and can be removed. Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- meson.build | 215 +++- tcg/meson.build | 2 +- 2 files changed, 85

[PULL 22/68] mkvenv: add nested venv workaround

2023-05-17 Thread Paolo Bonzini
From: John Snow Python virtual environments do not typically nest; they may inherit from the top-level system packages or not at all. For our purposes, it would be convenient to emulate "nested" virtual environments to allow callers of the configure script to install specific versions of python

[PULL 54/68] meson: prepare move of QEMU_CFLAGS to meson

2023-05-17 Thread Paolo Bonzini
Clean up the handling of compiler flags in meson.build, splitting the general flags that should be included in subprojects as well, from warning flags that only apply to QEMU itself. The two were mixed in both configure tests and meson tests. This split makes it easier to move the compiler tests

[PULL 36/68] qemu.git: drop meson git submodule

2023-05-17 Thread Paolo Bonzini
From: John Snow Now that meson is installed from a vendored wheel, we don't need the git submodule anymore. Drop it. Signed-off-by: John Snow Message-Id: <20230511035435.734312-19-js...@redhat.com> Signed-off-by: Paolo Bonzini --- .gitmodules | 3 --- meson | 1 - 2 files changed, 4

[PULL 14/68] tcg: round-robin: do not use mb_read for rr_current_cpu

2023-05-17 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- accel/tcg/tcg-accel-ops-rr.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/accel/tcg/tcg-accel-ops-rr.c b/accel/tcg/tcg-accel-ops-rr.c index 5788efa5ff4d..b6d10fa9a250 100644 --- a/accel/tcg/tcg-accel-ops-rr.c +++

[PULL 13/68] kvm: Enable dirty ring for arm64

2023-05-17 Thread Paolo Bonzini
From: Gavin Shan arm64 has different capability from x86 to enable the dirty ring, which is KVM_CAP_DIRTY_LOG_RING_ACQ_REL. Besides, arm64 also needs the backup bitmap extension (KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP) when 'kvm-arm-gicv3' or 'arm-its-kvm' device is enabled. Here the extension is

[PULL 05/68] tests/tcg/i386: correct mask for VPERM2F128/VPERM2I128

2023-05-17 Thread Paolo Bonzini
The instructions also use bits 3 and 7 of their 8-byte immediate. Signed-off-by: Paolo Bonzini --- tests/tcg/i386/test-avx.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tcg/i386/test-avx.py b/tests/tcg/i386/test-avx.py index d9ca00a49e6c..641a2ef69ebc 100755 ---

[PULL 27/68] mkvenv: avoid ensurepip if pip is installed

2023-05-17 Thread Paolo Bonzini
From: John Snow Signed-off-by: Paolo Bonzini --- python/scripts/mkvenv.py | 67 ++-- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/python/scripts/mkvenv.py b/python/scripts/mkvenv.py index fb91f922d2b9..a9c566029e6f 100644 ---

[PULL 47/68] meson: use prefer_static option

2023-05-17 Thread Paolo Bonzini
The option is new in Meson 0.63 and removes the need to pass "static: true" to all dependency and find_library invocation. Actually cleaning up the invocations is left for a separate patch. Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- configure | 4 +---

[PULL 58/68] build: move stack protector flag selection to meson

2023-05-17 Thread Paolo Bonzini
Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- configure | 44 ++- meson.build | 28 +- meson_options.txt | 2 ++ scripts/meson-buildoptions.sh | 3 +++ 4 files changed, 34

[PULL 35/68] configure: use 'mkvenv ensure meson' to bootstrap meson

2023-05-17 Thread Paolo Bonzini
From: John Snow This commit changes how we detect and install meson. It notably removes '--meson='. Currently, configure creates a lightweight Python virtual environment unconditionally using the user's configured $python that inherits system packages. Temporarily, we forced the use of meson

[PULL 12/68] kvm: Add helper kvm_dirty_ring_init()

2023-05-17 Thread Paolo Bonzini
From: Gavin Shan Due to multiple capabilities associated with the dirty ring for different architectures: KVM_CAP_DIRTY_{LOG_RING, LOG_RING_ACQ_REL} for x86 and arm64 separately. There will be more to be done in order to support the dirty ring for arm64. Lets add helper kvm_dirty_ring_init() to

[PULL 30/68] tests/vm: Configure netbsd to use Python 3.10

2023-05-17 Thread Paolo Bonzini
From: John Snow NetBSD removes some packages from the Python stdlib, but only re-packages them for Python 3.10. Switch to using Python 3.10. Signed-off-by: John Snow Reviewed-by: Daniel P. Berrangé Message-Id: <20230511035435.734312-13-js...@redhat.com> Signed-off-by: Paolo Bonzini ---

[PULL 25/68] mkvenv: add console script entry point generation

2023-05-17 Thread Paolo Bonzini
From: John Snow When creating a virtual environment that inherits system packages, script entry points (like "meson", "sphinx-build", etc) are not re-generated with the correct shebang. When you are *inside* of the venv, this is not a problem, but if you are *outside* of it, you will not have a

[PULL 43/68] mkvenv: mark command as required

2023-05-17 Thread Paolo Bonzini
This is only available in Python 3.7+. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow Message-Id: <20230511035435.734312-26-js...@redhat.com> Signed-off-by: Paolo Bonzini --- python/scripts/mkvenv.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/scripts/mkvenv.py

[PULL 61/68] build: move compiler version check to meson

2023-05-17 Thread Paolo Bonzini
Use the slighly nicer .version_compare() function for GCC; for Clang that is not possible due to the mess that Apple does with version numbers. Signed-off-by: Paolo Bonzini --- configure | 25 - meson.build | 20 2 files changed, 20 insertions(+),

[PULL 24/68] mkvenv: add --diagnose option to explain "ensure" failures

2023-05-17 Thread Paolo Bonzini
From: John Snow This is a routine that is designed to print some usable info for human beings back out to the terminal if/when "mkvenv ensure" fails to locate or install a package during configure time, such as meson or sphinx. Since we are requiring that "meson" and "sphinx" are installed to

  1   2   3   4   5   >