mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge tag 'v7.2.0' into sync/qemu-7.2.0
v7.2.0 release
This commit is contained in:
@@ -46,7 +46,6 @@ grep_include() {
|
||||
}
|
||||
|
||||
echo Found $(find . -name "*.d" | wc -l) object files
|
||||
echo $(grep_include -F 'include/qemu-common.h') files include qemu-common.h
|
||||
echo $(grep_include -F 'hw/hw.h') files include hw/hw.h
|
||||
echo $(grep_include 'target/[a-z0-9]*/cpu\.h') files include cpu.h
|
||||
echo $(grep_include -F 'qapi-types.h') files include qapi-types.h
|
||||
@@ -86,9 +85,6 @@ analyze() {
|
||||
echo osdep.h:
|
||||
analyze ../include/qemu/osdep.h
|
||||
|
||||
echo qemu-common.h:
|
||||
analyze -include ../include/qemu/osdep.h ../include/qemu-common.h
|
||||
|
||||
echo hw/hw.h:
|
||||
analyze -include ../include/qemu/osdep.h ../include/hw/hw.h
|
||||
|
||||
|
||||
@@ -588,7 +588,7 @@ if args.extract:
|
||||
|
||||
dump.read(desc_only = True)
|
||||
print("desc.json")
|
||||
f = open("desc.json", "wb")
|
||||
f = open("desc.json", "w")
|
||||
f.truncate()
|
||||
f.write(jsonenc.encode(dump.vmsd_desc))
|
||||
f.close()
|
||||
@@ -596,7 +596,7 @@ if args.extract:
|
||||
dump.read(write_memory = True)
|
||||
dict = dump.getDict()
|
||||
print("state.json")
|
||||
f = open("state.json", "wb")
|
||||
f = open("state.json", "w")
|
||||
f.truncate()
|
||||
f.write(jsonenc.encode(dict))
|
||||
f.close()
|
||||
@@ -610,4 +610,4 @@ elif args.dump == "desc":
|
||||
dump.read(desc_only = True)
|
||||
print(jsonenc.encode(dump.vmsd_desc))
|
||||
else:
|
||||
raise Exception("Please specify either -x, -d state or -d dump")
|
||||
raise Exception("Please specify either -x, -d state or -d desc")
|
||||
|
||||
@@ -26,7 +26,7 @@ sub_file="${sub_tdir}/submodule.tar"
|
||||
# independent of what the developer currently has initialized
|
||||
# in their checkout, because the build environment is completely
|
||||
# different to the host OS.
|
||||
submodules="dtc slirp meson ui/keycodemapdb"
|
||||
submodules="dtc meson ui/keycodemapdb"
|
||||
submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3"
|
||||
submodules="$submodules ui/thirdparty/imgui ui/thirdparty/implot util/xxHash tomlplusplus genconfig" # xemu extras
|
||||
submodules="$submodules hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu"
|
||||
|
||||
@@ -100,12 +100,20 @@ def snake_to_camel(func_name: str) -> str:
|
||||
def gen_wrapper(func: FuncDecl) -> str:
|
||||
assert not '_co_' in func.name
|
||||
assert func.return_type == 'int'
|
||||
assert func.args[0].type in ['BlockDriverState *', 'BdrvChild *']
|
||||
assert func.args[0].type in ['BlockDriverState *', 'BdrvChild *',
|
||||
'BlockBackend *']
|
||||
|
||||
subsystem, subname = func.name.split('_', 1)
|
||||
|
||||
name = f'{subsystem}_co_{subname}'
|
||||
bs = 'bs' if func.args[0].type == 'BlockDriverState *' else 'child->bs'
|
||||
|
||||
t = func.args[0].type
|
||||
if t == 'BlockDriverState *':
|
||||
bs = 'bs'
|
||||
elif t == 'BdrvChild *':
|
||||
bs = 'child->bs'
|
||||
else:
|
||||
bs = 'blk_bs(blk)'
|
||||
struct_name = snake_to_camel(name)
|
||||
|
||||
return f"""\
|
||||
|
||||
+19
-11
@@ -223,11 +223,11 @@ our $Sparse = qr{
|
||||
our $Attribute = qr{
|
||||
const|
|
||||
volatile|
|
||||
QEMU_NORETURN|
|
||||
QEMU_WARN_UNUSED_RESULT|
|
||||
QEMU_SENTINEL|
|
||||
G_NORETURN|
|
||||
G_GNUC_WARN_UNUSED_RESULT|
|
||||
G_GNUC_NULL_TERMINATED|
|
||||
QEMU_PACKED|
|
||||
GCC_FMT_ATTR
|
||||
G_GNUC_PRINTF
|
||||
}x;
|
||||
our $Modifier;
|
||||
our $Inline = qr{inline};
|
||||
@@ -307,7 +307,6 @@ our @typeList = (
|
||||
qr{target_(?:u)?long},
|
||||
qr{hwaddr},
|
||||
# external libraries
|
||||
qr{xml${Ident}},
|
||||
qr{xen\w+_handle},
|
||||
# Glib definitions
|
||||
qr{gchar},
|
||||
@@ -1668,6 +1667,7 @@ sub process {
|
||||
# some scripts we imported from other projects.
|
||||
next if ($realfile =~ /\.(s|S)$/);
|
||||
next if ($realfile =~ /(checkpatch|get_maintainer)\.pl$/);
|
||||
next if ($realfile =~ /^target\/hexagon\/imported\/*/);
|
||||
|
||||
if ($rawline =~ /^\+.*\t/) {
|
||||
my $herevet = "$here\n" . cat_vet($rawline) . "\n";
|
||||
@@ -1681,8 +1681,10 @@ sub process {
|
||||
# Block comment styles
|
||||
|
||||
# Block comments use /* on a line of its own
|
||||
if ($rawline !~ m@^\+.*/\*.*\*/[ \t)}]*$@ && #inline /*...*/
|
||||
$rawline =~ m@^\+.*/\*\*?+[ \t]*[^ \t]@) { # /* or /** non-blank
|
||||
my $commentline = $rawline;
|
||||
while ($commentline =~ s@^(\+.*)/\*.*\*/@$1@o) { # remove inline /*...*/
|
||||
}
|
||||
if ($commentline =~ m@^\+.*/\*\*?+[ \t]*[^ \t]@) { # /* or /** non-blank
|
||||
WARN("Block comments use a leading /* on a separate line\n" . $herecurr);
|
||||
}
|
||||
|
||||
@@ -2832,8 +2834,8 @@ sub process {
|
||||
}
|
||||
|
||||
# check for pointless casting of g_malloc return
|
||||
if ($line =~ /\*\s*\)\s*g_(try)?(m|re)alloc(0?)(_n)?\b/) {
|
||||
if ($2 == 'm') {
|
||||
if ($line =~ /\*\s*\)\s*g_(try|)(m|re)alloc(0?)(_n)?\b/) {
|
||||
if ($2 eq 'm') {
|
||||
ERROR("unnecessary cast may hide bugs, use g_$1new$3 instead\n" . $herecurr);
|
||||
} else {
|
||||
ERROR("unnecessary cast may hide bugs, use g_$1renew$3 instead\n" . $herecurr);
|
||||
@@ -2850,6 +2852,11 @@ sub process {
|
||||
WARN("consider using g_path_get_$1() in preference to g_strdup($1())\n" . $herecurr);
|
||||
}
|
||||
|
||||
# enforce g_memdup2() over g_memdup()
|
||||
if ($line =~ /\bg_memdup\s*\(/) {
|
||||
ERROR("use g_memdup2() instead of unsafe g_memdup()\n" . $herecurr);
|
||||
}
|
||||
|
||||
# recommend qemu_strto* over strto* for numeric conversions
|
||||
if ($line =~ /\b(strto[^kd].*?)\s*\(/) {
|
||||
ERROR("consider using qemu_$1 in preference to $1\n" . $herecurr);
|
||||
@@ -2878,6 +2885,7 @@ sub process {
|
||||
SCSIBusInfo|
|
||||
SCSIReqOps|
|
||||
Spice[A-Z][a-zA-Z0-9]*Interface|
|
||||
TypeInfo|
|
||||
USBDesc[A-Z][a-zA-Z0-9]*|
|
||||
VhostOps|
|
||||
VMStateDescription|
|
||||
@@ -2969,10 +2977,10 @@ sub process {
|
||||
ERROR("use memset() instead of bzero()\n" . $herecurr);
|
||||
}
|
||||
if ($line =~ /\bgetpagesize\(\)/) {
|
||||
ERROR("use qemu_real_host_page_size instead of getpagesize()\n" . $herecurr);
|
||||
ERROR("use qemu_real_host_page_size() instead of getpagesize()\n" . $herecurr);
|
||||
}
|
||||
if ($line =~ /\bsysconf\(_SC_PAGESIZE\)/) {
|
||||
ERROR("use qemu_real_host_page_size instead of sysconf(_SC_PAGESIZE)\n" . $herecurr);
|
||||
ERROR("use qemu_real_host_page_size() instead of sysconf(_SC_PAGESIZE)\n" . $herecurr);
|
||||
}
|
||||
my $non_exit_glib_asserts = qr{g_assert_cmpstr|
|
||||
g_assert_cmpint|
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
- name: Installation of extra packages to build QEMU
|
||||
hosts: all
|
||||
tasks:
|
||||
- name: Extra check for CentOS Stream 8
|
||||
lineinfile:
|
||||
path: /etc/redhat-release
|
||||
line: CentOS Stream release 8
|
||||
state: present
|
||||
check_mode: yes
|
||||
register: centos_stream_8
|
||||
|
||||
- name: Enable PowerTools repo on CentOS Stream 8
|
||||
ini_file:
|
||||
path: /etc/yum.repos.d/CentOS-Stream-PowerTools.repo
|
||||
section: powertools
|
||||
option: enabled
|
||||
value: "1"
|
||||
when:
|
||||
- ansible_facts['distribution'] == 'CentOS'
|
||||
- ansible_facts['distribution_major_version'] == '8'
|
||||
- centos_stream_8
|
||||
|
||||
- name: Install basic packages to build QEMU on CentOS Stream 8
|
||||
dnf:
|
||||
name:
|
||||
- device-mapper-multipath-devel
|
||||
- glusterfs-api-devel
|
||||
- gnutls-devel
|
||||
- libcap-ng-devel
|
||||
- libcurl-devel
|
||||
- libfdt-devel
|
||||
- libiscsi-devel
|
||||
- libpmem-devel
|
||||
- librados-devel
|
||||
- librbd-devel
|
||||
- libseccomp-devel
|
||||
- libssh-devel
|
||||
- libxkbcommon-devel
|
||||
- ninja-build
|
||||
- numactl-devel
|
||||
- python3-sphinx
|
||||
- redhat-rpm-config
|
||||
- snappy-devel
|
||||
- spice-server-devel
|
||||
- systemd-devel
|
||||
state: present
|
||||
when:
|
||||
- ansible_facts['distribution'] == 'CentOS'
|
||||
- ansible_facts['distribution_major_version'] == '8'
|
||||
- centos_stream_8
|
||||
+203
@@ -0,0 +1,203 @@
|
||||
#!/bin/sh -e
|
||||
#
|
||||
# Configuration for QEMU based on CentOS Stream 8 x86_64 builds
|
||||
#
|
||||
# The "configure" command line is based on:
|
||||
#
|
||||
# https://git.centos.org/rpms/qemu-kvm/blob/c8s-stream-rhel/f/SPECS/qemu-kvm.spec
|
||||
#
|
||||
# But, because the SPEC file contains a number of conditionals and
|
||||
# variable and expansions only available at RPM build time, this version
|
||||
# was initially generated from an actual RPM build on an x86_64 platform.
|
||||
#
|
||||
# From that initial version, options that are required or are a
|
||||
# consequence of non-upstream patches have been adapted. One example
|
||||
# is "--without-default-devices" which is *not* present here, given
|
||||
# that patches adding downstream specific devices are not available.
|
||||
#
|
||||
../configure \
|
||||
--prefix="/usr" \
|
||||
--libdir="/usr/lib64" \
|
||||
--datadir="/usr/share" \
|
||||
--sysconfdir="/etc" \
|
||||
--interp-prefix=/usr/qemu-%M \
|
||||
--localstatedir="/var" \
|
||||
--docdir="/usr/share/doc" \
|
||||
--libexecdir="/usr/libexec" \
|
||||
--extra-ldflags="-Wl,--build-id -Wl,-z,relro -Wl,-z,now" \
|
||||
--extra-cflags="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection" \
|
||||
--with-suffix="qemu-kvm" \
|
||||
--firmwarepath=/usr/share/qemu-firmware \
|
||||
--with-git=meson \
|
||||
--with-git-submodules=update \
|
||||
--target-list="x86_64-softmmu" \
|
||||
--block-drv-rw-whitelist="qcow2,raw,file,host_device,nbd,iscsi,rbd,blkdebug,luks,null-co,nvme,copy-on-read,throttle,gluster" \
|
||||
--audio-drv-list="" \
|
||||
--block-drv-ro-whitelist="vmdk,vhdx,vpc,https,ssh" \
|
||||
--with-coroutine=ucontext \
|
||||
--with-git=git \
|
||||
--tls-priority=@QEMU,SYSTEM \
|
||||
--disable-attr \
|
||||
--disable-auth-pam \
|
||||
--disable-avx2 \
|
||||
--disable-avx512f \
|
||||
--disable-bochs \
|
||||
--disable-bpf \
|
||||
--disable-brlapi \
|
||||
--disable-bsd-user \
|
||||
--disable-bzip2 \
|
||||
--disable-cap-ng \
|
||||
--disable-capstone \
|
||||
--disable-cfi \
|
||||
--disable-cfi-debug \
|
||||
--disable-cloop \
|
||||
--disable-cocoa \
|
||||
--disable-coroutine-pool \
|
||||
--disable-crypto-afalg \
|
||||
--disable-curl \
|
||||
--disable-curses \
|
||||
--disable-debug-info \
|
||||
--disable-debug-mutex \
|
||||
--disable-debug-tcg \
|
||||
--disable-dmg \
|
||||
--disable-docs \
|
||||
--disable-fuse \
|
||||
--disable-fuse-lseek \
|
||||
--disable-gcrypt \
|
||||
--disable-gio \
|
||||
--disable-glusterfs \
|
||||
--disable-gnutls \
|
||||
--disable-gtk \
|
||||
--disable-guest-agent \
|
||||
--disable-guest-agent-msi \
|
||||
--disable-hax \
|
||||
--disable-hvf \
|
||||
--disable-iconv \
|
||||
--disable-kvm \
|
||||
--disable-libdaxctl \
|
||||
--disable-libiscsi \
|
||||
--disable-libnfs \
|
||||
--disable-libpmem \
|
||||
--disable-libssh \
|
||||
--disable-libudev \
|
||||
--disable-libusb \
|
||||
--disable-linux-aio \
|
||||
--disable-linux-io-uring \
|
||||
--disable-linux-user \
|
||||
--disable-live-block-migration \
|
||||
--disable-lto \
|
||||
--disable-lzfse \
|
||||
--disable-lzo \
|
||||
--disable-malloc-trim \
|
||||
--disable-membarrier \
|
||||
--disable-modules \
|
||||
--disable-module-upgrades \
|
||||
--disable-mpath \
|
||||
--disable-multiprocess \
|
||||
--disable-netmap \
|
||||
--disable-nettle \
|
||||
--disable-numa \
|
||||
--disable-nvmm \
|
||||
--disable-opengl \
|
||||
--disable-parallels \
|
||||
--disable-pie \
|
||||
--disable-pvrdma \
|
||||
--disable-qcow1 \
|
||||
--disable-qed \
|
||||
--disable-qom-cast-debug \
|
||||
--disable-rbd \
|
||||
--disable-rdma \
|
||||
--disable-replication \
|
||||
--disable-rng-none \
|
||||
--disable-safe-stack \
|
||||
--disable-sanitizers \
|
||||
--disable-sdl \
|
||||
--disable-sdl-image \
|
||||
--disable-seccomp \
|
||||
--disable-slirp-smbd \
|
||||
--disable-smartcard \
|
||||
--disable-snappy \
|
||||
--disable-sparse \
|
||||
--disable-spice \
|
||||
--disable-strip \
|
||||
--disable-system \
|
||||
--disable-tcg \
|
||||
--disable-tools \
|
||||
--disable-tpm \
|
||||
--disable-u2f \
|
||||
--disable-usb-redir \
|
||||
--disable-user \
|
||||
--disable-vde \
|
||||
--disable-vdi \
|
||||
--disable-vhost-crypto \
|
||||
--disable-vhost-kernel \
|
||||
--disable-vhost-net \
|
||||
--disable-vhost-user \
|
||||
--disable-vhost-user-blk-server \
|
||||
--disable-vhost-vdpa \
|
||||
--disable-virglrenderer \
|
||||
--disable-virtfs \
|
||||
--disable-virtiofsd \
|
||||
--disable-vnc \
|
||||
--disable-vnc-jpeg \
|
||||
--disable-png \
|
||||
--disable-vnc-sasl \
|
||||
--disable-vte \
|
||||
--disable-vvfat \
|
||||
--disable-werror \
|
||||
--disable-whpx \
|
||||
--disable-xen \
|
||||
--disable-xen-pci-passthrough \
|
||||
--disable-xkbcommon \
|
||||
--disable-zstd \
|
||||
--enable-attr \
|
||||
--enable-avx2 \
|
||||
--enable-cap-ng \
|
||||
--enable-capstone \
|
||||
--enable-coroutine-pool \
|
||||
--enable-curl \
|
||||
--enable-debug-info \
|
||||
--enable-docs \
|
||||
--enable-fdt \
|
||||
--enable-gcrypt \
|
||||
--enable-glusterfs \
|
||||
--enable-gnutls \
|
||||
--enable-guest-agent \
|
||||
--enable-iconv \
|
||||
--enable-kvm \
|
||||
--enable-libiscsi \
|
||||
--enable-libpmem \
|
||||
--enable-libssh \
|
||||
--enable-libusb \
|
||||
--enable-libudev \
|
||||
--enable-linux-aio \
|
||||
--enable-lzo \
|
||||
--enable-malloc-trim \
|
||||
--enable-modules \
|
||||
--enable-mpath \
|
||||
--enable-numa \
|
||||
--enable-opengl \
|
||||
--enable-pie \
|
||||
--enable-rbd \
|
||||
--enable-rdma \
|
||||
--enable-seccomp \
|
||||
--enable-snappy \
|
||||
--enable-smartcard \
|
||||
--enable-spice \
|
||||
--enable-system \
|
||||
--enable-tcg \
|
||||
--enable-tools \
|
||||
--enable-tpm \
|
||||
--enable-trace-backend=dtrace \
|
||||
--enable-usb-redir \
|
||||
--enable-virtiofsd \
|
||||
--enable-vhost-kernel \
|
||||
--enable-vhost-net \
|
||||
--enable-vhost-user \
|
||||
--enable-vhost-user-blk-server \
|
||||
--enable-vhost-vdpa \
|
||||
--enable-vnc \
|
||||
--enable-png \
|
||||
--enable-vnc-sasl \
|
||||
--enable-werror \
|
||||
--enable-xkbcommon
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
#!/bin/sh -e
|
||||
#
|
||||
# Runs a previously vetted list of tests, either marked explicitly for
|
||||
# KVM and x86_64, or tests that are generic enough to be valid for all
|
||||
# targets. Such a test list can be generated with:
|
||||
#
|
||||
# ./tests/venv/bin/avocado list --filter-by-tags-include-empty \
|
||||
# --filter-by-tags-include-empty-key -t accel:kvm,arch:x86_64 \
|
||||
# tests/avocado/
|
||||
#
|
||||
# This is almost the complete list of avocado based tests available at
|
||||
# the time this was compile, with the following exceptions:
|
||||
#
|
||||
# * Require machine type "x-remote":
|
||||
# - tests/avocado/multiprocess.py:Multiprocess.test_multiprocess_x86_64
|
||||
#
|
||||
# * Needs superuser privileges:
|
||||
# - tests/avocado/virtiofs_submounts.py:VirtiofsSubmountsTest.test_pre_virtiofsd_set_up
|
||||
# - tests/avocado/virtiofs_submounts.py:VirtiofsSubmountsTest.test_pre_launch_set_up
|
||||
# - tests/avocado/virtiofs_submounts.py:VirtiofsSubmountsTest.test_post_launch_set_up
|
||||
# - tests/avocado/virtiofs_submounts.py:VirtiofsSubmountsTest.test_post_mount_set_up
|
||||
# - tests/avocado/virtiofs_submounts.py:VirtiofsSubmountsTest.test_two_runs
|
||||
#
|
||||
# * Requires display type "egl-headless":
|
||||
# - tests/avocado/virtio-gpu.py:VirtioGPUx86.test_virtio_vga_virgl
|
||||
# - tests/avocado/virtio-gpu.py:VirtioGPUx86.test_vhost_user_vga_virgl
|
||||
#
|
||||
# * Test is marked (unconditionally) to be skipped:
|
||||
# - tests/avocado/virtio_check_params.py:VirtioMaxSegSettingsCheck.test_machine_types
|
||||
#
|
||||
make get-vm-images
|
||||
./tests/venv/bin/avocado run \
|
||||
--job-results-dir=tests/results/ \
|
||||
tests/avocado/boot_linux.py:BootLinuxX8664.test_pc_i440fx_kvm \
|
||||
tests/avocado/boot_linux.py:BootLinuxX8664.test_pc_q35_kvm \
|
||||
tests/avocado/boot_linux_console.py:BootLinuxConsole.test_x86_64_pc \
|
||||
tests/avocado/cpu_queries.py:QueryCPUModelExpansion.test \
|
||||
tests/avocado/empty_cpu_model.py:EmptyCPUModel.test \
|
||||
tests/avocado/hotplug_cpu.py:HotPlugCPU.test \
|
||||
tests/avocado/info_usernet.py:InfoUsernet.test_hostfwd \
|
||||
tests/avocado/intel_iommu.py:IntelIOMMU.test_intel_iommu \
|
||||
tests/avocado/intel_iommu.py:IntelIOMMU.test_intel_iommu_pt \
|
||||
tests/avocado/intel_iommu.py:IntelIOMMU.test_intel_iommu_strict \
|
||||
tests/avocado/intel_iommu.py:IntelIOMMU.test_intel_iommu_strict_cm \
|
||||
tests/avocado/linux_initrd.py:LinuxInitrd.test_with_2gib_file_should_exit_error_msg_with_linux_v3_6 \
|
||||
tests/avocado/linux_initrd.py:LinuxInitrd.test_with_2gib_file_should_work_with_linux_v4_16 \
|
||||
tests/avocado/migration.py:Migration.test_migration_with_exec \
|
||||
tests/avocado/migration.py:Migration.test_migration_with_tcp_localhost \
|
||||
tests/avocado/migration.py:Migration.test_migration_with_unix \
|
||||
tests/avocado/pc_cpu_hotplug_props.py:OmittedCPUProps.test_no_die_id \
|
||||
tests/avocado/replay_kernel.py:ReplayKernelNormal.test_x86_64_pc \
|
||||
tests/avocado/reverse_debugging.py:ReverseDebugging_X86_64.test_x86_64_pc \
|
||||
tests/avocado/version.py:Version.test_qmp_human_info_version \
|
||||
tests/avocado/virtio_version.py:VirtioVersionCheck.test_conventional_devs \
|
||||
tests/avocado/virtio_version.py:VirtioVersionCheck.test_modern_only_devs \
|
||||
tests/avocado/vnc.py:Vnc.test_change_password \
|
||||
tests/avocado/vnc.py:Vnc.test_change_password_requires_a_password \
|
||||
tests/avocado/vnc.py:Vnc.test_no_vnc \
|
||||
tests/avocado/vnc.py:Vnc.test_no_vnc_change_password \
|
||||
tests/avocado/x86_cpu_model_versions.py:CascadelakeArchCapabilities.test_4_0 \
|
||||
tests/avocado/x86_cpu_model_versions.py:CascadelakeArchCapabilities.test_4_1 \
|
||||
tests/avocado/x86_cpu_model_versions.py:CascadelakeArchCapabilities.test_set_4_0 \
|
||||
tests/avocado/x86_cpu_model_versions.py:CascadelakeArchCapabilities.test_unset_4_1 \
|
||||
tests/avocado/x86_cpu_model_versions.py:CascadelakeArchCapabilities.test_v1_4_0 \
|
||||
tests/avocado/x86_cpu_model_versions.py:CascadelakeArchCapabilities.test_v1_set_4_0 \
|
||||
tests/avocado/x86_cpu_model_versions.py:CascadelakeArchCapabilities.test_v2_4_0 \
|
||||
tests/avocado/x86_cpu_model_versions.py:CascadelakeArchCapabilities.test_v2_unset_4_1 \
|
||||
tests/avocado/x86_cpu_model_versions.py:X86CPUModelAliases.test_4_0_alias_compatibility \
|
||||
tests/avocado/x86_cpu_model_versions.py:X86CPUModelAliases.test_4_1_alias \
|
||||
tests/avocado/x86_cpu_model_versions.py:X86CPUModelAliases.test_none_alias
|
||||
@@ -0,0 +1,17 @@
|
||||
This directory contains scripts for generating a build of QEMU that
|
||||
closely matches the CentOS Stream[1] builds of the qemu-kvm package.
|
||||
|
||||
To have the environment ready to configure, build QEMU and run tests,
|
||||
please start with a CentOS Stream machine and:
|
||||
|
||||
* apply the generic "build-environment.yml" playbook located at
|
||||
scripts/ci/setup
|
||||
|
||||
* apply the "build-environment.yml" in the directory following the
|
||||
CentOS Stream version (such as "8").
|
||||
|
||||
This currently only covers CentOS Stream 8 environments and
|
||||
packages[2].
|
||||
|
||||
[1] https://www.centos.org/centos-stream/
|
||||
[2] https://git.centos.org/rpms/qemu-kvm/commits/c8s-stream-rhel
|
||||
@@ -19,6 +19,13 @@
|
||||
- '((ansible_version.major == 2) and (ansible_version.minor >= 8)) or (ansible_version.major >= 3)'
|
||||
msg: "Unsuitable ansible version, please use version 2.8.0 or later"
|
||||
|
||||
- name: Add armhf foreign architecture to aarch64 hosts
|
||||
command: dpkg --add-architecture armhf
|
||||
when:
|
||||
- ansible_facts['distribution'] == 'Ubuntu'
|
||||
- ansible_facts['architecture'] == 'aarch64'
|
||||
- ansible_facts['distribution_version'] == '20.04'
|
||||
|
||||
- name: Update apt cache / upgrade packages via apt
|
||||
apt:
|
||||
update_cache: yes
|
||||
@@ -26,10 +33,9 @@
|
||||
when:
|
||||
- ansible_facts['distribution'] == 'Ubuntu'
|
||||
|
||||
- name: Install basic packages to build QEMU on Ubuntu 18.04/20.04
|
||||
- name: Install basic packages to build QEMU on Ubuntu 20.04
|
||||
package:
|
||||
name:
|
||||
# Originally from tests/docker/dockerfiles/ubuntu1804.docker
|
||||
- ccache
|
||||
- gcc
|
||||
- gettext
|
||||
@@ -83,7 +89,7 @@
|
||||
when:
|
||||
- ansible_facts['distribution'] == 'Ubuntu'
|
||||
|
||||
- name: Install packages to build QEMU on Ubuntu 18.04/20.04 on non-s390x
|
||||
- name: Install packages to build QEMU on Ubuntu 20.04 on non-s390x
|
||||
package:
|
||||
name:
|
||||
- libspice-server-dev
|
||||
@@ -91,16 +97,7 @@
|
||||
state: present
|
||||
when:
|
||||
- ansible_facts['distribution'] == 'Ubuntu'
|
||||
- ansible_facts['architecture'] != 's390x'
|
||||
|
||||
- name: Install basic packages to build QEMU on Ubuntu 18.04
|
||||
package:
|
||||
name:
|
||||
# Originally from tests/docker/dockerfiles/ubuntu1804.docker
|
||||
- clang
|
||||
when:
|
||||
- ansible_facts['distribution'] == 'Ubuntu'
|
||||
- ansible_facts['distribution_version'] == '18.04'
|
||||
- ansible_facts['architecture'] == 'aarch64' or ansible_facts['architecture'] == 'x86_64'
|
||||
|
||||
- name: Install basic packages to build QEMU on Ubuntu 20.04
|
||||
package:
|
||||
@@ -114,3 +111,70 @@
|
||||
when:
|
||||
- ansible_facts['distribution'] == 'Ubuntu'
|
||||
- ansible_facts['distribution_version'] == '20.04'
|
||||
|
||||
- name: Install armhf cross-compile packages to build QEMU on AArch64 Ubuntu 20.04
|
||||
package:
|
||||
name:
|
||||
- binutils-arm-linux-gnueabihf
|
||||
- gcc-arm-linux-gnueabihf
|
||||
- libblkid-dev:armhf
|
||||
- libc6-dev:armhf
|
||||
- libffi-dev:armhf
|
||||
- libglib2.0-dev:armhf
|
||||
- libmount-dev:armhf
|
||||
- libpcre2-dev:armhf
|
||||
- libpixman-1-dev:armhf
|
||||
- zlib1g-dev:armhf
|
||||
when:
|
||||
- ansible_facts['distribution'] == 'Ubuntu'
|
||||
- ansible_facts['distribution_version'] == '20.04'
|
||||
- ansible_facts['architecture'] == 'aarch64'
|
||||
|
||||
- name: Install basic packages to build QEMU on EL8
|
||||
dnf:
|
||||
# This list of packages start with tests/docker/dockerfiles/centos8.docker
|
||||
# but only include files that are common to all distro variants and present
|
||||
# in the standard repos (no add-ons)
|
||||
name:
|
||||
- bzip2
|
||||
- bzip2-devel
|
||||
- dbus-daemon
|
||||
- diffutils
|
||||
- gcc
|
||||
- gcc-c++
|
||||
- genisoimage
|
||||
- gettext
|
||||
- git
|
||||
- glib2-devel
|
||||
- libaio-devel
|
||||
- libepoxy-devel
|
||||
- libgcrypt-devel
|
||||
- lzo-devel
|
||||
- make
|
||||
- mesa-libEGL-devel
|
||||
- nettle-devel
|
||||
- ninja-build
|
||||
- nmap-ncat
|
||||
- perl-Test-Harness
|
||||
- pixman-devel
|
||||
- python36
|
||||
- rdma-core-devel
|
||||
- spice-glib-devel
|
||||
- systemtap-sdt-devel
|
||||
- tar
|
||||
- zlib-devel
|
||||
state: present
|
||||
when:
|
||||
- ansible_facts['distribution_file_variety'] == 'RedHat'
|
||||
- ansible_facts['distribution_version'] == '8'
|
||||
|
||||
- name: Install packages only available on x86 and aarch64
|
||||
dnf:
|
||||
# Spice server not available in ppc64le
|
||||
name:
|
||||
- spice-server
|
||||
state: present
|
||||
when:
|
||||
- ansible_facts['distribution_file_variety'] == 'RedHat'
|
||||
- ansible_facts['distribution_version'] == '8'
|
||||
- ansible_facts['architecture'] == 'aarch64' or ansible_facts['architecture'] == 'x86_64'
|
||||
|
||||
@@ -69,3 +69,41 @@
|
||||
name: gitlab-runner
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
- name: Download secondary gitlab-runner
|
||||
get_url:
|
||||
dest: /usr/local/bin/gitlab-runner-arm
|
||||
url: "https://s3.amazonaws.com/gitlab-runner-downloads/v{{ gitlab_runner_version }}/binaries/gitlab-runner-{{ gitlab_runner_os }}-arm"
|
||||
owner: gitlab-runner
|
||||
group: gitlab-runner
|
||||
mode: u=rwx,g=rwx,o=rx
|
||||
when:
|
||||
- ansible_facts['distribution'] == 'Ubuntu'
|
||||
- ansible_facts['architecture'] == 'aarch64'
|
||||
- ansible_facts['distribution_version'] == '20.04'
|
||||
|
||||
- name: Register secondary gitlab-runner
|
||||
command: "/usr/local/bin/gitlab-runner-arm register --non-interactive --url {{ gitlab_runner_server_url }} --registration-token {{ gitlab_runner_registration_token }} --executor shell --tag-list aarch32,{{ ansible_facts[\"distribution\"]|lower }}_{{ ansible_facts[\"distribution_version\"] }} --description '{{ ansible_facts[\"distribution\"] }} {{ ansible_facts[\"distribution_version\"] }} {{ ansible_facts[\"architecture\"] }} ({{ ansible_facts[\"os_family\"] }})'"
|
||||
when:
|
||||
- ansible_facts['distribution'] == 'Ubuntu'
|
||||
- ansible_facts['architecture'] == 'aarch64'
|
||||
- ansible_facts['distribution_version'] == '20.04'
|
||||
|
||||
- name: Install the secondary gitlab-runner service using its own functionality
|
||||
command: /usr/local/bin/gitlab-runner-arm install --user gitlab-runner --working-directory /home/gitlab-runner/arm -n gitlab-runner-arm
|
||||
register: gitlab_runner_install_service_result
|
||||
failed_when: "gitlab_runner_install_service_result.rc != 0 and \"already exists\" not in gitlab_runner_install_service_result.stderr"
|
||||
when:
|
||||
- ansible_facts['distribution'] == 'Ubuntu'
|
||||
- ansible_facts['architecture'] == 'aarch64'
|
||||
- ansible_facts['distribution_version'] == '20.04'
|
||||
|
||||
- name: Enable the secondary gitlab-runner service
|
||||
service:
|
||||
name: gitlab-runner-arm
|
||||
state: started
|
||||
enabled: yes
|
||||
when:
|
||||
- ansible_facts['distribution'] == 'Ubuntu'
|
||||
- ansible_facts['architecture'] == 'aarch64'
|
||||
- ansible_facts['distribution_version'] == '20.04'
|
||||
|
||||
@@ -32,8 +32,8 @@ use warnings;
|
||||
use Getopt::Std;
|
||||
|
||||
# Stuff we don't want to clean because we import it into our tree:
|
||||
my $exclude = qr,^(disas/libvixl/|include/standard-headers/
|
||||
|linux-headers/|pc-bios/|tests/tcg/|tests/multiboot/),x;
|
||||
my $exclude = qr,^(include/standard-headers/|linux-headers/
|
||||
|pc-bios/|tests/tcg/|tests/multiboot/),x;
|
||||
# Stuff that is expected to fail the preprocessing test:
|
||||
my $exclude_cpp = qr,^include/libdecnumber/decNumberLocal.h,;
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ GIT=no
|
||||
DUPHEAD=no
|
||||
|
||||
# Extended regular expression defining files to ignore when using --all
|
||||
XDIRREGEX='^(tests/tcg|tests/multiboot|pc-bios|disas/libvixl)'
|
||||
XDIRREGEX='^(tests/tcg|tests/multiboot|pc-bios)'
|
||||
|
||||
while true
|
||||
do
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
*/
|
||||
|
||||
/* From qemu/compiler.h */
|
||||
#define QEMU_NORETURN __attribute__ ((__noreturn__))
|
||||
#define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
#define QEMU_SENTINEL __attribute__((sentinel))
|
||||
#define G_NORETURN __attribute__ ((__noreturn__))
|
||||
#define G_GNUC_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
#define G_GNUC_NULL_TERMINATED __attribute__((sentinel))
|
||||
|
||||
#if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__))
|
||||
# define QEMU_PACKED __attribute__((gcc_struct, packed))
|
||||
@@ -34,7 +34,7 @@
|
||||
#define QEMU_BUILD_BUG_ON(x) \
|
||||
typedef char cat2(qemu_build_bug_on__,__LINE__)[(x)?-1:1] __attribute__((unused));
|
||||
|
||||
#define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m)))
|
||||
#define G_GNUC_PRINTF(n, m) __attribute__((format(gnu_printf, n, m)))
|
||||
|
||||
#define xglue(x, y) x ## y
|
||||
#define glue(x, y) xglue(x, y)
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
// Use g_new() & friends where that makes obvious sense
|
||||
@@
|
||||
type T;
|
||||
@@
|
||||
-g_malloc(sizeof(T))
|
||||
+g_new(T, 1)
|
||||
@@
|
||||
type T;
|
||||
@@
|
||||
-g_try_malloc(sizeof(T))
|
||||
+g_try_new(T, 1)
|
||||
@@
|
||||
type T;
|
||||
@@
|
||||
-g_malloc0(sizeof(T))
|
||||
+g_new0(T, 1)
|
||||
@@
|
||||
type T;
|
||||
@@
|
||||
-g_try_malloc0(sizeof(T))
|
||||
+g_try_new0(T, 1)
|
||||
@@
|
||||
type T;
|
||||
expression n;
|
||||
@@
|
||||
-g_malloc(sizeof(T) * (n))
|
||||
+g_new(T, n)
|
||||
@@
|
||||
type T;
|
||||
expression n;
|
||||
@@
|
||||
-g_try_malloc(sizeof(T) * (n))
|
||||
+g_try_new(T, n)
|
||||
@@
|
||||
type T;
|
||||
expression n;
|
||||
@@
|
||||
-g_malloc0(sizeof(T) * (n))
|
||||
+g_new0(T, n)
|
||||
@@
|
||||
type T;
|
||||
expression n;
|
||||
@@
|
||||
-g_try_malloc0(sizeof(T) * (n))
|
||||
+g_try_new0(T, n)
|
||||
@@
|
||||
type T;
|
||||
expression p, n;
|
||||
@@
|
||||
-g_realloc(p, sizeof(T) * (n))
|
||||
+g_renew(T, p, n)
|
||||
@@
|
||||
type T;
|
||||
expression p, n;
|
||||
@@
|
||||
-g_try_realloc(p, sizeof(T) * (n))
|
||||
+g_try_renew(T, p, n)
|
||||
@@
|
||||
type T;
|
||||
expression n;
|
||||
@@
|
||||
-(T *)g_new(T, n)
|
||||
+g_new(T, n)
|
||||
@@
|
||||
type T;
|
||||
expression n;
|
||||
@@
|
||||
-(T *)g_new0(T, n)
|
||||
+g_new0(T, n)
|
||||
@@
|
||||
type T;
|
||||
expression p, n;
|
||||
@@
|
||||
-(T *)g_renew(T, p, n)
|
||||
+g_renew(T, p, n)
|
||||
@@ -22,7 +22,7 @@ i386
|
||||
~ (/qemu)?((/include)?/hw/i386/.*|/target/i386/.*|/hw/intc/[^/]*apic[^/]*\.c)
|
||||
|
||||
m68k
|
||||
~ (/qemu)?((/include)?/hw/m68k/.*|/target/m68k/.*|(/include)?/hw(/.*)?/mcf.*)
|
||||
~ (/qemu)?((/include)?/hw/m68k/.*|/target/m68k/.*|(/include)?/hw(/.*)?/mcf.*|(/include)?/hw/nubus/.*)
|
||||
|
||||
microblaze
|
||||
~ (/qemu)?((/include)?/hw/microblaze/.*|/target/microblaze/.*)
|
||||
@@ -87,9 +87,6 @@ io
|
||||
ipmi
|
||||
~ (/qemu)?((/include)?/hw/ipmi/.*)
|
||||
|
||||
libvixl
|
||||
~ (/qemu)?(/disas/libvixl/.*)
|
||||
|
||||
migration
|
||||
~ (/qemu)?((/include)?/migration/.*)
|
||||
|
||||
@@ -111,8 +108,8 @@ qemu-ga
|
||||
scsi
|
||||
~ (/qemu)?(/scsi/.*|/hw/scsi/.*|/include/hw/scsi/.*)
|
||||
|
||||
slirp
|
||||
~ (/qemu)?(/.*slirp.*)
|
||||
slirp (component should be ignored in analysis)
|
||||
~ (/qemu)?(/slirp/.*)
|
||||
|
||||
tcg
|
||||
~ (/qemu)?(/accel/tcg/.*|/replay/.*|/(.*/)?softmmu.*)
|
||||
@@ -146,3 +143,9 @@ testlibs
|
||||
|
||||
tests
|
||||
~ (/qemu)?(/tests/.*)
|
||||
|
||||
loongarch
|
||||
~ (/qemu)?((/include)?/hw/(loongarch/.*|.*/loongarch.*)|/target/loongarch/.*)
|
||||
|
||||
riscv
|
||||
~ (/qemu)?((/include)?/hw/riscv/.*|/target/riscv/.*|/hw/.*/(riscv_|ibex_|sifive_).*)
|
||||
|
||||
@@ -59,7 +59,6 @@ ENV PACKAGES \
|
||||
libubsan \
|
||||
libudev-devel \
|
||||
libusbx-devel \
|
||||
libxml2-devel \
|
||||
libzstd-devel \
|
||||
llvm \
|
||||
lzo-devel \
|
||||
|
||||
@@ -356,7 +356,8 @@ int g_poll (GPollFD *fds, unsigned nfds, int timeout)
|
||||
typedef struct _GIOChannel GIOChannel;
|
||||
GIOChannel *g_io_channel_unix_new(int fd)
|
||||
{
|
||||
GIOChannel *c = g_malloc0(sizeof(GIOChannel));
|
||||
/* cannot use incomplete type, the actual struct is roughly this size. */
|
||||
GIOChannel *c = g_malloc0(20 * sizeof(void *));
|
||||
__coverity_escape__(fd);
|
||||
return c;
|
||||
}
|
||||
|
||||
@@ -394,15 +394,15 @@ echo "Configuring..."
|
||||
--enable-opengl --enable-vte --enable-gnutls \
|
||||
--enable-nettle --enable-curses --enable-curl \
|
||||
--audio-drv-list=oss,alsa,sdl,pa --enable-virtfs \
|
||||
--enable-vnc --enable-vnc-sasl --enable-vnc-jpeg --enable-vnc-png \
|
||||
--enable-vnc --enable-vnc-sasl --enable-vnc-jpeg --enable-png \
|
||||
--enable-xen --enable-brlapi \
|
||||
--enable-linux-aio --enable-attr \
|
||||
--enable-cap-ng --enable-trace-backends=log --enable-spice --enable-rbd \
|
||||
--enable-xfsctl --enable-libusb --enable-usb-redir \
|
||||
--enable-libusb --enable-usb-redir \
|
||||
--enable-libiscsi --enable-libnfs --enable-seccomp \
|
||||
--enable-tpm --enable-libssh --enable-lzo --enable-snappy --enable-bzip2 \
|
||||
--enable-numa --enable-rdma --enable-smartcard --enable-virglrenderer \
|
||||
--enable-mpath --enable-libxml2 --enable-glusterfs \
|
||||
--enable-mpath --enable-glusterfs \
|
||||
--enable-virtfs --enable-zstd
|
||||
|
||||
echo "Running cov-build..."
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
# compatibility levels for each CPU model.
|
||||
#
|
||||
|
||||
from qemu import qmp
|
||||
from qemu.qmp.legacy import QEMUMonitorProtocol
|
||||
import sys
|
||||
|
||||
if len(sys.argv) != 1:
|
||||
if len(sys.argv) != 2:
|
||||
print("syntax: %s QMP-SOCK\n\n" % __file__ +
|
||||
"Where QMP-SOCK points to a QEMU process such as\n\n" +
|
||||
" # qemu-system-x86_64 -qmp unix:/tmp/qmp,server,nowait " +
|
||||
@@ -66,8 +66,7 @@ levels = [
|
||||
|
||||
|
||||
sock = sys.argv[1]
|
||||
cmd = sys.argv[2]
|
||||
shell = qmp.QEMUMonitorProtocol(sock)
|
||||
shell = QEMUMonitorProtocol(sock)
|
||||
shell.connect()
|
||||
|
||||
models = shell.cmd("query-cpu-definitions")
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user