* fuzzing fixes (Alexander)

* fix cross compilation CFLAGS and compiler choice
 * do not specify -bios option for tests/vm
 * miscellaneous fixes
 * preparation for pre-install tree in the build directory (Akihiko)
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmLNbVcUHHBib256aW5p
 QHJlZGhhdC5jb20ACgkQv/vSX3jHroO1KggArZDxqEOyTCvsu2H1Bf7j2J4Mfx2k
 +8FiDNpdfnmpQIc8KnQHZN7QKodXhaPwShoK6NZPYeAbg62n5/RUlF+fj2DbdCN0
 udBqt9V5dmjF2S+vb2++pWSpEUpqH1yAVYX3t0MvQDkfscADYYqYndHkYqVP34Sy
 sIIkDGdFODQqHCPDmNNFWFHt8X5Zu8t5j53NjPebdryZBDiA4DgFnorTw0sTPV1H
 XeS2M06C1lkGyWrdy7eaF9IL3tmlCsuc6xiA0RAhzJiWgHe1LQZOUPMfR+GKuidI
 E9Cz05iGyOlH+CNYgdukqT8BdJtcjWZwDgYWVxVIswv461h/asoENUIx1g==
 =Nyzq
 -----END PGP SIGNATURE-----

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

* fuzzing fixes (Alexander)
* fix cross compilation CFLAGS and compiler choice
* do not specify -bios option for tests/vm
* miscellaneous fixes
* preparation for pre-install tree in the build directory (Akihiko)

# gpg: Signature made Tue 12 Jul 2022 13:47:19 BST
# gpg:                using RSA key F13338574B662389866C7682BFFBD25F78C7AE83
# gpg:                issuer "pbonzini@redhat.com"
# gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
# gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
# 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:
  meson: place default firmware path under .../share
  qga: Relocate a path emitted in the help text
  build: Do not depend on pc-bios for config-host.mak
  accel: kvm: Fix memory leak in find_stats_descriptors
  audio/dbus: fix building
  fuzz: only use generic-fuzz targets on oss-fuzz
  build: improve -fsanitize-coverage-allowlist check
  build: try both native and cross compilers
  configure: pass whole target name to probe_target_compiler
  tests/tcg: compile system emulation tests as freestanding
  configure: write EXTRA_CFLAGS for all sub-Makefiles
  configure: allow more host/target combos to use the host compiler
  configure, pc-bios/vof: pass cross CFLAGS correctly
  configure, pc-bios/s390-ccw: pass cross CFLAGS correctly
  configure, pc-bios/optionrom: pass cross CFLAGS correctly
  pc-bios/optionrom: use -m16 unconditionally
  scsi/lsi53c895a: fix use-after-free in lsi_do_msgout (CVE-2022-0216)
  tests/vm: do not specify -bios option

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

# Conflicts:
#	pc-bios/s390-ccw/netboot.mak
This commit is contained in:
Peter Maydell 2022-07-12 14:12:15 +01:00
commit 8e3d85d36b
24 changed files with 163 additions and 130 deletions

View File

@ -87,7 +87,7 @@ x := $(shell rm -rf meson-private meson-info meson-logs)
endif
# 1. ensure config-host.mak is up-to-date
config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/scripts/meson-buildoptions.sh $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION
config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/scripts/meson-buildoptions.sh $(SRC_PATH)/VERSION
@echo config-host.mak is out-of-date, running configure
@if test -f meson-private/coredata.dat; then \
./config.status --skip-meson; \

View File

@ -3891,6 +3891,7 @@ static StatsDescriptors *find_stats_descriptors(StatsTarget target, int stats_fd
error_setg(errp, "KVM stats: failed to read stats header: "
"expected %zu actual %zu",
sizeof(*kvm_stats_header), ret);
g_free(descriptors);
return NULL;
}
size_desc = sizeof(*kvm_stats_desc) + kvm_stats_header->name_size;

View File

