Message ID | 20240223162202.1936541-23-alex.bennee@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:a356:0:b0:33b:4db1:f5b3 with SMTP id d22csp439177wrb; Fri, 23 Feb 2024 08:47:11 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXNRXPG3/V03H70DUK1Xmgi2qBFqvJ/gOXXYEFYcX4Zw1achmqKJ66Duqd7+23Zn/14zyd6hI8Ez8H8G7cBnUSv X-Google-Smtp-Source: AGHT+IEjHIFta77daDLozZlLAPwFiAOXLG5D/CgeRynPplraHsj5gOwtxzaQqHVaudqpCyZrGWHX X-Received: by 2002:a0c:dc02:0:b0:68f:30a1:4bea with SMTP id s2-20020a0cdc02000000b0068f30a14beamr326508qvk.33.1708706831046; Fri, 23 Feb 2024 08:47:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708706831; cv=none; d=google.com; s=arc-20160816; b=VAcs7eABqOE8Ct44ae2saJUSuJ3xv/E89RlNH/bK8nwn146G4cWzQIwQAWbmgmkukR 3lW0wqKMMIzjCxIDT1XOU+i+ShH6WuPolUh2bBA7pacHOpSdoLkN96s92WFh7eyWUYLc +FwT0l1MiR7hRIKBqHYoU27iUkbTU5ZzC2Jv5ZWvWIwNoZsi7CEMd/1IGIJRfTeCl2/3 8kbTXmzLhAt6SDd3HwjH4KVmOSv4r5r2y/A8ymUE3ijPEwO5UipVI4SCHbCJBrhz7UQd EzYaQqrHB9ngva7g9Jysc3EBkJ5G9mgmcrX+eebyc0LiunQzvtHZhMGEMAh3avD5LeWG Yy1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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:cc:to :from:dkim-signature; bh=v93sjlrKGHF/8PcF+jkx1JshiyYwDWnn08uJwR8C/sE=; fh=/YEu+IjZM84YWRDAuPeJeqMoLNTdSzM/iYv/jybOCWk=; b=ieaoQ57+HtdAFAuftTI2OTy4cjSYqH0QOnbrHWGIGPQNsYXM6igqcJwmUd+cOQctZo zXRxvbkxos1DQoofrefjreNFj3fmnbvXvVaQmv+ZoQNGsMWUndaE6FeqA/x8FbCukEUa MOBdNOfG/PJOwGIu+MN07Y3gX+lJdLU6cWAY1vagaR3eTtnDA/mqLrPcOe+Yiw/39SB+ bO8rUZCUqJ9EuKhAXwfHiOAk1umy1DqriLxb1UngXx37MnLh0BU8n6Q0yhb6MX9XMI4i u7Yj0BTQ/+8FvuA0pKI+MYRMdGjPuWrUSLVMyv7/C1Iv4c8PGxS2Yue7qvXj3F7JLlWx yYyw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P5wmz2KX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r8-20020a056214212800b0068f45b756f5si15280012qvc.69.2024.02.23.08.47.10 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Feb 2024 08:47:11 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=P5wmz2KX; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1rdYhO-0005Uo-7B; Fri, 23 Feb 2024 11:46:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>) id 1rdYQ8-00060T-9a for qemu-devel@nongnu.org; Fri, 23 Feb 2024 11:29:08 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <alex.bennee@linaro.org>) id 1rdYPp-0007GH-Lq for qemu-devel@nongnu.org; Fri, 23 Feb 2024 11:29:08 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-41279203064so3895505e9.1 for <qemu-devel@nongnu.org>; Fri, 23 Feb 2024 08:28:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708705727; x=1709310527; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=v93sjlrKGHF/8PcF+jkx1JshiyYwDWnn08uJwR8C/sE=; b=P5wmz2KXmq5DA/Wn7dvF6QOh+RJ2/ESv+NFrOJQh/K1/q9lqqqSH4BQ5QgRl+YtqBY oOUfQk14A+luaim8vTihVlpqlyZtT+V+lUzE5GDfmvud+Qw5HY+di7ANX9wWDgveG4en JFi8KAr2DlsD4zA82DTbA2swHQjmjPyinqs/fQQCJ71BPx8ZA1LvH0m+TfFWRRloeeRE NqQkCTZxgKkbqKOq46Oe7b2HECfQD2/JanlB+XZPAsijqm5tJuOcJCDzda9r7D28Hh9x 5arcZfUxH11PH9y+/M+AGBbnhMW8ahB4FE7NJlWReWOrXckHWGjwtu3ejCP3XIdVN8gU rrPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708705727; x=1709310527; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v93sjlrKGHF/8PcF+jkx1JshiyYwDWnn08uJwR8C/sE=; b=kzUO71XSn6aqOBF9pXOafMulZjs9PCq64JqPU8EMFUB2Ta2QzwUYYEqfBH6I8tgQTK 5hWvIjVOSfWYqsP6oGUDGTbLN24TbAV1rvKBvSGYJks/z1AAyT4kOuBRrfhAINyi+yUj zSK1QmoZZrOQmFZYsExhQVpqo/UyeQ8vM7UfeZuQZ4EgwW492wuQM6HpJIOfqR8kd9cA 5FOz8T5n7dgvJ/XtHrQZ6omGAPuEzktUzdimo7p9wAiGLzrU/oy3sANwWe9ou4A2onYo q44izSWwZ5aDYKUG7gIo1k3or140iGOrWIEz0uj+QIq71frcTARZ1IUmPaEjM/gTEbjU IFSQ== X-Gm-Message-State: AOJu0YzUHwq8ps/4FVLwfyWmwV75UKMnRIUP+LVu+O7qGwEduC24Ls9O ntMLEYBypJNxZrI33lJhIqcx77r3/1OcFjD7WBuVTSmpM20QE9ZPul4qqAl04Xw= X-Received: by 2002:a05:600c:4e11:b0:410:55a:5458 with SMTP id b17-20020a05600c4e1100b00410055a5458mr205838wmq.31.1708705727123; Fri, 23 Feb 2024 08:28:47 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id z6-20020a05600c0a0600b0041266f5b041sm2984923wmp.34.2024.02.23.08.28.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 08:28:46 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 9C7235F938; Fri, 23 Feb 2024 16:22:04 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> To: qemu-devel@nongnu.org Cc: Song Gao <gaosong@loongson.cn>, qemu-s390x@nongnu.org, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Pierrick Bouvier <pierrick.bouvier@linaro.org>, Thomas Huth <thuth@redhat.com>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Bin Meng <bin.meng@windriver.com>, Yanan Wang <wangyanan55@huawei.com>, Laurent Vivier <laurent@vivier.eu>, qemu-ppc@nongnu.org, David Hildenbrand <david@redhat.com>, =?utf-8?q?C=C3=A9dric_Le_Goater?= <clg@kaod.org>, Ilya Leoshkevich <iii@linux.ibm.com>, Cleber Rosa <crosa@redhat.com>, Nicholas Piggin <npiggin@gmail.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Eduardo Habkost <eduardo@habkost.net>, Richard Henderson <richard.henderson@linaro.org>, =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= <philmd@linaro.org>, Alexandre Iooss <erdnaxe@crans.org>, Peter Maydell <peter.maydell@linaro.org>, =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, Daniel Henrique Barboza <danielhb413@gmail.com>, qemu-arm@nongnu.org, qemu-riscv@nongnu.org, Palmer Dabbelt <palmer@dabbelt.com>, Mahmoud Mandour <ma.mandourr@gmail.com>, John Snow <jsnow@redhat.com>, Weiwei Li <liwei1518@gmail.com>, Alistair Francis <alistair.francis@wdc.com>, Yoshinori Sato <ysato@users.sourceforge.jp>, Brian Cain <bcain@quicinc.com>, Paolo Bonzini <pbonzini@redhat.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Michael Rolnik <mrolnik@gmail.com> Subject: [PATCH v2 22/27] tests/tcg: expand insn test case to exercise register API Date: Fri, 23 Feb 2024 16:21:57 +0000 Message-Id: <20240223162202.1936541-23-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240223162202.1936541-1-alex.bennee@linaro.org> References: <20240223162202.1936541-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.com 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_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
maintainer updates for 9.0 pre-PR (tests, plugin register support)
|
expand
|
diff --git a/tests/plugin/insn.c b/tests/plugin/insn.c index 5fd3017c2b3..54da06fcf26 100644 --- a/tests/plugin/insn.c +++ b/tests/plugin/insn.c @@ -46,6 +46,25 @@ typedef struct { char *disas; } Instruction; +/* + * Initialise a new vcpu with reading the register list + */ +static void vcpu_init(qemu_plugin_id_t id, unsigned int vcpu_index) +{ + g_autoptr(GArray) reg_list = qemu_plugin_get_registers(); + g_autoptr(GByteArray) reg_value = g_byte_array_new(); + + if (reg_list) { + for (int i = 0; i < reg_list->len; i++) { + qemu_plugin_reg_descriptor *rd = &g_array_index( + reg_list, qemu_plugin_reg_descriptor, i); + int count = qemu_plugin_read_register(rd->handle, reg_value); + g_assert(count > 0); + } + } +} + + static void vcpu_insn_exec_before(unsigned int cpu_index, void *udata) { unsigned int i = cpu_index % MAX_CPUS; @@ -212,6 +231,8 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, sizes = g_array_new(true, true, sizeof(unsigned long)); } + /* Register init, translation block and exit callbacks */ + qemu_plugin_register_vcpu_init_cb(id, vcpu_init); qemu_plugin_register_vcpu_tb_trans_cb(id, vcpu_tb_trans); qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); return 0;
This ensure we at least read every register the plugin API reports at least once during the check-tcg checks. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- tests/plugin/insn.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)