qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 0e7e3b: target/i386: add support for FLUSH_L1


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 0e7e3b: target/i386: add support for FLUSH_L1D feature
Date: Thu, 18 May 2023 09:28:12 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 0e7e3bf1a552c178924867fa7c2f30ccc8a179e0
      
https://github.com/qemu/qemu/commit/0e7e3bf1a552c178924867fa7c2f30ccc8a179e0
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M target/i386/cpu.c
    M target/i386/cpu.h

  Log Message:
  -----------
  target/i386: add support for FLUSH_L1D feature

As reported by Intel's doc:
"L1D_FLUSH: Writeback and invalidate the L1 data cache"

If this cpu feature is present in host, allow QEMU to choose whether to
show it to the guest too.
One disadvantage of not exposing it is that the guest will report
a non existing vulnerability in
/sys/devices/system/cpu/vulnerabilities/mmio_stale_data
because the mitigation is present only when the cpu has
        (FLUSH_L1D and MD_CLEAR) or FB_CLEAR
features enabled.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20230201135759.555607-2-eesposit@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 22e1094ca82d5518c1b69aff3e87c550776ae1eb
      
https://github.com/qemu/qemu/commit/22e1094ca82d5518c1b69aff3e87c550776ae1eb
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M target/i386/cpu.c
    M target/i386/cpu.h

  Log Message:
  -----------
  target/i386: add support for FB_CLEAR feature

As reported by the Intel's doc:
"FB_CLEAR: The processor will overwrite fill buffer values as part of
MD_CLEAR operations with the VERW instruction.
On these processors, L1D_FLUSH does not overwrite fill buffer values."

If this cpu feature is present in host, allow QEMU to choose whether to
show it to the guest too.
One disadvantage of not exposing it is that the guest will report
a non existing vulnerability in
/sys/devices/system/cpu/vulnerabilities/mmio_stale_data
because the mitigation is present only when the cpu has
        (FLUSH_L1D and MD_CLEAR) or FB_CLEAR
features enabled.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20230201135759.555607-3-eesposit@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 2b55e479e6fcbb466585fd25077a50c32e10dc3a
      
https://github.com/qemu/qemu/commit/2b55e479e6fcbb466585fd25077a50c32e10dc3a
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M target/i386/tcg/decode-new.c.inc

  Log Message:
  -----------
  target/i386: fix operand size for VCOMI/VUCOMI instructions

Compared to other SSE instructions, VUCOMISx and VCOMISx are different:
the single and double precision versions are distinguished through a
prefix, however they use no-prefix and 0x66 for SS and SD respectively.
Scalar values usually are associated with 0xF2 and 0xF3.

Because of these, they incorrectly perform a 128-bit memory load instead
of a 32- or 64-bit load.  Fix this by writing a custom decoding function.

I tested that the reproducer is fixed and the test-avx output does not
change.

Reported-by: Gabriele Svelto <gsvelto@mozilla.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1637
Fixes: f8d19eec0d53 ("target/i386: reimplement 0x0f 0x28-0x2f, add AVX", 
2022-10-18)
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 056d649007bc9fdae9f1d576e77c1316e9a34468
      
https://github.com/qemu/qemu/commit/056d649007bc9fdae9f1d576e77c1316e9a34468
  Author: Xinyu Li <lixinyu20s@ict.ac.cn>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M target/i386/ops_sse.h
    M target/i386/tcg/emit.c.inc

  Log Message:
  -----------
  target/i386: fix avx2 instructions vzeroall and vpermdq

vzeroall: xmm_regs should be used instead of xmm_t0
vpermdq: bit 3 and 7 of imm should be considered

Signed-off-by: Xinyu Li <lixinyu20s@ict.ac.cn>
Message-Id: <20230510145222.586487-1-lixinyu20s@ict.ac.cn>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 9e65829699f901c62a612316a2897f4ad8a27049
      
https://github.com/qemu/qemu/commit/9e65829699f901c62a612316a2897f4ad8a27049
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M tests/tcg/i386/test-avx.py

  Log Message:
  -----------
  tests/tcg/i386: correct mask for VPERM2F128/VPERM2I128

The instructions also use bits 3 and 7 of their 8-byte immediate.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: afa94dabc52b17e340975e158d5a816ec2b2de23
      
https://github.com/qemu/qemu/commit/afa94dabc52b17e340975e158d5a816ec2b2de23
  Author: Ricky Zhou <ricky@rzhou.org>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M target/i386/tcg/decode-new.c.inc

  Log Message:
  -----------
  target/i386: Fix and add some comments next to SSE/AVX instructions.

Adds some comments describing what instructions correspond to decoding
table entries and fixes some existing comments which named the wrong
instruction.
Message-Id: <20230501111428.95998-1-ricky@rzhou.org>

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: cab529b0dc15746b270e87d77e1dd12c6216807c
      
https://github.com/qemu/qemu/commit/cab529b0dc15746b270e87d77e1dd12c6216807c
  Author: Ricky Zhou <ricky@rzhou.org>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M target/i386/tcg/decode-new.c.inc

  Log Message:
  -----------
  target/i386: Fix exception classes for SSE/AVX instructions.

Fix the exception classes for some SSE/AVX instructions to match what is
documented in the Intel manual.

These changes are expected to have no functional effect on the behavior
that qemu implements (primarily >= 16-byte memory alignment checks). For
instance, since qemu does not implement the AC flag, there is no
difference in behavior between Exception Classes 4 and 5 for
instructions where the SSE version only takes <16 byte memory operands.
Message-Id: <20230501111428.95998-2-ricky@rzhou.org>

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 8bf171c2d126aea6b60b818f1cee7e0e9eef0390
      
https://github.com/qemu/qemu/commit/8bf171c2d126aea6b60b818f1cee7e0e9eef0390
  Author: Ricky Zhou <ricky@rzhou.org>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M target/i386/tcg/decode-new.c.inc

  Log Message:
  -----------
  target/i386: Fix exception classes for MOVNTPS/MOVNTPD.

Before this change, MOVNTPS and MOVNTPD were labeled as Exception Class
4 (only requiring alignment for legacy SSE instructions). This changes
them to Exception Class 1 (always requiring memory alignment), as
documented in the Intel manual.
Message-Id: <20230501111428.95998-3-ricky@rzhou.org>

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: ed8d95182bc994e31e730c59e1c8bfec4822b27d
      
https://github.com/qemu/qemu/commit/ed8d95182bc994e31e730c59e1c8bfec4822b27d
  Author: Fabiano Rosas <farosas@suse.de>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M docs/meson.build
    M docs/sphinx/dbusdomain.py
    M docs/sphinx/fakedbusdoc.py
    M docs/sphinx/qmp_lexer.py

  Log Message:
  -----------
  meson: Pass -j option to sphinx

Save a bit of build time by passing the number of jobs option to
sphinx.

We cannot use  the -j option from make because  meson does not support
setting build time parameters for custom targets. Use nproc instead or
the equivalent sphinx option "-j  auto", if that is available (version
>=1.7.0).

Also make sure our plugins support parallelism and report it properly
to sphinx. Particularly, implement the merge_domaindata method in
DBusDomain that is used to merge in data from other subprocesses.

Tested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Message-Id: <20230503203947.3417-2-farosas@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 1e493be58708c3003d9e38b09eedf0134c0ca9fe
      
https://github.com/qemu/qemu/commit/1e493be58708c3003d9e38b09eedf0134c0ca9fe
  Author: Gavin Shan <gshan@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M accel/kvm/kvm-all.c
    M include/exec/memory.h
    M migration/dirtyrate.c
    M migration/ram.c
    M softmmu/memory.c

  Log Message:
  -----------
  migration: Add last stage indicator to global dirty log

The global dirty log synchronization is used when KVM and dirty ring
are enabled. There is a particularity for ARM64 where the backup
bitmap is used to track dirty pages in non-running-vcpu situations.
It means the dirty ring works with the combination of ring buffer
and backup bitmap. The dirty bits in the backup bitmap needs to
collected in the last stage of live migration.

In order to identify the last stage of live migration and pass it
down, an extra parameter is added to the relevant functions and
callbacks. This last stage indicator isn't used until the dirty
ring is enabled in the subsequent patches.

No functional change intended.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Tested-by: Zhenyu Zhang <zhenyzha@redhat.com>
Message-Id: <20230509022122.20888-2-gshan@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: b20cc776922dcf6d97f431a3460e868a9ac3e89e
      
https://github.com/qemu/qemu/commit/b20cc776922dcf6d97f431a3460e868a9ac3e89e
  Author: Gavin Shan <gshan@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M accel/kvm/kvm-all.c
    M include/sysemu/kvm_int.h

  Log Message:
  -----------
  kvm: Synchronize the backup bitmap in the last stage

In the last stage of live migration or memory slot removal, the
backup bitmap needs to be synchronized when it has been enabled.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Tested-by: Zhenyu Zhang <zhenyzha@redhat.com>
Message-Id: <20230509022122.20888-3-gshan@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 3794cb9485ca52a65494c6eb108ff280a7e98dbc
      
https://github.com/qemu/qemu/commit/3794cb9485ca52a65494c6eb108ff280a7e98dbc
  Author: Gavin Shan <gshan@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M accel/kvm/kvm-all.c

  Log Message:
  -----------
  kvm: Add helper kvm_dirty_ring_init()

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 enable the dirty ring. With this,
the code looks a bit clean.

No functional change intended.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Tested-by: Zhenyu Zhang <zhenyzha@redhat.com>
Message-Id: <20230509022122.20888-4-gshan@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 856e23a0fb92b0949eace7f43a521e0214246735
      
https://github.com/qemu/qemu/commit/856e23a0fb92b0949eace7f43a521e0214246735
  Author: Gavin Shan <gshan@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M accel/kvm/kvm-all.c

  Log Message:
  -----------
  kvm: Enable dirty ring for arm64

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 always enabled
and the unnecessary overhead to do the last stage of dirty log synchronization
when those two devices aren't used is introduced, but the overhead should
be very small and acceptable. The benefit is cover future cases where those
two devices are used without modifying the code.

Signed-off-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Tested-by: Zhenyu Zhang <zhenyzha@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Message-Id: <20230509022122.20888-5-gshan@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 2e73952926381b7ff8224bbf80ff7b035053595f
      
https://github.com/qemu/qemu/commit/2e73952926381b7ff8224bbf80ff7b035053595f
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M accel/tcg/tcg-accel-ops-rr.c

  Log Message:
  -----------
  tcg: round-robin: do not use mb_read for rr_current_cpu

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: c9214c935564775483ee4865857dbef1bd4a7ad9
      
https://github.com/qemu/qemu/commit/c9214c935564775483ee4865857dbef1bd4a7ad9
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M scripts/coverity-scan/COMPONENTS.md

  Log Message:
  -----------
  coverity: the definitive COMPONENTS.md update

The ordering here tries to be logical and matches the one in the
website.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 9bd634b2f5e2f10fe35d7609eb83f30583f2e15a
      
https://github.com/qemu/qemu/commit/9bd634b2f5e2f10fe35d7609eb83f30583f2e15a
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M hw/scsi/scsi-generic.c

  Log Message:
  -----------
  scsi-generic: fix buffer overflow on block limits inquiry

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 <tmaillart@freebox.fr>
Analyzed-by: Théo Maillart <tmaillart@freebox.fr>
Cc: qemu-stable@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 6fd87e74a1c56cbe63691fc33de0b616e6efcff3
      
https://github.com/qemu/qemu/commit/6fd87e74a1c56cbe63691fc33de0b616e6efcff3
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M Makefile

  Log Message:
  -----------
  make: clean after distclean deletes source files

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 .d source files in 'meson/test cases/d/*/*.d'.

    find . \( -name '*.so' -o -name '*.dll' -o \
          -name '*.[oda]' -o -name '*.gcno' \) -type f \
        ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-aarch64.a \
        ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \
        -exec rm {} +

To fix, remove clean and distclean from UNCHECKED_GOALS, so those targets
are "checked", meaning that configure must be run before make.  However,
the check action does not trigger, because clean does not depend on
config-host.mak, so change the action to simply throw an error.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Message-Id: <1681909700-94095-1-git-send-email-steven.sistare@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 0b15c42b81ff1e66ccbab3c2f2cef1535cbb9d24
      
https://github.com/qemu/qemu/commit/0b15c42b81ff1e66ccbab3c2f2cef1535cbb9d24
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M python/Makefile

  Log Message:
  -----------
  python: shut up "pip install" during "make check-minreqs"

"make check-minreqs" runs pip without the --disable-pip-version-check
option, which causes the obnoxious "A new release of pip available"
message.

Recent versions of pip also complain that some of the dependencies in
our virtual environment rely on "setup.py install" instead of providing
a pyproject.toml file; apparently it is deprecated to install them
directly from pip instead of letting the "wheel" package take care
of them.  So, install "wheel" in the virtual environment.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-2-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 6c2537d35bf121d8924b66a795a58dd761d459b4
      
https://github.com/qemu/qemu/commit/6c2537d35bf121d8924b66a795a58dd761d459b4
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M python/setup.cfg

  Log Message:
  -----------
  python: update pylint configuration

Pylint 2.17.x decided that SocketAddrT was a bad name for a Type Alias for some
reason. Sure, fine, whatever.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230511035435.734312-3-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: dd84028ff911e75028dea0ac1e578c2a7bcc3ffd
      
https://github.com/qemu/qemu/commit/dd84028ff911e75028dea0ac1e578c2a7bcc3ffd
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    A python/scripts/mkvenv.py
    M python/setup.cfg
    M python/tests/flake8.sh
    M python/tests/isort.sh
    M python/tests/mypy.sh
    M python/tests/pylint.sh

  Log Message:
  -----------
  python: add mkvenv.py

This script will be responsible for building a lightweight Python
virtual environment at configure time. It works with Python 3.6 or
newer.

It has been designed to:
- work *offline*, no PyPI required.
- work *quickly*, The fast path is only ~65ms on my machine.
- work *robustly*, with multiple fallbacks to keep things working.
- work *cooperatively*, using system packages where possible.
  (You can use your distro's meson, no problem.)

Due to its unique position in the build chain, it exists outside of the
installable python packages in-tree and *must* be runnable without any
third party dependencies.

Under normal circumstances, the only dependency required to execute this
script is Python 3.6+ itself. The script is *faster* by several seconds
when setuptools and pip are installed in the host environment, which is
probably the case for a typical multi-purpose developer workstation.

In the event that pip/setuptools are missing or not usable, additional
dependencies may be required on some distributions which remove certain
Python stdlib modules to package them separately:

- Debian may require python3-venv to provide "ensurepip"
- NetBSD may require py310-expat to provide "pyexpat" *
  (* Or whichever version is current for NetBSD.)

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-4-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: a9dbde71da553fe0b132ffac6d1a0de16892a90d
      
https://github.com/qemu/qemu/commit/a9dbde71da553fe0b132ffac6d1a0de16892a90d
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M python/scripts/mkvenv.py

  Log Message:
  -----------
  mkvenv: add better error message for broken or missing ensurepip

Debian debundles ensurepip for python; NetBSD debundles pyexpat but
ensurepip needs pyexpat. Try our best to offer a helpful error message
instead of just failing catastrophically.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-5-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: dee01b827ffc26577217697074052b8b7f4770dc
      
https://github.com/qemu/qemu/commit/dee01b827ffc26577217697074052b8b7f4770dc
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M python/scripts/mkvenv.py

  Log Message:
  -----------
  mkvenv: add nested venv workaround

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 utilities in order to test build system
features, utility version compatibility, etc.

While it is possible to install packages into the system environment
(say, by using the --user flag), it's nicer to install test packages
into a totally isolated environment instead.

As detailed in https://www.qemu.org/2023/03/24/python/, Emulate a nested
venv environment by using .pth files installed into the site-packages
folder that points to the parent environment when appropriate.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-6-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: c5538eed12e2e427e3715b39cca46c00afcde78d
      
https://github.com/qemu/qemu/commit/c5538eed12e2e427e3715b39cca46c00afcde78d
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M python/scripts/mkvenv.py
    M python/setup.cfg
    M python/tests/minreqs.txt

  Log Message:
  -----------
  mkvenv: add ensure subcommand

This command is to be used to add various packages (or ensure they're
already present) into the configure-provided venv in a modular fashion.

Examples:

mkvenv ensure --online --dir "${source_dir}/python/wheels/" "meson>=0.61.5"
mkvenv ensure --online "sphinx>=1.6.0"
mkvenv ensure "qemu.qmp==0.0.2"

It's designed to look for packages in three places, in order:

(1) In system packages, if the version installed is already good
enough. This way your distribution-provided meson, sphinx, etc are
always used as first preference.

(2) In a vendored packages directory. Here I am suggesting
qemu.git/python/wheels/ as that directory. This is intended to serve as
a replacement for vendoring the meson source for QEMU tarballs. It is
also highly likely to be extremely useful for packaging the "qemu.qmp"
package in source distributions for platforms that do not yet package
qemu.qmp separately.

(3) Online, via PyPI, ***only when "--online" is passed***. This is only
ever used as a fallback if the first two sources do not have an
appropriate package that meets the requirement. The ability to build
QEMU and run tests *completely offline* is not impinged.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-7-jsnow@redhat.com>
[Use distlib to lookup distributions. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 4695a22e9adb0c9a96465109a17da10c17cf2a67
      
https://github.com/qemu/qemu/commit/4695a22e9adb0c9a96465109a17da10c17cf2a67
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M python/scripts/mkvenv.py

  Log Message:
  -----------
  mkvenv: add --diagnose option to explain "ensure" failures

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 the
same Python environment as QEMU is configured to build with, this can
produce some surprising failures when things are mismatched. This method
is here to try and ease that sting by offering some actionable
diagnosis.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-8-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 928348949d1d04f67715fa7125e7e1fa3ff40f7c
      
https://github.com/qemu/qemu/commit/928348949d1d04f67715fa7125e7e1fa3ff40f7c
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M python/scripts/mkvenv.py
    M python/setup.cfg

  Log Message:
  -----------
  mkvenv: add console script entry point generation

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 script that engages the virtual environment appropriately.

Add a mechanism that generates new entry points for pre-existing
packages so that we can use these scripts to run "meson",
"sphinx-build", "pip", unambiguously inside the venv.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-9-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 68ea6d17fe531e383394573251359ab4f99f7091
      
https://github.com/qemu/qemu/commit/68ea6d17fe531e383394573251359ab4f99f7091
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M python/scripts/mkvenv.py
    M python/setup.cfg

  Log Message:
  -----------
  mkvenv: use pip's vendored distlib as a fallback

distlib is usually not installed on Linux distribution, but it is vendored
into pip.  Because the virtual environment has pip via ensurepip, we
can piggy-back on pip's vendored version.  This could break if they move
our cheese in the future, but the fix would be simply to require distlib.

If it is debundled, as it is on msys, it is simply available directly.

Signed-off-by: John Snow <jsnow@redhat.com>
[Move to toplevel. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: f1ad527ff5f789a19c79f5f39a87f7a8f78d81b9
      
https://github.com/qemu/qemu/commit/f1ad527ff5f789a19c79f5f39a87f7a8f78d81b9
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M python/scripts/mkvenv.py

  Log Message:
  -----------
  mkvenv: avoid ensurepip if pip is installed

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: c804962617dc987e202f8e9ce0210503fd489616
      
https://github.com/qemu/qemu/commit/c804962617dc987e202f8e9ce0210503fd489616
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M python/scripts/mkvenv.py

  Log Message:
  -----------
  mkvenv: work around broken pip installations on Debian 10

This is a workaround intended for Debian 10, where the debian-patched
pip does not function correctly if accessed from within a virtual
environment.

We don't support Debian 10 as a build platform any longer, though we do
still utilize it for our build-tricore-softmmu CI test. It's also
possible that this bug might appear on other derivative platforms and
this workaround may prove useful.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-11-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: a22a4b29adfb8cbab8059315e97fd65413d6d444
      
https://github.com/qemu/qemu/commit/a22a4b29adfb8cbab8059315e97fd65413d6d444
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M tests/docker/dockerfiles/debian-all-test-cross.docker
    M tests/docker/dockerfiles/debian-hexagon-cross.docker
    M tests/docker/dockerfiles/debian-riscv64-cross.docker
    M tests/docker/dockerfiles/debian-tricore-cross.docker

  Log Message:
  -----------
  tests/docker: add python3-venv dependency

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 seconds faster if you have setuptools and pip, so
developers should prefer the first requirement. For the purposes of CI,
the time-save is a wash; it's only a matter of who is responsible for
installing pip and when; the timing is about the same.

Arbitrarily, I chose adding ensurepip to the test configuration because
it is normally part of the Python stdlib, and always having it allows us
a more consistent cross-platform environment.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230511035435.734312-12-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: dd48b477e90c3200b970545d1953e12e8c1431db
      
https://github.com/qemu/qemu/commit/dd48b477e90c3200b970545d1953e12e8c1431db
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M tests/vm/netbsd

  Log Message:
  -----------
  tests/vm: Configure netbsd to use Python 3.10

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 <jsnow@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230511035435.734312-13-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 1dee66c693e6772ee33f5b8be7d061dd7ee27cd5
      
https://github.com/qemu/qemu/commit/1dee66c693e6772ee33f5b8be7d061dd7ee27cd5
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M tests/vm/netbsd

  Log Message:
  -----------
  tests/vm: add py310-expat to NetBSD

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 purposes of a throwaway VM, there's not really a speed
difference for who is responsible for installing pip; us (needs
py310-pip) or Python (needs py310-expat).

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230511035435.734312-14-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 2274817f6c499fd31081d7973b7cbfdca17c44a8
      
https://github.com/qemu/qemu/commit/2274817f6c499fd31081d7973b7cbfdca17c44a8
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    A python/scripts/vendor.py

  Log Message:
  -----------
  python: add vendor.py utility

This is a teeny-tiny script that just downloads any packages we want to
vendor from PyPI and stores them in qemu.git/python/wheels/. If I'm hit
by a meteor, it'll be easy to replicate what I have done in order to
udpate the vendored source.

We don't really care which python runs it; it exists as a meta-utility
with no external dependencies and we won't package or install it. It
will be monitored by the linters/type checkers, though; so it's
guaranteed safe on python 3.6+.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-15-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 81e2b198a8cb4ee5fdf108bd438f44b193ee3a36
      
https://github.com/qemu/qemu/commit/81e2b198a8cb4ee5fdf108bd438f44b193ee3a36
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: create a python venv unconditionally

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 restores the use of distribution-vendored Meson.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-16-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: e80bdbf283fb7a3643172b7f85b41d9dd312091c
      
https://github.com/qemu/qemu/commit/e80bdbf283fb7a3643172b7f85b41d9dd312091c
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    A python/wheels/meson-0.61.5-py3-none-any.whl

  Log Message:
  -----------
  python/wheels: add vendored meson package

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, chiefly.)
(3) We don't treat meson any differently than we would any other python
    package (we install it, end of story, done.)
(4) All future tarball *and* developer checkouts will function offline;
    No git or PyPI connection needed to fetch meson.

Note that because mkvenv prefers vendored packages to PyPI, as mkvenv is
currently written we will never consult PyPI for meson. (Do keep in mind
that your distribution's meson will be preferred above the vendored
version, though.)

```
jsnow@scv ~/s/q/python (python-configure-venv)> python3 scripts/vendor.py
pip download --dest /home/jsnow/src/qemu/python/wheels --require-hashes -r 
/tmp/tmpvo5qav7i
Collecting meson==0.61.5
  Using cached meson-0.61.5-py3-none-any.whl (862 kB)
Saved ./wheels/meson-0.61.5-py3-none-any.whl
Successfully downloaded meson
```

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-17-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 66e2c6cbacea9302a1fc5528906243d36c103fc7
      
https://github.com/qemu/qemu/commit/66e2c6cbacea9302a1fc5528906243d36c103fc7
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M .gitlab-ci.d/buildtest-template.yml
    M configure

  Log Message:
  -----------
  configure: use 'mkvenv ensure meson' to bootstrap meson

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 source present via git
submodule or in the release tarball.

With this patch, we restore the ability to use a system-provided meson:

If Meson is installed in the build venv and meets our minimum version
requirements, we will use that Meson. This includes a system provided
meson, which would be visible via system-site packages inside the venv.

In the event that Meson is installed but *not for the chosen Python
interpreter*, not found, or of insufficient version, we will attempt to
install Meson from vendored source into the newly created Python virtual
environment. This vendored installation replaces both the git submodule
and tarball source mechanisms for sourcing meson.

As a result of this patch, the Python interpreter we use for both our
own build scripts *and* Meson extensions are always known to be the
exact same Python. As a further benefit, there will also be a symlink
available in the build directory that points to the correct, configured
python and can be used by e.g. manual tests to invoke the correct,
configured Python unambiguously.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-18-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: aab95127565cea74672c291566c7bcaec601e756
      
https://github.com/qemu/qemu/commit/aab95127565cea74672c291566c7bcaec601e756
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M .gitmodules
    R meson

  Log Message:
  -----------
  qemu.git: drop meson git submodule

Now that meson is installed from a vendored wheel, we don't need the git
submodule anymore. Drop it.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-19-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 9c6692db550f739a84fe4b677428df09d9fafdc3
      
https://github.com/qemu/qemu/commit/9c6692db550f739a84fe4b677428df09d9fafdc3
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M .gitlab-ci.d/buildtest.yml
    M docs/devel/acpi-bits.rst
    M docs/devel/testing.rst
    M scripts/ci/org.centos/stream/8/x86_64/test-avocado
    M scripts/device-crash-test
    M tests/Makefile.include
    M tests/requirements.txt

  Log Message:
  -----------
  tests: Use configure-provided pyvenv for tests

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 <jsnow@redhat.com>
Message-Id: <20230511035435.734312-20-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 6b0cedcdc7c52feda1a6b5d6c6f30356290af0ec
      
https://github.com/qemu/qemu/commit/6b0cedcdc7c52feda1a6b5d6c6f30356290af0ec
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: move --enable-docs and --disable-docs back to configure

Move this option back from meson into configure for the purposes of
using the configuration value to bootstrap Sphinx in different ways
based on this value.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-21-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 6f6652ebc2717b28c5788e6364c6dab09bb0ac44
      
https://github.com/qemu/qemu/commit/6f6652ebc2717b28c5788e6364c6dab09bb0ac44
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure
    M docs/conf.py
    M docs/meson.build
    M meson_options.txt
    M scripts/meson-buildoptions.sh

  Log Message:
  -----------
  configure: bootstrap sphinx with mkvenv

When docs are explicitly requested, require Sphinx>=1.6.0. When docs are
explicitly disabled, don't bother to check for Sphinx at all. If docs
are set to "auto", attempt to locate Sphinx, but continue onward if it
wasn't located.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-22-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 0c5f3dcbb255453041628923625284109a810792
      
https://github.com/qemu/qemu/commit/0c5f3dcbb255453041628923625284109a810792
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: add --enable-pypi and --disable-pypi

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
subtleties that make this action occur much less frequently than you
might imagine:

(1) While --enable-pypi is the default, vendored source will always be
    preferred when found, making PyPI a fallback. This should ensure
    that configure-time venv building "just works" for almost everyone
    in almost every circumstance.

(2) Because meson source is, at time of writing, vendored directly into
    qemu.git, PyPI will never be used for sourcing meson.

(3) Because Sphinx is an optional dependency, if docs are set to "auto",
    PyPI will not be used to obtain Sphinx source as a fallback and
    instead docs will be disabled. If PyPI sourcing of sphinx is
    desired, --enable-docs should be passed to force the lookup. I chose
    this as the default behavior to avoid adding new internet lookups to
    a "default" invocation of configure.

Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-23-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 5591b74511ab370b2b7705c5ce97116030038990
      
https://github.com/qemu/qemu/commit/5591b74511ab370b2b7705c5ce97116030038990
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure
    M docs/about/build-platforms.rst
    M python/Makefile
    M python/setup.cfg
    M python/tests/minreqs.txt
    M scripts/qapi/mypy.ini

  Log Message:
  -----------
  Python: Drop support for Python 3.6

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 available in our supported build platforms as of today,
with optional versions available in parentheses:

openSUSE Leap 15.4: 3.6.15 (3.9.10, 3.10.2)
CentOS Stream 8:    3.6.8  (3.8.13, 3.9.16)
CentOS Stream 9:    3.9.13
Fedora 36:          3.10
Fedora 37:          3.11
Debian 11:          3.9.2
Alpine 3.14, 3.15:  3.9.16
Alpine 3.16, 3.17:  3.10.10
Ubuntu 20.04 LTS:   3.8.10
Ubuntu 22.04 LTS:   3.10.4
NetBSD 9.3:         3.9.13*
FreeBSD 12.4:       3.9.16
FreeBSD 13.1:       3.9.16
OpenBSD 7.2:        3.9.16

Note: Our VM tests install 3.9 explicitly for FreeBSD and 3.10 for
NetBSD; the default for "python" or "python3" in FreeBSD is
3.9.16. NetBSD does not appear to have a default meta-package, but
offers several options, the lowest of which is 3.7.15. "python39"
appears to be a pre-requisite to one of the other packages we request in
tests/vm/netbsd. pip, ensurepip and other Python essentials are
currently only available for Python 3.10 for NetBSD.

CentOS and OpenSUSE support parallel installation of multiple Python
interpreters, and binaries in /usr/bin will always use Python 3.6.  However,
the newly introduced support for virtual environments ensures that all build
steps that execute QEMU Python code use a single interpreter.

Since it is safe to under our supported platform policy, bump our
minimum supported version of Python to 3.7.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20230511035435.734312-24-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: e46b82a03cf2c7d9edd5c58e0d77515e53f66190
      
https://github.com/qemu/qemu/commit/e46b82a03cf2c7d9edd5c58e0d77515e53f66190
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: Add courtesy hint to Python version failure message

If we begin requiring Python 3.7+, a few platforms are going to need to
install an additional Python interpreter package.

As a courtesy to the user, suggest the optional package they might need
to install. This will hopefully minimize any downtime caused by the
change in Python dependency.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230221012456.2607692-3-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20230511035435.734312-25-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 02312f1af1524253d1b98f4fa6dfe23dc53f1c02
      
https://github.com/qemu/qemu/commit/02312f1af1524253d1b98f4fa6dfe23dc53f1c02
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M python/scripts/mkvenv.py

  Log Message:
  -----------
  mkvenv: mark command as required

This is only available in Python 3.7+.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-26-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 7b4b98c46cb47771aba3469435fe81beda99de6d
      
https://github.com/qemu/qemu/commit/7b4b98c46cb47771aba3469435fe81beda99de6d
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M python/setup.cfg
    M python/tests/minreqs.txt

  Log Message:
  -----------
  python: bump some of the dependencies

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 time to do so, before
Python packages start dropping support for Python 3.7 as well!

The new mypy is also a bit smarter about which packages are actually
being used, so remove the now-unnecessary sections from setup.cfg.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Message-Id: <20230511035435.734312-27-jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 5fbfea6c9dc35536c0fe572bb92c32bb45b177cb
      
https://github.com/qemu/qemu/commit/5fbfea6c9dc35536c0fe572bb92c32bb45b177cb
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M scripts/meson-buildoptions.sh

  Log Message:
  -----------
  meson: regenerate meson-buildoptions.sh

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 3b087f79a48807f348ea61469175e66b28ba44de
      
https://github.com/qemu/qemu/commit/3b087f79a48807f348ea61469175e66b28ba44de
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure
    M meson.build
    M python/scripts/vendor.py
    R python/wheels/meson-0.61.5-py3-none-any.whl
    A python/wheels/meson-0.63.3-py3-none-any.whl

  Log Message:
  -----------
  meson: require 0.63.0

This version allows cleanups in modinfo collection, but they only
work with Ninja 1.9.x and 1.8.x is still supported.  It also supports the
equivalent of QEMU's --static option to configure.

The wheel file is bumped to 0.63.3, the last release in the 0.63 branch.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: a0cbd2e8496aa8a80241fca3b247a54709c5ed26
      
https://github.com/qemu/qemu/commit/a0cbd2e8496aa8a80241fca3b247a54709c5ed26
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure
    M docs/devel/build-system.rst
    M meson.build
    M qga/meson.build

  Log Message:
  -----------
  meson: use prefer_static option

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 <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 063d5119c18af76b9e3303856dd114b36a8e1a43
      
https://github.com/qemu/qemu/commit/063d5119c18af76b9e3303856dd114b36a8e1a43
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M meson.build
    M tcg/meson.build

  Log Message:
  -----------
  meson: remove static_kwargs

After static_kwargs has been changed to an empty dictionary, it has
no functional effect and can be removed.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: bd3615d68fabb3578467e34af345c3eb8d88a0b2
      
https://github.com/qemu/qemu/commit/bd3615d68fabb3578467e34af345c3eb8d88a0b2
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M meson.build

  Log Message:
  -----------
  meson: add more version numbers to the summary

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é <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 5328353c05d880fbdba16a968cf9a39c8bd11a14
      
https://github.com/qemu/qemu/commit/5328353c05d880fbdba16a968cf9a39c8bd11a14
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M meson.build

  Log Message:
  -----------
  meson: drop unnecessary declare_dependency()

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 <pbonzini@redhat.com>


  Commit: fc9a809e0d28417fa1e7f7efc19f845bda4c1be9
      
https://github.com/qemu/qemu/commit/fc9a809e0d28417fa1e7f7efc19f845bda4c1be9
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure
    M contrib/plugins/Makefile
    M meson.build
    M util/meson.build

  Log Message:
  -----------
  build: move glib detection and workarounds to meson

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 now it is possible to use add_project_dependencies instead.

gmodule is detected in a separate variable, with export enabled for
modules and disabled for plugin.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 877c5567050eff2c63267d76f0c0c3c38cebe048
      
https://github.com/qemu/qemu/commit/877c5567050eff2c63267d76f0c0c3c38cebe048
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure
    M docs/devel/build-system.rst

  Log Message:
  -----------
  configure: remove pkg-config functions

All uses of pkg-config have been moved to Meson.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 6002711c669ecfa9124e9a5a6264ced30bbee3f9
      
https://github.com/qemu/qemu/commit/6002711c669ecfa9124e9a5a6264ced30bbee3f9
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure
    M meson.build
    M meson_options.txt
    M scripts/meson-buildoptions.sh
    M tests/qtest/meson.build

  Log Message:
  -----------
  configure, meson: move --enable-modules to Meson

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: d67212d47f7f114a34dba558997f6e56435777e1
      
https://github.com/qemu/qemu/commit/d67212d47f7f114a34dba558997f6e56435777e1
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M meson.build

  Log Message:
  -----------
  meson: prepare move of QEMU_CFLAGS to meson

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 piecewise
from configure to Meson.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 34f983d86fe40ffe5975369c1cf5e6a61688383a
      
https://github.com/qemu/qemu/commit/34f983d86fe40ffe5975369c1cf5e6a61688383a
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure
    M docs/devel/build-system.rst
    M meson.build
    M meson_options.txt
    M scripts/meson-buildoptions.sh
    M tests/qemu-iotests/meson.build
    M tests/unit/meson.build

  Log Message:
  -----------
  build: move sanitizer tests to meson

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 721fa5e563e8174d6c33e1e413cebb5442625932
      
https://github.com/qemu/qemu/commit/721fa5e563e8174d6c33e1e413cebb5442625932
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure
    M meson.build
    M meson_options.txt
    M scripts/meson-buildoptions.sh

  Log Message:
  -----------
  build: move SafeStack tests to meson

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é <philmd@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 6739825aa6e432fdb668e842def12c5deb3e5bad
      
https://github.com/qemu/qemu/commit/6739825aa6e432fdb668e842def12c5deb3e5bad
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure
    M meson.build
    M meson_options.txt
    M scripts/meson-buildoptions.py
    M scripts/meson-buildoptions.sh
    R util/coroutine-win32.c
    A util/coroutine-windows.c
    M util/meson.build

  Log Message:
  -----------
  build: move coroutine backend selection to meson

To simplify the code, rename coroutine-win32.c to match the option
passed to configure.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 911d4caaa267c43a5aa727f5a100e9122158e989
      
https://github.com/qemu/qemu/commit/911d4caaa267c43a5aa727f5a100e9122158e989
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure
    M meson.build
    M meson_options.txt
    M scripts/meson-buildoptions.sh

  Log Message:
  -----------
  build: move stack protector flag selection to meson

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 95caf1fb4230d64f7b5e117c6ea988ae38f76aa0
      
https://github.com/qemu/qemu/commit/95caf1fb4230d64f7b5e117c6ea988ae38f76aa0
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure
    M contrib/plugins/Makefile
    M meson.build

  Log Message:
  -----------
  build: move warning flag selection to meson

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 on the OS.  No feature tests are performed in configure.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: a988b4c56143d90f98034daf176e416b08dddf36
      
https://github.com/qemu/qemu/commit/a988b4c56143d90f98034daf176e416b08dddf36
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure
    M meson.build

  Log Message:
  -----------
  build: move remaining compiler flag tests to meson

Remove the only remaining uses of QEMU_CFLAGS.  Now that no
feature tests are done in configure, it is possible to remove
CONFIGURE_CFLAGS and CONFIGURE_LDFLAGS as well.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 13f60de816cc88577e2432014b84d702cc082160
      
https://github.com/qemu/qemu/commit/13f60de816cc88577e2432014b84d702cc082160
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure
    M meson.build

  Log Message:
  -----------
  build: move compiler version check to meson

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 <pbonzini@redhat.com>


  Commit: c0e705c6800a1f98c8cb3795ce66f5a48d4e33aa
      
https://github.com/qemu/qemu/commit/c0e705c6800a1f98c8cb3795ce66f5a48d4e33aa
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure
    M scripts/meson-buildoptions.py
    M scripts/meson-buildoptions.sh

  Log Message:
  -----------
  build: move --disable-debug-info to meson

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 264b8037210c36d2e81d9dcce361b7b45b9d5944
      
https://github.com/qemu/qemu/commit/264b8037210c36d2e81d9dcce361b7b45b9d5944
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: remove compiler sanity check

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 <pbonzini@redhat.com>


  Commit: d0016b869274b2e37b4ee8343cc181a030e9e882
      
https://github.com/qemu/qemu/commit/d0016b869274b2e37b4ee8343cc181a030e9e882
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: do not rerun the tests with -Werror

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 <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: eebcddf2fd41a6c8776533b242d592f3a01e5fda
      
https://github.com/qemu/qemu/commit/eebcddf2fd41a6c8776533b242d592f3a01e5fda
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: remove unnecessary mkdir

It is taken care of by the symlink shell function.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: 13cf376c1f5ee778d1ddae043346d494b4627cb2
      
https://github.com/qemu/qemu/commit/13cf376c1f5ee778d1ddae043346d494b4627cb2
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: reorder option parsing code

Move some variable assignments around for clarity and to remove
one of three loops on the command line arguments.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: d71ccfa1b8ea2a67648e6b5becc247bb6f0956e1
      
https://github.com/qemu/qemu/commit/d71ccfa1b8ea2a67648e6b5becc247bb6f0956e1
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M configure

  Log Message:
  -----------
  configure: remove unnecessary check

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 <pbonzini@redhat.com>


  Commit: fe3ab4eb2de46076cbafcbc86b22e71ad24894c6
      
https://github.com/qemu/qemu/commit/fe3ab4eb2de46076cbafcbc86b22e71ad24894c6
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M docs/devel/build-system.rst

  Log Message:
  -----------
  docs/devel: update build system docs

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 list of produced files, while leaving it
for a future patch to document how it works and how ``mkvenv ensure``
is used.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>


  Commit: f0b95ab6b8192d84338496a0b6fd8f2c08a4a3a8
      
https://github.com/qemu/qemu/commit/f0b95ab6b8192d84338496a0b6fd8f2c08a4a3a8
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-05-18 (Thu, 18 May 2023)

  Changed paths:
    M .gitlab-ci.d/buildtest-template.yml
    M .gitlab-ci.d/buildtest.yml
    M .gitmodules
    M Makefile
    M accel/kvm/kvm-all.c
    M accel/tcg/tcg-accel-ops-rr.c
    M configure
    M contrib/plugins/Makefile
    M docs/about/build-platforms.rst
    M docs/conf.py
    M docs/devel/acpi-bits.rst
    M docs/devel/build-system.rst
    M docs/devel/testing.rst
    M docs/meson.build
    M docs/sphinx/dbusdomain.py
    M docs/sphinx/fakedbusdoc.py
    M docs/sphinx/qmp_lexer.py
    M hw/scsi/scsi-generic.c
    M include/exec/memory.h
    M include/sysemu/kvm_int.h
    R meson
    M meson.build
    M meson_options.txt
    M migration/dirtyrate.c
    M migration/ram.c
    M python/Makefile
    A python/scripts/mkvenv.py
    A python/scripts/vendor.py
    M python/setup.cfg
    M python/tests/flake8.sh
    M python/tests/isort.sh
    M python/tests/minreqs.txt
    M python/tests/mypy.sh
    M python/tests/pylint.sh
    A python/wheels/meson-0.63.3-py3-none-any.whl
    M qga/meson.build
    M scripts/ci/org.centos/stream/8/x86_64/test-avocado
    M scripts/coverity-scan/COMPONENTS.md
    M scripts/device-crash-test
    M scripts/meson-buildoptions.py
    M scripts/meson-buildoptions.sh
    M scripts/qapi/mypy.ini
    M softmmu/memory.c
    M target/i386/cpu.c
    M target/i386/cpu.h
    M target/i386/ops_sse.h
    M target/i386/tcg/decode-new.c.inc
    M target/i386/tcg/emit.c.inc
    M tcg/meson.build
    M tests/Makefile.include
    M tests/docker/dockerfiles/debian-all-test-cross.docker
    M tests/docker/dockerfiles/debian-hexagon-cross.docker
    M tests/docker/dockerfiles/debian-riscv64-cross.docker
    M tests/docker/dockerfiles/debian-tricore-cross.docker
    M tests/qemu-iotests/meson.build
    M tests/qtest/meson.build
    M tests/requirements.txt
    M tests/tcg/i386/test-avx.py
    M tests/unit/meson.build
    M tests/vm/netbsd
    R util/coroutine-win32.c
    A util/coroutine-windows.c
    M util/meson.build

  Log Message:
  -----------
  Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging

* kvm: enable dirty ring for arm64
* target/i386: new features
* target/i386: AVX fixes
* configure: create a python venv unconditionally
* meson: bump to 0.63.0 and move tests from configure
* meson: Pass -j option to sphinx
* drop support for Python 3.6
* fix check-python-tox
* fix "make clean" in the source directory

# -----BEGIN PGP SIGNATURE-----
#
# iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmRmDYQUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroOXSwf/WKmYPe09yHfxfVSFsSz83QpB3e+f
# KJx6FdyMMt26ZQJpcqorobrDV23R8FyxngXPkwoxqobAEtXB/AH0/S/u8RUZ46Qt
# IrF8FXr4ZdyLW7CW6nmIejmlul0iRmFD7D98E6dZ3QXfype3Ifra7gG74spZ1B44
# ZNvaomJKUK8Ga8rbChs9KtgrxlOC5q8IfTWF5ZExmZszPC9NRnZmU5Oncnuwek9T
# Ic6zDPoAeF3jDtovZhxg1HAB9e/ENZX/V9NjO92yZa8u/TITQ88l4tJctf7uiLxO
# 2oGY12ln8i//pbjyUe4iM+bNh5+reAChEI8iv7WxEsj9s2HBUJ68f3tpbQ==
# =Zg00
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 18 May 2023 04:35:32 AM PDT
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [undefined]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
#      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83

* tag 'for-upstream' of https://gitlab.com/bonzini/qemu: (68 commits)
  docs/devel: update build system docs
  configure: remove unnecessary check
  configure: reorder option parsing code
  configure: remove unnecessary mkdir
  configure: do not rerun the tests with -Werror
  configure: remove compiler sanity check
  build: move --disable-debug-info to meson
  build: move compiler version check to meson
  build: move remaining compiler flag tests to meson
  build: move warning flag selection to meson
  build: move stack protector flag selection to meson
  build: move coroutine backend selection to meson
  build: move SafeStack tests to meson
  build: move sanitizer tests to meson
  meson: prepare move of QEMU_CFLAGS to meson
  configure, meson: move --enable-modules to Meson
  configure: remove pkg-config functions
  build: move glib detection and workarounds to meson
  meson: drop unnecessary declare_dependency()
  meson: add more version numbers to the summary
  ...

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/266ccbb27b3e...f0b95ab6b819



reply via email to

[Prev in Thread] Current Thread [Next in Thread]