@ -28,7 +28,7 @@ endforeach
if dbus_display
module_ss = ss.source_set()
module_ss.add(when: [gio, pixman, opengl, 'CONFIG_GIO'], if_true: files('dbusaudio.c'))
module_ss.add(when: gio, if_true: files('dbusaudio.c'))
audio_modules += {'dbus': module_ss}
endif

201
configure vendored
View File

@ -1858,7 +1858,7 @@ fi
: ${cross_cc_hexagon="hexagon-unknown-linux-musl-clang"}
: ${cross_cc_cflags_hexagon="-mv67 -O2 -static"}
: ${cross_cc_cflags_i386="-m32"}
: ${cross_cc_cflags_ppc="-m32"}
: ${cross_cc_cflags_ppc="-m32 -mbig-endian"}
: ${cross_cc_cflags_ppc64="-m64 -mbig-endian"}
: ${cross_cc_ppc64le="$cross_cc_ppc64"}
: ${cross_cc_cflags_ppc64le="-m64 -mlittle-endian"}
@ -1868,6 +1868,7 @@ fi
: ${cross_cc_cflags_x86_64="-m64"}
compute_target_variable() {
eval "$2="
if eval test -n "\"\${cross_prefix_$1}\""; then
if eval has "\"\${cross_prefix_$1}\$3\""; then
eval "$2=\"\${cross_prefix_$1}\$3\""
@ -1875,8 +1876,20 @@ compute_target_variable() {
fi
}
# probe_target_compiler TARGET
#
# Look for a compiler for the given target, either native or cross.
# Set variables target_* if a compiler is found, and container_cross_*
# if a Docker-based cross-compiler image is known for the target.
# Set got_cross_cc to yes/no depending on whether a non-container-based
# compiler was found.
#
# If TARGET is a user-mode emulation target, also set build_static to
# "y" if static linking is possible.
#
probe_target_compiler() {
# reset all output variables
got_cross_cc=no
container_image=
container_hosts=
container_cross_cc=
@ -1887,16 +1900,9 @@ probe_target_compiler() {
container_cross_objcopy=
container_cross_ranlib=
container_cross_strip=
target_cc=
target_ar=
target_as=
target_ld=
target_nm=
target_objcopy=
target_ranlib=
target_strip=
case $1 in
target_arch=${1%%-*}
case $target_arch in
aarch64) container_hosts="x86_64 aarch64" ;;
alpha) container_hosts=x86_64 ;;
arm) container_hosts="x86_64 aarch64" ;;
@ -1925,7 +1931,7 @@ probe_target_compiler() {
for host in $container_hosts; do
test "$container" != no || continue
test "$host" = "$cpu" || continue
case $1 in
case $target_arch in
aarch64)
# We don't have any bigendian build tools so we only use this for AArch64
container_image=debian-arm64-cross
@ -2041,54 +2047,116 @@ probe_target_compiler() {
: ${container_cross_strip:=${container_cross_prefix}strip}
done
eval "target_cflags=\${cross_cc_cflags_$1}"
if eval test -n "\"\${cross_cc_$1}\""; then
if eval has "\"\${cross_cc_$1}\""; then
eval "target_cc=\"\${cross_cc_$1}\""
local t try
try=cross
case "$target_arch:$cpu" in
aarch64_be:aarch64 | \
armeb:arm | \
i386:x86_64 | \
mips*:mips64 | \
ppc*:ppc64 | \
sparc:sparc64 | \
"$cpu:$cpu")
try='native cross' ;;
esac
eval "target_cflags=\${cross_cc_cflags_$target_arch}"
for t in $try; do
case $t in
native)
target_cc=$cc
target_ccas=$ccas
target_ar=$ar
target_as=$as
target_ld=$ld
target_nm=$nm
target_objcopy=$objcopy
target_ranlib=$ranlib
target_strip=$strip
;;
cross)
target_cc=
if eval test -n "\"\${cross_cc_$target_arch}\""; then
if eval has "\"\${cross_cc_$target_arch}\""; then
eval "target_cc=\"\${cross_cc_$target_arch}\""
fi
else
compute_target_variable $target_arch target_cc gcc
fi
target_ccas=$target_cc
compute_target_variable $target_arch target_ar ar
compute_target_variable $target_arch target_as as
compute_target_variable $target_arch target_ld ld
compute_target_variable $target_arch target_nm nm
compute_target_variable $target_arch target_objcopy objcopy
compute_target_variable $target_arch target_ranlib ranlib
compute_target_variable $target_arch target_strip strip
;;
esac
if test -n "$target_cc"; then
case $target_arch in
i386|x86_64)
if $target_cc --version | grep -qi "clang"; then
continue
fi
;;
esac
elif test -n "$target_as" && test -n "$target_ld"; then
# Special handling for assembler only targets
case $target in
tricore-softmmu)
build_static=
got_cross_cc=yes
break
;;
*)
continue
;;
esac
else
continue
fi
else
compute_target_variable $1 target_cc gcc
fi
target_ccas=$target_cc
compute_target_variable $1 target_ar ar
compute_target_variable $1 target_as as
compute_target_variable $1 target_ld ld
compute_target_variable $1 target_nm nm
compute_target_variable $1 target_objcopy objcopy
compute_target_variable $1 target_ranlib ranlib
compute_target_variable $1 target_strip strip
if test "$1" = $cpu; then
: ${target_cc:=$cc}
: ${target_ccas:=$ccas}
: ${target_as:=$as}
: ${target_ld:=$ld}
: ${target_ar:=$ar}
: ${target_as:=$as}
: ${target_ld:=$ld}
: ${target_nm:=$nm}
: ${target_objcopy:=$objcopy}
: ${target_ranlib:=$ranlib}
: ${target_strip:=$strip}
fi
if test -n "$target_cc"; then
write_c_skeleton
case $1 in
i386|x86_64)
if $target_cc --version | grep -qi "clang"; then
unset target_cc
*-softmmu)
if do_compiler "$target_cc" $target_cflags -o $TMPO -c $TMPC &&
do_compiler "$target_cc" $target_cflags -r -nostdlib -o "${TMPDIR1}/${TMPB}2.o" "$TMPO" -lgcc; then
got_cross_cc=yes
break
fi
;;
*)
if do_compiler "$target_cc" $target_cflags -o $TMPE $TMPC -static ; then
build_static=y
got_cross_cc=yes
break
fi
if do_compiler "$target_cc" $target_cflags -o $TMPE $TMPC ; then
build_static=
got_cross_cc=yes
break
fi
;;
esac
done
if test $got_cross_cc != yes; then
build_static=
target_cc=
target_ccas=
target_cflags=
target_ar=
target_as=
target_ld=
target_nm=
target_objcopy=
target_ranlib=
target_strip=
fi
}
probe_target_compilers() {
for i; do
probe_target_compiler $i
test -n "$target_cc" && return 0
done
}
write_target_makefile() {
echo "EXTRA_CFLAGS=$target_cflags"
if test -n "$target_cc"; then
echo "CC=$target_cc"
echo "CCAS=$target_ccas"
@ -2117,6 +2185,7 @@ write_target_makefile() {
}
write_container_target_makefile() {
echo "EXTRA_CFLAGS=$target_cflags"
if test -n "$container_cross_cc"; then
echo "CC=\$(DOCKER_SCRIPT) cc --cc $container_cross_cc -i qemu/$container_image -s $source_path --"
echo "CCAS=\$(DOCKER_SCRIPT) cc --cc $container_cross_cc -i qemu/$container_image -s $source_path --"
@ -2238,7 +2307,7 @@ done
# Mac OS X ships with a broken assembler
roms=
probe_target_compilers i386 x86_64
probe_target_compiler i386-softmmu
if test -n "$target_cc" &&
test "$targetos" != "darwin" && test "$targetos" != "sunos" && \
test "$targetos" != "haiku" && test "$softmmu" = yes ; then
@ -2261,7 +2330,7 @@ if test -n "$target_cc" &&
fi
fi
probe_target_compilers ppc ppc64
probe_target_compiler ppc-softmmu
if test -n "$target_cc" && test "$softmmu" = yes; then
roms="$roms pc-bios/vof"
config_mak=pc-bios/vof/config.mak
@ -2272,7 +2341,7 @@ fi
# Only build s390-ccw bios if the compiler has -march=z900 or -march=z10
# (which is the lowest architecture level that Clang supports)
probe_target_compiler s390x
probe_target_compiler s390x-softmmu
if test -n "$target_cc" && test "$softmmu" = yes; then
write_c_skeleton
do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC
@ -2485,7 +2554,6 @@ tcg_tests_targets=
for target in $target_list; do
arch=${target%%-*}
probe_target_compiler ${arch}
config_target_mak=tests/tcg/config-$target.mak
echo "# Automatically generated by configure - do not modify" > $config_target_mak
@ -2504,29 +2572,7 @@ for target in $target_list; do
;;
esac
got_cross_cc=no
unset build_static
if test -n "$target_cc"; then
write_c_skeleton
if ! do_compiler "$target_cc" $target_cflags \
-o $TMPE $TMPC -static ; then
# For host systems we might get away with building without -static
if do_compiler "$target_cc" $target_cflags \
-o $TMPE $TMPC ; then
got_cross_cc=yes
fi
else
got_cross_cc=yes
build_static=y
fi
elif test -n "$target_as" && test -n "$target_ld"; then
# Special handling for assembler only tests
case $target in
tricore-softmmu) got_cross_cc=yes ;;
esac
fi
probe_target_compiler $target
if test $got_cross_cc = yes; then
# Test for compiler features for optional tests. We only do this
# for cross compilers because ensuring the docker containers based
@ -2600,7 +2646,6 @@ for target in $target_list; do
if test $got_cross_cc = yes; then
mkdir -p tests/tcg/$target
echo "QEMU=$PWD/$qemu" >> $config_target_mak
echo "EXTRA_CFLAGS=$target_cflags" >> $config_target_mak
echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> $makefile
tcg_tests_targets="$tcg_tests_targets $target"
fi

View File

@ -1028,8 +1028,9 @@ static void lsi_do_msgout(LSIState *s)
case 0x0d:
/* The ABORT TAG message clears the current I/O process only. */
trace_lsi_do_msgout_abort(current_tag);
if (current_req) {
if (current_req && current_req->req) {
scsi_req_cancel(current_req->req);
current_req->req = NULL;
}
lsi_disconnect(s);
break;

View File

@ -212,7 +212,8 @@ if get_option('fuzzing')
if cc.compiles('int main () { return 0; }',
name: '-fsanitize-coverage-allowlist=/dev/null',
args: ['-fsanitize-coverage-allowlist=/dev/null'] )
args: ['-fsanitize-coverage-allowlist=/dev/null',
'-fsanitize-coverage=trace-pc'] )
add_global_arguments('-fsanitize-coverage-allowlist=instrumentation-filter',
native: false, language: ['c', 'cpp', 'objc'])
endif
@ -1671,6 +1672,8 @@ dbus_display = get_option('dbus_display') \
error_message: '-display dbus requires --enable-modules') \
.require(gdbus_codegen.found(),
error_message: '-display dbus requires gdbus-codegen') \
.require(opengl.found(),
error_message: '-display dbus requires epoxy/egl') \
.allowed()
have_virtfs = get_option('virtfs') \

View File

@ -6,7 +6,7 @@ option('qemu_suffix', type : 'string', value: 'qemu',
description: 'Suffix for QEMU data/modules/config directories (can be empty)')
option('docdir', type : 'string', value : 'share/doc',
description: 'Base directory for documentation installation (can be empty)')
option('qemu_firmwarepath', type : 'string', value : 'qemu-firmware',
option('qemu_firmwarepath', type : 'string', value : 'share/qemu-firmware',
description: 'search PATH for firmware files')
option('pkgversion', type : 'string', value : '',
description: 'use specified string as sub-version of the package')

View File

@ -11,7 +11,7 @@ CFLAGS = -O2 -g
quiet-command = $(if $(V),$1,$(if $(2),@printf " %-7s %s\n" $2 $3 && $1, @$1))
cc-option = $(if $(shell $(CC) $1 -c -o /dev/null -xc /dev/null >/dev/null 2>&1 && echo OK), $1, $2)
override CFLAGS += -march=i486 -Wall
override CFLAGS += -march=i486 -Wall $(EXTRA_CFLAGS) -m16
# If -fcf-protection is enabled in flags or compiler defaults that will
# conflict with -march=i486
@ -24,21 +24,8 @@ override CFLAGS += $(filter -W%, $(QEMU_CFLAGS))
override CFLAGS += $(call cc-option, -fno-pie)
override CFLAGS += -ffreestanding -I$(TOPSRC_DIR)/include
override CFLAGS += $(call cc-option, -fno-stack-protector)
override CFLAGS += $(call cc-option, -m16)
override CFLAGS += $(call cc-option, -Wno-array-bounds)
ifeq ($(filter -m16, $(CFLAGS)),)
# Attempt to work around compilers that lack -m16 (GCC <= 4.8, clang <= ??)
# On GCC we add -fno-toplevel-reorder to keep the order of asm blocks with
# respect to the rest of the code. clang does not have -fno-toplevel-reorder,
# but it places all asm blocks at the beginning and we're relying on it for
# the option ROM header. So just force clang not to use the integrated
# assembler, which doesn't support .code16gcc.
override CFLAGS += $(call cc-option, -fno-toplevel-reorder)
override CFLAGS += $(call cc-option, -no-integrated-as)
override CFLAGS += -m32 -include $(SRC_DIR)/code16gcc.h
endif
Wa = -Wa,
override ASFLAGS += -32
override CFLAGS += $(call cc-option, $(Wa)-32)

View File

@ -1,3 +0,0 @@
asm(
".code16gcc\n"
);

View File

@ -18,11 +18,11 @@ $(call set-vpath, $(SRC_PATH))
QEMU_DGFLAGS = -MMD -MP -MT $@ -MF $(@D)/$(*F).d
%.o: %.c
$(call quiet-command,$(CC) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \
$(call quiet-command,$(CC) $(EXTRA_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \
-c -o $@ $<,"CC","$(TARGET_DIR)$@")
%.o: %.S
$(call quiet-command,$(CCAS) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \
$(call quiet-command,$(CCAS) $(EXTRA_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \
-c -o $@ $<,"CCAS","$(TARGET_DIR)$@")
.PHONY : all clean build-all
@ -30,14 +30,14 @@ QEMU_DGFLAGS = -MMD -MP -MT $@ -MF $(@D)/$(*F).d
OBJECTS = start.o main.o bootmap.o jump2ipl.o sclp.o menu.o \
virtio.o virtio-scsi.o virtio-blkdev.o libc.o cio.o dasd-ipl.o
QEMU_CFLAGS := -Wall $(filter -W%, $(QEMU_CFLAGS))
QEMU_CFLAGS += $(call cc-option,-Werror $(QEMU_CFLAGS),-Wno-stringop-overflow)
QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -fno-common -fPIE
QEMU_CFLAGS += -fwrapv -fno-strict-aliasing -fno-asynchronous-unwind-tables
QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector)
QEMU_CFLAGS += -msoft-float
QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS),-march=z900,-march=z10)
QEMU_CFLAGS += -std=gnu99
EXTRA_CFLAGS := $(EXTRA_CFLAGS) -Wall
EXTRA_CFLAGS += $(call cc-option,-Werror $(EXTRA_CFLAGS),-Wno-stringop-overflow)
EXTRA_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -fno-common -fPIE
EXTRA_CFLAGS += -fwrapv -fno-strict-aliasing -fno-asynchronous-unwind-tables
EXTRA_CFLAGS += $(call cc-option, $(EXTRA_CFLAGS), -fno-stack-protector)
EXTRA_CFLAGS += -msoft-float
EXTRA_CFLAGS += $(call cc-option, $(EXTRA_CFLAGS),-march=z900,-march=z10)
EXTRA_CFLAGS += -std=gnu99
LDFLAGS += -Wl,-pie -nostdlib
build-all: s390-ccw.img s390-netboot.img

View File

@ -8,7 +8,7 @@ LIBNET_INC := -I$(SLOF_DIR)/lib/libnet
NETLDFLAGS := $(LDFLAGS) -Wl,-Ttext=0x7800000
$(NETOBJS): QEMU_CFLAGS += $(LIBC_INC) $(LIBNET_INC)
$(NETOBJS): EXTRA_CFLAGS += $(LIBC_INC) $(LIBNET_INC)
s390-netboot.elf: $(NETOBJS) libnet.a libc.a
$(call quiet-command,$(CC) $(NETLDFLAGS) -o $@ $^,"BUILD","$(TARGET_DIR)$@")
@ -21,7 +21,7 @@ NO_GNU_WARN := $(call cc-option,-Werror $(QEMU_CFLAGS),-Wno-gnu)
# libc files:
LIBC_CFLAGS = $(QEMU_CFLAGS) $(CFLAGS) $(NO_GNU_WARN) $(LIBC_INC) $(LIBNET_INC) \
LIBC_CFLAGS = $(EXTRA_CFLAGS) $(CFLAGS) $(NO_GNU_WARN) $(LIBC_INC) $(LIBNET_INC) \
-MMD -MP -MT $@ -MF $(@:%.o=%.d)
CTYPE_OBJS = isdigit.o isxdigit.o toupper.o
@ -55,7 +55,7 @@ libc.a: $(LIBCOBJS)
LIBNETOBJS := args.o dhcp.o dns.o icmpv6.o ipv6.o tcp.o udp.o bootp.o \
dhcpv6.o ethernet.o ipv4.o ndp.o tftp.o pxelinux.o
LIBNETCFLAGS = $(QEMU_CFLAGS) $(CFLAGS) $(NO_GNU_WARN) $(LIBC_INC) $(LIBNET_INC) \
LIBNETCFLAGS = $(EXTRA_CFLAGS) $(CFLAGS) $(NO_GNU_WARN) $(LIBC_INC) $(LIBNET_INC) \
-DDHCPARCH=0x1F -MMD -MP -MT $@ -MF $(@:%.o=%.d)
%.o : $(SLOF_DIR)/lib/libnet/%.c

View File

@ -2,15 +2,13 @@ include config.mak
VPATH=$(SRC_DIR)
all: vof.bin
CC ?= $(CROSS)gcc
LD ?= $(CROSS)ld
OBJCOPY ?= $(CROSS)objcopy
EXTRA_CFLAGS += -mcpu=power4
%.o: %.S
$(CC) -m32 -mbig-endian -mcpu=power4 -c -o $@ $<
$(CC) $(EXTRA_CFLAGS) -c -o $@ $<
%.o: %.c
$(CC) -m32 -mbig-endian -mcpu=power4 -c -fno-stack-protector -o $@ $<
$(CC) $(EXTRA_CFLAGS) -c -fno-stack-protector -o $@ $<
vof.elf: entry.o main.o ci.o bootmem.o libc.o
$(LD) -nostdlib -e_start -T$(SRC_DIR)/vof.lds -EB -o $@ $^

View File

@ -223,6 +223,10 @@ void reopen_fd_to_null(int fd)
static void usage(const char *cmd)
{
#ifdef CONFIG_FSFREEZE
g_autofree char *fsfreeze_hook = get_relocated_path(QGA_FSFREEZE_HOOK_DEFAULT);
#endif
printf(
"Usage: %s [-m <method> -p <path>] [<options>]\n"
"QEMU Guest Agent " QEMU_FULL_VERSION "\n"
@ -270,7 +274,7 @@ QEMU_HELP_BOTTOM "\n"
, cmd, QGA_VIRTIO_PATH_DEFAULT, QGA_SERIAL_PATH_DEFAULT,
dfl_pathnames.pidfile,
#ifdef CONFIG_FSFREEZE
QGA_FSFREEZE_HOOK_DEFAULT,
fsfreeze_hook,
#endif
dfl_pathnames.state_dir);
}

View File

@ -42,7 +42,7 @@ meson_options_help() {
printf "%s\n" ' --enable-trace-backends=CHOICES'
printf "%s\n" ' Set available tracing backends [log] (choices:'
printf "%s\n" ' dtrace/ftrace/log/nop/simple/syslog/ust)'
printf "%s\n" ' --firmwarepath=VALUE search PATH for firmware files [qemu-firmware]'
printf "%s\n" ' --firmwarepath=VALUE search PATH for firmware files [share/qemu-firmware]'
printf "%s\n" ' --iasl=VALUE Path to ACPI disassembler'
printf "%s\n" ' --includedir=VALUE Header file directory [include]'
printf "%s\n" ' --interp-prefix=VALUE where to find shared libraries etc., use %M for'

View File

@ -1,4 +1,4 @@
#!/bin/sh -e
#!/bin/bash -e
#
# OSS-Fuzz build script. See:
# https://google.github.io/oss-fuzz/getting-started/new-project-guide/#buildsh
@ -105,7 +105,7 @@ do
# to be configured. We have some generic-fuzz-{pc-q35, floppy, ...} targets
# that are thin wrappers around this target that set the required
# environment variables according to predefined configs.
if [ "$target" != "generic-fuzz" ]; then
if [[ $target == "generic-fuzz-"* ]]; then
ln $base_copy \
"$DEST_DIR/qemu-fuzz-i386-target-$target"
fi

View File

@ -111,6 +111,7 @@ else
# For softmmu targets we include a different Makefile fragement as the
# build options for bare programs are usually pretty different. They
# are expected to provide their own build recipes.
EXTRA_CFLAGS += -ffreestanding
-include $(SRC_PATH)/tests/tcg/minilib/Makefile.target
-include $(SRC_PATH)/tests/tcg/multiarch/system/Makefile.softmmu-target
-include $(SRC_PATH)/tests/tcg/$(TARGET_NAME)/Makefile.softmmu-target

View File

@ -1,4 +1,4 @@
#include <inttypes.h>
#include <stdint.h>
#include <minilib.h>
int main()

View File

@ -6,7 +6,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include <inttypes.h>
#include <stdint.h>
#include <minilib.h>
#define SYS_READC 0x7

View File

@ -6,7 +6,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include <inttypes.h>
#include <stdint.h>
#include <stddef.h>
#include <minilib.h>

View File

@ -12,7 +12,7 @@
* - sign extension when loading
*/
#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <minilib.h>

View File

@ -79,7 +79,6 @@ class FedoraVM(basevm.BaseVM):
self.exec_qemu_img("create", "-f", "qcow2", img_tmp, self.size)
self.print_step("Booting installer")
self.boot(img_tmp, extra_args = [
"-bios", "pc-bios/bios-256k.bin",
"-machine", "graphics=off",
"-device", "VGA",
"-cdrom", iso

View File

@ -95,7 +95,6 @@ class FreeBSDVM(basevm.BaseVM):
self.print_step("Booting installer")
self.boot(img_tmp, extra_args = [
"-bios", "pc-bios/bios-256k.bin",
"-machine", "graphics=off",
"-device", "VGA",
"-cdrom", iso

View File

@ -86,7 +86,6 @@ class NetBSDVM(basevm.BaseVM):
self.print_step("Booting installer")
self.boot(img_tmp, extra_args = [
"-bios", "pc-bios/bios-256k.bin",
"-machine", "graphics=off",
"-cdrom", iso
])

View File

@ -82,7 +82,6 @@ class OpenBSDVM(basevm.BaseVM):
self.print_step("Booting installer")
self.boot(img_tmp, extra_args = [
"-bios", "pc-bios/bios-256k.bin",
"-machine", "graphics=off",
"-device", "VGA",
"-cdrom", iso