qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 190f3c: target/i386: add support for FLUSH_L1


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] 190f3c: target/i386: add support for FLUSH_L1D feature
Date: Wed, 17 May 2023 12:19:57 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 190f3cb7001c72b58ce77a26a97b7d95b029d2fe
      
https://github.com/qemu/qemu/commit/190f3cb7001c72b58ce77a26a97b7d95b029d2fe
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: c539b1a382a192d61bace1c556fffca0920a6c42
      
https://github.com/qemu/qemu/commit/c539b1a382a192d61bace1c556fffca0920a6c42
  Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 9e1080447b4e8170030dbe643a34f56db26eeaf5
      
https://github.com/qemu/qemu/commit/9e1080447b4e8170030dbe643a34f56db26eeaf5
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 846838ad97ffd4860d4a5b5c69d8cae57eccddb4
      
https://github.com/qemu/qemu/commit/846838ad97ffd4860d4a5b5c69d8cae57eccddb4
  Author: Xinyu Li <lixinyu20s@ict.ac.cn>
  Date:   2023-05-16 (Tue, 16 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: b41ed175be2c5c05988451442c09b15130d3f6ce
      
https://github.com/qemu/qemu/commit/b41ed175be2c5c05988451442c09b15130d3f6ce
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: e9e84fa2d72ed5f482d7bd80655c146fcd563b69
      
https://github.com/qemu/qemu/commit/e9e84fa2d72ed5f482d7bd80655c146fcd563b69
  Author: Ricky Zhou <ricky@rzhou.org>
  Date:   2023-05-16 (Tue, 16 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: 1c0bb354545bf7228efc6f3e9cd57c2958f037df
      
https://github.com/qemu/qemu/commit/1c0bb354545bf7228efc6f3e9cd57c2958f037df
  Author: Ricky Zhou <ricky@rzhou.org>
  Date:   2023-05-16 (Tue, 16 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: dcc131306917f459e049e04a418ec25c6aecf4a3
      
https://github.com/qemu/qemu/commit/dcc131306917f459e049e04a418ec25c6aecf4a3
  Author: Ricky Zhou <ricky@rzhou.org>
  Date:   2023-05-16 (Tue, 16 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: 4bcde8dcda556fb1c94643e012caec625f0da5a2
      
https://github.com/qemu/qemu/commit/4bcde8dcda556fb1c94643e012caec625f0da5a2
  Author: Fabiano Rosas <farosas@suse.de>
  Date:   2023-05-16 (Tue, 16 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: ac503e83272afe488ee7ec3abc9a5586e4392cd4
      
https://github.com/qemu/qemu/commit/ac503e83272afe488ee7ec3abc9a5586e4392cd4
  Author: Gavin Shan <gshan@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: b0511e08159fe0740cdbaae14c9b6cb93493f407
      
https://github.com/qemu/qemu/commit/b0511e08159fe0740cdbaae14c9b6cb93493f407
  Author: Gavin Shan <gshan@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 94257087f82e411b1e9938d4945d8800581b29ad
      
https://github.com/qemu/qemu/commit/94257087f82e411b1e9938d4945d8800581b29ad
  Author: Gavin Shan <gshan@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 522da6debcdeac36453a7d744eed3c361c37e109
      
https://github.com/qemu/qemu/commit/522da6debcdeac36453a7d744eed3c361c37e109
  Author: Gavin Shan <gshan@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 2888b8c418819cf3ed5665a84783a3a6fa1ceac7
      
https://github.com/qemu/qemu/commit/2888b8c418819cf3ed5665a84783a3a6fa1ceac7
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 2b649d5cb6d3dca832e6f4e906423827e5ddd47b
      
https://github.com/qemu/qemu/commit/2b649d5cb6d3dca832e6f4e906423827e5ddd47b
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: daafba20c2d79dadf91f374d02a1b02b9b9dc24d
      
https://github.com/qemu/qemu/commit/daafba20c2d79dadf91f374d02a1b02b9b9dc24d
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 231923d7af4cd25541bc5ee3c02e939276c08706
      
https://github.com/qemu/qemu/commit/231923d7af4cd25541bc5ee3c02e939276c08706
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2023-05-16 (Tue, 16 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: fb039e9349af93cd9e4c59b41ee2c5ad51709527
      
https://github.com/qemu/qemu/commit/fb039e9349af93cd9e4c59b41ee2c5ad51709527
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 38c5f82c9e09f4a01a5ea11ad0c14b4deb1a769a
      
https://github.com/qemu/qemu/commit/38c5f82c9e09f4a01a5ea11ad0c14b4deb1a769a
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 4265e70f6bebaa98cb7c8d60a5f7fe6cd1f6d6b4
      
https://github.com/qemu/qemu/commit/4265e70f6bebaa98cb7c8d60a5f7fe6cd1f6d6b4
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 47258f2f4749cb1fdb9d48f183bcb470787507f7
      
https://github.com/qemu/qemu/commit/47258f2f4749cb1fdb9d48f183bcb470787507f7
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: fbf26d0b7634930d50150081cc8999da00467213
      
https://github.com/qemu/qemu/commit/fbf26d0b7634930d50150081cc8999da00467213
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: eb44692366aaee0c7869d529dcfa0a4229817c73
      
https://github.com/qemu/qemu/commit/eb44692366aaee0c7869d529dcfa0a4229817c73
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 9b5a31e212792cb3168c7149fe6d7b80e5d5fa04
      
https://github.com/qemu/qemu/commit/9b5a31e212792cb3168c7149fe6d7b80e5d5fa04
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 65d50a0efb3b166e849423b7812ec5c880c3e812
      
https://github.com/qemu/qemu/commit/65d50a0efb3b166e849423b7812ec5c880c3e812
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 8616c068cb57ac16a76e5494f008ecde2957a2c2
      
https://github.com/qemu/qemu/commit/8616c068cb57ac16a76e5494f008ecde2957a2c2
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: f1b1892477ad1c78aaf47cf87a27f82377292a4f
      
https://github.com/qemu/qemu/commit/f1b1892477ad1c78aaf47cf87a27f82377292a4f
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: f0c6e22edf378b0d70958b7f093732b5f06125a5
      
https://github.com/qemu/qemu/commit/f0c6e22edf378b0d70958b7f093732b5f06125a5
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 47953b92064c0b43c0078747651b14b32014b472
      
https://github.com/qemu/qemu/commit/47953b92064c0b43c0078747651b14b32014b472
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: a1225096702e8698af08610407b9071b280bc400
      
https://github.com/qemu/qemu/commit/a1225096702e8698af08610407b9071b280bc400
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 51e6fc4bc11aff53e8f85024707f58a692e4864e
      
https://github.com/qemu/qemu/commit/51e6fc4bc11aff53e8f85024707f58a692e4864e
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 288ea03aab5bb1792b83ab0b6b5d8cae06a7c4da
      
https://github.com/qemu/qemu/commit/288ea03aab5bb1792b83ab0b6b5d8cae06a7c4da
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 46cf5ee6727fcd97acd73da9125d6466739b3b24
      
https://github.com/qemu/qemu/commit/46cf5ee6727fcd97acd73da9125d6466739b3b24
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 4f280bc1d8aaefaea5ab0710e8fe07dd068542a0
      
https://github.com/qemu/qemu/commit/4f280bc1d8aaefaea5ab0710e8fe07dd068542a0
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 8a13ab83d416b4804c2108ce0bdd196da7a27cf2
      
https://github.com/qemu/qemu/commit/8a13ab83d416b4804c2108ce0bdd196da7a27cf2
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: a199f76237c1c6a3810a40514cc911290c141eb3
      
https://github.com/qemu/qemu/commit/a199f76237c1c6a3810a40514cc911290c141eb3
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: 7729b3f6a51d86acd78f5f20247b70bdac907dca
      
https://github.com/qemu/qemu/commit/7729b3f6a51d86acd78f5f20247b70bdac907dca
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: ce88790103f7925024204995531369c1f1afcd52
      
https://github.com/qemu/qemu/commit/ce88790103f7925024204995531369c1f1afcd52
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-16 (Tue, 16 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: dfe5b11e258524be54f98ae6257e908dc54552af
      
https://github.com/qemu/qemu/commit/dfe5b11e258524be54f98ae6257e908dc54552af
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 0511a2a199a0a51270e6e951ed2da06be7fe2966
      
https://github.com/qemu/qemu/commit/0511a2a199a0a51270e6e951ed2da06be7fe2966
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: e7127eb1d39ffd64e04c89dd243e647e062cf04b
      
https://github.com/qemu/qemu/commit/e7127eb1d39ffd64e04c89dd243e647e062cf04b
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: b6e61652bb152a67c480dbf79a69c320462b279e
      
https://github.com/qemu/qemu/commit/b6e61652bb152a67c480dbf79a69c320462b279e
  Author: John Snow <jsnow@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 012b598cfd31d89926e1a71c23bff32c5ed5b3b6
      
https://github.com/qemu/qemu/commit/012b598cfd31d89926e1a71c23bff32c5ed5b3b6
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 7b2190498d8991e89d6bf0e2c51c4a065af93ce9
      
https://github.com/qemu/qemu/commit/7b2190498d8991e89d6bf0e2c51c4a065af93ce9
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 72147d5b4b5b5966ae8195cd1ab5b40fc54633fd
      
https://github.com/qemu/qemu/commit/72147d5b4b5b5966ae8195cd1ab5b40fc54633fd
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 276358ef7930ed10884b3a0c2c3c4e977e836d43
      
https://github.com/qemu/qemu/commit/276358ef7930ed10884b3a0c2c3c4e977e836d43
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 6be1da609be80b951c31c402a2afecb50273e5b4
      
https://github.com/qemu/qemu/commit/6be1da609be80b951c31c402a2afecb50273e5b4
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: eba9db4e5067a7caef40bf35c56edc09244d3312
      
https://github.com/qemu/qemu/commit/eba9db4e5067a7caef40bf35c56edc09244d3312
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 752cc71a2d3d939fd218dbc967b7d0550178f4b9
      
https://github.com/qemu/qemu/commit/752cc71a2d3d939fd218dbc967b7d0550178f4b9
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: c20ded617452a8ea3452ff02ab8b030492880c37
      
https://github.com/qemu/qemu/commit/c20ded617452a8ea3452ff02ab8b030492880c37
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 9a70c2a772dcb43b0851a4906b43f54db820c602
      
https://github.com/qemu/qemu/commit/9a70c2a772dcb43b0851a4906b43f54db820c602
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 9f2342618c042f58728d64abdb8ea77b06809b30
      
https://github.com/qemu/qemu/commit/9f2342618c042f58728d64abdb8ea77b06809b30
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 6b9d52ad200a31888910347f46f85d5b2a0fd53f
      
https://github.com/qemu/qemu/commit/6b9d52ad200a31888910347f46f85d5b2a0fd53f
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 32baf9d9c6ca6674fa327ad2d3238c8c2274fc87
      
https://github.com/qemu/qemu/commit/32baf9d9c6ca6674fa327ad2d3238c8c2274fc87
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: a9907551758d7f77e78c3b175219214eeb904f1e
      
https://github.com/qemu/qemu/commit/a9907551758d7f77e78c3b175219214eeb904f1e
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: a4ebbf23e9eaaf123ff6b713920c1caf3930db9d
      
https://github.com/qemu/qemu/commit/a4ebbf23e9eaaf123ff6b713920c1caf3930db9d
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 3e8020cdd1791cb470b0e2bd9c3fb7562328b0a5
      
https://github.com/qemu/qemu/commit/3e8020cdd1791cb470b0e2bd9c3fb7562328b0a5
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 976a5de07668152184030b5eb109b6e43f72ec56
      
https://github.com/qemu/qemu/commit/976a5de07668152184030b5eb109b6e43f72ec56
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: a71003eb1098e5bd05191437302fc1ad4f3ea1ee
      
https://github.com/qemu/qemu/commit/a71003eb1098e5bd05191437302fc1ad4f3ea1ee
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 374e5c33da3a8f25591a3f26e58d52f23c70de5e
      
https://github.com/qemu/qemu/commit/374e5c33da3a8f25591a3f26e58d52f23c70de5e
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 4a45b354b8ef2d86df3c43c443f8e1f18b3a0b04
      
https://github.com/qemu/qemu/commit/4a45b354b8ef2d86df3c43c443f8e1f18b3a0b04
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: e8e8688f4e325b8be4cccf5617a9a6a46cb7a054
      
https://github.com/qemu/qemu/commit/e8e8688f4e325b8be4cccf5617a9a6a46cb7a054
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 438742b3ee97fc6c30c589bc22954b294cabc06d
      
https://github.com/qemu/qemu/commit/438742b3ee97fc6c30c589bc22954b294cabc06d
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 6da4bbf0f27daf3db686d48d00e776ab228b1d24
      
https://github.com/qemu/qemu/commit/6da4bbf0f27daf3db686d48d00e776ab228b1d24
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 4624a454e1649c45f01da4e9385f9fd0dcdb8fcb
      
https://github.com/qemu/qemu/commit/4624a454e1649c45f01da4e9385f9fd0dcdb8fcb
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 8bfa075422825f29d37a84dd1ae6db1006311e23
      
https://github.com/qemu/qemu/commit/8bfa075422825f29d37a84dd1ae6db1006311e23
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 06243f229c9e7555654c2a232b57edffa8aedbcc
      
https://github.com/qemu/qemu/commit/06243f229c9e7555654c2a232b57edffa8aedbcc
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: b98d6272e33a2ca8bab4c8087e8809e98400d2c5
      
https://github.com/qemu/qemu/commit/b98d6272e33a2ca8bab4c8087e8809e98400d2c5
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2023-05-17 (Wed, 17 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: 76ec63282cbf2b74343c9f613fd0ca10225636cd
      
https://github.com/qemu/qemu/commit/76ec63282cbf2b74343c9f613fd0ca10225636cd
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-05-17 (Wed, 17 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/vSX3jHroMFAmRk7qwUHHBib256aW5p
# QHJlZGhhdC5jb20ACgkQv/vSX3jHroPHOggAhDX4KSbXILCGiPlJLQHtLWQfHQpl
# bfpDz2ReHyCEPUoUL3ZZqqftEw3EalJllTtv//ooSYvjQZVg4UaJRBNPRAbcOXqw
# lSdJZJigP+OU4/E8kX1e/cIcJaaEI28gLR/+ArPGOZrmajxdy6wLg8PghZSP/2x7
# 28a5hrkHQoXmpdYESluiE47MvRuiuaolHQ1IHI07iOwM6v63nI6+qcnHsjVVtec2
# iNXmQwFliuw7lIM4Rtd+R8an7hLcCfA4EoWEMkjzLVdPaQaEGsYnTHmaVNGgPJc3
# xKkNjZiTu4YBpWbu5jgvCjux/WLN04CXakKxImqjg50DeldRYEl3TcCiDw==
# =K1DA
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed 17 May 2023 08:11:40 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/ce7edeae274a...76ec63282cbf



reply via email to

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