* [PULL v2 00/50] testing updates (vm, gitlab, misc build fixes) @ 2020-07-11 17:07 Alex Bennée 2020-07-11 17:07 ` [PULL v2 04/50] tests/vm: Add configuration to basevm.py Alex Bennée ` (10 more replies) 0 siblings, 11 replies; 12+ messages in thread From: Alex Bennée @ 2020-07-11 17:07 UTC (permalink / raw) To: peter.maydell; +Cc: Alex Bennée, qemu-devel Fixed a few, dropped a few, added a few --- The following changes since commit 827937158b72ce2265841ff528bba3c44a1bfbc8: Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20200710' into staging (2020-07-11 13:56:03 +0100) are available in the Git repository at: https://github.com/stsquad/qemu.git tags/pull-testing-and-misc-110720-2 for you to fetch changes up to 4a40f561d5ebb5050a8c6dcbdcee85621056590a: iotests: Set LC_ALL=C for sort (2020-07-11 15:53:29 +0100) ---------------------------------------------------------------- Testing and misc build updates: - tests/vm support for aarch64 VMs - tests/tcg better cross-compiler detection - update docker tooling to support registries - update docker support for xtensa - gitlab build docker images and store in registry - gitlab use docker images for builds - a number of skipIf updates to support move - linux-user MAP_FIXED_NOREPLACE fix - qht-bench compiler tweaks - configure fix for secret keyring - tsan fiber annotation clean-up - doc updates for mttcg/icount/gdbstub - fix cirrus to use brew bash for iotests - revert virtio-gpu breakage - fix LC_ALL to avoid sorting changes in iotests ---------------------------------------------------------------- Alex Bennée (26): tests/vm: switch from optsparse to argparse tests/vm: allow us to take advantage of MTTCG tests/docker: check for an parameters not empty string tests/docker: change tag naming scheme of our images .gitignore: un-ignore .gitlab-ci.d gitlab: build containers with buildkit and metadata tests/docker: add --registry support to tooling tests/docker: add packages needed for check-acceptance tests/acceptance: skip s390x_ccw_vrtio_tcg on GitLab tests/acceptance: fix dtb path for machine_rx_gdbsim tests/acceptance: skip multicore mips_malta tests on GitLab tests/acceptance: skip LinuxInitrd 2gib with v4.16 on GitLab gitlab: add acceptance testing to system builds tests/tcg: add more default compilers to configure.sh tests/docker: add a linux-user testing focused image linux-user/elfload: use MAP_FIXED_NOREPLACE in pgb_reserved_va gitlab: enable check-tcg for linux-user tests gitlab: add avocado asset caching gitlab: limit re-builds of the containers containers.yml: build with docker.py tooling testing: add check-build target shippable: pull images from registry instead of building docs/devel: convert and update MTTCG design document docs/devel: add some notes on tcg-icount for developers tests/docker: fall back more gracefully when pull fails .cirrus.yml: add bash to the brew packages Daniel P. Berrangé (4): gitlab: introduce explicit "container" and "build" stages gitlab: build all container images during CI gitlab: convert jobs to use custom built containers tests: improve performance of device-introspect-test David Edmondson (1): crypto/linux_keyring: fix 'secret_keyring' configure test Gerd Hoffmann (2): tests: fix "make check-qtest" for modular builds Revert "vga: build virtio-gpu as module" Jon Doron (1): docs: Add to gdbstub documentation the PhyMemMode Max Filippov (1): tests/docker: update toolchain set in debian-xtensa-cross Max Reitz (1): iotests: Set LC_ALL=C for sort Richard Henderson (2): tests/qht-bench: Adjust testing rate by -1 tests/qht-bench: Adjust threshold computation Robert Foley (10): util/coroutine: Cleanup start_switch_fiber_ for TSAN. tests/vm: pass args through to BaseVM's __init__ tests/vm: Add configuration to basevm.py tests/vm: Added configuration file support tests/vm: Add common Ubuntu python module tests/vm: Added a new script for ubuntu.aarch64. tests/vm: Added a new script for centos.aarch64. tests/vm: change scripts to use self._config python/qemu: Add ConsoleSocket for optional use in QEMUMachine tests/vm: Add workaround to consume console Thomas Huth (2): gitlab-ci: Fix the change rules after moving the YML files travis.yml: Test also the other targets on s390x docs/devel/index.rst | 2 + .../{multi-thread-tcg.txt => multi-thread-tcg.rst} | 52 ++-- docs/devel/tcg-icount.rst | 97 ++++++ docs/system/gdb.rst | 20 ++ configure | 31 +- linux-user/elfload.c | 10 +- tests/qht-bench.c | 40 ++- tests/qtest/device-introspect-test.c | 60 ++-- util/coroutine-ucontext.c | 52 ++-- util/module.c | 6 - .cirrus.yml | 4 +- .gitignore | 1 + .gitlab-ci.d/containers.yml | 263 ++++++++++++++++ .gitlab-ci.d/edk2.yml | 5 +- .gitlab-ci.d/opensbi.yml | 5 +- .gitlab-ci.yml | 265 ++++++++++------ .shippable.yml | 8 +- .travis.yml | 62 ++-- hw/display/Makefile.objs | 23 +- python/qemu/console_socket.py | 110 +++++++ python/qemu/machine.py | 23 +- tests/Makefile.include | 19 +- tests/acceptance/boot_linux.py | 2 + tests/acceptance/linux_initrd.py | 3 + tests/acceptance/machine_mips_malta.py | 3 + tests/acceptance/machine_rx_gdbsim.py | 2 +- tests/acceptance/replay_kernel.py | 2 +- tests/docker/Makefile.include | 17 +- tests/docker/common.rc | 2 +- tests/docker/docker.py | 47 ++- .../dockerfiles/debian-all-test-cross.docker | 53 ++++ tests/docker/dockerfiles/debian-alpha-cross.docker | 2 +- tests/docker/dockerfiles/debian-amd64-cross.docker | 2 +- tests/docker/dockerfiles/debian-amd64.docker | 2 +- tests/docker/dockerfiles/debian-arm64-cross.docker | 2 +- .../dockerfiles/debian-arm64-test-cross.docker | 2 +- tests/docker/dockerfiles/debian-armel-cross.docker | 2 +- tests/docker/dockerfiles/debian-armhf-cross.docker | 2 +- tests/docker/dockerfiles/debian-hppa-cross.docker | 2 +- tests/docker/dockerfiles/debian-m68k-cross.docker | 2 +- tests/docker/dockerfiles/debian-mips-cross.docker | 2 +- .../docker/dockerfiles/debian-mips64-cross.docker | 2 +- .../dockerfiles/debian-mips64el-cross.docker | 2 +- .../docker/dockerfiles/debian-mipsel-cross.docker | 2 +- .../docker/dockerfiles/debian-powerpc-cross.docker | 2 +- tests/docker/dockerfiles/debian-ppc64-cross.docker | 2 +- .../docker/dockerfiles/debian-ppc64el-cross.docker | 2 +- .../docker/dockerfiles/debian-riscv64-cross.docker | 2 +- tests/docker/dockerfiles/debian-s390x-cross.docker | 2 +- tests/docker/dockerfiles/debian-sh4-cross.docker | 2 +- .../docker/dockerfiles/debian-sparc64-cross.docker | 2 +- .../docker/dockerfiles/debian-tricore-cross.docker | 2 +- tests/docker/dockerfiles/debian-win32-cross.docker | 2 +- tests/docker/dockerfiles/debian-win64-cross.docker | 2 +- .../docker/dockerfiles/debian-xtensa-cross.docker | 6 +- tests/docker/dockerfiles/debian9-mxe.docker | 2 +- tests/docker/dockerfiles/fedora.docker | 7 + tests/docker/dockerfiles/ubuntu2004.docker | 10 +- tests/qemu-iotests/common.filter | 2 +- tests/qtest/Makefile.include | 1 + tests/tcg/Makefile.qemu | 4 +- tests/tcg/configure.sh | 21 +- tests/vm/Makefile.include | 22 ++ tests/vm/aarch64vm.py | 106 +++++++ tests/vm/basevm.py | 344 +++++++++++++++------ tests/vm/centos-8-aarch64.ks | 51 +++ tests/vm/centos.aarch64 | 227 ++++++++++++++ tests/vm/conf_example_aarch64.yml | 51 +++ tests/vm/conf_example_x86.yml | 50 +++ tests/vm/fedora | 17 +- tests/vm/freebsd | 16 +- tests/vm/netbsd | 19 +- tests/vm/openbsd | 17 +- tests/vm/ubuntu.aarch64 | 68 ++++ tests/vm/ubuntu.i386 | 46 +-- tests/vm/ubuntuvm.py | 60 ++++ 76 files changed, 2034 insertions(+), 448 deletions(-) rename docs/devel/{multi-thread-tcg.txt => multi-thread-tcg.rst} (90%) create mode 100644 docs/devel/tcg-icount.rst create mode 100644 .gitlab-ci.d/containers.yml create mode 100644 python/qemu/console_socket.py create mode 100644 tests/docker/dockerfiles/debian-all-test-cross.docker create mode 100644 tests/vm/aarch64vm.py create mode 100644 tests/vm/centos-8-aarch64.ks create mode 100755 tests/vm/centos.aarch64 create mode 100644 tests/vm/conf_example_aarch64.yml create mode 100644 tests/vm/conf_example_x86.yml create mode 100755 tests/vm/ubuntu.aarch64 create mode 100644 tests/vm/ubuntuvm.py -- 2.20.1 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PULL v2 04/50] tests/vm: Add configuration to basevm.py 2020-07-11 17:07 [PULL v2 00/50] testing updates (vm, gitlab, misc build fixes) Alex Bennée @ 2020-07-11 17:07 ` Alex Bennée 2020-07-11 17:07 ` [PULL v2 42/50] docs/devel: convert and update MTTCG design document Alex Bennée ` (9 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: Alex Bennée @ 2020-07-11 17:07 UTC (permalink / raw) To: peter.maydell Cc: Fam Zheng, Robert Foley, Alex Bennée, qemu-devel, Peter Puhov, Philippe Mathieu-Daudé From: Robert Foley <robert.foley@linaro.org> Added use of a configuration to tests/vm/basevm.py. The configuration provides parameters used to configure a VM. This allows for providing alternate configurations to the VM being created/launched. cpu, machine, memory, and NUMA configuration are all examples of configuration which we might want to vary on the VM being created or launched. This will for example allow for creating an aarch64 vm. Signed-off-by: Robert Foley <robert.foley@linaro.org> Reviewed-by: Peter Puhov <peter.puhov@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200601211421.1277-3-robert.foley@linaro.org> Message-Id: <20200701135652.1366-7-alex.bennee@linaro.org> diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 5a58e6c393..5ae39ad113 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -29,16 +29,41 @@ import tempfile import shutil import multiprocessing import traceback - -SSH_KEY = open(os.path.join(os.path.dirname(__file__), - "..", "keys", "id_rsa")).read() -SSH_PUB_KEY = open(os.path.join(os.path.dirname(__file__), - "..", "keys", "id_rsa.pub")).read() - +import shlex + +SSH_KEY_FILE = os.path.join(os.path.dirname(__file__), + "..", "keys", "id_rsa") +SSH_PUB_KEY_FILE = os.path.join(os.path.dirname(__file__), + "..", "keys", "id_rsa.pub") + +# This is the standard configuration. +# Any or all of these can be overridden by +# passing in a config argument to the VM constructor. +DEFAULT_CONFIG = { + 'cpu' : "max", + 'machine' : 'pc', + 'guest_user' : "qemu", + 'guest_pass' : "qemupass", + 'root_pass' : "qemupass", + 'ssh_key_file' : SSH_KEY_FILE, + 'ssh_pub_key_file': SSH_PUB_KEY_FILE, + 'memory' : "4G", + 'extra_args' : [], + 'qemu_args' : "", + 'dns' : "", + 'ssh_port' : 0, + 'install_cmds' : "", + 'boot_dev_type' : "block", + 'ssh_timeout' : 1, +} +BOOT_DEVICE = { + 'block' : "-drive file={},if=none,id=drive0,cache=writeback "\ + "-device virtio-blk,drive=drive0,bootindex=0", + 'scsi' : "-device virtio-scsi-device,id=scsi "\ + "-drive file={},format=raw,if=none,id=hd0 "\ + "-device scsi-hd,drive=hd0,bootindex=0", +} class BaseVM(object): - GUEST_USER = "qemu" - GUEST_PASS = "qemupass" - ROOT_PASS = "qemupass" envvars = [ "https_proxy", @@ -57,25 +82,38 @@ class BaseVM(object): poweroff = "poweroff" # enable IPv6 networking ipv6 = True + # This is the timeout on the wait for console bytes. + socket_timeout = 120 # Scale up some timeouts under TCG. # 4 is arbitrary, but greater than 2, # since we found we need to wait more than twice as long. tcg_ssh_timeout_multiplier = 4 - def __init__(self, args): + def __init__(self, args, config=None): self._guest = None self._genisoimage = args.genisoimage self._build_path = args.build_path + # Allow input config to override defaults. + self._config = DEFAULT_CONFIG.copy() + if config != None: + self._config.update(config) + self.validate_ssh_keys() self._tmpdir = os.path.realpath(tempfile.mkdtemp(prefix="vm-test-", suffix=".tmp", dir=".")) atexit.register(shutil.rmtree, self._tmpdir) - - self._ssh_key_file = os.path.join(self._tmpdir, "id_rsa") - open(self._ssh_key_file, "w").write(SSH_KEY) - subprocess.check_call(["chmod", "600", self._ssh_key_file]) - - self._ssh_pub_key_file = os.path.join(self._tmpdir, "id_rsa.pub") - open(self._ssh_pub_key_file, "w").write(SSH_PUB_KEY) + # Copy the key files to a temporary directory. + # Also chmod the key file to agree with ssh requirements. + self._config['ssh_key'] = \ + open(self._config['ssh_key_file']).read().rstrip() + self._config['ssh_pub_key'] = \ + open(self._config['ssh_pub_key_file']).read().rstrip() + self._ssh_tmp_key_file = os.path.join(self._tmpdir, "id_rsa") + open(self._ssh_tmp_key_file, "w").write(self._config['ssh_key']) + subprocess.check_call(["chmod", "600", self._ssh_tmp_key_file]) + + self._ssh_tmp_pub_key_file = os.path.join(self._tmpdir, "id_rsa.pub") + open(self._ssh_tmp_pub_key_file, + "w").write(self._config['ssh_pub_key']) self.debug = args.debug self._stderr = sys.stderr @@ -84,11 +122,14 @@ class BaseVM(object): self._stdout = sys.stdout else: self._stdout = self._devnull + netdev = "user,id=vnet,hostfwd=:127.0.0.1:{}-:22" self._args = [ \ - "-nodefaults", "-m", "4G", - "-cpu", "max", - "-netdev", "user,id=vnet,hostfwd=:127.0.0.1:0-:22" + - (",ipv6=no" if not self.ipv6 else ""), + "-nodefaults", "-m", self._config['memory'], + "-cpu", self._config['cpu'], + "-netdev", + netdev.format(self._config['ssh_port']) + + (",ipv6=no" if not self.ipv6 else "") + + (",dns=" + self._config['dns'] if self._config['dns'] else ""), "-device", "virtio-net-pci,netdev=vnet", "-vnc", "127.0.0.1:0,to=20"] if args.jobs and args.jobs > 1: @@ -99,6 +140,55 @@ class BaseVM(object): logging.info("KVM not available, not using -enable-kvm") self._data_args = [] + if self._config['qemu_args'] != None: + qemu_args = self._config['qemu_args'] + qemu_args = qemu_args.replace('\n',' ').replace('\r','') + # shlex groups quoted arguments together + # we need this to keep the quoted args together for when + # the QEMU command is issued later. + args = shlex.split(qemu_args) + self._config['extra_args'] = [] + for arg in args: + if arg: + # Preserve quotes around arguments. + # shlex above takes them out, so add them in. + if " " in arg: + arg = '"{}"'.format(arg) + self._config['extra_args'].append(arg) + + def validate_ssh_keys(self): + """Check to see if the ssh key files exist.""" + if 'ssh_key_file' not in self._config or\ + not os.path.exists(self._config['ssh_key_file']): + raise Exception("ssh key file not found.") + if 'ssh_pub_key_file' not in self._config or\ + not os.path.exists(self._config['ssh_pub_key_file']): + raise Exception("ssh pub key file not found.") + + def wait_boot(self, wait_string=None): + """Wait for the standard string we expect + on completion of a normal boot. + The user can also choose to override with an + alternate string to wait for.""" + if wait_string is None: + if self.login_prompt is None: + raise Exception("self.login_prompt not defined") + wait_string = self.login_prompt + # Intentionally bump up the default timeout under TCG, + # since the console wait below takes longer. + timeout = self.socket_timeout + if not kvm_available(self.arch): + timeout *= 8 + self.console_init(timeout=timeout) + self.console_wait(wait_string) + + def __getattr__(self, name): + # Support direct access to config by key. + # for example, access self._config['cpu'] by self.cpu + if name.lower() in self._config.keys(): + return self._config[name.lower()] + return object.__getattribute__(self, name) + def _download_with_cache(self, url, sha256sum=None, sha512sum=None): def check_sha256sum(fname): if not sha256sum: @@ -130,8 +220,9 @@ class BaseVM(object): "-t", "-o", "StrictHostKeyChecking=no", "-o", "UserKnownHostsFile=" + os.devnull, - "-o", "ConnectTimeout=1", - "-p", self.ssh_port, "-i", self._ssh_key_file] + "-o", + "ConnectTimeout={}".format(self._config["ssh_timeout"]), + "-p", self.ssh_port, "-i", self._ssh_tmp_key_file] # If not in debug mode, set ssh to quiet mode to # avoid printing the results of commands. if not self.debug: @@ -180,14 +271,14 @@ class BaseVM(object): "virtio-blk,drive=%s,serial=%s,bootindex=1" % (name, name)] def boot(self, img, extra_args=[]): - args = self._args + [ - "-drive", "file=%s,if=none,id=drive0,cache=writeback" % img, - "-device", "virtio-blk,drive=drive0,bootindex=0"] - args += self._data_args + extra_args + boot_dev = BOOT_DEVICE[self._config['boot_dev_type']] + boot_params = boot_dev.format(img) + args = self._args + boot_params.split(' ') + args += self._data_args + extra_args + self._config['extra_args'] logging.debug("QEMU args: %s", " ".join(args)) qemu_path = get_qemu_path(self.arch, self._build_path) guest = QEMUMachine(binary=qemu_path, args=args) - guest.set_machine('pc') + guest.set_machine(self._config['machine']) guest.set_console() try: guest.launch() @@ -301,7 +392,8 @@ class BaseVM(object): self.console_send(command) def console_ssh_init(self, prompt, user, pw): - sshkey_cmd = "echo '%s' > .ssh/authorized_keys\n" % SSH_PUB_KEY.rstrip() + sshkey_cmd = "echo '%s' > .ssh/authorized_keys\n" \ + % self._config['ssh_pub_key'].rstrip() self.console_wait_send("login:", "%s\n" % user) self.console_wait_send("Password:", "%s\n" % pw) self.console_wait_send(prompt, "mkdir .ssh\n") @@ -360,23 +452,23 @@ class BaseVM(object): "local-hostname: {}-guest\n".format(name)]) mdata.close() udata = open(os.path.join(cidir, "user-data"), "w") - print("guest user:pw {}:{}".format(self.GUEST_USER, - self.GUEST_PASS)) + print("guest user:pw {}:{}".format(self._config['guest_user'], + self._config['guest_pass'])) udata.writelines(["#cloud-config\n", "chpasswd:\n", " list: |\n", - " root:%s\n" % self.ROOT_PASS, - " %s:%s\n" % (self.GUEST_USER, - self.GUEST_PASS), + " root:%s\n" % self._config['root_pass'], + " %s:%s\n" % (self._config['guest_user'], + self._config['guest_pass']), " expire: False\n", "users:\n", - " - name: %s\n" % self.GUEST_USER, + " - name: %s\n" % self._config['guest_user'], " sudo: ALL=(ALL) NOPASSWD:ALL\n", " ssh-authorized-keys:\n", - " - %s\n" % SSH_PUB_KEY, + " - %s\n" % self._config['ssh_pub_key'], " - name: root\n", " ssh-authorized-keys:\n", - " - %s\n" % SSH_PUB_KEY, + " - %s\n" % self._config['ssh_pub_key'], "locale: en_US.UTF-8\n"]) proxy = os.environ.get("http_proxy") if not proxy is None: @@ -447,15 +539,17 @@ def parse_args(vmcls): parser.disable_interspersed_args() return parser.parse_args() -def main(vmcls): +def main(vmcls, config=None): try: + if config == None: + config = DEFAULT_CONFIG args, argv = parse_args(vmcls) if not argv and not args.build_qemu and not args.build_image: print("Nothing to do?") return 1 logging.basicConfig(level=(logging.DEBUG if args.debug else logging.WARN)) - vm = vmcls(args) + vm = vmcls(args, config=config) if args.build_image: if os.path.exists(args.image) and not args.force: sys.stderr.writelines(["Image file exists: %s\n" % args.image, -- 2.20.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PULL v2 42/50] docs/devel: convert and update MTTCG design document 2020-07-11 17:07 [PULL v2 00/50] testing updates (vm, gitlab, misc build fixes) Alex Bennée 2020-07-11 17:07 ` [PULL v2 04/50] tests/vm: Add configuration to basevm.py Alex Bennée @ 2020-07-11 17:07 ` Alex Bennée 2020-07-11 17:07 ` [PULL v2 43/50] docs/devel: add some notes on tcg-icount for developers Alex Bennée ` (8 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: Alex Bennée @ 2020-07-11 17:07 UTC (permalink / raw) To: peter.maydell; +Cc: Richard Henderson, Alex Bennée, qemu-devel Do a light conversion to .rst and clean-up some of the language at the start now MTTCG has been merged for a while. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20200709141327.14631-2-alex.bennee@linaro.org> diff --git a/docs/devel/index.rst b/docs/devel/index.rst index bb8238c5d6..4ecaea3643 100644 --- a/docs/devel/index.rst +++ b/docs/devel/index.rst @@ -23,6 +23,7 @@ Contents: decodetree secure-coding-practices tcg + multi-thread-tcg tcg-plugins bitops reset diff --git a/docs/devel/multi-thread-tcg.txt b/docs/devel/multi-thread-tcg.rst similarity index 90% rename from docs/devel/multi-thread-tcg.txt rename to docs/devel/multi-thread-tcg.rst index 3c85ac0eab..42158b77c7 100644 --- a/docs/devel/multi-thread-tcg.txt +++ b/docs/devel/multi-thread-tcg.rst @@ -1,15 +1,17 @@ -Copyright (c) 2015-2016 Linaro Ltd. +.. + Copyright (c) 2015-2020 Linaro Ltd. -This work is licensed under the terms of the GNU GPL, version 2 or -later. See the COPYING file in the top-level directory. + This work is licensed under the terms of the GNU GPL, version 2 or + later. See the COPYING file in the top-level directory. Introduction ============ -This document outlines the design for multi-threaded TCG system-mode -emulation. The current user-mode emulation mirrors the thread -structure of the translated executable. Some of the work will be -applicable to both system and linux-user emulation. +This document outlines the design for multi-threaded TCG (a.k.a MTTCG) +system-mode emulation. user-mode emulation has always mirrored the +thread structure of the translated executable although some of the +changes done for MTTCG system emulation have improved the stability of +linux-user emulation. The original system-mode TCG implementation was single threaded and dealt with multiple CPUs with simple round-robin scheduling. This @@ -21,9 +23,18 @@ vCPU Scheduling =============== We introduce a new running mode where each vCPU will run on its own -user-space thread. This will be enabled by default for all FE/BE -combinations that have had the required work done to support this -safely. +user-space thread. This is enabled by default for all FE/BE +combinations where the host memory model is able to accommodate the +guest (TCG_GUEST_DEFAULT_MO & ~TCG_TARGET_DEFAULT_MO is zero) and the +guest has had the required work done to support this safely +(TARGET_SUPPORTS_MTTCG). + +System emulation will fall back to the original round robin approach +if: + +* forced by --accel tcg,thread=single +* enabling --icount mode +* 64 bit guests on 32 bit hosts (TCG_OVERSIZED_GUEST) In the general case of running translated code there should be no inter-vCPU dependencies and all vCPUs should be able to run at full @@ -61,7 +72,9 @@ have their block-to-block jumps patched. Global TCG State ---------------- -### User-mode emulation +User-mode emulation +~~~~~~~~~~~~~~~~~~~ + We need to protect the entire code generation cycle including any post generation patching of the translated code. This also implies a shared translation buffer which contains code running on all cores. Any @@ -78,9 +91,11 @@ patching. Code generation is serialised with mmap_lock(). -### !User-mode emulation +!User-mode emulation +~~~~~~~~~~~~~~~~~~~~ + Each vCPU has its own TCG context and associated TCG region, thereby -requiring no locking. +requiring no locking during translation. Translation Blocks ------------------ @@ -92,6 +107,7 @@ including: - debugging operations (breakpoint insertion/removal) - some CPU helper functions + - linux-user spawning it's first thread This is done with the async_safe_run_on_cpu() mechanism to ensure all vCPUs are quiescent when changes are being made to shared global @@ -250,8 +266,10 @@ to enforce a particular ordering of memory operations from the point of view of external observers (e.g. another processor core). They can apply to any memory operations as well as just loads or stores. -The Linux kernel has an excellent write-up on the various forms of -memory barrier and the guarantees they can provide [1]. +The Linux kernel has an excellent `write-up +<https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/memory-barriers.txt>` +on the various forms of memory barrier and the guarantees they can +provide. Barriers are often wrapped around synchronisation primitives to provide explicit memory ordering semantics. However they can be used @@ -352,7 +370,3 @@ an exclusive lock which ensures all emulation is serialised. While the atomic helpers look good enough for now there may be a need to look at solutions that can more closely model the guest architectures semantics. - -========== - -[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/memory-barriers.txt -- 2.20.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PULL v2 43/50] docs/devel: add some notes on tcg-icount for developers 2020-07-11 17:07 [PULL v2 00/50] testing updates (vm, gitlab, misc build fixes) Alex Bennée 2020-07-11 17:07 ` [PULL v2 04/50] tests/vm: Add configuration to basevm.py Alex Bennée 2020-07-11 17:07 ` [PULL v2 42/50] docs/devel: convert and update MTTCG design document Alex Bennée @ 2020-07-11 17:07 ` Alex Bennée 2020-07-11 17:07 ` [PULL v2 44/50] docs: Add to gdbstub documentation the PhyMemMode Alex Bennée ` (7 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: Alex Bennée @ 2020-07-11 17:07 UTC (permalink / raw) To: peter.maydell Cc: Richard Henderson, Alex Bennée, qemu-devel, Pavel Dovgalyuk, Paolo Bonzini This attempts to bring together my understanding of the requirements for icount behaviour into one reference document for our developer notes. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Pavel Dovgalyuk <dovgaluk@ispras.ru> Cc: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20200709141327.14631-3-alex.bennee@linaro.org> diff --git a/docs/devel/index.rst b/docs/devel/index.rst index 4ecaea3643..ae6eac7c9c 100644 --- a/docs/devel/index.rst +++ b/docs/devel/index.rst @@ -23,6 +23,7 @@ Contents: decodetree secure-coding-practices tcg + tcg-icount multi-thread-tcg tcg-plugins bitops diff --git a/docs/devel/tcg-icount.rst b/docs/devel/tcg-icount.rst new file mode 100644 index 0000000000..8d67b6c076 --- /dev/null +++ b/docs/devel/tcg-icount.rst @@ -0,0 +1,97 @@ +.. + Copyright (c) 2020, Linaro Limited + Written by Alex Bennée + + +======================== +TCG Instruction Counting +======================== + +TCG has long supported a feature known as icount which allows for +instruction counting during execution. This should not be confused +with cycle accurate emulation - QEMU does not attempt to emulate how +long an instruction would take on real hardware. That is a job for +other more detailed (and slower) tools that simulate the rest of a +micro-architecture. + +This feature is only available for system emulation and is +incompatible with multi-threaded TCG. It can be used to better align +execution time with wall-clock time so a "slow" device doesn't run too +fast on modern hardware. It can also provides for a degree of +deterministic execution and is an essential part of the record/replay +support in QEMU. + +Core Concepts +============= + +At its heart icount is simply a count of executed instructions which +is stored in the TimersState of QEMU's timer sub-system. The number of +executed instructions can then be used to calculate QEMU_CLOCK_VIRTUAL +which represents the amount of elapsed time in the system since +execution started. Depending on the icount mode this may either be a +fixed number of ns per instruction or adjusted as execution continues +to keep wall clock time and virtual time in sync. + +To be able to calculate the number of executed instructions the +translator starts by allocating a budget of instructions to be +executed. The budget of instructions is limited by how long it will be +until the next timer will expire. We store this budget as part of a +vCPU icount_decr field which shared with the machinery for handling +cpu_exit(). The whole field is checked at the start of every +translated block and will cause a return to the outer loop to deal +with whatever caused the exit. + +In the case of icount, before the flag is checked we subtract the +number of instructions the translation block would execute. If this +would cause the instruction budget to go negative we exit the main +loop and regenerate a new translation block with exactly the right +number of instructions to take the budget to 0 meaning whatever timer +was due to expire will expire exactly when we exit the main run loop. + +Dealing with MMIO +----------------- + +While we can adjust the instruction budget for known events like timer +expiry we cannot do the same for MMIO. Every load/store we execute +might potentially trigger an I/O event, at which point we will need an +up to date and accurate reading of the icount number. + +To deal with this case, when an I/O access is made we: + + - restore un-executed instructions to the icount budget + - re-compile a single [1]_ instruction block for the current PC + - exit the cpu loop and execute the re-compiled block + +The new block is created with the CF_LAST_IO compile flag which +ensures the final instruction translation starts with a call to +gen_io_start() so we don't enter a perpetual loop constantly +recompiling a single instruction block. For translators using the +common translator_loop this is done automatically. + +.. [1] sometimes two instructions if dealing with delay slots + +Other I/O operations +-------------------- + +MMIO isn't the only type of operation for which we might need a +correct and accurate clock. IO port instructions and accesses to +system registers are the common examples here. These instructions have +to be handled by the individual translators which have the knowledge +of which operations are I/O operations. + +When the translator is handling an instruction of this kind: + +* it must call gen_io_start() if icount is enabled, at some + point before the generation of the code which actually does + the I/O, using a code fragment similar to: + +.. code:: c + + if (tb_cflags(s->base.tb) & CF_USE_ICOUNT) { + gen_io_start(); + } + +* it must end the TB immediately after this instruction + +Note that some older front-ends call a "gen_io_end()" function: +this is obsolete and should not be used. -- 2.20.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PULL v2 44/50] docs: Add to gdbstub documentation the PhyMemMode 2020-07-11 17:07 [PULL v2 00/50] testing updates (vm, gitlab, misc build fixes) Alex Bennée ` (2 preceding siblings ...) 2020-07-11 17:07 ` [PULL v2 43/50] docs/devel: add some notes on tcg-icount for developers Alex Bennée @ 2020-07-11 17:07 ` Alex Bennée 2020-07-11 17:07 ` [PULL v2 45/50] tests/docker: fall back more gracefully when pull fails Alex Bennée ` (6 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: Alex Bennée @ 2020-07-11 17:07 UTC (permalink / raw) To: peter.maydell Cc: Philippe Mathieu-Daudé, Alex Bennée, qemu-devel, Jon Doron From: Jon Doron <arilou@gmail.com> The PhyMemMode gdb extension command was missing from the gdb.rst document. Signed-off-by: Jon Doron <arilou@gmail.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200601171609.1665397-1-arilou@gmail.com> Message-Id: <20200709141327.14631-4-alex.bennee@linaro.org> diff --git a/docs/system/gdb.rst b/docs/system/gdb.rst index a40145fcf8..abda961e2b 100644 --- a/docs/system/gdb.rst +++ b/docs/system/gdb.rst @@ -87,3 +87,23 @@ three commands you can query and set the single step behavior: (gdb) maintenance packet Qqemu.sstep=0x5 sending: "qemu.sstep=0x5" received: "OK" + + +Another feature that QEMU gdbstub provides is to toggle the memory GDB +works with, by default GDB will show the current process memory respecting +the virtual address translation. + +If you want to examine/change the physical memory you can set the gdbstub +to work with the physical memory rather with the virtual one. + +The memory mode can be checked by sending the following command: + +``maintenance packet qqemu.PhyMemMode`` + This will return either 0 or 1, 1 indicates you are currently in the + physical memory mode. + +``maintenance packet Qqemu.PhyMemMode:1`` + This will change the memory mode to physical memory. + +``maintenance packet Qqemu.PhyMemMode:0`` + This will change it back to normal memory mode. -- 2.20.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PULL v2 45/50] tests/docker: fall back more gracefully when pull fails 2020-07-11 17:07 [PULL v2 00/50] testing updates (vm, gitlab, misc build fixes) Alex Bennée ` (3 preceding siblings ...) 2020-07-11 17:07 ` [PULL v2 44/50] docs: Add to gdbstub documentation the PhyMemMode Alex Bennée @ 2020-07-11 17:07 ` Alex Bennée 2020-07-11 17:07 ` [PULL v2 46/50] tests/docker: update toolchain set in debian-xtensa-cross Alex Bennée ` (5 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: Alex Bennée @ 2020-07-11 17:07 UTC (permalink / raw) To: peter.maydell Cc: Fam Zheng, Philippe Mathieu-Daudé, Alex Bennée, qemu-devel, Philippe Mathieu-Daudé I only spotted this in the small window between my testing with my registry while waiting for the gitlab PR to go in. As we pre-pull the registry image we know if that fails there isn't any point attempting to use the cache. Fall back to the way we used to do it at that point. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200709141327.14631-12-alex.bennee@linaro.org> diff --git a/tests/docker/docker.py b/tests/docker/docker.py index 9684f07bde..2d67bbd15a 100755 --- a/tests/docker/docker.py +++ b/tests/docker/docker.py @@ -306,13 +306,14 @@ class Docker(object): checksum = _text_checksum(_dockerfile_preprocess(dockerfile)) if registry is not None: - dockerfile = dockerfile.replace("FROM qemu/", - "FROM %s/qemu/" % - (registry)) # see if we can fetch a cache copy, may fail... pull_args = ["pull", "%s/%s" % (registry, tag)] - self._do(pull_args, quiet=quiet) - + if self._do(pull_args, quiet=quiet) == 0: + dockerfile = dockerfile.replace("FROM qemu/", + "FROM %s/qemu/" % + (registry)) + else: + registry = None tmp_df = tempfile.NamedTemporaryFile(mode="w+t", encoding='utf-8', -- 2.20.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PULL v2 46/50] tests/docker: update toolchain set in debian-xtensa-cross 2020-07-11 17:07 [PULL v2 00/50] testing updates (vm, gitlab, misc build fixes) Alex Bennée ` (4 preceding siblings ...) 2020-07-11 17:07 ` [PULL v2 45/50] tests/docker: fall back more gracefully when pull fails Alex Bennée @ 2020-07-11 17:07 ` Alex Bennée 2020-07-11 17:07 ` [PULL v2 47/50] .cirrus.yml: add bash to the brew packages Alex Bennée ` (4 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: Alex Bennée @ 2020-07-11 17:07 UTC (permalink / raw) To: peter.maydell Cc: Fam Zheng, Alex Bennée, qemu-devel, Philippe Mathieu-Daudé, Max Filippov, Philippe Mathieu-Daudé From: Max Filippov <jcmvbkbc@gmail.com> Switch to the prebuilt xtensa toolchains release 2020.07. Drop csp toolchain as the csp core is not a part of QEMU. Add de233_fpu and dsp3400 toolchains to enable DFPU and FPU2000 tests. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> [AJB: fix path in configure.sh] Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200708082347.27318-1-jcmvbkbc@gmail.com> Message-Id: <20200709141327.14631-13-alex.bennee@linaro.org> diff --git a/tests/docker/dockerfiles/debian-xtensa-cross.docker b/tests/docker/dockerfiles/debian-xtensa-cross.docker index beb73f46ba..ba4148299c 100644 --- a/tests/docker/dockerfiles/debian-xtensa-cross.docker +++ b/tests/docker/dockerfiles/debian-xtensa-cross.docker @@ -18,12 +18,12 @@ RUN apt-get update && \ git \ python3-minimal -ENV CPU_LIST csp dc232b dc233c -ENV TOOLCHAIN_RELEASE 2018.02 +ENV CPU_LIST dc232b dc233c de233_fpu dsp3400 +ENV TOOLCHAIN_RELEASE 2020.07 RUN for cpu in $CPU_LIST; do \ curl -#SL http://github.com/foss-xtensa/toolchain/releases/download/$TOOLCHAIN_RELEASE/x86_64-$TOOLCHAIN_RELEASE-xtensa-$cpu-elf.tar.gz \ | tar -xzC /opt; \ done -ENV PATH $PATH:/opt/$TOOLCHAIN_RELEASE/xtensa-dc232b-elf/bin:/opt/$TOOLCHAIN_RELEASE/xtensa-dc233c-elf/bin:/opt/$TOOLCHAIN_RELEASE/xtensa-csp-elf/bin +ENV PATH $PATH:/opt/$TOOLCHAIN_RELEASE/xtensa-dc232b-elf/bin:/opt/$TOOLCHAIN_RELEASE/xtensa-dc233c-elf/bin:/opt/$TOOLCHAIN_RELEASE/xtensa-de233_fpu-elf/bin:/opt/$TOOLCHAIN_RELEASE/xtensa-dsp3400-elf/bin diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index 37e49736ca..102578caa5 100755 --- a/tests/tcg/configure.sh +++ b/tests/tcg/configure.sh @@ -182,7 +182,7 @@ for target in $target_list; do container_image=debian-xtensa-cross # default to the dc232b cpu - container_cross_cc=/opt/2018.02/xtensa-dc232b-elf/bin/xtensa-dc232b-elf-gcc + container_cross_cc=/opt/2020.07/xtensa-dc232b-elf/bin/xtensa-dc232b-elf-gcc ;; esac -- 2.20.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PULL v2 47/50] .cirrus.yml: add bash to the brew packages 2020-07-11 17:07 [PULL v2 00/50] testing updates (vm, gitlab, misc build fixes) Alex Bennée ` (5 preceding siblings ...) 2020-07-11 17:07 ` [PULL v2 46/50] tests/docker: update toolchain set in debian-xtensa-cross Alex Bennée @ 2020-07-11 17:07 ` Alex Bennée 2020-07-11 17:07 ` [PULL v2 48/50] tests: fix "make check-qtest" for modular builds Alex Bennée ` (3 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: Alex Bennée @ 2020-07-11 17:07 UTC (permalink / raw) To: peter.maydell Cc: Ed Maste, Li-Wen Hsu, Alex Bennée, qemu-devel, Max Reitz Like the sed we include earlier we want something more recent for iotests to work. Fixes: 57ee95ed Cc: Max Reitz <mreitz@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200710182238.10675-1-alex.bennee@linaro.org> diff --git a/.cirrus.yml b/.cirrus.yml index 69342ae031..f287d23c5b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -20,7 +20,7 @@ macos_task: osx_instance: image: mojave-base install_script: - - brew install pkg-config python gnu-sed glib pixman make sdl2 + - brew install pkg-config python gnu-sed glib pixman make sdl2 bash script: - mkdir build - cd build @@ -33,7 +33,7 @@ macos_xcode_task: # this is an alias for the latest Xcode image: mojave-xcode install_script: - - brew install pkg-config gnu-sed glib pixman make sdl2 + - brew install pkg-config gnu-sed glib pixman make sdl2 bash script: - mkdir build - cd build -- 2.20.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PULL v2 48/50] tests: fix "make check-qtest" for modular builds 2020-07-11 17:07 [PULL v2 00/50] testing updates (vm, gitlab, misc build fixes) Alex Bennée ` (6 preceding siblings ...) 2020-07-11 17:07 ` [PULL v2 47/50] .cirrus.yml: add bash to the brew packages Alex Bennée @ 2020-07-11 17:07 ` Alex Bennée 2020-07-11 17:07 ` [PULL v2 49/50] Revert "vga: build virtio-gpu as module" Alex Bennée ` (2 subsequent siblings) 10 siblings, 0 replies; 12+ messages in thread From: Alex Bennée @ 2020-07-11 17:07 UTC (permalink / raw) To: peter.maydell Cc: Laurent Vivier, Thomas Huth, qemu-devel, Gerd Hoffmann, Paolo Bonzini, Alex Bennée From: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200710203652.9708-2-kraxel@redhat.com> diff --git a/tests/qtest/Makefile.include b/tests/qtest/Makefile.include index 98af2c2d93..6a0276fd42 100644 --- a/tests/qtest/Makefile.include +++ b/tests/qtest/Makefile.include @@ -277,6 +277,7 @@ tests/qtest/tco-test$(EXESUF): tests/qtest/tco-test.o $(libqos-pc-obj-y) tests/qtest/virtio-ccw-test$(EXESUF): tests/qtest/virtio-ccw-test.o tests/qtest/display-vga-test$(EXESUF): tests/qtest/display-vga-test.o tests/qtest/qom-test$(EXESUF): tests/qtest/qom-test.o +tests/qtest/modules-test$(EXESUF): tests/qtest/modules-test.o tests/qtest/test-hmp$(EXESUF): tests/qtest/test-hmp.o tests/qtest/machine-none-test$(EXESUF): tests/qtest/machine-none-test.o tests/qtest/device-plug-test$(EXESUF): tests/qtest/device-plug-test.o -- 2.20.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PULL v2 49/50] Revert "vga: build virtio-gpu as module" 2020-07-11 17:07 [PULL v2 00/50] testing updates (vm, gitlab, misc build fixes) Alex Bennée ` (7 preceding siblings ...) 2020-07-11 17:07 ` [PULL v2 48/50] tests: fix "make check-qtest" for modular builds Alex Bennée @ 2020-07-11 17:07 ` Alex Bennée 2020-07-11 17:07 ` [PULL v2 50/50] iotests: Set LC_ALL=C for sort Alex Bennée 2020-07-13 8:34 ` [PULL v2 00/50] testing updates (vm, gitlab, misc build fixes) Peter Maydell 10 siblings, 0 replies; 12+ messages in thread From: Alex Bennée @ 2020-07-11 17:07 UTC (permalink / raw) To: peter.maydell; +Cc: Alex Bennée, qemu-devel, Gerd Hoffmann From: Gerd Hoffmann <kraxel@redhat.com> This reverts commit 8d5a24c83dba90b08ef163bbf166d6dfbad9019b. Compiling all virtio-gpu objects into a single module isn't a good plan because the individual objects have different CONFIG_* dependencies. Leads to module load failures on s390x due to vga support being disabled, which in turn breaks '-device virtio-gpu-device' (flagged by travis ci). So back to the drawing board for modular virtio-gpu ... Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200710203652.9708-3-kraxel@redhat.com> diff --git a/util/module.c b/util/module.c index 32b0547b82..90e9bd42c6 100644 --- a/util/module.c +++ b/util/module.c @@ -266,12 +266,6 @@ static struct { { "usb-redir", "hw-", "usb-redirect" }, { "qxl-vga", "hw-", "display-qxl" }, { "qxl", "hw-", "display-qxl" }, - { "virtio-gpu-device", "hw-", "display-virtio-gpu" }, - { "virtio-gpu-pci", "hw-", "display-virtio-gpu" }, - { "virtio-vga", "hw-", "display-virtio-gpu" }, - { "vhost-user-gpu-device", "hw-", "display-virtio-gpu" }, - { "vhost-user-gpu-pci", "hw-", "display-virtio-gpu" }, - { "vhost-user-vga", "hw-", "display-virtio-gpu" }, { "chardev-braille", "chardev-", "baum" }, }; diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs index e907f3182b..d619594ad4 100644 --- a/hw/display/Makefile.objs +++ b/hw/display/Makefile.objs @@ -49,19 +49,16 @@ common-obj-m += qxl.mo qxl.mo-objs = qxl.o qxl-logger.o qxl-render.o endif -ifeq ($(CONFIG_VIRTIO_GPU),y) -common-obj-m += virtio-gpu.mo -virtio-gpu-obj-$(CONFIG_VIRTIO_GPU) += virtio-gpu-base.o virtio-gpu.o virtio-gpu-3d.o -virtio-gpu-obj-$(CONFIG_VHOST_USER_GPU) += vhost-user-gpu.o -virtio-gpu-obj-$(call land,$(CONFIG_VIRTIO_GPU),$(CONFIG_VIRTIO_PCI)) += virtio-gpu-pci.o -virtio-gpu-obj-$(call land,$(CONFIG_VHOST_USER_GPU),$(CONFIG_VIRTIO_PCI)) += vhost-user-gpu-pci.o -virtio-gpu-obj-$(CONFIG_VIRTIO_VGA) += virtio-vga.o -virtio-gpu-obj-$(CONFIG_VHOST_USER_VGA) += vhost-user-vga.o -virtio-gpu.mo-objs := $(virtio-gpu-obj-y) -virtio-gpu.mo-cflags := $(VIRGL_CFLAGS) -virtio-gpu.mo-libs := $(VIRGL_LIBS) -endif - +common-obj-$(CONFIG_VIRTIO_GPU) += virtio-gpu-base.o virtio-gpu.o virtio-gpu-3d.o +common-obj-$(CONFIG_VHOST_USER_GPU) += vhost-user-gpu.o +common-obj-$(call land,$(CONFIG_VIRTIO_GPU),$(CONFIG_VIRTIO_PCI)) += virtio-gpu-pci.o +common-obj-$(call land,$(CONFIG_VHOST_USER_GPU),$(CONFIG_VIRTIO_PCI)) += vhost-user-gpu-pci.o +common-obj-$(CONFIG_VIRTIO_VGA) += virtio-vga.o +common-obj-$(CONFIG_VHOST_USER_VGA) += vhost-user-vga.o +virtio-gpu.o-cflags := $(VIRGL_CFLAGS) +virtio-gpu.o-libs += $(VIRGL_LIBS) +virtio-gpu-3d.o-cflags := $(VIRGL_CFLAGS) +virtio-gpu-3d.o-libs += $(VIRGL_LIBS) common-obj-$(CONFIG_DPCD) += dpcd.o common-obj-$(CONFIG_XLNX_ZYNQMP_ARM) += xlnx_dp.o -- 2.20.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PULL v2 50/50] iotests: Set LC_ALL=C for sort 2020-07-11 17:07 [PULL v2 00/50] testing updates (vm, gitlab, misc build fixes) Alex Bennée ` (8 preceding siblings ...) 2020-07-11 17:07 ` [PULL v2 49/50] Revert "vga: build virtio-gpu as module" Alex Bennée @ 2020-07-11 17:07 ` Alex Bennée 2020-07-13 8:34 ` [PULL v2 00/50] testing updates (vm, gitlab, misc build fixes) Peter Maydell 10 siblings, 0 replies; 12+ messages in thread From: Alex Bennée @ 2020-07-11 17:07 UTC (permalink / raw) To: peter.maydell Cc: Kevin Wolf, open list:Block layer core, qemu-devel, Max Reitz, John Snow, Alex Bennée From: Max Reitz <mreitz@redhat.com> Otherwise the result is basically unpredictable. (Note that the precise environment variable to control sorting order is LC_COLLATE, but LC_ALL overrides LC_COLLATE, and we do not want the sorting order to be messed up if LC_ALL is set in the environment.) Reported-by: John Snow <jsnow@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20200710163253.381630-3-mreitz@redhat.com> diff --git a/tests/qemu-iotests/common.filter b/tests/qemu-iotests/common.filter index d967adc59a..c9f978abce 100644 --- a/tests/qemu-iotests/common.filter +++ b/tests/qemu-iotests/common.filter @@ -186,7 +186,7 @@ _filter_img_create() -e 's/^\(data_file\)/3-\1/' \ -e 's/^\(encryption\)/4-\1/' \ -e 's/^\(preallocation\)/8-\1/' \ - | sort \ + | LC_ALL=C sort \ | $SED -e 's/^[0-9]-//' \ | tr '\n\0' ' \n' \ | $SED -e 's/^ *$//' -e 's/ *$//' -- 2.20.1 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PULL v2 00/50] testing updates (vm, gitlab, misc build fixes) 2020-07-11 17:07 [PULL v2 00/50] testing updates (vm, gitlab, misc build fixes) Alex Bennée ` (9 preceding siblings ...) 2020-07-11 17:07 ` [PULL v2 50/50] iotests: Set LC_ALL=C for sort Alex Bennée @ 2020-07-13 8:34 ` Peter Maydell 10 siblings, 0 replies; 12+ messages in thread From: Peter Maydell @ 2020-07-13 8:34 UTC (permalink / raw) To: Alex Bennée; +Cc: QEMU Developers On Sat, 11 Jul 2020 at 18:07, Alex Bennée <alex.bennee@linaro.org> wrote: > > Fixed a few, dropped a few, added a few > > --- > > The following changes since commit 827937158b72ce2265841ff528bba3c44a1bfbc8: > > Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20200710' into staging (2020-07-11 13:56:03 +0100) > > are available in the Git repository at: > > https://github.com/stsquad/qemu.git tags/pull-testing-and-misc-110720-2 > > for you to fetch changes up to 4a40f561d5ebb5050a8c6dcbdcee85621056590a: > > iotests: Set LC_ALL=C for sort (2020-07-11 15:53:29 +0100) > > ---------------------------------------------------------------- > Testing and misc build updates: > > - tests/vm support for aarch64 VMs > - tests/tcg better cross-compiler detection > - update docker tooling to support registries > - update docker support for xtensa > - gitlab build docker images and store in registry > - gitlab use docker images for builds > - a number of skipIf updates to support move > - linux-user MAP_FIXED_NOREPLACE fix > - qht-bench compiler tweaks > - configure fix for secret keyring > - tsan fiber annotation clean-up > - doc updates for mttcg/icount/gdbstub > - fix cirrus to use brew bash for iotests > - revert virtio-gpu breakage > - fix LC_ALL to avoid sorting changes in iotests Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/5.1 for any user-visible changes. -- PMM ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2020-07-13 8:35 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-07-11 17:07 [PULL v2 00/50] testing updates (vm, gitlab, misc build fixes) Alex Bennée 2020-07-11 17:07 ` [PULL v2 04/50] tests/vm: Add configuration to basevm.py Alex Bennée 2020-07-11 17:07 ` [PULL v2 42/50] docs/devel: convert and update MTTCG design document Alex Bennée 2020-07-11 17:07 ` [PULL v2 43/50] docs/devel: add some notes on tcg-icount for developers Alex Bennée 2020-07-11 17:07 ` [PULL v2 44/50] docs: Add to gdbstub documentation the PhyMemMode Alex Bennée 2020-07-11 17:07 ` [PULL v2 45/50] tests/docker: fall back more gracefully when pull fails Alex Bennée 2020-07-11 17:07 ` [PULL v2 46/50] tests/docker: update toolchain set in debian-xtensa-cross Alex Bennée 2020-07-11 17:07 ` [PULL v2 47/50] .cirrus.yml: add bash to the brew packages Alex Bennée 2020-07-11 17:07 ` [PULL v2 48/50] tests: fix "make check-qtest" for modular builds Alex Bennée 2020-07-11 17:07 ` [PULL v2 49/50] Revert "vga: build virtio-gpu as module" Alex Bennée 2020-07-11 17:07 ` [PULL v2 50/50] iotests: Set LC_ALL=C for sort Alex Bennée 2020-07-13 8:34 ` [PULL v2 00/50] testing updates (vm, gitlab, misc build fixes) Peter Maydell
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).