From patchwork Tue Jun 2 15:46:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187371 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp4088870ilb; Tue, 2 Jun 2020 08:47:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyknxWO+99o1yPqtC4t3AFYbLyAjlO/di7AM3259UoqoDNAryhHbU6fjJ4eGG1HDxEl/Rf1 X-Received: by 2002:a25:4f44:: with SMTP id d65mr45955469ybb.149.1591112855216; Tue, 02 Jun 2020 08:47:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591112855; cv=none; d=google.com; s=arc-20160816; b=w92VV25ySUYZ1QhtJjDLzVCdjd9qS+q63DexH4XQeKtDUfmvDG9HosFV/mCtNVbq4g zLNGvnULvK1dXESbLG/PIET0QBDBlaoC7Lzbjbjo7wTWQWLx7VhwVYM8kgd0hCfc4pqx I6QLkv34vPiZg+UShMTMLYBtnn6j9cFRvrLQwuBiMq897q+4Y049dv4nv5trvt8KK2ps UE5si2xr1ZsCGE6BhpugcWBeShsew6QxdOiiv5MBeYgDy/n7VYVdVqldF5OJHOlOuQOs CqlENj2CT97rcifUgOcgaExshrqDMw6zPVZDWzC3i04tBRcqyqdDfCXsk4QyPcRlE4rF MvxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=t6TltwBrO/H4+UuBeh2Az6/wBriymiMCvdLIFdXcB4g=; b=KTxV93h4gFcuvbRdzILJ4YbNVvoscT6HxpQj+S1tGCf5sxr6yCQ4mrtCLNAz4xJtbd oLk2ZLMHalBHaVSUmmltEtfwh4ae+/+hVgsFOapkXZovurw0RLIof7VxSLE4uUzLUaLg VwSaaeJkKbU2i76iM/4o6c1wpcv6E4LnehAEIur4OvJBcdS6/XDrsfjK88mgNqanr2zO vhtupwFxrFx6MTYWYqNbYjwg/ODpd5tY6HeIQoaeJv1FQSbGlHwtmTChCde0qSAXEZnw 3JARpEPoTwjcv60H4kXB1k/vbBlBHaR6WZwvSEMK4HllAJg6DF4qJgIgL2WnO4bPAM0g zYiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=RljLo1pd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id s138si2451469ybs.285.2020.06.02.08.47.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jun 2020 08:47:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=RljLo1pd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg98Y-0003aw-Ij for patch@linaro.org; Tue, 02 Jun 2020 11:47:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg97Z-0003YH-5V for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:33 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:35790) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jg97X-0007cy-HP for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:32 -0400 Received: by mail-wr1-x42f.google.com with SMTP id x14so3922496wrp.2 for ; Tue, 02 Jun 2020 08:46:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=t6TltwBrO/H4+UuBeh2Az6/wBriymiMCvdLIFdXcB4g=; b=RljLo1pdf3OqzU5sQEILvMRC3HtYYRvb6n/s/kKx+yJjFe92RZjHd1wdq+s6+0Tm6S BEITY3AnNJmyB/WGJIgKb1syAVnR40dbQDHF/mQpIa4aVLN7CDq+IGqmgUCgn/wVIMxg CQ2EcxsvrmsxLWAsdNAErqFCcGPfYjFsNFoCKQkxIj5ZRYZ+x0md+/VGFBjwg7gzgdXP Z6nIWIiicQPAaal6T3P5xDkjGdpShYTqIg1NEMo/y2I7GdWVA+k4Bmt9QLbiBgOtAEJE MPC/664jY+XnHjLdN71ngrrsjk/rbQC8DTrMsXwJLgWQOHcgBYWS6u7goEzy5sjQNu2s XqIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=t6TltwBrO/H4+UuBeh2Az6/wBriymiMCvdLIFdXcB4g=; b=O5JAzQK2nVC9ptnWyw8bPVe6YDqmYyb3Zh/xmUgNMnyTKkBpSZk1DOgnG+zpk9Wq8+ 0wFdDsaqdRY2n4GzqJdym3TFq6UU8gL/uMz4V93Fu8zWFlvpYF956umEUEkVaRSR1wjQ fHqfftcOC5BB6whtf4thKPxBW4RljWZ4srcpB9TOdVCWxZIDW/UiPkiICpSgp/33MjzQ ZXdx0dmhIY4wQmsDeoP9MsW/q+a+4CusxFKWKfrqmXOl1BpWH0THyKeZ9NzUdMAwqh2C wI5CgFixEwGWxLrOXnH8y/tshAMx/p+k3zxCS6/dkv9yWB4sfjJKUVfudr2BEfDTBvnb Pmww== X-Gm-Message-State: AOAM532oYa4lmwbLPTj1kartpTjbzMPHkRBS/W5KzFq6QVr34px1Zp7e RhRGEPAOacZqCmu7IGfx5rcuUA== X-Received: by 2002:a5d:6586:: with SMTP id q6mr25124055wru.319.1591112790038; Tue, 02 Jun 2020 08:46:30 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r11sm4520738wre.25.2020.06.02.08.46.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 08:46:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 55E621FF87; Tue, 2 Jun 2020 16:46:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 1/9] plugins: new lockstep plugin for debugging TCG changes Date: Tue, 2 Jun 2020 16:46:16 +0100 Message-Id: <20200602154624.4460-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200602154624.4460-1-alex.bennee@linaro.org> References: <20200602154624.4460-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robert.foley@linaro.org, Mark Cave-Ayland , Richard Henderson , robhenry@microsoft.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" When we make changes to the TCG we sometimes cause regressions that are deep into the execution cycle of the guest. Debugging this often requires comparing large volumes of trace information to figure out where behaviour has diverged. The lockstep plugin utilises a shared socket so two QEMU's running with the plugin will write their current execution position and wait to receive the position of their partner process. When execution diverges the plugins output where they were and the previous few blocks before unloading themselves and letting execution continue. Originally I planned for this to be most useful with -icount but it turns out you can get divergence pretty quickly due to asynchronous qemu_cpu_kick_rr_cpus() events causing one side to eventually run into a short block a few cycles before the other side. For this reason I've added a bit of tracking and I think the divergence reporting could be finessed to report only if we really start to diverge in execution. An example run would be: qemu-system-sparc -monitor none -parallel none -net none \ -M SS-20 -m 256 -kernel day11/zImage.elf \ -plugin ./tests/plugin/liblockstep.so,arg=lockstep-sparc.sock \ -d plugin,nochain with an identical command in another window in the same working directory. Signed-off-by: Alex Bennée Cc: Richard Henderson Cc: Mark Cave-Ayland Message-Id: <20200429200754.18327-1-alex.bennee@linaro.org> --- v3 - added verbose flag - basic heuristics to detect "real" divergence - checkpatch tweaks --- tests/plugin/lockstep.c | 340 ++++++++++++++++++++++++++++++++++++++ tests/plugin/Makefile | 1 + tests/tcg/Makefile.target | 2 +- 3 files changed, 342 insertions(+), 1 deletion(-) create mode 100644 tests/plugin/lockstep.c -- 2.20.1 diff --git a/tests/plugin/lockstep.c b/tests/plugin/lockstep.c new file mode 100644 index 00000000000..a696673dff3 --- /dev/null +++ b/tests/plugin/lockstep.c @@ -0,0 +1,340 @@ +/* + * Lockstep Execution Plugin + * + * Allows you to execute two QEMU instances in lockstep and report + * when their execution diverges. This is mainly useful for developers + * who want to see where a change to TCG code generation has + * introduced a subtle and hard to find bug. + * + * Caveats: + * - single-threaded linux-user apps only with non-deterministic syscalls + * - no MTTCG enabled system emulation (icount may help) + * + * While icount makes things more deterministic it doesn't mean a + * particular run may execute the exact same sequence of blocks. An + * asynchronous event (for example X11 graphics update) may cause a + * block to end early and a new partial block to start. This means + * serial only test cases are a better bet. -d nochain may also help. + * + * This code is not thread safe! + * + * Copyright (c) 2020 Linaro Ltd + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; + +/* saved so we can uninstall later */ +static qemu_plugin_id_t our_id; + +static unsigned long bb_count; +static unsigned long insn_count; + +/* Information about a translated block */ +typedef struct { + uint64_t pc; + uint64_t insns; +} BlockInfo; + +/* Information about an execution state in the log */ +typedef struct { + BlockInfo *block; + unsigned long insn_count; + unsigned long block_count; +} ExecInfo; + +/* The execution state we compare */ +typedef struct { + uint64_t pc; + unsigned long insn_count; +} ExecState; + +typedef struct { + GSList *log_pos; + int distance; +} DivergeState; + +/* list of translated block info */ +static GSList *blocks; + +/* execution log and points of divergence */ +static GSList *log, *divergence_log; + +static int socket_fd; +static char *path_to_unlink; + +static bool verbose; + +static void plugin_cleanup(qemu_plugin_id_t id) +{ + /* Free our block data */ + g_slist_free_full(blocks, &g_free); + g_slist_free_full(log, &g_free); + g_slist_free(divergence_log); + + close(socket_fd); + if (path_to_unlink) { + unlink(path_to_unlink); + } +} + +static void plugin_exit(qemu_plugin_id_t id, void *p) +{ + g_autoptr(GString) out = g_string_new("No divergence :-)\n"); + g_string_append_printf(out, "Executed %ld/%d blocks\n", + bb_count, g_slist_length(log)); + g_string_append_printf(out, "Executed ~%ld instructions\n", insn_count); + qemu_plugin_outs(out->str); + + plugin_cleanup(id); +} + +static void report_divergance(ExecState *us, ExecState *them) +{ + DivergeState divrec = { log, 0 }; + g_autoptr(GString) out = g_string_new(""); + bool diverged = false; + + /* + * If we have diverged before did we get back on track or are we + * totally loosing it? + */ + if (divergence_log) { + DivergeState *last = (DivergeState *) divergence_log->data; + GSList *entry; + + for (entry = log; g_slist_next(entry); entry = g_slist_next(entry)) { + if (entry == last->log_pos) { + break; + } + divrec.distance++; + } + + /* + * If the last two records are so close it is likely we will + * not recover synchronisation with the other end. + */ + if (divrec.distance == 1 && last->distance == 1) { + diverged = true; + } + } + divergence_log = g_slist_prepend(divergence_log, + g_memdup(&divrec, sizeof(divrec))); + + /* Output short log entry of going out of sync... */ + if (verbose || divrec.distance == 1 || diverged) { + g_string_printf(out, "@ %#016lx vs %#016lx (%d/%d since last)\n", + us->pc, them->pc, g_slist_length(divergence_log), + divrec.distance); + qemu_plugin_outs(out->str); + } + + if (diverged) { + int i; + GSList *entry; + + g_string_printf(out, "Δ insn_count @ %#016lx (%ld) vs %#016lx (%ld)\n", + us->pc, us->insn_count, them->pc, them->insn_count); + + for (entry = log, i = 0; + g_slist_next(entry) && i < 5; + entry = g_slist_next(entry), i++) { + ExecInfo *prev = (ExecInfo *) entry->data; + g_string_append_printf(out, + " previously @ %#016lx/%ld (%ld insns)\n", + prev->block->pc, prev->block->insns, + prev->insn_count); + } + qemu_plugin_outs(out->str); + qemu_plugin_outs("too much divergence... giving up."); + qemu_plugin_uninstall(our_id, plugin_cleanup); + } +} + +static void vcpu_tb_exec(unsigned int cpu_index, void *udata) +{ + BlockInfo *bi = (BlockInfo *) udata; + ExecState us, them; + ssize_t bytes; + ExecInfo *exec; + + us.pc = bi->pc; + us.insn_count = insn_count; + + /* + * Write our current position to the other end. If we fail the + * other end has probably died and we should shut down gracefully. + */ + bytes = write(socket_fd, &us, sizeof(ExecState)); + if (bytes < sizeof(ExecState)) { + qemu_plugin_outs(bytes < 0 ? + "problem writing to socket" : + "wrote less than expected to socket"); + qemu_plugin_uninstall(our_id, plugin_cleanup); + return; + } + + /* + * Now read where our peer has reached. Again a failure probably + * indicates the other end died and we should close down cleanly. + */ + bytes = read(socket_fd, &them, sizeof(ExecState)); + if (bytes < sizeof(ExecState)) { + qemu_plugin_outs(bytes < 0 ? + "problem reading from socket" : + "read less than expected"); + qemu_plugin_uninstall(our_id, plugin_cleanup); + return; + } + + /* + * Compare and report if we have diverged. + */ + if (us.pc != them.pc) { + report_divergance(&us, &them); + } + + /* + * Assume this block will execute fully and record it + * in the execution log. + */ + insn_count += bi->insns; + bb_count++; + exec = g_new0(ExecInfo, 1); + exec->block = bi; + exec->insn_count = insn_count; + exec->block_count = bb_count; + log = g_slist_prepend(log, exec); +} + +static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +{ + BlockInfo *bi = g_new0(BlockInfo, 1); + bi->pc = qemu_plugin_tb_vaddr(tb); + bi->insns = qemu_plugin_tb_n_insns(tb); + + /* save a reference so we can free later */ + blocks = g_slist_prepend(blocks, bi); + qemu_plugin_register_vcpu_tb_exec_cb(tb, vcpu_tb_exec, + QEMU_PLUGIN_CB_NO_REGS, (void *)bi); +} + + +/* + * Instead of encoding master/slave status into what is essentially + * two peers we shall just take the simple approach of checking for + * the existence of the pipe and assuming if it's not there we are the + * first process. + */ +static bool setup_socket(const char *path) +{ + struct sockaddr_un sockaddr; + int fd; + + fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (fd < 0) { + perror("create socket"); + return false; + } + + sockaddr.sun_family = AF_UNIX; + g_strlcpy(sockaddr.sun_path, path, sizeof(sockaddr.sun_path) - 1); + if (bind(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) < 0) { + perror("bind socket"); + close(fd); + return false; + } + + /* remember to clean-up */ + path_to_unlink = g_strdup(path); + + if (listen(fd, 1) < 0) { + perror("listen socket"); + close(fd); + return false; + } + + socket_fd = accept(fd, NULL, NULL); + if (socket_fd < 0 && errno != EINTR) { + perror("accept socket"); + return false; + } + + qemu_plugin_outs("setup_socket::ready\n"); + + return true; +} + +static bool connect_socket(const char *path) +{ + int fd; + struct sockaddr_un sockaddr; + + fd = socket(AF_UNIX, SOCK_STREAM, 0); + if (fd < 0) { + perror("create socket"); + return false; + } + + sockaddr.sun_family = AF_UNIX; + g_strlcpy(sockaddr.sun_path, path, sizeof(sockaddr.sun_path) - 1); + + if (connect(fd, (struct sockaddr *)&sockaddr, sizeof(sockaddr)) < 0) { + perror("failed to connect"); + return false; + } + + qemu_plugin_outs("connect_socket::ready\n"); + + socket_fd = fd; + return true; +} + +static bool setup_unix_socket(const char *path) +{ + if (g_file_test(path, G_FILE_TEST_EXISTS)) { + return connect_socket(path); + } else { + return setup_socket(path); + } +} + + +QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, + const qemu_info_t *info, + int argc, char **argv) +{ + int i; + + if (!argc || !argv[0]) { + qemu_plugin_outs("Need a socket path to talk to other instance."); + return -1; + } + + for (i = 0; i < argc; i++) { + char *p = argv[i]; + if (strcmp(p, "verbose") == 0) { + verbose = true; + } else if (!setup_unix_socket(argv[0])) { + qemu_plugin_outs("Failed to setup socket for communications."); + return -1; + } + } + + our_id = id; + + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); + return 0; +} diff --git a/tests/plugin/Makefile b/tests/plugin/Makefile index 75467b6db85..b3250e2504c 100644 --- a/tests/plugin/Makefile +++ b/tests/plugin/Makefile @@ -13,6 +13,7 @@ NAMES += mem NAMES += hotblocks NAMES += howvec NAMES += hotpages +NAMES += lockstep SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES))) diff --git a/tests/tcg/Makefile.target b/tests/tcg/Makefile.target index b3cff3cad1a..075daf3d22d 100644 --- a/tests/tcg/Makefile.target +++ b/tests/tcg/Makefile.target @@ -128,7 +128,7 @@ RUN_TESTS=$(patsubst %,run-%, $(TESTS)) ifeq ($(CONFIG_PLUGIN),y) PLUGIN_DIR=../../plugin VPATH+=$(PLUGIN_DIR) -PLUGINS=$(notdir $(wildcard $(PLUGIN_DIR)/*.so)) +PLUGINS=$(filter-out liblockstep.so,$(notdir $(wildcard $(PLUGIN_DIR)/*.so))) # We need to ensure expand the run-plugin-TEST-with-PLUGIN # pre-requistes manually here as we can't use stems to handle it. We From patchwork Tue Jun 2 15:46:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187369 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp4088316ilb; Tue, 2 Jun 2020 08:46:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9tIfZLggAvTJFBSFXfg1nGsJS7/jBB77jhboAy3THRaxi2P0gKDggbCTWTwAdf3JyaK3P X-Received: by 2002:a25:9385:: with SMTP id a5mr16064636ybm.111.1591112806351; Tue, 02 Jun 2020 08:46:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591112806; cv=none; d=google.com; s=arc-20160816; b=e2+WiclJ5QVj1AKLBvXkXAFzpDkQEcrqsWBpyF5AYqLzxONbIXhJ8ic8AIHHPTshuQ YVnA/4t04ak8OkrLEtCDHR1jJXQ7hMBCQCgfsyejjnZFV4EjXWeZ9VR1vZUilh0fJHsr nbVzwBf47YY2wCrJafugy5MXGMgfeJxRrcFKnKebJzHdHAJPqQiboXsZxuwcItDr3aDL EcAHUEfhP6DK8185nRJlencRa8MrltPHAyK4fpOG3q9pScULTMQF7zlvmH+e1GgXK1Eu qhPEILsv2yy07gmUovxb+Kd9e9rnqEqgCAj5MwmXI4E8qbdu5aE6poDAmdtBJqUpMrlr OVSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=tRdpUcQhIJndhkGIh7lOShh9mZ16AUqZ+rVZ66b8A6w=; b=i2NilmW+7Ps6VNcEMf6KT+q89zdVmp8+TTJ//FFlLa5WtgrNwnx6hAyPZTX36FDYSG UQhz6NabcxTgqUVIS5jeyjpXBgdBy37ykAuutFv7rmCwFel8hI/ZaGxYRlvWNl/yYiyJ ko3/qJ3rTfiVJVdcD5T9ICpcs/S3i92FEFGkmUS2c6nbP9jUHWLwO6vikhXHy1qL70IY C0bD7u/1ezLud+INbPDW4V78PFpm/y5NuKtc/MX5XssepTaF5kbmJ/gELBnltvQgDXcm T7t6KiMy0F5OeHhk7Nfcc2RPsnM51Ky8vA3v1fvKCyz9C85aWW8wPUTr3rsOPZKTzAO5 Oz7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hbzcYpCU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c133si1935345ybb.294.2020.06.02.08.46.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jun 2020 08:46:46 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=hbzcYpCU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg97l-0003Wv-OA for patch@linaro.org; Tue, 02 Jun 2020 11:46:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55682) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg97W-0003VY-62 for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:30 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:46555) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jg97V-0007cR-AF for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:29 -0400 Received: by mail-wr1-x42b.google.com with SMTP id x6so3854097wrm.13 for ; Tue, 02 Jun 2020 08:46:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tRdpUcQhIJndhkGIh7lOShh9mZ16AUqZ+rVZ66b8A6w=; b=hbzcYpCUBmW9hGtiScsLFOc8rCdSX33sD+5yGjR3d/hakP7Dc2CujLcUgKrcLxgKfD LISb7wlPAWtpBCVtu+Q4nBIKCN0pk6nt6vWl1sbPw+/QfGy4NDAX/sy7mGskFkW/g7ka q4Q6WlNI7DuVcVDdG6pUv/+t3fXg2A6osRSMTmhCR7LkeXjC3uTCms2rrO3dsEfDFUop 2ZyfKmWCb1PU13u2XKMMT8fdElrdwlWKySdBZWqltjYIAU8DPt+zW9No3U5Gb01azrX6 xBdrHVxDpsyv+AytJZwbbAKEqsFyGQ6H0Be9JuDwtblqgEU4ZejEj0EVIdZLm+TvuMEk Tv0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tRdpUcQhIJndhkGIh7lOShh9mZ16AUqZ+rVZ66b8A6w=; b=FrUFaQTlx9FSRXF1TcukSW3WiA+hIm18zOD9N9SFrXzlR8rWAmwom5yu46Ih9ppzkk CEnYymfnW5CsndUotL9Ba+Tt+YL/+2Ea6qCjrYRfn9a1EuLR6yDZbuyFi9MqBiJ1icwN YWmOgcGHHbdCWZMyHI9vRp072lSgqvN7FKp+KHq5oSKvpn4Rge6uSDWUY3CCL+qjl3zs FSjDI5cRbR02hpwIwCnKhe+WDqWkIe2i1u++DUy0QcnEuAflyvijuAJHfOQwhz4jYflP vuXiQYbTPuyd+/hq4frqkeYNWuGNE1Mdn1duif+OhGR21Ft1VXyip/xMOU3fXqkmluET j0YQ== X-Gm-Message-State: AOAM532ufYQlFlHvRiYrP6PJc57C5nkSHOchPZm1n2PlFYRudGDWQieH IHH6PSoYX9tBkxtJDmGlM5EmGA== X-Received: by 2002:adf:e749:: with SMTP id c9mr29200751wrn.25.1591112787738; Tue, 02 Jun 2020 08:46:27 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s5sm120100wme.37.2020.06.02.08.46.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 08:46:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6AF731FF8C; Tue, 2 Jun 2020 16:46:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 2/9] qemu-plugin.h: add missing include to define size_t Date: Tue, 2 Jun 2020 16:46:17 +0100 Message-Id: <20200602154624.4460-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200602154624.4460-1-alex.bennee@linaro.org> References: <20200602154624.4460-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robert.foley@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , robhenry@microsoft.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" Signed-off-by: Emilio G. Cota Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20200524202427.951784-1-cota@braap.org> --- include/qemu/qemu-plugin.h | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 89ed579f559..bab8b0d4b3a 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -12,6 +12,7 @@ #include #include +#include /* * For best performance, build the plugin with -fvisibility=hidden so that From patchwork Tue Jun 2 15:46:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187373 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp4090439ilb; Tue, 2 Jun 2020 08:49:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhPRDRaBG2pxYcvpgi2W47UrbQ12L62MER9AreImbH0hhFehzbAxnvM2GiK1Rc29ICOFTC X-Received: by 2002:a25:6f03:: with SMTP id k3mr46028522ybc.293.1591112985627; Tue, 02 Jun 2020 08:49:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591112985; cv=none; d=google.com; s=arc-20160816; b=O9IbZ4o0K2Yk4PLEYQC1SFTLJeoq4cGlF94MI2rFGpklKKxulDcVJW3t3+JCrlnbdA OZ2CimX7z1s2+RQ3a3BvO44oIkGWlC/1t9a5mDowt8np55H/UJ4I6IwlpCa9KF7Tt11N tGrXLWc/4TrACs4BzXDvuSm6S8vwkYpVU38/Ang2al2t64cRGFxZzfhQn+hmmEc9PBqb JGro770zD9/yPLfLH6/dY/2iaod3g4XOGORlYXhOuYZVxTxDO0qeLM50fa4a6sxZpm3Z kHTkk55AR4b5AokmV2AWCf5mue+FuTCU/shEvpJ4Flea3Q3YlTwAm0atCL+YcLQ5P0Us GJ4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=QSCo20FpmcSa9pqRC9AwXDY8+utkLNtj0/ksS5sWNSA=; b=vOYdjSF/RvBwtEW3LZLVBGSenljSFXRJulegO0tBtg83V7320/NeimCvcYkM6EXU13 vzP0jGsU9o/hVdI5w/bPXdaSVTjM8dKutZJKRb8VfnIdoeiDwCj+U4+eOBti1lh3VLzO DOSc8PoPQsEhRFvUV5q/xWaRvZLUiBAy7N77jopSsnT+ANQfxd7jL4FdZBqIkZ4clJP1 PwcpJC1aeZp+tQTp62VOSjxZpJa/JRIkwwmBCJeL2Y0JQfD9zamu0zc1xBzCy2GQVMWJ 1dgti6sG4axQIp2m47U4uD+0+h7R1Cufh62AZHH0VwMfSUEs/N3lrAdC1jfa/VbICNJw mF1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=CPl2hDcB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e9si2410337ybr.497.2020.06.02.08.49.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jun 2020 08:49:45 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=CPl2hDcB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:36870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg9Af-0007Hf-37 for patch@linaro.org; Tue, 02 Jun 2020 11:49:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg97X-0003W1-80 for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:31 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:32797) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jg97W-0007cm-C8 for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:30 -0400 Received: by mail-wr1-x441.google.com with SMTP id l11so3930874wru.0 for ; Tue, 02 Jun 2020 08:46:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QSCo20FpmcSa9pqRC9AwXDY8+utkLNtj0/ksS5sWNSA=; b=CPl2hDcBqDkH8YckenHJHDWIKS2aLw0vI3NKfQGRwbEkNP1HZQG78k8XORGUwMWHgi fG9OEsGzpY2BWMW/2Z+boNgBwi5De/OAlQxlHH7alUoZXu6w6JJesZh+1I0yZtAq/P34 hhkHl3PsPxgj2+OIwwJl7zu4xprDwaLGn7Q0ymUYdgJTiX4LvczRb33ydePABlkcGC0d wGx67xXUXGZVss4x+btdUUGq7iQhB2O4BfCaUJ6Eoz8JIgm4+qoSqZVFU8eqj3DRlC7O s0lhH1hDMK1n6d4IVeCu54rq2jV0zUM+CUr97OeNIbwPvLOz9Zsugm9CDffg3LX09m5f Ht8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QSCo20FpmcSa9pqRC9AwXDY8+utkLNtj0/ksS5sWNSA=; b=UoQXqp8yMw5P/jLK9mt9oz4j+65v+n/AL0ViGjHkVLJG03vB8L/TDnsGY19ryEQzER F/qA/lgGXdO7ZCFvNSJSmhYzG9gju4dm+KjbQMIHqdm80I/22KJ+O6oeJ6kQbr9Or5LD awEwT7IrwWMstNF9QHWzASgdzUBkFhQDtZ+rEwwRHewk0wcx3mDLM+Ns0WMm0cLZdRpb WwhhDg+BVdz1kovOVzO0Rn2r4GZlML9GZGz6swZbVkpeFYRmpUnybPO1hYVQ+kGiqCSp KctNs1J59syHQ2/q2Zvi3fmV/y678TFkdRc1TFAJDXL4HiSNOGtUEuEh9y/69n65MLsL Nsxg== X-Gm-Message-State: AOAM533Np0DNECI9bajZEh859UoTekiqFqp1WMzEWEwPBm0L6lYDtqKD x+dRYd7yPns1dB4StlbsmUXnmw== X-Received: by 2002:a5d:4008:: with SMTP id n8mr26269887wrp.82.1591112788931; Tue, 02 Jun 2020 08:46:28 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id d17sm5003905wrg.75.2020.06.02.08.46.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 08:46:25 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 82B1A1FF8F; Tue, 2 Jun 2020 16:46:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 3/9] scripts/clean-includes: Mark 'qemu/qemu-plugin.h' as special header Date: Tue, 2 Jun 2020 16:46:18 +0100 Message-Id: <20200602154624.4460-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200602154624.4460-1-alex.bennee@linaro.org> References: <20200602154624.4460-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robert.foley@linaro.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , robhenry@microsoft.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé "qemu/qemu-plugin.h" isn't meant to be include by QEMU codebase, but by 3rd party plugins that QEMU can use. These plugins can be built out of QEMU and don't include "qemu/osdep.h". Mark "qemu/qemu-plugin.h" as a special header that doesn't need to be cleaned for "qemu/osdep.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Emilio G. Cota Signed-off-by: Alex Bennée Message-Id: <20200524215654.13256-1-f4bug@amsat.org> --- scripts/clean-includes | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 diff --git a/scripts/clean-includes b/scripts/clean-includes index dd938daa3ec..795b3bea318 100755 --- a/scripts/clean-includes +++ b/scripts/clean-includes @@ -123,6 +123,7 @@ for f in "$@"; do ;; *include/qemu/osdep.h | \ *include/qemu/compiler.h | \ + *include/qemu/qemu-plugin.h | \ *include/glib-compat.h | \ *include/sysemu/os-posix.h | \ *include/sysemu/os-win32.h | \ From patchwork Tue Jun 2 15:46:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187370 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp4088417ilb; Tue, 2 Jun 2020 08:46:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvGpKJv0IFg+WpVM0l4qgmKUqUimve2bJwHONEWzMqEgspftk3lcryJk9znu3K68+t6W+k X-Received: by 2002:a25:46c1:: with SMTP id t184mr8411499yba.307.1591112813898; Tue, 02 Jun 2020 08:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591112813; cv=none; d=google.com; s=arc-20160816; b=ye7lY900zo5h2JIsi26hDeWuCTRkvzV16KxsDYB5fsYA7fQY3YZBd4efnVeEy8yU2S fux+Rf7TYxzS4x5fuRg1c14YPGx+M2f5gftpxcqiR7XSkwyrk3x6ZuOahOEcZeDQ8JKg 9RZDAKzU/TNxQm1o7oTlf2Su0uCqgNW0K0lWCpAgrAPn12hwWcbRQEdfzrMUR2otvhlE 6/WBDZooUCOw3jT2yFsv1Z9sXJyhQy9764X4DnC62zSwSe4xnO3Ik1aGZwe2yxLwWd1R f8evFVEFtaPPukocbfdWNy1s4WQi4JPpS4AcHJNs9m82qnalig9QHGw0JYRLWVguUj/y kzuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=j6KWkQ7GMCxDwtP2C3gX6zvZP7J6EFfLnh9MNnF4sLE=; b=HJNrWr8FfdvXOX0YALqu/6QHoDhDFuz+B8kPRBzec8y6n/aXVVJi2rJaJduV0wnWwP hkXdDIEVDEdvYJd+LiLxDyPvQB2Sq7b98qFS9ylWdjvJcA1IpntvjmD8XlXjwQp0hJCB TWNiAXPwX15P85CWZGG70PLxlTdaoHe7KVn5rRDL0AaEjPaf4sDsLiQJe1pxlljV38gw jqL5lRpBIEUNRyNVqzp9ETz9jbRml9bOuOFOAOYhN0W/BJ0lpi/iYEz76HFINmzXTi9i rhFN2kQB6RWiyS7hCSvsm6BzlLRmH1kQL0xtfRoiWffPYi+3x/3fkaNeZWo5jQd5Pfq8 +5CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ziPpwH0s; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id x9si2078448ybp.442.2020.06.02.08.46.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jun 2020 08:46:53 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ziPpwH0s; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg97t-0003di-DC for patch@linaro.org; Tue, 02 Jun 2020 11:46:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg97a-0003ZC-0O for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:34 -0400 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:51163) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jg97Z-0007dB-4W for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:33 -0400 Received: by mail-wm1-x341.google.com with SMTP id v19so3420726wmj.0 for ; Tue, 02 Jun 2020 08:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=j6KWkQ7GMCxDwtP2C3gX6zvZP7J6EFfLnh9MNnF4sLE=; b=ziPpwH0s3ebzUfIhuKb5CsAVmdk8rBX6MMMIjVM6YD8ntQrPgieRjf9l8i+TzP/ule oDdZf3MTjWSd7kIyNVgoJxihPQfvPW3Dz2CfbBpL5Ufgts9aOxDIHoGwEuht4FBaC4l1 8KT22PrqSIl7LHNsogDN/rSceH/8LqvULD7K94WbHLXwNCvPrm939Sfs9PVddjNY2Ufu yfWIwJ/XtWWLG6CqvkUpsq6GXIftWzjCbX48VTSubeAlokL/gXmsN3IRpBMN1ma1fLYb VoRLTh0DEkblEi0/cW+c3j/DuZG1TNpQrFeEx6E3Iq/FEaLoMTImnje0MCSX8wSeQicO ihqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=j6KWkQ7GMCxDwtP2C3gX6zvZP7J6EFfLnh9MNnF4sLE=; b=TbE4Dz3pAuD1QD/ysK3cmkYptjQxF0oswG/DFEzUuhsO/slHgvORoaelCSBdcF64MB 8D24GKuLRCHdMntnXPH5KlkNunAyRJ9LItcGgrI3Gn4kYcg6uTWA3OHwnbXDkrVSvwnQ b6HNhpC6gyGS7I4jbOSVr8cEy/IETo3jx9DL6fAwWadLhu06OWrK62Lt7yKuKcuKeFGy wZR20/O2nn2ubhK+OoduQt1zZr12VFRgv6+c3x/xmTZSymG1g5Ryc8KyERb1mjTYcWaI qCNIP6Y/mspyNImcEVkbsDg3p+ZP4mJxexEyXWY7Kcua2h/hXuPcos0LYJfTE0FNTurF qAUg== X-Gm-Message-State: AOAM530y6y4UPv6lPovtMe20CAahkMbwMrxNJ4AOVtKt4V94UCsFe0MB GBmD6afP9445MpcsApDMAAS89g== X-Received: by 2002:a7b:c249:: with SMTP id b9mr4331087wmj.143.1591112791778; Tue, 02 Jun 2020 08:46:31 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o15sm148556wmm.31.2020.06.02.08.46.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 08:46:27 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 96EE81FF90; Tue, 2 Jun 2020 16:46:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 4/9] tests/plugin: correctly honour io_count Date: Tue, 2 Jun 2020 16:46:19 +0100 Message-Id: <20200602154624.4460-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200602154624.4460-1-alex.bennee@linaro.org> References: <20200602154624.4460-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::341; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x341.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robert.foley@linaro.org, robhenry@microsoft.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alex Bennée --- tests/plugin/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/tests/plugin/mem.c b/tests/plugin/mem.c index 878abf09d19..4725bd851d8 100644 --- a/tests/plugin/mem.c +++ b/tests/plugin/mem.c @@ -28,7 +28,7 @@ static void plugin_exit(qemu_plugin_id_t id, void *p) g_string_printf(out, "mem accesses: %" PRIu64 "\n", mem_count); if (do_haddr) { - g_string_append_printf(out, "io accesses: %" PRIu64 "\n", mem_count); + g_string_append_printf(out, "io accesses: %" PRIu64 "\n", io_count); } qemu_plugin_outs(out->str); } From patchwork Tue Jun 2 15:46:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187375 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp4091729ilb; Tue, 2 Jun 2020 08:51:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4rnd1XiWnWvM3X4XQLoPOaEdj08Fgap1Yr5OC/jVGXORkp+Jysx9E6y+oVuKi8oU22RXd X-Received: by 2002:a25:76c5:: with SMTP id r188mr31604702ybc.377.1591113089743; Tue, 02 Jun 2020 08:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591113089; cv=none; d=google.com; s=arc-20160816; b=obtYsi4Ur26Y99qFNgIoMYgIP+5MDTbBMkSckbuDH89DW+MSsns9fccjV6m8a08kHq AAEa7tjtWUnudsRYBrnZKibV7TBh71WLQpjDsXGKoV0JrI/wLEye9e24Pi+5O4E3tWAe TpXw5VohtWkXO9OJonzt4Z5Jx/CVsf0qq5D7/wH+T1bfhE86LxQdZWhSKb4THceUzfJ0 KhXfNOsB+lp50Eq9pU8ZX3q2mujBUoDr0Rk1sbZkUgGNENrd1sr2XmpSKa01Ej4e3cIU iU3JpFOXQhZk6uZVO3kWyqcrqadVP9yboDQRLFng9VNlU5cBt1f3+iwECdGXiHexh1CX 4gvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=uvMYxLr0Nl/kQDg+PeIHS1bjqHOZjTucP3buAR3WOFI=; b=tz+G7GFca4BWoj6c9nXLGb0MmgkY5xB1+2filZngMo6Tr5/XtVU1z2nKrjFBYMqXPR UcW7KZZ6VteFV5XrqcyIvIfcNEh0zJD+jkvvt38ErVSZMX8g30x10MojrW4IKSTbiIWV 8iHyyzU4UsoGVCB5tLxF1H4GvCel+NtfcVO6w7x6yVtsCcxexBkglMd3KEYHMrNUiN5e W3Cohz12K5KzRUDVNz/8wYTZmmtL4PHDIYB6yk0hkCAnkzELYo4LJLIopjlqfnmNK1ZN AyEInEj23tzK3FgmDFLafo/67yA6dmVL7KP8BjBcXSeJw0kZm/CGvV6ONAITQ5xI3PFi XUQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=sZoi3Bja; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y7si2417024ybh.207.2020.06.02.08.51.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jun 2020 08:51:29 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=sZoi3Bja; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:43822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg9CL-0002DT-8s for patch@linaro.org; Tue, 02 Jun 2020 11:51:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg97c-0003cY-32 for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:36 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:52446) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jg97b-0007dL-3d for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:35 -0400 Received: by mail-wm1-x343.google.com with SMTP id r9so3410927wmh.2 for ; Tue, 02 Jun 2020 08:46:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uvMYxLr0Nl/kQDg+PeIHS1bjqHOZjTucP3buAR3WOFI=; b=sZoi3Bja+i3ID+6DKXNmzxL80Rqrw5oDLfooP3kNM+VyxrF/x2LJcoh8tSkOc//IYY B6qIFvkVMEDyF6RwuM4zdwSoZ/9WnddA1cUBpTYm50RzbwWR0wbd3/LwqkDVb12zAWfd 6kl51LgXKwX+0/XpDBuPBO41hzaRKl9nKCv253O6Qbf6yD3KdOJhgo3CbEIVrLGRR7B9 HKFu6S3OFqH6wZ9VXeht6t0+tMFZVIdKgg8121wA412LaScpLdyx2XBBXMYp97S7YrI9 lzD39hlRLLqmNhfnUjCZ1r6IsrIkarJXQLR/3pPWaw7bD7944usolRKgov+0JrxSutKS Tc5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uvMYxLr0Nl/kQDg+PeIHS1bjqHOZjTucP3buAR3WOFI=; b=mjiC+2k7BRmG0Dycx907VE3jxMi3DUmfro4Hmhw5ntDY9xf9bUMaF74jhbvyS0Y53s cDNjeiYDNm1pwg4vl0DjmG0haX97zU+K+ImhPYBq2BptH61mHKbORxN3EFMLNIi+0oPD ha6M14O/daFKV4nTEOq5Fdera1R7icjy1+Htzz6i/lRHKJklaHZcApckCuoLVKfbYgVe 5miA7RDkBfa4q+NaPKsqRCpCAHmFlD2PGziQCAlm6rpgnE/x2YAFQ8Aa9U+XoOwzC/dN Ta+20XiqsPjTOEWox7UVBEVKWobqh9LDlLmgNcfmMsUYeJXk2JyUvSXrgcSYJPvDN36r 3GTw== X-Gm-Message-State: AOAM533+fVF2YztASOJA3dXCboMvRsJ6aWu8iFvik8p8LFV+1TGr8xn1 QvPkBkARSdob+IDcz8QRzCPmww== X-Received: by 2002:a7b:ce15:: with SMTP id m21mr4705152wmc.117.1591112793713; Tue, 02 Jun 2020 08:46:33 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id i3sm4366144wrm.83.2020.06.02.08.46.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 08:46:30 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id ABE0B1FF91; Tue, 2 Jun 2020 16:46:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 5/9] cputlb: ensure we re-fill the TLB if it has reset Date: Tue, 2 Jun 2020 16:46:20 +0100 Message-Id: <20200602154624.4460-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200602154624.4460-1-alex.bennee@linaro.org> References: <20200602154624.4460-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x343.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robert.foley@linaro.org, Paolo Bonzini , robhenry@microsoft.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Any write to a device might cause a re-arrangement of memory triggering a TLB flush and potential re-size of the TLB invalidating previous entries. This would cause users of qemu_plugin_get_hwaddr() to see the warning: invalid use of qemu_plugin_get_hwaddr because of the failed tlb_lookup which should always succeed. We catch this case by checking to see if the list of entries has been cleared and if so triggering a re-fill. Signed-off-by: Alex Bennée --- accel/tcg/cputlb.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -- 2.20.1 diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index eb2cf9de5e6..b7d329f7155 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -1091,6 +1091,20 @@ static void io_writex(CPUArchState *env, CPUIOTLBEntry *iotlbentry, MMU_DATA_STORE, mmu_idx, iotlbentry->attrs, r, retaddr); } + + /* + * The memory_region_dispatch may have triggered a flush/resize + * so for plugins we need to ensure we have reset the tlb_entry + * so any later lookup is correct. + */ +#ifdef CONFIG_PLUGIN + if (env_tlb(env)->d[mmu_idx].n_used_entries == 0) { + int size = op & MO_SIZE; + tlb_fill(env_cpu(env), addr, size, MMU_DATA_STORE, + mmu_idx, retaddr); + } +#endif + if (locked) { qemu_mutex_unlock_iothread(); } From patchwork Tue Jun 2 15:46:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187372 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp4089766ilb; Tue, 2 Jun 2020 08:48:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLiGPV7Bv1dWl9ILVljdzMsbVSdgXSCdH8SMdZdxi+zVnhXWFDjehq406IMZgitVQOh7kN X-Received: by 2002:a25:bacd:: with SMTP id a13mr44248378ybk.461.1591112928439; Tue, 02 Jun 2020 08:48:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591112928; cv=none; d=google.com; s=arc-20160816; b=KDn7PtX1Cpk5obOp1KDDDeiwSSk7NjS14dc4fu0nH9y6D9J4xAOep/NiEdIZog3CP4 OULxmjs/zkZoTS7noGdg1bEZCTdlECIyfwFtmUwL5oLr6KKe+bUmZqvefTDZlQkdXmUs SrBBFNetqzzir8bDXNr3xB/A4QQE8L4UWg8m15eWIDQc3GE2OIZ2Eo9wXV31gySPFvyB +9YBWqs/pyHHnHZApTSW1FHemaoYjkg0EJwi9hN8Hc5jvBrC1/Vh34ap/3trJZ1svOMf JfIMoTqVrvhITszM4y4Tz9Q7ljA+T+UI0UTDlJ98WiJAn1i0MuzruvVIpWrKgxRVbJmU fcMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=ieiufg3+rZeSqlWjO6C+srZMnCXRrjzqU0qc19RSOzQ=; b=CA1DAJDzWO4d7b4HzoOXVG39pstWpFMdgyHib033dM7WLbJoI/Gbi/X7IvjM/tqbYR DBFhBQjKG+21cGV2lJ4bB6uluILusqYOYCzu532KhDiYOKBrVi10EayIiu9s49ENpJbk W+ShXLOQLvUmlac2ykbIOl1Z/dAGFJIDpbsXuZe/p9DSJIhZdsFjGDrLHWa9B/2c9MLU 0aLYAiy230suLgvPdYDc/Q4sbmGFa4SwqZj5Fl+03VNOIDpD0QTDtVwSkb2/PID5GhxD 6l210u/AHOMnkdrZPwRl5+IfQ0VlsHKFU3bzCe2wv/Pt/8glFHI7PeZyNLmUKolPAkgb MwLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JR3b8t6F; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w78si2693143ybe.184.2020.06.02.08.48.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jun 2020 08:48:48 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=JR3b8t6F; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:36716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg99j-0007Bm-SH for patch@linaro.org; Tue, 02 Jun 2020 11:48:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55712) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg97d-0003ey-7B for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:37 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:35380) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jg97c-0007dP-38 for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:36 -0400 Received: by mail-wr1-x444.google.com with SMTP id x14so3922732wrp.2 for ; Tue, 02 Jun 2020 08:46:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ieiufg3+rZeSqlWjO6C+srZMnCXRrjzqU0qc19RSOzQ=; b=JR3b8t6FMRb/PPNshBv9i/pSevLTzh4toO8FfG9UYFX+85SPBuOe2SoKFsC0UaZ3h2 VssMokhms1MhCLF6Swp20D8M2WrCjg2WOnMQUK70RTqvBKmFGMd+TTX7fkOu3mN5Wfay MS+MdyLS6OWErZZtSBz/M7W7E5qnp9bEHDqxhBHOjb5phOue+gGb6K9Dv62U4YdCWar/ PsbVYsqRniPR5fAx4sXYHE00GuIKDYgSO+Uppsri7sCaiOjo7bXfYjGOWoi6VZbIxoGw Lf6Ep95SEXwiBrTY2XAOqqDCgNf3TbLzSEwesvd4Bg4BkuwVHRJorLu95rmo5z+LJ0LW 6gMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ieiufg3+rZeSqlWjO6C+srZMnCXRrjzqU0qc19RSOzQ=; b=Zrw2YfwrImY8U1/uV85jtIXKiXSPsbOW2aNBsXFmK0URXj8r6yppeaj3pthD+WY2Dd x6CNv5phq5/YzSIFUvPwxc+RBpf7qpfqsO/tUnhsTV7uL0rAIJQaCSG53ViawTIkO2R0 yKIakQXfMBCtztqlVBv0iaXUZ30HAYvtUj7aacrvcREM6Sk1VVIxoTmjNjiR1wZnDe19 g1FXIVmVlFSYfNfWzpKE3uVQ2zzQIW7jCe7xcYoP4TrO9BjndfDNXpaLTdLoPSNkIW1A aRQRaHbopeyTB8lXasMSJL3ZMD2Dlj4n/HYptHwCYUJJKmyDkbvHVY8m+758hDQDx7Uf WegA== X-Gm-Message-State: AOAM5316MtKO6gLx7qkpJwdGGbLQIOy3rvIQAatbUAdYhXWKi/j9s2cM 4/7foDckslaEbVBybScH8xNd6g== X-Received: by 2002:adf:f0d2:: with SMTP id x18mr26578126wro.250.1591112794706; Tue, 02 Jun 2020 08:46:34 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id i10sm4421436wrw.51.2020.06.02.08.46.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 08:46:30 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C157E1FF92; Tue, 2 Jun 2020 16:46:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 6/9] hw/virtio/pci: include vdev name in registered PCI sections Date: Tue, 2 Jun 2020 16:46:21 +0100 Message-Id: <20200602154624.4460-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200602154624.4460-1-alex.bennee@linaro.org> References: <20200602154624.4460-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robert.foley@linaro.org, "Michael S. Tsirkin" , robhenry@microsoft.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" When viewing/debugging memory regions it is sometimes hard to figure out which PCI device something belongs to. Make the names unique by including the vdev name in the name string. Signed-off-by: Alex Bennée --- hw/virtio/virtio-pci.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index d028c17c240..9ee4ab26cfe 100644 --- a/hw/virtio/virtio-pci.c +++ b/hw/virtio/virtio-pci.c @@ -1390,7 +1390,7 @@ static void virtio_pci_device_write(void *opaque, hwaddr addr, } } -static void virtio_pci_modern_regions_init(VirtIOPCIProxy *proxy) +static void virtio_pci_modern_regions_init(VirtIOPCIProxy *proxy, const char *vdev_name) { static const MemoryRegionOps common_ops = { .read = virtio_pci_common_read, @@ -1437,36 +1437,41 @@ static void virtio_pci_modern_regions_init(VirtIOPCIProxy *proxy) }, .endianness = DEVICE_LITTLE_ENDIAN, }; + g_autoptr(GString) name = g_string_new(NULL); - + g_string_printf(name, "virtio-pci-common(%s)", vdev_name); memory_region_init_io(&proxy->common.mr, OBJECT(proxy), &common_ops, proxy, - "virtio-pci-common", + name->str, proxy->common.size); + g_string_printf(name, "virtio-pci-isr(%s)", vdev_name); memory_region_init_io(&proxy->isr.mr, OBJECT(proxy), &isr_ops, proxy, - "virtio-pci-isr", + name->str, proxy->isr.size); + g_string_printf(name, "virtio-pci-device(%s)", vdev_name); memory_region_init_io(&proxy->device.mr, OBJECT(proxy), &device_ops, virtio_bus_get_device(&proxy->bus), - "virtio-pci-device", + name->str, proxy->device.size); + g_string_printf(name, "virtio-pci-notify(%s)", vdev_name); memory_region_init_io(&proxy->notify.mr, OBJECT(proxy), ¬ify_ops, virtio_bus_get_device(&proxy->bus), - "virtio-pci-notify", + name->str, proxy->notify.size); + g_string_printf(name, "virtio-pci-notify-pio(%s)", vdev_name); memory_region_init_io(&proxy->notify_pio.mr, OBJECT(proxy), ¬ify_pio_ops, virtio_bus_get_device(&proxy->bus), - "virtio-pci-notify-pio", + name->str, proxy->notify_pio.size); } @@ -1607,7 +1612,7 @@ static void virtio_pci_device_plugged(DeviceState *d, Error **errp) struct virtio_pci_cfg_cap *cfg_mask; - virtio_pci_modern_regions_init(proxy); + virtio_pci_modern_regions_init(proxy, vdev->name); virtio_pci_modern_mem_region_map(proxy, &proxy->common, &cap); virtio_pci_modern_mem_region_map(proxy, &proxy->isr, &cap); From patchwork Tue Jun 2 15:46:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187374 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp4091052ilb; Tue, 2 Jun 2020 08:50:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXp8qKrdgzpfegrpMrgFfRTs+5Ay/d7T+HtUXxcCsszeHupS7d8O+gYVEsBnx75sU4Lrf/ X-Received: by 2002:a25:69c3:: with SMTP id e186mr18563448ybc.445.1591113033865; Tue, 02 Jun 2020 08:50:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591113033; cv=none; d=google.com; s=arc-20160816; b=n8LGaMb+weWH28nfIe7cuZN2NBn+6+UgYoFmt2tIoxb9oNVdWwdI6KdCBrO8TLcMo7 3lQ03HrrMqgun20JCs+apPtwHQNXS0o21axegLYtHnAwL/Mie1hEWKQN+VkBlQ9SPkfZ q8vSArjeX8ap2hD9Gr7p9LVAEhdzg8C8Zq/GIZ8DwXiuHYo77SDbNX2d4lhYZZbBEBW8 /L2DO9bMRkXJaCsMNJd9kYE+jZEEQ2QdYd26WZryBWu2CALNISK1+tqNW43HaPHEfe6D wzYT8HL3QXt5Ph+gWm6h1VfHlz0E6Xc+7Ze8Lm2QK7sqwy38xKgqZepXQABZMDwZitwJ HJVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=D98gPKyXYpHfK2vdgoTLIOCcijD4DQVmE2DVfMIiR4I=; b=CUIBkfbxxGalYGAVapD1ixR7UwOtVhFrlIKEhUlQw5u3Pog4yOOACcVRLYPDvztmd5 DOzQVdMCGtZFous4pO8D2tXAN6Ey3oU3H/G6BwFXhu8BuJNmrDxOTifVMyjRkzcDmae1 eRaZ8SBl9yz0v7Jh02uG/2yzZW3Nipgs7s6JCfqgnmVa8x3bMkBfYSdE9jwJijGEBxR0 KsloZ83vw8HNAlkKYB2d68yOy234a1DVaF/fj2G72Gn50gMOtUSc6SNnShOM1+f+DS7C hwcxEtEa9BUFE0onsYrFywnPJYgCbWe0+ln4G7EwgeF9KVXezGa3Vf7bbHZzpQZGGpkg XDSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Ul2p1678; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a3si2447897ybp.308.2020.06.02.08.50.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jun 2020 08:50:33 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Ul2p1678; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39830 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg9BR-0000EZ-BH for patch@linaro.org; Tue, 02 Jun 2020 11:50:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55718) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg97f-0003jI-4q for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:39 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:37120) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jg97e-0007da-0N for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:38 -0400 Received: by mail-wr1-x441.google.com with SMTP id x13so3922638wrv.4 for ; Tue, 02 Jun 2020 08:46:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D98gPKyXYpHfK2vdgoTLIOCcijD4DQVmE2DVfMIiR4I=; b=Ul2p16782znMcbsKpUw0Xm/g/AeHDL2ZSBciVmljZk8//OPHCBdPCJk8dnfLFihx06 XODtINTxB+ww5N3Dtuh/8jUv4RxmvrXbstAVsUpELiIGNfjDYIFW9AQSOkteAEw10Y1c dA3YpTnWkBxU99/HzeQlDImeyyGJG8OVaPOR0orp2UqLxt5YuJvBy4kO2VgYUWkyXDTD VC4HANX9Uy5euDTNSBVdaSXJcR/0MZm+AAdNyEPdKDtZO74FG1CUChHAPLq2wI3wuNrc Jq+1IITF1y1vW4m90iDZt4Hp+8lksjqrnrPRstKfug1T+Ozwip98K4crr0vxr+B4mHTS 4eYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D98gPKyXYpHfK2vdgoTLIOCcijD4DQVmE2DVfMIiR4I=; b=Hm2D5bMNFVfKI54TmKszaFBe9fr/JKHSC79X11rUzsRJmKTQMlrQ15KFT1imomxn57 2/69NMOoDIpYHsdwy7SVCp34ZSXxP632zpcNNezFF5vSRHlwyQYHMXxWsDO6736Rylj8 vBxTvJl6V5yOAt4w2N3D+7Ij9pKnJDgA/TrB3axmyfn5d7EdRgjZl5w/J+zWPs6UBRqo IJFC1QDLoHrG571ik0Rn1HaDRjrYMfGlj4s7aeEYseeB9lTQRvTev/Su1lCLTfG9SBtE 73vRzdEBAz1wqzgmcH5Ks0fOn9WcrbaDz83NNFK+yQIauv8+wa79wahud9tFYQ2lpOzO DuTQ== X-Gm-Message-State: AOAM530spmD5C4eoWXg8JibMuWZEEW1W4pqEVYP4kZh4+q58LFpp2auK /4PpD6l9OVSK9mg+wjfvYn8J+w== X-Received: by 2002:adf:a50e:: with SMTP id i14mr15141142wrb.21.1591112796558; Tue, 02 Jun 2020 08:46:36 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id l17sm186818wmi.16.2020.06.02.08.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 08:46:32 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id D7B241FF93; Tue, 2 Jun 2020 16:46:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 7/9] plugins: add API to return a name for a IO device Date: Tue, 2 Jun 2020 16:46:22 +0100 Message-Id: <20200602154624.4460-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200602154624.4460-1-alex.bennee@linaro.org> References: <20200602154624.4460-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robert.foley@linaro.org, robhenry@microsoft.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This may well end up being anonymous but it should always be unique. Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 5 +++++ plugins/api.c | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) -- 2.20.1 Reviewed-by: Clement Deschamps Reviewed-by: Emilio G. Cota diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index bab8b0d4b3a..43c6a9e857f 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -335,6 +335,11 @@ struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info, bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr); uint64_t qemu_plugin_hwaddr_device_offset(const struct qemu_plugin_hwaddr *haddr); +/* + * Returns a string representing the device. Plugin must free() it + */ +char * qemu_plugin_hwaddr_device_name(const struct qemu_plugin_hwaddr *haddr); + typedef void (*qemu_plugin_vcpu_mem_cb_t)(unsigned int vcpu_index, qemu_plugin_meminfo_t info, uint64_t vaddr, diff --git a/plugins/api.c b/plugins/api.c index bbdc5a4eb46..3c73de8c1c2 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -303,6 +303,24 @@ uint64_t qemu_plugin_hwaddr_device_offset(const struct qemu_plugin_hwaddr *haddr return 0; } +char * qemu_plugin_hwaddr_device_name(const struct qemu_plugin_hwaddr *haddr) +{ +#ifdef CONFIG_SOFTMMU + if (haddr && haddr->is_io) { + MemoryRegionSection *mrs = haddr->v.io.section; + if (!mrs->mr->name) { + return g_strdup_printf("anon%08lx", 0xffffffff & (uintptr_t) mrs->mr); + } else { + return g_strdup(mrs->mr->name); + } + } else { + return g_strdup("RAM"); + } +#else + return g_strdup("Invalid"); +#endif +} + /* * Queries to the number and potential maximum number of vCPUs there * will be. This helps the plugin dimension per-vcpu arrays. From patchwork Tue Jun 2 15:46:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187377 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp4093288ilb; Tue, 2 Jun 2020 08:54:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKznCCoClAYHFFl2OxHBLRN64ocCwEoUQiF9dnQH80Yaf7MKEBznaRw0Gxq43jmMvchFhF X-Received: by 2002:a25:eb05:: with SMTP id d5mr21672350ybs.12.1591113241298; Tue, 02 Jun 2020 08:54:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591113241; cv=none; d=google.com; s=arc-20160816; b=fa0HK28gM3RvdtfA7sxUSgvyV3q6rsXGMvv5egGx4SV2wagE+WIQVoU0LpuBMNlE7S 0/Okr19/3diGh9kjDeuVJyuu9eBWXBBye9CIgH5rEMHMJfjk7P1Iy+e49clvSTYbk6Ju 84tiOlWRszYmHqo+8BU7JD6Oj3BuTN0TaRKbawUtD/KuacwXyQphmmGvarhhul+Ssyba kkYc4gYQXKSNDHFfXrYd2hkYn3UrfLbpLabWZUo7BLqYeokzea5+LCQ3vzokNHVAMEV9 u656k803QRmKfZHdPPZ6XuB7amRfNtfjUglYdtzgCAVcqxuoSkYhv8v2an6bvfShw1DP hCaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=TTAp5rDD3D05lpMYKygwT+EZBLy9H09vRzxjadlC3og=; b=T5ggP2MRX+dNN4Y6GRYvD+5yu+98Fl//6ymIz5ZRTBB9Tsfw5Jc/lmh1ovB/zRcRbQ u83WVKuKKM6psYquCMBtKf2LwzwM+ToAnvwc0yUKQkmCveUIDN6k58JZQt23QgNe0nAk Ina7+Hgxow2xPeMDkzc9oWzB1t5BEC9P3NjDyDxxu7/sYGkrZJ3idp3EyX5XOSkYQWC3 ui8lY0Osse9+vRAPGRgc7GrSe2kYgBDaWR+vrSywc28kTmAI1I4e9j+wwYejucvjy8Z3 oK7485gmSNjGZnGPNhVVgI5WxnEKSxfL9Ivt/j8eZPg2Ojc4a6fAkvedCBwvnI75f5tH xfFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=boJLOshU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u10si2343133ybm.304.2020.06.02.08.54.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jun 2020 08:54:01 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=boJLOshU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg9Em-0005me-Qe for patch@linaro.org; Tue, 02 Jun 2020 11:54:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg97h-0003p9-Qa for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:41 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:54511) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jg97g-0007dx-DQ for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:41 -0400 Received: by mail-wm1-x332.google.com with SMTP id g10so3402146wmh.4 for ; Tue, 02 Jun 2020 08:46:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TTAp5rDD3D05lpMYKygwT+EZBLy9H09vRzxjadlC3og=; b=boJLOshUdKXGZfw665tFYM4A4pCjHkOuSLRwmpolEJ1R0ind9XcaALkQ4LcriVcjj4 I1Q1cs5XA0/7S+2W9lYhrEQnTXzY6Gs8Dba9RgIkd2OVpvHebJG0pizNUVkf72fXl6bB POYPkewda46q8tBX5ZYhluUdIGsqcJe4TEkDo1fx5lOB3DDUnq+UIbZ/iMHdhlSe2IPt z/W4ZpeAYAE6xd8RwcfSEZAuQUEJZ/ocnY2ZKNqAK0Qde48+9VHckBM46Q0MwDSTC0SV 0ubnhpToIFoI0xshuKpnHJJUpqrlQgJNuc00fQTUzkCLZ9kQCYI5PxZ2Nwg7oDDeyXo4 ke0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TTAp5rDD3D05lpMYKygwT+EZBLy9H09vRzxjadlC3og=; b=C/5UCFOLEQNt3DRA2l3zHYuvlHRMWNXrbCYkKIDdEQ9+8qpTiKxAQbZwyOA/vdAYfU 3gbTuDjJJ2y7IihQQfwxdTd70RrjX9m4p4k+SrPkST42W5Nwpq+GClDB6vKMz20T2tkk K9vXsc09Uk1CnMjWCYw00tAB9dNTJpok4Xn/lr+GSjB5R0tW/tJgdKsKC5QThQ7mDVF4 uD+FvpwMaCFN2OQeb/4ubYxaX3SeqAjl3GITV6pI31MJ7BnfBXUGnbM8pSuTZNpriLRd nHfOMIij8SKxOZaf8b+ku3og4bvycJ9is3XQTBgQbsg8d6UgKuBRKeglKtSiMe/JIE21 Lrlg== X-Gm-Message-State: AOAM533yCZoXkhKrP2eYe+u8g7/DdH6BjxIw3ydNYX5wxngQZ9HPtHlM rpcwQHDaTpEi8J8QGoxqxX/j4Q== X-Received: by 2002:a1c:bc84:: with SMTP id m126mr5004966wmf.159.1591112798854; Tue, 02 Jun 2020 08:46:38 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id b136sm283700wme.1.2020.06.02.08.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 08:46:32 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id F09D61FF96; Tue, 2 Jun 2020 16:46:24 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 8/9] plugins: new hwprofile plugin Date: Tue, 2 Jun 2020 16:46:23 +0100 Message-Id: <20200602154624.4460-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200602154624.4460-1-alex.bennee@linaro.org> References: <20200602154624.4460-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x332.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robert.foley@linaro.org, robhenry@microsoft.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This is a plugin intended to help with profiling access to various bits of system hardware. It only really makes sense for system emulation. It takes advantage of the recently exposed helper API that allows us to see the device name (memory region name) associated with a device. Signed-off-by: Alex Bennée --- tests/plugin/hwprofile.c | 248 +++++++++++++++++++++++++++++++++++++++ tests/plugin/Makefile | 1 + 2 files changed, 249 insertions(+) create mode 100644 tests/plugin/hwprofile.c -- 2.20.1 Reviewed-by: Robert Foley Tested-by: Robert Foley diff --git a/tests/plugin/hwprofile.c b/tests/plugin/hwprofile.c new file mode 100644 index 00000000000..f5e0639e762 --- /dev/null +++ b/tests/plugin/hwprofile.c @@ -0,0 +1,248 @@ +/* + * Copyright (C) 2020, Alex Bennée + * + * HW Profile - breakdown access patterns for IO to devices + * + * License: GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +QEMU_PLUGIN_EXPORT int qemu_plugin_version = QEMU_PLUGIN_VERSION; + +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) + +typedef struct { + uint64_t offset; + int size; + int cpu_read; + int cpu_write; + uint64_t reads; + uint64_t writes; +} IOLocationCounts; + +typedef struct { + const char *name; + uint64_t base; + int cpu_read; + int cpu_write; + uint64_t total_writes; + uint64_t total_reads; + GHashTable *access_pattern; +} DeviceCounts; + +static GMutex lock; +static GHashTable *devices; +static bool detail; + +static enum qemu_plugin_mem_rw rw = QEMU_PLUGIN_MEM_RW; + +static inline bool track_reads(void) +{ + return rw == QEMU_PLUGIN_MEM_RW || rw == QEMU_PLUGIN_MEM_R; +} + +static inline bool track_writes(void) +{ + return rw == QEMU_PLUGIN_MEM_RW || rw == QEMU_PLUGIN_MEM_W; +} + +static void plugin_init(void) +{ + devices = g_hash_table_new(g_str_hash, g_str_equal); +} + +static gint sort_cmp(gconstpointer a, gconstpointer b) +{ + DeviceCounts *ea = (DeviceCounts *) a; + DeviceCounts *eb = (DeviceCounts *) b; + return ea->total_reads + ea->total_writes > + eb->total_reads + eb->total_writes ? -1 : 1; +} + +static gint sort_off(gconstpointer a, gconstpointer b) +{ + IOLocationCounts *ea = (IOLocationCounts *) a; + IOLocationCounts *eb = (IOLocationCounts *) b; + return ea->offset > eb->offset; +} + +static void plugin_exit(qemu_plugin_id_t id, void *p) +{ + g_autoptr(GString) report = g_string_new(""); + GList *counts; + + if (!detail) { + g_string_printf(report, "Device, Address"); + if (track_reads()) { + g_string_append_printf(report, ", RCPUs, Reads"); + } + if (track_writes()) { + g_string_append_printf(report, ", WCPUs, Writes"); + } + g_string_append_c(report, '\n'); + } + + counts = g_hash_table_get_values(devices); + if (counts && g_list_next(counts)) { + GList *it; + + it = g_list_sort(counts, sort_cmp); + + while (it) { + DeviceCounts *rec = (DeviceCounts *) it->data; + if (detail) { + GList *accesses = g_hash_table_get_values(rec->access_pattern); + GList *io_it = g_list_sort(accesses, sort_off); + g_string_append_printf(report, "%s @ 0x%"PRIx64"\n", rec->name, rec->base); + while (io_it) { + IOLocationCounts *loc = (IOLocationCounts *) io_it->data; + g_string_append_printf(report, " off:%08"PRIx64, loc->offset); + if (track_reads()) { + g_string_append_printf(report, ", 0x%04x, %"PRId64, + loc->cpu_read, loc->reads); + } + if (track_writes()) { + g_string_append_printf(report, ", 0x%04x, %"PRId64, + loc->cpu_write, loc->writes); + } + g_string_append_c(report,'\n'); + io_it = io_it->next; + } + } else { + g_string_append_printf(report, "%s, 0x%"PRIx64, + rec->name, rec->base); + if (track_reads()) { + g_string_append_printf(report, ", 0x%04x, %"PRId64, + rec->cpu_read, rec->total_reads); + } + if (track_writes()) { + g_string_append_printf(report, ", 0x%04x, %"PRId64, + rec->cpu_write, rec->total_writes); + } + g_string_append_c(report, '\n'); + } + it = it->next; + }; + g_list_free(it); + } + + qemu_plugin_outs(report->str); +} + +static DeviceCounts * new_count(char *name, uint64_t base) +{ + DeviceCounts *count = g_new0(DeviceCounts, 1); + count->name = name; + count->base = base; + if (detail) { + count->access_pattern = g_hash_table_new(g_int64_hash, g_int64_equal); + } + g_hash_table_insert(devices, name, count); + return count; +} + +static IOLocationCounts * new_location(uint64_t offset) +{ + IOLocationCounts *loc = g_new0(IOLocationCounts, 1); + loc->offset = offset; + return loc; +} + +static void vcpu_haddr(unsigned int cpu_index, qemu_plugin_meminfo_t meminfo, + uint64_t vaddr, void *udata) +{ + struct qemu_plugin_hwaddr *hwaddr = qemu_plugin_get_hwaddr(meminfo, vaddr); + + if (!hwaddr || !qemu_plugin_hwaddr_is_io(hwaddr)) { + return; + } else { + char *name = qemu_plugin_hwaddr_device_name(hwaddr); + DeviceCounts *counts; + + g_mutex_lock(&lock); + counts = (DeviceCounts *) g_hash_table_lookup(devices, name); + if (!counts) { + uint64_t off = qemu_plugin_hwaddr_device_offset(hwaddr); + uint64_t base = vaddr - off; + counts = new_count(name, base); + } else { + g_free(name); + } + + if (detail) { + uint64_t off = qemu_plugin_hwaddr_device_offset(hwaddr); + IOLocationCounts *io_count = g_hash_table_lookup(counts->access_pattern, &off); + if (!io_count) { + io_count = new_location(off); + g_hash_table_insert(counts->access_pattern, &off, io_count); + } + if (qemu_plugin_mem_is_store(meminfo)) { + io_count->writes++; + io_count->cpu_write |= (1 << cpu_index); + } else { + io_count->reads++; + io_count->cpu_read |= (1 << cpu_index); + } + } else { + if (qemu_plugin_mem_is_store(meminfo)) { + counts->total_writes++; + counts->cpu_write |= (1 << cpu_index); + } else { + counts->total_reads++; + counts->cpu_read |= (1 << cpu_index); + } + } + g_mutex_unlock(&lock); + } +} + +static void vcpu_tb_trans(qemu_plugin_id_t id, struct qemu_plugin_tb *tb) +{ + size_t n = qemu_plugin_tb_n_insns(tb); + size_t i; + + for (i = 0; i < n; i++) { + struct qemu_plugin_insn *insn = qemu_plugin_tb_get_insn(tb, i); + qemu_plugin_register_vcpu_mem_cb(insn, vcpu_haddr, + QEMU_PLUGIN_CB_NO_REGS, + rw, NULL); + } +} + +QEMU_PLUGIN_EXPORT +int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, + int argc, char **argv) +{ + int i; + + for (i = 0; i < argc; i++) { + char *opt = argv[i]; + if (g_strcmp0(opt, "read") == 0) { + rw = QEMU_PLUGIN_MEM_R; + } else if (g_strcmp0(opt, "write") == 0) { + rw = QEMU_PLUGIN_MEM_W; + } else if (g_strcmp0(opt, "detail") == 0) { + detail = true; + } else { + fprintf(stderr, "option parsing failed: %s\n", opt); + return -1; + } + } + + plugin_init(); + + qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); + qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); + return 0; +} diff --git a/tests/plugin/Makefile b/tests/plugin/Makefile index b3250e2504c..d87b8d40699 100644 --- a/tests/plugin/Makefile +++ b/tests/plugin/Makefile @@ -14,6 +14,7 @@ NAMES += hotblocks NAMES += howvec NAMES += hotpages NAMES += lockstep +NAMES += hwprofile SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES))) From patchwork Tue Jun 2 15:46:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 187376 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp4092056ilb; Tue, 2 Jun 2020 08:51:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1mnwizhaxWmFkzUAMcJRiXbfYWKI95ZFxzgBboZH/z35HtxO86snM31xI4C4bDNIkPRjE X-Received: by 2002:a25:2088:: with SMTP id g130mr37162803ybg.300.1591113119514; Tue, 02 Jun 2020 08:51:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591113119; cv=none; d=google.com; s=arc-20160816; b=XfgFDJc/QG83/z2D972qohCgWHVbnd+xTXxcBY1JbX18g6DL1iy+kl6QkbYq0/ph7/ TNRtHwRXrVr6pXCMLtegHmatb3I2dvnQ9JoB8keegOku/jAqNsEUdqg11RrRNvTOto1L 10FBiLycR+zytlnpeC+z4lpr3+w2c9BI5s7eWj2U1IabKycTAplYjz/CWPE/7/mH8zkH ZHhmmzbng7IXI319GMASkREPeC7djgmsm7z+atekfYaL2DBiu4hwDOBFM6bF9pS4YR7c Fh+lnXaD5Kass3J/kqgNSOU/rho3ZuWNqSpDVlayK31nmfCjGto+t8cJvay73ZyMcTmw fuHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=D7IUd/fMXoOGoaV/5qSVVzKkzaDzbDEGnaTAgX8XWeQ=; b=LMpYxRZBDyBt5cnxUv9hduWxcqnDy4L7PklAE9s3kMNto6K8K+PeoL6oG1IRponqhD Qn2/Klr5Z/ewF3L2BazpTosyUtRJ/dKmWYIAB2VCePiPsk/FukPxH/IdaVDzC0nqHdoD LaFqrsWHVhVH41eNtH6IlCVlT7/q8MpVU54sTvLRju1lsRjuXBX6sPgVJ6ps1DwlAemY 2OoLD/pajabiBUIjdogP1WAmdHk02LK5gPhilPFsbhimdyTEx/R0fYp0m4w4E6/B/+5k rT0enU49lwrqqhYvddM9YrsHHHppUdzzD8DZudln9zqLxzuKMG3rxeOOrtIp473XuNyG OO3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=W65GZhjn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y184si2398548ybc.353.2020.06.02.08.51.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jun 2020 08:51:59 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=W65GZhjn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg9Co-0003CJ-Vt for patch@linaro.org; Tue, 02 Jun 2020 11:51:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg97g-0003m9-IY for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:40 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:35381) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jg97e-0007dh-Uc for qemu-devel@nongnu.org; Tue, 02 Jun 2020 11:46:40 -0400 Received: by mail-wr1-x444.google.com with SMTP id x14so3922887wrp.2 for ; Tue, 02 Jun 2020 08:46:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D7IUd/fMXoOGoaV/5qSVVzKkzaDzbDEGnaTAgX8XWeQ=; b=W65GZhjnZ98xwCzBbH0fHzuuUkAIA01tNSHq/Alu6fN+EyyuvKkcLCdAt+278dEtDe 0+k/ch+rEK6wYrP0EAWYowzRCfgz1/keWSt1+beEc+/SqG4jC4+vqSqH7024pgM6872R z4pXloEmu4sKFxCiNrcugWNfF0At/sO4LANKLsRpvBVNpNHUnqK14pM14eCTRnJ6f8x1 VkVVQKjBnizmQEKccSUJyVw3rtHAQS9IxL22OBiAD52Yr/ZGf0Ho94Cp+Fe28XmZPBIR ayU5x7AJAdoZf/k/UqImCpYsxFkHMXumgpW2807LQ6FM6DzlPI3TF951XFsB6n7enTSZ W0Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D7IUd/fMXoOGoaV/5qSVVzKkzaDzbDEGnaTAgX8XWeQ=; b=BDBT/ZiwpUc6f4FevCcD2alw+Xk1XdleceFhbzAQVPnEj+wA04gRpV9JTPF3nNSo6t Vxca52OKQV4xsqo6aeEPyCyV5QgOOhJWfZQ3hCvn2XNxTe7mQRQPlierMiAWYkjgq5tc XBcXhs00fMrUpwLEabg5SD71nbMzw/KPsNCWVKPA5uMf+Jd7J+qy+Wui+nuXaEe5upS9 F5ALB1bCqTUX0NVaJPQhRbgO6Ca3uJRrQ5pME8M2BkNiQwHHzWOaE4IgFFDOf2dcQblk skz5nEwHTAvfj2fGFuqQ8BDSC+kG3Id9w2GwLhJ3IHxyI/nfhKhr/nxkLaLZQ0kyj3WU hZGQ== X-Gm-Message-State: AOAM531Tcr+/UbbjIZSpzcgEBHMywItjcYHrKHt0TGwribt8kgUVXBmi BzGbXbBoIX8JxUwTmjBvy+7EbA== X-Received: by 2002:adf:fdcd:: with SMTP id i13mr25544969wrs.190.1591112797582; Tue, 02 Jun 2020 08:46:37 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 37sm4682599wrk.61.2020.06.02.08.46.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jun 2020 08:46:32 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 10D451FF98; Tue, 2 Jun 2020 16:46:25 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 9/9] .travis.yml: allow failure for unreliable hosts Date: Tue, 2 Jun 2020 16:46:24 +0100 Message-Id: <20200602154624.4460-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200602154624.4460-1-alex.bennee@linaro.org> References: <20200602154624.4460-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , robert.foley@linaro.org, =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , robhenry@microsoft.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, peter.puhov@linaro.org, =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" They will still run but they won't get in the way of the result. Signed-off-by: Alex Bennée --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) -- 2.20.1 Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé diff --git a/.travis.yml b/.travis.yml index 564be50a3c1..ec6367af1f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -429,6 +429,7 @@ jobs: env: - TEST_CMD="make check check-tcg V=1" - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS}" + - UNRELIABLE=true - name: "[ppc64] GCC check-tcg" arch: ppc64le @@ -493,6 +494,7 @@ jobs: env: - TEST_CMD="make check check-tcg V=1" - CONFIG="--disable-containers --target-list=${MAIN_SOFTMMU_TARGETS},s390x-linux-user" + - UNRELIABLE=true script: - ( cd ${SRC_DIR} ; git submodule update --init roms/SLOF ) - BUILD_RC=0 && make -j${JOBS} || BUILD_RC=$? @@ -535,6 +537,7 @@ jobs: - TEST_CMD="make check-unit" - CONFIG="--disable-containers --disable-tcg --enable-kvm --disable-tools --host-cc=clang --cxx=clang++" + - UNRELIABLE=true # Release builds # The make-release script expect a QEMU version, so our tag must start with a 'v'. @@ -556,3 +559,5 @@ jobs: - mkdir -p release-build && cd release-build - ../configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; } - make install + allow_failures: + - env: UNRELIABLE=true