Build system changes and misc fixes for QEMU 5.2 soft freeze
Subsystems (4)
The following changes since commit 4c5b97bfd0dd54dc27717ae8d1cd10e14eef1430:
Merge remote-tracking branch 'remotes/kraxel/tags/modules-20201022-pull-request' into staging (2020-10-22 12:33:21 +0100)
are available in the Git repository at:
https://gitlab.com/bonzini/qemu.git tags/for-upstream
for you to fetch changes up to 8b0e484c8bf82e07bb0439bff04e248c63cdc86a:
machine: move SMP initialization from vl.c (2020-10-26 07:08:40 -0400)
----------------------------------------------------------------
* fix --disable-tcg builds (Claudio)
* Fixes for macOS --enable-modules build and OpenBSD curses/iconv detection (myself)
* Start preparing for meson 0.56 (myself)
* Move directory configuration to meson (myself)
* Start untangling qemu_init (myself)
* Windows fixes (Sunil)
* Remove -no-kbm (Thomas)
----------------------------------------------------------------
Claudio Fontana (2):
qtest: unbreak non-TCG builds in bios-tables-test
replay: do not build if TCG is not available
Luc Michel (1):
hw/core/qdev-clock: add a reference on aliased clocks
Paolo Bonzini (11):
build: fix macOS --enable-modules build
meson: rewrite curses/iconv test
do not use colons in test names
Makefile: separate meson rerun from the rest of the ninja invocation
configure: allow configuring localedir
configure: move directory options from config-host.mak to meson
configure: remove unused variable from config-host.mak
configure: move install_blobs from configure to meson
machine: remove deprecated -machine enforce-config-section option
machine: move UP defaults to class_base_init
machine: move SMP initialization from vl.c
Sunil Muthuswamy (2):
WHPX: Fix WHPX build break
win32: boot broken when bind & data dir are the same
Thomas Huth (1):
Remove deprecated -no-kvm option
.cirrus.yml | 2 +- Makefile | 44 ++++++--- block/meson.build | 3 +- configure | 64 +++---------- contrib/vhost-user-gpu/meson.build | 2 +- docs/system/deprecated.rst | 23 ++--- hw/core/machine.c | 36 +++----- hw/core/qdev-clock.c | 8 ++ include/hw/boards.h | 1 - meson.build | 178 ++++++++++++++++++++++--------------- meson_options.txt | 4 + migration/migration.c | 10 --- net/meson.build | 3 +- pc-bios/descriptors/meson.build | 4 +- pc-bios/meson.build | 15 ++-- qemu-options.hx | 11 --- replay/meson.build | 4 +- replay/stubs-system.c | 96 ++++++++++++++++++++ scripts/undefsym.py | 11 ++- softmmu/vl.c | 16 ---- stubs/meson.build | 4 +- stubs/replay-tools.c | 83 +++++++++++++++++ stubs/replay-user.c | 9 -- stubs/replay.c | 78 ---------------- tests/fp/meson.build | 6 +- tests/ptimer-test-stubs.c | 5 -- tests/qtest/bios-tables-test.c | 10 +++ tests/qtest/meson.build | 2 +- tests/qtest/qmp-cmd-test.c | 3 + tools/virtiofsd/meson.build | 2 +- ui/icons/meson.build | 6 +- ui/meson.build | 2 +- util/cutils.c | 2 +- version.texi.in | 2 - 34 files changed, 416 insertions(+), 333 deletions(-) create mode 100644 replay/stubs-system.c create mode 100644 stubs/replay-tools.c delete mode 100644 stubs/replay-user.c delete mode 100644 version.texi.in
Signature · 1 line
2.26.2
[PULL 08/17] Makefile: separate meson rerun from the rest of the ninja invocation
The rules to build Makefile.mtest are suffering from the "tunnel vision" problem that is common with recursive makefiles. Makefile.mtest depends on build.ninja, but Make does not know when build.ninja needs to be rebuilt before creating Makefile.mtest.
To fix this, separate the ninja invocation into the "regenerate build files" phase and the QEMU build phase. Sentinel files such as meson-private/coredata.dat or build.ninja are used to figure out the phases that haven't run yet; however, because those files' timestamps are not guaranteed to be touched, the usual makefile stamp-file trick is used on top.
--- Makefile | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-)
Makefile +29 -11
@@ -92,6 +92,8 @@ endif ifeq ($(NINJA),) .PHONY: config-host.mak x := $(shell rm -rf meson-private meson-info meson-logs) +else +export NINJA endif ifeq ($(wildcard build.ninja),) .PHONY: config-host.mak
@@ -100,31 +102,44 @@ endif # 1. ensure config-host.mak is up-to-date config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION - @echo $@ is out-of-date, running configure + @echo config-host.mak is out-of-date, running configure @if test -f meson-private/coredata.dat; then \ ./config.status --skip-meson; \ else \ - ./config.status; \ + ./config.status && touch build.ninja.stamp; \ fi -# 2. ensure generated build files are up-to-date +# 2. meson.stamp exists if meson has run at least once (so ninja reconfigure +# works), but otherwise never needs to be updated +meson-private/coredata.dat: meson.stamp +meson.stamp: config-host.mak + @touch meson.stamp + +# 3. ensure generated build files are up-to-date ifneq ($(NINJA),) -# A separate rule is needed for Makefile dependencies to avoid -n -export NINJA Makefile.ninja: build.ninja - $(quiet-@){ echo 'ninja-targets = \'; $(NINJA) -t targets all | sed 's/:.*//; $$!s/$$/ \\/'; } > $@ + $(quiet-@){ \ + echo 'ninja-targets = \'; \ + $(NINJA) -t targets all | sed 's/:.*//; $$!s/$$/ \\/'; \ + echo 'build-files = \'; \ + $(NINJA) -t query build.ninja | sed -n '1,/^ input:/d; /^ outputs:/q; s/$$/ \\/p'; \ + } > [email protected] && mv [email protected] $@ -include Makefile.ninja + +# A separate rule is needed for Makefile dependencies to avoid -n +build.ninja: build.ninja.stamp +build.ninja.stamp: meson.stamp $(build-files) + $(NINJA) $(if $V,-v,) build.ninja && touch $@ endif ifneq ($(MESON),) -# The dependency on config-host.mak ensures that meson has run -Makefile.mtest: build.ninja scripts/mtest2make.py config-host.mak +Makefile.mtest: build.ninja scripts/mtest2make.py $(MESON) introspect --targets --tests --benchmarks | $(PYTHON) scripts/mtest2make.py > $@ -include Makefile.mtest endif -# 3. Rules to bridge to other makefiles +# 4. Rules to bridge to other makefiles ifneq ($(NINJA),) NINJAFLAGS = $(if $V,-v,) \
@@ -135,7 +150,10 @@ ninja-cmd-goals = $(or $(MAKECMDGOALS), all) ninja-cmd-goals += $(foreach t, $(.tests), $(.test.deps.$t)) makefile-targets := build.ninja ctags TAGS cscope dist clean uninstall -ninja-targets := $(filter-out $(makefile-targets), $(ninja-targets)) +# "ninja -t targets" also lists all prerequisites. If build system +# files are marked as PHONY, however, Make will always try to execute +# "ninja build.ninja". +ninja-targets := $(filter-out $(build-files) $(makefile-targets), $(ninja-targets)) .PHONY: $(ninja-targets) run-ninja $(ninja-targets): run-ninja
@@ -214,7 +232,7 @@ distclean: clean rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols rm -f *-config-target.h *-config-devices.mak *-config-devices.h rm -rf meson-private meson-logs meson-info compile_commands.json - rm -f Makefile.ninja Makefile.mtest + rm -f Makefile.ninja Makefile.mtest build.ninja.stamp meson.stamp rm -f config.log rm -f linux-headers/asm rm -Rf .sdk
Signature · 1 line
2.26.2
[PULL 07/17] Remove deprecated -no-kvm option
In reply to Paolo BonziniFrom: Thomas Huth <[email protected]>
The option has never been mentioned in our documentation, it's been deprecated since years, it's marked with QEMU_ARCH_I386 (which does not make sense anymore since KVM is available on other architectures, too), it does not do anything by default in upstream QEMU (since TCG is the default here anyway), and we're spending too much precious time each year discussing whether it makes sense to keep this option as a nice suger or not... let's finally put an end on this and remove it.
Message-Id: <[email protected]>
--- docs/system/deprecated.rst | 11 ++++++----- qemu-options.hx | 3 --- softmmu/vl.c | 4 ---- 3 files changed, 6 insertions(+), 12 deletions(-)
docs/system/deprecated.rst +6 -5
@@ -27,11 +27,6 @@ System emulator command line arguments The ``enforce-config-section`` parameter is replaced by the ``-global migration.send-configuration={on|off}`` option. -``-no-kvm`` (since 1.3.0) -''''''''''''''''''''''''' - -The ``-no-kvm`` argument is now a synonym for setting ``-accel tcg``. - ``-usbdevice`` (since 2.10.0) '''''''''''''''''''''''''''''
@@ -504,6 +499,12 @@ System emulator command line arguments The ``name`` parameter of the ``-net`` option was a synonym for the ``id`` parameter, which should now be used instead. +``-no-kvm`` (removed in 5.2) +'''''''''''''''''''''''''''' + +The ``-no-kvm`` argument was a synonym for setting ``-machine accel=tcg``. + + QEMU Machine Protocol (QMP) commands ------------------------------------
qemu-options.hx +0 -3
@@ -4351,9 +4351,6 @@ SRST Enable FIPS 140-2 compliance mode. ERST -HXCOMM Deprecated by -accel tcg -DEF("no-kvm", 0, QEMU_OPTION_no_kvm, "", QEMU_ARCH_I386) - DEF("msg", HAS_ARG, QEMU_OPTION_msg, "-msg [timestamp[=on|off]][,guest-name=[on|off]]\n" " control error message format\n"
softmmu/vl.c +0 -4
@@ -3502,10 +3502,6 @@ void qemu_init(int argc, char **argv, char **envp)exit (1 ); }break ; -case QEMU_OPTION_no_kvm: - olist =qemu_find_opts ("machine" ); -qemu_opts_parse_noisily (olist,"accel=tcg" , false); -break ;case QEMU_OPTION_accel: accel_opts =qemu_opts_parse_noisily (qemu_find_opts ("accel" ), optarg, true);
Signature · 1 line
2.26.2
[PULL 03/17] do not use colons in test names
In reply to Paolo BonziniStarting with meson 0.56, colons are used to separate the subproject name from the test name. Use dash or slash depending on what looks nicer.
--- tests/fp/meson.build | 6 +++--- tests/qtest/meson.build | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
tests/fp/meson.build +3 -3
@@ -603,7 +603,7 @@ fptest_rounding_args = ['-r', 'all'] # FIXME: i32_to_extF80 (broken), i64_to_extF80 (broken) # extF80_roundToInt (broken) foreach k, v : softfloat_conv_tests - test('fp-test:' + k, fptest, + test('fp-test-' + k, fptest, args: fptest_args + fptest_rounding_args + v.split(), suite: ['softfloat', 'softfloat-conv']) endforeach
@@ -612,13 +612,13 @@ endforeach # extF80_{mulAdd} (missing) foreach k, v : softfloat_tests extF80_broken = ['lt_quiet', 'rem'].contains(k) - test('fp-test:' + k, fptest, + test('fp-test-' + k, fptest, args: fptest_args + fptest_rounding_args + ['f16_' + k, 'f32_' + k, 'f64_' + k, 'f128_' + k] + (extF80_broken ? [] : ['extF80_' + k]), suite: ['softfloat', 'softfloat-' + v]) endforeach -test('fp-test:mulAdd', fptest, +test('fp-test-mulAdd', fptest, # no fptest_rounding_args args: fptest_args + ['f16_mulAdd', 'f32_mulAdd', 'f64_mulAdd', 'f128_mulAdd'],
tests/qtest/meson.build +1 -1
@@ -251,7 +251,7 @@ foreach dir : target_dirs } endif # FIXME: missing dependency on the emulator binary and qemu-img - test('qtest-@0@: @1@'.format(target_base, test), + test('qtest-@0@/@1@'.format(target_base, test), qtest_executables[test], depends: [test_deps, qtest_emulator], env: qtest_env,
Signature · 1 line
2.26.2
[PULL 04/17] hw/core/qdev-clock: add a reference on aliased clocks
In reply to Paolo BonziniFrom: Luc Michel <[email protected]>
When aliasing a clock with the qdev_alias_clock() function, a new link property is created on the device aliasing the clock. The link points to the aliased clock and use the OBJ_PROP_LINK_STRONG flag. This property is read only since it does not provide a check callback for modifications.
The object_property_add_link() documentation stats that with OBJ_PROP_LINK_STRONG properties, the linked object reference count get decremented when the property is deleted. But it is _not_ incremented on creation (object_property_add_link() does not actually know the link).
This commit increments the reference count on the aliased clock to ensure the aliased clock stays alive during the property lifetime, and to avoid a double-free memory error when the property gets deleted.
Message-Id: <[email protected]>
--- hw/core/qdev-clock.c | 8 ++++++++ 1 file changed, 8 insertions(+)
hw/core/qdev-clock.c +8 -0
@@ -61,6 +61,14 @@ static NamedClockList *qdev_init_clocklist(DeviceState *dev, const char *name,object_get_typename (OBJECT (clk)), (Object **) &ncl->clock, NULL, OBJ_PROP_LINK_STRONG); +/* +* Since the link property has the OBJ_PROP_LINK_STRONG flag, the clk +* object reference count gets decremented on property deletion. +* However object_property_add_link does not increment it since it +* doesn't know the linked object. Increment it here to ensure the +* aliased clock stays alive during this device life-time. +*/ +object_ref (OBJECT (clk)); } ncl->clock = clk;
Signature · 1 line
2.26.2
[PULL 17/17] machine: move SMP initialization from vl.c
In reply to Paolo BonziniInitialize the object's values from the class when the object is created, no need to have vl.c do it for us.
--- hw/core/machine.c | 7 +++++++ softmmu/vl.c | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-)
hw/core/machine.c +7 -0
@@ -907,6 +907,13 @@ static void machine_initfn(Object *obj)/* Register notifier when init is done for sysbus sanity checks */ ms->sysbus_notifier.notify = machine_init_notify;qemu_add_machine_init_done_notifier (&ms->sysbus_notifier); + +/* default to mc->default_cpus */ + ms->smp.cpus = mc->default_cpus; + ms->smp.max_cpus = mc->default_cpus; + ms->smp.cores =1 ; + ms->smp.threads =1 ; + ms->smp.sockets =1 ; }static void machine_finalize (Object *obj)
softmmu/vl.c +0 -7
@@ -3970,13 +3970,6 @@ void qemu_init(int argc, char **argv, char **envp)exit (0 ); } -/* default to machine_class->default_cpus */ - current_machine->smp.cpus = machine_class->default_cpus; - current_machine->smp.max_cpus = machine_class->default_cpus; - current_machine->smp.cores =1 ; - current_machine->smp.threads =1 ; - current_machine->smp.sockets =1 ; - machine_class->smp_parse (current_machine,qemu_opts_find (qemu_find_opts ("smp-opts" ),NULL ));
Signature · 1 line
2.26.2
[PULL 02/17] meson: rewrite curses/iconv test
In reply to Paolo BonziniRedo the curses test to do the same tests that the configure check used to do. OpenBSD triggers the warning because it does not support NCURSES_WIDECHAR and thus the cc.links test fails.
--- meson.build | 127 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 73 insertions(+), 54 deletions(-)
meson.build +73 -54
@@ -465,70 +465,89 @@ endif iconv = not_found curses = not_found if have_system and not get_option('curses').disabled() - if not get_option('iconv').disabled() - libiconv = cc.find_library('iconv', - required: false, - static: enable_static) - if cc.links(''' - #include <iconv.h> - int main(void) { - iconv_t conv = iconv_open("WCHAR_T", "UCS-2"); - return conv != (iconv_t) -1; - }''', dependencies: [libiconv]) - iconv = declare_dependency(dependencies: [libiconv]) + curses_test = ''' + #include <locale.h> + #include <curses.h> + #include <wchar.h> + int main(void) { + wchar_t wch = L'w'; + setlocale(LC_ALL, ""); + resize_term(0, 0); + addwstr(L"wide chars\n"); + addnwstr(&wch, 1); + add_wch(WACS_DEGREE); + return 0; + }''' + + curses = dependency((targetos == 'windows' ? 'ncurses' : 'ncursesw'), + required: false, + method: 'pkg-config', + static: enable_static) + msg = get_option('curses').enabled() ? 'curses library not found' : '' + if curses.found() + if cc.links(curses_test, dependencies: [curses]) + curses = declare_dependency(compile_args: '-DNCURSES_WIDECHAR', dependencies: [curses]) + else + msg = 'curses package not usable' + curses = not_found endif endif - if get_option('iconv').enabled() and not iconv.found() - error('Cannot detect iconv API') - endif - if iconv.found() - curses_libname_list = ['ncursesw', 'ncurses', 'cursesw', 'pdcurses'] - curses_test = ''' - #include <locale.h> - #include <curses.h> - #include <wchar.h> - int main(void) { - wchar_t wch = L'w'; - setlocale(LC_ALL, ""); - resize_term(0, 0); - addwstr(L"wide chars\n"); - addnwstr(&wch, 1); - add_wch(WACS_DEGREE); - return 0; - }''' - foreach curses_libname : curses_libname_list - libcurses = dependency(curses_libname, - required: false, - method: 'pkg-config', - static: enable_static) - - if not libcurses.found() - dirs = ['/usr/include/ncursesw'] - if targetos == 'windows' - dirs = [] - endif + if not curses.found() + curses_compile_args = ['-DNCURSES_WIDECHAR'] + has_curses_h = cc.has_header('curses.h', args: curses_compile_args) + if targetos != 'windows' and not has_curses_h + message('Trying with /usr/include/ncursesw') + curses_compile_args += ['-I/usr/include/ncursesw'] + has_curses_h = cc.has_header('curses.h', args: curses_compile_args) + endif + if has_curses_h + curses_libname_list = (targetos == 'windows' ? ['pdcurses'] : ['ncursesw', 'cursesw']) + foreach curses_libname : curses_libname_list libcurses = cc.find_library(curses_libname, required: false, - dirs: dirs, static: enable_static) - endif - if libcurses.found() - if cc.links(curses_test, dependencies: [libcurses]) - curses = declare_dependency(compile_args: '-DNCURSES_WIDECHAR', dependencies: [libcurses]) - break + if libcurses.found() + if cc.links(curses_test, args: curses_compile_args, dependencies: libcurses) + curses = declare_dependency(compile_args: curses_compile_args, + dependencies: [libcurses]) + break + else + msg = 'curses library not usable' + endif endif + endforeach + endif + endif + if not get_option('iconv').disabled() + foreach link_args : [ ['-liconv'], [] ] + # Programs will be linked with glib and this will bring in libiconv on FreeBSD. + # We need to use libiconv if available because mixing libiconv's headers with + # the system libc does not work. + # However, without adding glib to the dependencies -L/usr/local/lib will not be + # included in the command line and libiconv will not be found. + if cc.links(''' + #include <iconv.h> + int main(void) { + iconv_t conv = iconv_open("WCHAR_T", "UCS-2"); + return conv != (iconv_t) -1; + }''', args: config_host['GLIB_CFLAGS'].split() + config_host['GLIB_LIBS'].split() + link_args) + iconv = declare_dependency(link_args: link_args, dependencies: glib) + break endif endforeach endif - if not curses.found() - if iconv.found() - if get_option('curses').enabled() - error('Cannot find curses') - endif - elif get_option('curses').enabled() - error('iconv required for curses UI but not available') + if curses.found() and not iconv.found() + if get_option('iconv').enabled() + error('iconv not available') + endif + msg = 'iconv required for curses UI but not available' + curses = not_found + endif + if not curses.found() and msg != '' + if get_option('curses').enabled() + error(msg) else - warning('iconv required for curses UI but not available, disabling') + warning(msg + ', disabling') endif endif endif
Signature · 1 line
2.26.2
[PULL 05/17] qtest: unbreak non-TCG builds in bios-tables-test
In reply to Paolo BonziniFrom: Claudio Fontana <[email protected]>
the tests assume TCG is available, thus breaking for TCG-only tests, where only the TCG accelerator option is passed to the QEMU binary.
Message-Id: <[email protected]>
--- tests/qtest/bios-tables-test.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
tests/qtest/bios-tables-test.c +10 -0
@@ -127,6 +127,9 @@ static void free_test_data(test_data *data) {int i; +if (!data->tables) { +return ; + }for (i =0 ; i < data->tables->len; ++i) {cleanup_table_descriptor (&g_array_index (data->tables, AcpiSdtTable, i)); }
@@ -656,6 +659,13 @@ static void test_acpi_one(const char *params, test_data *data)char *args;bool use_uefi = data->uefi_fl1 && data->uefi_fl2; +#ifndef CONFIG_TCG +if (data->tcg_only) { +g_test_skip ("TCG disabled, skipping ACPI tcg_only test" ); +return ; + } +#endif /* CONFIG_TCG */ +if (use_uefi) {/* * TODO: convert '-drive if=pflash' to new syntax (see e33763be7cd3)
Signature · 1 line
2.26.2
[PULL 06/17] replay: do not build if TCG is not available
In reply to Paolo BonziniFrom: Claudio Fontana <[email protected]>
this fixes non-TCG builds broken recently by replay reverse debugging.
Stub the needed functions in stub/, splitting roughly between functions needed only by system emulation, by system emulation and tools, and by everyone. This includes duplicating some code in replay/, and puts the logic for non-replay related events in the replay/ module (+ the stubs), so this should be revisited in the future.
Surprisingly, only _one_ qtest was affected by this, ide-test.c, which resulted in a buzz as the bh events were never delivered, and the bh never executed.
Many other subsystems _should_ have been affected.
This fixes the immediate issue, however a better way to group replay functionality to TCG-only code could be developed in the long term.
Message-Id: <[email protected]>
--- block/meson.build | 3 +- net/meson.build | 3 +- replay/meson.build | 4 +- replay/stubs-system.c | 96 ++++++++++++++++++++++++++++++++++++++ stubs/meson.build | 4 +- stubs/replay-tools.c | 83 ++++++++++++++++++++++++++++++++ stubs/replay-user.c | 9 ---- stubs/replay.c | 78 ------------------------------- tests/ptimer-test-stubs.c | 5 -- tests/qtest/qmp-cmd-test.c | 3 ++ 10 files changed, 191 insertions(+), 97 deletions(-) create mode 100644 replay/stubs-system.c create mode 100644 stubs/replay-tools.c delete mode 100644 stubs/replay-user.c
block/meson.build +2 -1
@@ -7,7 +7,6 @@ block_ss.add(files( 'backup-top.c', 'blkdebug.c', 'blklogwrites.c', - 'blkreplay.c', 'blkverify.c', 'block-backend.c', 'block-copy.c',
@@ -42,6 +41,8 @@ block_ss.add(files( 'write-threshold.c', ), zstd, zlib) +softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('blkreplay.c')) + block_ss.add(when: 'CONFIG_QCOW1', if_true: files('qcow.c')) block_ss.add(when: 'CONFIG_VDI', if_true: files('vdi.c')) block_ss.add(when: 'CONFIG_CLOOP', if_true: files('cloop.c'))
net/meson.build +2 -1
@@ -7,7 +7,6 @@ softmmu_ss.add(files( 'eth.c', 'filter-buffer.c', 'filter-mirror.c', - 'filter-replay.c', 'filter-rewriter.c', 'filter.c', 'hub.c',
@@ -17,6 +16,8 @@ softmmu_ss.add(files( 'util.c', )) +softmmu_ss.add(when: 'CONFIG_TCG', if_true: files('filter-replay.c')) + softmmu_ss.add(when: 'CONFIG_L2TPV3', if_true: files('l2tpv3.c')) softmmu_ss.add(when: slirp, if_true: files('slirp.c')) softmmu_ss.add(when: ['CONFIG_VDE', vde], if_true: files('vde.c'))
replay/meson.build +2 -2
@@ -1,4 +1,4 @@ -softmmu_ss.add(files( +softmmu_ss.add(when: 'CONFIG_TCG', if_true: files( 'replay.c', 'replay-internal.c', 'replay-events.c',
@@ -10,4 +10,4 @@ softmmu_ss.add(files( 'replay-audio.c', 'replay-random.c', 'replay-debugging.c', -)) +), if_false: files('stubs-system.c'))
replay/stubs-system.c new file +96 -0
96 lines not on this page · raw message
stubs/meson.build +3 -1
@@ -32,7 +32,6 @@ stub_ss.add(files('qtest.c')) stub_ss.add(files('ram-block.c')) stub_ss.add(files('ramfb.c')) stub_ss.add(files('replay.c')) -stub_ss.add(files('replay-user.c')) stub_ss.add(files('runstate-check.c')) stub_ss.add(files('set-fd-handler.c')) stub_ss.add(files('sysbus.c'))
@@ -46,6 +45,9 @@ stub_ss.add(files('vmstate.c')) stub_ss.add(files('vm-stop.c')) stub_ss.add(files('win32-kbd-hook.c')) stub_ss.add(files('cpu-synchronize-state.c')) +if have_block + stub_ss.add(files('replay-tools.c')) +endif if have_system stub_ss.add(files('semihost.c')) stub_ss.add(files('xen-hw-stub.c'))
stubs/replay-tools.c new file +83 -0
83 lines not on this page · raw message
stubs/replay-user.c deleted +0 -9
@@ -1,9 +0,0 @@ -#include "qemu/osdep.h" -#include "sysemu/replay.h" -#include "sysemu/sysemu.h" - -void replay_bh_schedule_oneshot_event (AioContext *ctx, -QEMUBHFunc *cb,void *opaque) -{ -aio_bh_schedule_oneshot (ctx, cb, opaque); -}
stubs/replay.c +0 -78
94 lines not on this page · raw message
tests/ptimer-test-stubs.c +0 -5
@@ -122,8 +122,3 @@ void qemu_bh_delete(QEMUBH *bh) {g_free (bh); } - -void replay_bh_schedule_event (QEMUBH *bh) -{ - bh->cb (bh->opaque); -}
tests/qtest/qmp-cmd-test.c +3 -0
@@ -31,6 +31,9 @@ static int query_error_class(const char *cmd) #ifndef CONFIG_SPICE { "query-spice", ERROR_CLASS_COMMAND_NOT_FOUND }, #endif +#ifndef CONFIG_TCG + { "query-replay", ERROR_CLASS_COMMAND_NOT_FOUND }, +#endif #ifndef CONFIG_VNC { "query-vnc", ERROR_CLASS_GENERIC_ERROR }, { "query-vnc-servers", ERROR_CLASS_GENERIC_ERROR },
Signature · 1 line
2.26.2
[PULL 12/17] configure: move install_blobs from configure to meson
In reply to Paolo BonziniMove the conditions under which edk2 blobs are decompressed and installed to pc-bios/meson.build.
--- configure | 26 +++----------------------- meson.build | 2 +- meson_options.txt | 2 ++ pc-bios/descriptors/meson.build | 2 +- pc-bios/meson.build | 13 +++++++------ 5 files changed, 14 insertions(+), 31 deletions(-)
configure +3 -23
@@ -362,8 +362,7 @@ cocoa="auto" softmmu="yes" linux_user="no" bsd_user="no" -blobs="yes" -edk2_blobs="no" +blobs="true" pkgversion="" pie="" qom_cast_debug="yes"
@@ -1205,7 +1204,7 @@ for opt do ;; --enable-membarrier) membarrier="yes" ;; - --disable-blobs) blobs="no" + --disable-blobs) blobs="false" ;; --with-pkgversion=*) pkgversion="$optarg" ;;
@@ -2221,18 +2220,6 @@ case " $target_list " in ;; esac -for target in $target_list; do - case "$target" in - arm-softmmu | aarch64-softmmu | i386-softmmu | x86_64-softmmu) - edk2_blobs="yes" - ;; - esac -done -# The EDK2 binaries are compressed with bzip2 -if test "$edk2_blobs" = "yes" && ! has bzip2; then - error_exit "The bzip2 program is required for building QEMU" -fi - feature_not_found() { feature=$1 remedy=$2
@@ -6276,9 +6263,6 @@ fi if test "$vhost_user_fs" = "yes" ; then echo "CONFIG_VHOST_USER_FS=y" >> $config_host_mak fi -if test "$blobs" = "yes" ; then - echo "INSTALL_BLOBS=yes" >> $config_host_mak -fi if test "$iovec" = "yes" ; then echo "CONFIG_IOVEC=y" >> $config_host_mak fi
@@ -6755,10 +6739,6 @@ if test "$fuzzing" != "no"; then fi echo "FUZZ_EXE_LDFLAGS=$FUZZ_EXE_LDFLAGS" >> $config_host_mak -if test "$edk2_blobs" = "yes" ; then - echo "DECOMPRESS_EDK2_BLOBS=y" >> $config_host_mak -fi - if test "$rng_none" = "yes"; then echo "CONFIG_RNG_NONE=y" >> $config_host_mak fi
@@ -6995,7 +6975,7 @@ NINJA=$ninja $meson setup \ -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt \ -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ - -Ddocs=$docs -Dsphinx_build=$sphinx_build \ + -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \ $cross_arg \ "$PWD" "$source_path"
meson.build +1 -1
@@ -2052,7 +2052,7 @@ summary_info += {'netmap support': config_host.has_key('CONFIG_NETMAP')} summary_info += {'Linux AIO support': config_host.has_key('CONFIG_LINUX_AIO')} summary_info += {'Linux io_uring support': config_host.has_key('CONFIG_LINUX_IO_URING')} summary_info += {'ATTR/XATTR support': config_host.has_key('CONFIG_ATTR')} -summary_info += {'Install blobs': config_host.has_key('INSTALL_BLOBS')} +summary_info += {'Install blobs': get_option('install_blobs')} summary_info += {'KVM support': config_all.has_key('CONFIG_KVM')} summary_info += {'HAX support': config_all.has_key('CONFIG_HAX')} summary_info += {'HVF support': config_all.has_key('CONFIG_HVF')}
meson_options.txt +2 -0
@@ -11,6 +11,8 @@ option('docs', type : 'feature', value : 'auto', description: 'Documentations build support') option('gettext', type : 'boolean', value : true, description: 'Localization of the GTK+ user interface') +option('install_blobs', type : 'boolean', value : true, + description: 'install provided firmware blobs') option('sparse', type : 'feature', value : 'auto', description: 'sparse checker')
pc-bios/descriptors/meson.build +1 -1
@@ -9,6 +9,6 @@ foreach f: [ configure_file(input: files(f), output: f, configuration: {'DATADIR': qemu_datadir}, - install: install_blobs, + install: get_option('install_blobs'), install_dir: qemu_datadir / 'firmware') endforeach
pc-bios/meson.build +7 -6
@@ -1,7 +1,8 @@ -bzip2 = find_program('bzip2') - -install_blobs = 'INSTALL_BLOBS' in config_host -if 'DECOMPRESS_EDK2_BLOBS' in config_host +if 'arm-softmmu' in target_dirs or \ + 'aarch64-softmmu' in target_dirs or \ + 'i386-softmmu' in target_dirs or \ + 'x86_64-softmmu' in target_dirs + bzip2 = find_program('bzip2', required: true) fds = [ 'edk2-aarch64-code.fd', 'edk2-arm-code.fd',
@@ -18,7 +19,7 @@ if 'DECOMPRESS_EDK2_BLOBS' in config_host output: f, input: '@[email protected]'.format(f), capture: true, - install: install_blobs, + install: get_option('install_blobs'), install_dir: qemu_datadir, command: [ bzip2, '-dc', '@INPUT0@' ]) endforeach
@@ -85,7 +86,7 @@ blobs = files( 'npcm7xx_bootrom.bin', ) -if install_blobs +if get_option('install_blobs') install_data(blobs, install_dir: qemu_datadir) endif
Signature · 1 line
2.26.2
[PULL 01/17] build: fix macOS --enable-modules build
In reply to Paolo BonziniApple's nm implementation includes empty lines in the output that are not found in GNU binutils. This confuses scripts/undefsym.py, though it did not confuse the scripts/undefsym.sh script that it replaced. To fix this, ignore lines that do not have two fields.
--- .cirrus.yml | 2 +- scripts/undefsym.py | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-)
.cirrus.yml +1 -1
@@ -40,7 +40,7 @@ macos_xcode_task: script: - mkdir build - cd build - - ../configure --extra-cflags='-Wno-error=deprecated-declarations' + - ../configure --extra-cflags='-Wno-error=deprecated-declarations' --enable-modules --enable-werror --cc=clang || { cat config.log meson-logs/meson-log.txt; exit 1; } - gmake -j$(sysctl -n hw.ncpu) - gmake check V=1
scripts/undefsym.py +5 -6
@@ -15,12 +15,11 @@ def filter_lines_set(stdout, from_staticlib): linesSet = set() for line in stdout.splitlines(): tokens = line.split(b' ') - if len(tokens) >= 1: - if len(tokens) > 1: - if from_staticlib and tokens[1] == b'U': - continue - if not from_staticlib and tokens[1] != b'U': - continue + if len(tokens) >= 2: + if from_staticlib and tokens[1] == b'U': + continue + if not from_staticlib and tokens[1] != b'U': + continue new_line = b'-Wl,-u,' + tokens[0] if not new_line in linesSet: linesSet.add(new_line)
Signature · 1 line
2.26.2
Re: [PULL 01/17] build: fix macOS --enable-modules build
Quoted 19 lines · Paolo Bonzini
Apple's nm implementation includes empty lines in the output that are not found in GNU binutils. This confuses
scripts/undefsym.py, though it did not confuse thescripts/undefsym.shscript that it replaced. To fix this, ignore lines that do not have two fields.Reported-by Emmanuel Blot <[email protected]>Tested-by Emmanuel Blot <[email protected]>Fixes 604f3e4e90 ("meson: Convert undefsym.sh to undefsym.py", 2020-09-08)Signed-off-by Paolo Bonzini <[email protected]>--- .cirrus.yml | 2 +- scripts/undefsym.py | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-).cirrus.yml +0
-0
.cirrus.yml macos_xcode_task: · line 44
Quoted 6 lines
.cirrus.yml +1
-1@@ -40,7 +40,7 @@ macos_xcode_task: script: - mkdir build - cd build - - ../configure --extra-cflags='-Wno-error=deprecated-declarations' + - ../configure --extra-cflags='-Wno-error=deprecated-declarations' --enable-modules --enable-werror --cc=clang || { cat config.log meson-logs/meson-log.txt; exit 1; }
I'm confused as this broke the catalina-xcode test:
PASS 5 qtest-aarch64/device-introspect-test /aarch64/device/introspect/abstract-interfaces
missing object type 'virtio-gpu-device'
Broken pipe../tests/qtest/libqtest.c:176: kill_qemu() detected QEMU death from signal 6 (Abort trap: 6)
ERROR qtest-aarch64/device-introspect-test - too few tests run (expected 6, got 5)
gmake: *** [Makefile.mtest:905: run-test-111] Error 1
Re: [PULL 01/17] build: fix macOS --enable-modules build
Quoted 12 lines · Philippe Mathieu-Daudé
I'm confused as this broke the catalina-xcode test:
PASS 5 qtest-aarch64/device-introspect-test /aarch64/device/introspect/abstract-interfaces
missing object type 'virtio-gpu-device'
Broken pipe../tests/qtest/libqtest.c:176:kill_qemu()detected QEMU death from signal 6 (Abort trap: 6)
ERROR qtest-aarch64/device-introspect-test - too few tests run (expected 6, got 5)
gmake: *** [Makefile.mtest:905: run-test-111] Error 1
It's showing that there is still a bug with macOS modules, Gerd was looking at it (Emmanuel could so as well :)).
Paolo
Re: [PULL 01/17] build: fix macOS --enable-modules build
Quoted 14 lines · Paolo Bonzini
Quoted 12 lines · Philippe Mathieu-Daudé
I'm confused as this broke the catalina-xcode test:
PASS 5 qtest-aarch64/device-introspect-test /aarch64/device/introspect/abstract-interfaces
missing object type 'virtio-gpu-device'
Broken pipe../tests/qtest/libqtest.c:176:kill_qemu()detected QEMU death from signal 6 (Abort trap: 6)
ERROR qtest-aarch64/device-introspect-test - too few tests run (expected 6, got 5)
gmake: *** [Makefile.mtest:905: run-test-111] Error 1
Quoted 2 lines
It's showing that there is still a bug with macOS modules, Gerd was looking at it (Emmanuel could so as well :)).
Turned out to be simple.
https://patchwork.ozlabs.org/project/qemu-devel/patch/[email protected]/
take care,
Gerd
Re: [PULL 01/17] build: fix macOS --enable-modules build
Quoted 1 line · Gerd Hoffmann
https://patchwork.ozlabs.org/project/qemu-devel/patch/[email protected]/
FYI: have pending pull req with this and 3 more module patches,
ci running atm, probably goes out tomorrow ... )
take care,
Gerd
[PULL 10/17] configure: move directory options from config-host.mak to meson
In reply to Paolo BonziniSince installation is not part of Makefiles anymore, Make need not know the directories anymore. Meson already knows them through built-in options, do everything using them instead of the config_host dictionary.
--- Makefile | 4 +++ configure | 31 ++++---------------- contrib/vhost-user-gpu/meson.build | 2 +- meson.build | 47 ++++++++++++++++++++---------- meson_options.txt | 2 ++ pc-bios/descriptors/meson.build | 2 +- pc-bios/meson.build | 2 +- tools/virtiofsd/meson.build | 2 +- ui/icons/meson.build | 6 ++-- ui/meson.build | 2 +- version.texi.in | 2 -- 11 files changed, 51 insertions(+), 51 deletions(-) delete mode 100644 version.texi.in
Makefile +4 -0
@@ -99,6 +99,10 @@ ifeq ($(wildcard build.ninja),) .PHONY: config-host.mak x := $(shell rm -rf meson-private meson-info meson-logs) endif +ifeq ($(origin prefix),file) +.PHONY: config-host.mak +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)/pc-bios $(SRC_PATH)/VERSION
configure +5 -26
@@ -1523,11 +1523,9 @@ for opt do esac done -firmwarepath="${firmwarepath:-$prefix/share/qemu-firmware}" libdir="${libdir:-$prefix/lib}" libexecdir="${libexecdir:-$prefix/libexec}" includedir="${includedir:-$prefix/include}" -localedir="${localedir:-$datadir/locale}" if test "$mingw32" = "yes" ; then mandir="$prefix"
@@ -1535,7 +1533,7 @@ if test "$mingw32" = "yes" ; then docdir="$prefix" bindir="$prefix" sysconfdir="$prefix" - local_statedir= + local_statedir="$prefix" else mandir="${mandir:-$prefix/share/man}" datadir="${datadir:-$prefix/share}"
@@ -1544,6 +1542,8 @@ else sysconfdir="${sysconfdir:-$prefix/etc}" local_statedir="${local_statedir:-$prefix/var}" fi +firmwarepath="${firmwarepath:-$datadir/qemu-firmware}" +localedir="${localedir:-$datadir/locale}" case "$cpu" in ppc)
@@ -5729,12 +5729,6 @@ if test "$mingw32" = "yes" ; then done fi -qemu_confdir="$sysconfdir/$qemu_suffix" -qemu_moddir="$libdir/$qemu_suffix" -qemu_datadir="$datadir/$qemu_suffix" -qemu_icondir="$datadir/icons" -qemu_desktopdir="$datadir/applications" - # We can only support ivshmem if we have eventfd if [ "$eventfd" = "yes" ]; then ivshmem=yes
@@ -5901,23 +5895,6 @@ echo "# Automatically generated by configure - do not modify" > $config_host_mak echo >> $config_host_mak echo all: >> $config_host_mak -echo "prefix=$prefix" >> $config_host_mak -echo "bindir=$bindir" >> $config_host_mak -echo "libdir=$libdir" >> $config_host_mak -echo "libexecdir=$libexecdir" >> $config_host_mak -echo "includedir=$includedir" >> $config_host_mak -echo "sysconfdir=$sysconfdir" >> $config_host_mak -echo "qemu_confdir=$qemu_confdir" >> $config_host_mak -echo "qemu_datadir=$qemu_datadir" >> $config_host_mak -echo "qemu_firmwarepath=$firmwarepath" >> $config_host_mak -echo "qemu_moddir=$qemu_moddir" >> $config_host_mak -if test "$mingw32" = "no" ; then - echo "qemu_localstatedir=$local_statedir" >> $config_host_mak -fi -echo "qemu_helperdir=$libexecdir" >> $config_host_mak -echo "qemu_localedir=$localedir" >> $config_host_mak -echo "qemu_icondir=$qemu_icondir" >> $config_host_mak -echo "qemu_desktopdir=$qemu_desktopdir" >> $config_host_mak echo "GIT=$git" >> $config_host_mak echo "GIT_SUBMODULES=$git_submodules" >> $config_host_mak echo "GIT_UPDATE=$git_update" >> $config_host_mak
@@ -7000,8 +6977,10 @@ NINJA=$ninja $meson setup \ --datadir "$datadir" \ --mandir "$mandir" \ --sysconfdir "$sysconfdir" \ + --localedir "$localedir" \ --localstatedir "$local_statedir" \ -Ddocdir="$docdir" \ + -Dqemu_firmwarepath="$firmwarepath" \ -Dqemu_suffix="$qemu_suffix" \ -Doptimization=$(if test "$debug" = yes; then echo 0; else echo 2; fi) \ -Ddebug=$(if test "$debug_info" = yes; then echo true; else echo false; fi) \
contrib/vhost-user-gpu/meson.build +1 -1
@@ -9,6 +9,6 @@ if 'CONFIG_TOOLS' in config_host and 'CONFIG_VIRGL' in config_host \ configure_file(input: '50-qemu-gpu.json.in', output: '50-qemu-gpu.json', - configuration: config_host, + configuration: { 'libexecdir' : get_option('libexecdir') }, install_dir: qemu_datadir / 'vhost-user') endif
meson.build +32 -15
86 lines not on this page · raw message
meson_options.txt +2 -0
@@ -2,6 +2,8 @@ option('qemu_suffix', type : 'string', value: 'qemu', description: 'Suffix for QEMU data/modules/config directories (can be empty)') option('docdir', type : 'string', value : 'doc', description: 'Base directory for documentation installation (can be empty)') +option('qemu_firmwarepath', type : 'string', value : '', + description: 'search PATH for firmware files') option('sphinx_build', type : 'string', value : '', description: 'Use specified sphinx-build [$sphinx_build] for building document (default to be empty)')
pc-bios/descriptors/meson.build +1 -1
@@ -8,7 +8,7 @@ foreach f: [ ] configure_file(input: files(f), output: f, - configuration: {'DATADIR': config_host['qemu_datadir']}, + configuration: {'DATADIR': qemu_datadir}, install: install_blobs, install_dir: qemu_datadir / 'firmware') endforeach
pc-bios/meson.build +1 -1
@@ -86,7 +86,7 @@ blobs = files( ) if install_blobs - install_data(blobs, install_dir: config_host['qemu_datadir']) + install_data(blobs, install_dir: qemu_datadir) endif subdir('descriptors')
tools/virtiofsd/meson.build +1 -1
@@ -15,5 +15,5 @@ executable('virtiofsd', files( configure_file(input: '50-qemu-virtiofsd.json.in', output: '50-qemu-virtiofsd.json', - configuration: config_host, + configuration: { 'libexecdir' : get_option('libexecdir') }, install_dir: qemu_datadir / 'vhost-user')
ui/icons/meson.build +3 -3
@@ -2,12 +2,12 @@ foreach s: [16, 24, 32, 48, 64, 128, 256, 512] s = '@0@x@0@'.format(s.to_string()) install_data('qemu_@[email protected]'.format(s), rename: 'qemu.png', - install_dir: config_host['qemu_icondir'] / 'hicolor' / s / 'apps') + install_dir: qemu_icondir / 'hicolor' / s / 'apps') endforeach install_data('qemu_32x32.bmp', rename: 'qemu.bmp', - install_dir: config_host['qemu_icondir'] / 'hicolor' / '32x32' / 'apps') + install_dir: qemu_icondir / 'hicolor' / '32x32' / 'apps') install_data('qemu.svg', - install_dir: config_host['qemu_icondir'] / 'hicolor' / 'scalable' / 'apps') + install_dir: qemu_icondir / 'hicolor' / 'scalable' / 'apps')
ui/meson.build +1 -1
@@ -139,7 +139,7 @@ subdir('shader') if have_system subdir('icons') - install_data('qemu.desktop', install_dir: config_host['qemu_desktopdir']) + install_data('qemu.desktop', install_dir: qemu_desktopdir) endif modules += {'ui': ui_modules}
version.texi.in deleted +0 -2
@@ -1,2 +0,0 @@ -@set VERSION @VERSION@ -@set CONFDIR @qemu_confdir@
Signature · 1 line
2.26.2
[PULL 16/17] machine: move UP defaults to class_base_init
In reply to Paolo BonziniClean up vl.c, default min/max/default_cpus to uniprocessor directly in the QOM class initialization code.
--- hw/core/machine.c | 6 +++++- softmmu/vl.c | 5 ----- 2 files changed, 5 insertions(+), 6 deletions(-)
hw/core/machine.c +5 -1
@@ -853,8 +853,12 @@ static void machine_class_init(ObjectClass *oc, void *data)static void machine_class_base_init (ObjectClass *oc,void *data) { +MachineClass *mc =MACHINE_CLASS (oc); + mc->max_cpus = mc->max_cpus ?:1 ; + mc->min_cpus = mc->min_cpus ?:1 ; + mc->default_cpus = mc->default_cpus ?:1 ; +if (!object_class_is_abstract (oc)) { -MachineClass *mc =MACHINE_CLASS (oc);const char *cname =object_class_get_name (oc);assert (g_str_has_suffix (cname,TYPE_MACHINE_SUFFIX )); mc->name = g_strndup(cname,
softmmu/vl.c +0 -5
@@ -3970,11 +3970,6 @@ void qemu_init(int argc, char **argv, char **envp)exit (0 ); } -/* machine_class: default to UP */ - machine_class->max_cpus = machine_class->max_cpus ?:1 ; - machine_class->min_cpus = machine_class->min_cpus ?:1 ; - machine_class->default_cpus = machine_class->default_cpus ?:1 ; -/* default to machine_class->default_cpus */ current_machine->smp.cpus = machine_class->default_cpus; current_machine->smp.max_cpus = machine_class->default_cpus;
Signature · 1 line
2.26.2
[PULL 09/17] configure: allow configuring localedir
In reply to Paolo BonziniMeson has a localedir option, so passing the path through that option is the cleanest way when we move directories out of config-host.mak. In preparation for doing that without changing semantics and without special-casing localedir code, add a configure option.
--- configure | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
configure +6 -3
@@ -962,6 +962,8 @@ for opt do ;; --docdir=*) docdir="$optarg" ;; + --localedir=*) localedir="$optarg" + ;; --sysconfdir=*) sysconfdir="$optarg" ;; --localstatedir=*) local_statedir="$optarg"
@@ -971,7 +973,7 @@ for opt do --host=*|--build=*|\ --disable-dependency-tracking|\ --sbindir=*|--sharedstatedir=*|\ - --oldincludedir=*|--datarootdir=*|--infodir=*|--localedir=*|\ + --oldincludedir=*|--datarootdir=*|--infodir=*|\ --htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*) # These switches are silently ignored, for compatibility with # autoconf-generated configure scripts. This allows QEMU's
@@ -1525,6 +1527,7 @@ firmwarepath="${firmwarepath:-$prefix/share/qemu-firmware}" libdir="${libdir:-$prefix/lib}" libexecdir="${libexecdir:-$prefix/libexec}" includedir="${includedir:-$prefix/include}" +localedir="${localedir:-$datadir/locale}" if test "$mingw32" = "yes" ; then mandir="$prefix"
@@ -1670,6 +1673,7 @@ Advanced options (experts only): --static enable static build [$static] --mandir=PATH install man pages in PATH --datadir=PATH install firmware in PATH/$qemu_suffix + --localedir=PATH install translation in PATH/$qemu_suffix --docdir=PATH install documentation in PATH/$qemu_suffix --bindir=PATH install binaries in PATH --libdir=PATH install libraries in PATH
@@ -5728,7 +5732,6 @@ fi qemu_confdir="$sysconfdir/$qemu_suffix" qemu_moddir="$libdir/$qemu_suffix" qemu_datadir="$datadir/$qemu_suffix" -qemu_localedir="$datadir/locale" qemu_icondir="$datadir/icons" qemu_desktopdir="$datadir/applications"
@@ -5912,7 +5915,7 @@ if test "$mingw32" = "no" ; then echo "qemu_localstatedir=$local_statedir" >> $config_host_mak fi echo "qemu_helperdir=$libexecdir" >> $config_host_mak -echo "qemu_localedir=$qemu_localedir" >> $config_host_mak +echo "qemu_localedir=$localedir" >> $config_host_mak echo "qemu_icondir=$qemu_icondir" >> $config_host_mak echo "qemu_desktopdir=$qemu_desktopdir" >> $config_host_mak echo "GIT=$git" >> $config_host_mak
Signature · 1 line
2.26.2
[PULL 13/17] WHPX: Fix WHPX build break
In reply to Paolo BonziniFrom: Sunil Muthuswamy <[email protected]>
With upstream commit#8a19980e3fc4, logic was introduced to only allow WHPX build on x64. But, the logic checks for the cpu family and not the cpu. On my fedora container build, the cpu family is x86 and the cpu is x86_64. Fixing the build break by checking for the cpu, instead of the cpu family.
Message-Id: <SN4PR2101MB0880D706A85793DDFC411304C01D0@SN4PR2101MB0880.namprd21.prod.outlook.com>
--- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +1 -1
@@ -204,7 +204,7 @@ else have_xen_pci_passthrough = false endif if not get_option('whpx').disabled() and targetos == 'windows' - if get_option('whpx').enabled() and cpu != 'x86_64' + if get_option('whpx').enabled() and host_machine.cpu() != 'x86_64' error('WHPX requires 64-bit host') elif cc.has_header('WinHvPlatform.h', required: get_option('whpx')) and \ cc.has_header('WinHvEmulation.h', required: get_option('whpx'))
Signature · 1 line
2.26.2
[PULL 11/17] configure: remove unused variable from config-host.mak
In reply to Paolo Bonzini--- configure | 2 -- 1 file changed, 2 deletions(-)
configure +0 -2
@@ -3612,7 +3612,6 @@ else if test "$found" = "no"; then LIBS="$pthread_lib $LIBS" fi - PTHREAD_LIB="$pthread_lib" break fi done
@@ -6742,7 +6741,6 @@ echo "GLIB_LIBS=$glib_libs" >> $config_host_mak echo "QEMU_LDFLAGS=$QEMU_LDFLAGS" >> $config_host_mak echo "LDFLAGS_NOPIE=$LDFLAGS_NOPIE" >> $config_host_mak echo "LD_I386_EMULATION=$ld_i386_emulation" >> $config_host_mak -echo "PTHREAD_LIB=$PTHREAD_LIB" >> $config_host_mak echo "EXESUF=$EXESUF" >> $config_host_mak echo "HOST_DSOSUF=$HOST_DSOSUF" >> $config_host_mak echo "LIBS_QGA=$libs_qga" >> $config_host_mak
Signature · 1 line
2.26.2
[PULL 14/17] win32: boot broken when bind & data dir are the same
In reply to Paolo BonziniFrom: Sunil Muthuswamy <[email protected]>
With upstream commit#ea1edcd7da1a "vl: relocate paths to data directories", the data dir logic was unified between POSIX & Win32. That patch moved to using 'get_relocated_path()', to find the data dir. There is a latent bug in get_relocated_path which can cause it to spin indefinitely, when the bind dir is the same as the passed in dir (in this case, it was the data dir).
Message-Id: <SN4PR2101MB08802BF242C429A15DDB32ACC01B0@SN4PR2101MB0880.namprd21.prod.outlook.com>
--- util/cutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
util/cutils.c +1 -1
@@ -949,7 +949,7 @@ char *get_relocated_path(const char *dir) bindir += len_bindir; dir =next_component (dir, &len_dir); bindir =next_component (bindir, &len_bindir); - }while (len_dir == len_bindir && !memcmp (dir, bindir, len_dir)); + }while (len_dir && len_dir == len_bindir && !memcmp (dir, bindir, len_dir));/* Ascend from bindir to the common prefix with dir. */ while (len_bindir) {
Signature · 1 line
2.26.2
[PULL 15/17] machine: remove deprecated -machine enforce-config-section option
In reply to Paolo BonziniDeprecated since 3.1 and complicates the initialization sequence, remove it.
--- docs/system/deprecated.rst | 12 ++++++------ hw/core/machine.c | 23 ----------------------- include/hw/boards.h | 1 - migration/migration.c | 10 ---------- qemu-options.hx | 8 -------- 5 files changed, 6 insertions(+), 48 deletions(-)
docs/system/deprecated.rst +6 -6
@@ -21,12 +21,6 @@ deprecated. System emulator command line arguments -------------------------------------- -``-machine enforce-config-section=on|off`` (since 3.1) -'''''''''''''''''''''''''''''''''''''''''''''''''''''' - -The ``enforce-config-section`` parameter is replaced by the -``-global migration.send-configuration={on|off}`` option. - ``-usbdevice`` (since 2.10.0) '''''''''''''''''''''''''''''
@@ -689,6 +683,12 @@ Support for invalid topologies is removed, the user must ensure topologies described with -smp include all possible cpus, i.e. *sockets* * *cores* * *threads* = *maxcpus*. +``-machine enforce-config-section=on|off`` (removed 5.2) +'''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +The ``enforce-config-section`` property was replaced by the +``-global migration.send-configuration={on|off}`` option. + Block devices -------------
hw/core/machine.c +0 -23
@@ -411,24 +411,6 @@ static bool machine_get_suppress_vmdesc(Object *obj, Error **errp)return ms->suppress_vmdesc; } -static void machine_set_enforce_config_section (Object *obj,bool value, -Error **errp) -{ -MachineState *ms =MACHINE (obj); - -warn_report ("enforce-config-section is deprecated, please use " -"-global migration.send-configuration=on|off instead" ); - - ms->enforce_config_section = value; -} - -static bool machine_get_enforce_config_section (Object *obj,Error **errp) -{ -MachineState *ms =MACHINE (obj); - -return ms->enforce_config_section; -} -static char *machine_get_memory_encryption (Object *obj,Error **errp) {MachineState *ms =MACHINE (obj);
@@ -857,11 +839,6 @@ static void machine_class_init(ObjectClass *oc, void *data)object_class_property_set_description (oc,"suppress-vmdesc" ,"Set on to disable self-describing migration" ); -object_class_property_add_bool (oc,"enforce-config-section" , - machine_get_enforce_config_section, machine_set_enforce_config_section); -object_class_property_set_description (oc,"enforce-config-section" , -"Set on to enforce configuration section migration" ); -object_class_property_add_str (oc,"memory-encryption" , machine_get_memory_encryption, machine_set_memory_encryption); object_class_property_set_description(oc, "memory-encryption",
include/hw/boards.h +0 -1
@@ -268,7 +268,6 @@ struct MachineState {char *firmware;bool iommu;bool suppress_vmdesc; -bool enforce_config_section;bool enable_graphics;char *memory_encryption;char *ram_memdev_id;
migration/migration.c +0 -10
@@ -145,7 +145,6 @@ static void migrate_fd_cancel(MigrationState *s);void migration_object_init (void ) { -MachineState *ms =MACHINE (qdev_get_machine ());Error *err =NULL ;/* This can only be called once. */
@@ -170,15 +169,6 @@ void migration_object_init(void)error_report_err (err);exit (1 ); } - -/* -* We cannot really do this in migration_instance_init() since at -* that time global properties are not yet applied, then this -* value will be definitely replaced by something else. -*/ -if (ms->enforce_config_section) { - current_migration->send_configuration = true; - } }void migration_shutdown (void )
qemu-options.hx +0 -8
@@ -34,7 +34,6 @@ DEF("machine", HAS_ARG, QEMU_OPTION_machine, \ " dea-key-wrap=on|off controls support for DEA key wrapping (default=on)\n" " suppress-vmdesc=on|off disables self-describing migration (default=off)\n" " nvdimm=on|off controls NVDIMM support (default=off)\n" - " enforce-config-section=on|off enforce configuration section migration (default=off)\n" " memory-encryption=@var{} memory encryption object to use (default=none)\n" " hmat=on|off controls ACPI HMAT support (default=off)\n", QEMU_ARCH_ALL)
@@ -91,13 +90,6 @@ SRST ``nvdimm=on|off`` Enables or disables NVDIMM support. The default is off. - ``enforce-config-section=on|off`` - If ``enforce-config-section`` is set to on, force migration code - to send configuration section even if the machine-type sets the - ``migration.send-configuration`` property to off. NOTE: this - parameter is deprecated. Please use ``-global`` - ``migration.send-configuration``\ =on\|off instead. - ``memory-encryption=`` Memory encryption object to use. The default is none.
Signature · 1 line
2.26.2
Peter Maydell
AppliedQuoted 22 lines · Paolo Bonzini
The following changes since commit
4c5b97bfd0dd54dc27717ae8d1cd10e14eef1430:Merge remote-tracking branch 'remotes/kraxel/tags/modules-20201022-pull-request' into staging (2020-10-22 12:33:21 +0100)
are available in the Git repository at:
https://gitlab.com/bonzini/qemu.git tags/for-upstream
for you to fetch changes up to
8b0e484c8bf82e07bb0439bff04e248c63cdc86a:machine: move SMP initialization from
vl.c(2020-10-26 07:08:40 -0400)----------------------------------------------------------------
* fix --disable-tcg builds (Claudio)
* Fixes for macOS --enable-modules build and OpenBSD curses/iconv detection (myself)
* Start preparing for meson 0.56 (myself)
* Move directory configuration to meson (myself)
* Start untanglingqemu_init(myself)
* Windows fixes (Sunil)
* Remove -no-kbm (Thomas)
Quoted 1 line
----------------------------------------------------------------
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
for any user-visible changes.
-- PMM
This pull request confused me, the windows msys2 build time slow down from 40min to more than one hour.
Quoted 4 lines · Peter Maydell
Quoted 2 lines · Paolo Bonzini
The following changes since commit
4c5b97bfd0dd54dc27717ae8d1cd10e14eef1430:
Quoted 2 lines
Quoted 2 lines
Merge remote-tracking branch
'remotes/kraxel/tags/modules-20201022-pull-request' into staging (2020-10-22 12:33:21 +0100)
Quoted 5 lines
Quoted 5 lines
are available in the Git repository at:
https://gitlab.com/bonzini/qemu.git tags/for-upstream
Quoted 7 lines
Quoted 7 lines
for you to fetch changes up to
8b0e484c8bf82e07bb0439bff04e248c63cdc86a:machine: move SMP initialization from
vl.c(2020-10-26 07:08:40 -0400)----------------------------------------------------------------
* fix --disable-tcg builds (Claudio)
* Fixes for macOS --enable-modules build and OpenBSD curses/iconv
detection (myself)
Quoted 9 lines
Quoted 7 lines
* Start preparing for meson 0.56 (myself)
* Move directory configuration to meson (myself)
* Start untanglingqemu_init(myself)
* Windows fixes (Sunil)
* Remove -no-kbm (Thomas)----------------------------------------------------------------
Quoted 7 lines
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/5.2
for any user-visible changes.-- PMM
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
Il lun 26 ott 2020, 19:59 罗勇刚(Yonggang Luo) <[email protected]> ha scritto:
Quoted 3 lines
This pull request confused me, the windows msys2 build time slow down from 40min to more than one hour.
Probably just the cache being rebuilt. Cirrus CI times seem to vary a lot but 40min and 1h5min seem to be the common cases before or after these changes:
https://cirrus-ci.com/task/5531259461959680
With this PR: 35+2 (build+test)
https://cirrus-ci.com/task/4570682912669696
With this PR: 10+4
https://cirrus-ci.com/task/6662289128423424
With this PR: 35+2, +20 to rebuild cirrus cache
https://cirrus-ci.com/task/5383432727429120
Without this PR: 30+2, +18 to rebuild cirrus cache
Paolo
Quoted 1 line
Quoted 4 lines · Paolo Bonzini
Il lun 26 ott 2020, 19:59 罗勇刚(Yonggang Luo) <[email protected]> ha
scritto:
Quoted 2 lines
Quoted 2 lines
This pull request confused me, the windows msys2 build time slow down
from 40min to more than one hour.
Quoted 3 lines
Probably just the cache being rebuilt. Cirrus CI times seem to vary a lot
but 40min and 1h5min seem to be the common cases before or after these changes:
Quoted 7 lines
https://cirrus-ci.com/task/5531259461959680
With this PR: 35+2 (build+test)https://cirrus-ci.com/task/4570682912669696
With this PR: 10+4
Quoted 7 lines
https://cirrus-ci.com/task/6662289128423424
With this PR: 35+2, +20 to rebuild cirrus cachehttps://cirrus-ci.com/task/5383432727429120
Without this PR: 30+2, +18 to rebuild cirrus cachePaolo
That's correct, cirrus's building time are not stable. My own build are already passed.
https://cirrus-ci.com/task/5357017537708032, if the cache are works, then it's definitely won't exceed the time
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo