Message ID | 20240228115701.1416107-25-alex.bennee@linaro.org |
---|---|
State | Accepted |
Commit | 6036b9cfde74f45af7ef449d7c034fb8a9cf2901 |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:e94d:0:b0:33d:f458:43ce with SMTP id m13csp256243wrn; Wed, 28 Feb 2024 04:09:43 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVaNh9rNRjYHeyJG3NgHZcMjcAj3BihOusguRE9m4dlpR4QGurDkPOZ7lrqQoRuFjmg5L3SYWst6zYV/xo0HeCL X-Google-Smtp-Source: AGHT+IF1ad/fOvPVdWgQm4a/zxHZ63SjEtg+OkpF9dU3Np6FrB/3AyBjpHZdGGTGfEPsdPBpL0Cn X-Received: by 2002:a05:6871:7292:b0:220:1870:2a7e with SMTP id mm18-20020a056871729200b0022018702a7emr9064038oac.46.1709122182915; Wed, 28 Feb 2024 04:09:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709122182; cv=none; d=google.com; s=arc-20160816; b=PdV4xxKAAmPcmHk4V9vUN29XFKWBjEtRlBfTGhclgW64zRFl/7nec5UWH7W96Mk/30 DVr0hECataRZgmv3dmnyJpz658JXQrzeOfoRBSznhaZyr49Q0ku/Y4VYUnxfbe6Q7b21 TXhfyQpwcqy176FVTW9BrMSLaADBQf0gKWwa53b4V5z0RHIfo+RAFC3hf3FQgdTi3nlN liu4z5nklnWwbtWYlkkSS6PQR35ez0vV/4HUVBvOJPntC5zK6zhFzr17/R08upQ2wo35 l2P+dw49fmgE9zIZ7w/ouYsvzsZxnbpzJ/l3JlFs+6cd82k6Ispv2BJ+GBP37CrMe+Ui PfTA== 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=2cnCNv8y43FexcD7a6Rtr0pLIxQ1zciWAgu6ycEDUXY=; fh=FAL2D6uTyIa7tGzjyRrQN+DzefW95j5rgBe4AZL1gi8=; b=gyl6HhyO9ZTj2TdbMVPO8l9mEHSEV3I80QybhD81Yf3jfZAJMfMjs1vcElddyYYRLX Jx+8pV4u1ypFxNgFAZ7Io6jm9eqT/5jdFSHyo7X8OBJBZq9wPScqzhGFlEVT6sXQCf4x A/bcYLFb21V/9GTLHbGRRhvn88yeJBdpZNkWavXARFReV8IdLBWpdC+qKApUWEnxORRL pP5Kz/fAzIF7Ij5HGRxm9b5mMorm64xfE6aDDsvAxaCjPRfchZ/6tg8G5KmyDcqZul5A AaA508XgtBAN65vFcD3J8rTh00s97a32vyLyLTx3ENmr9z1ZSGTuzUKp/1jxlnXzxSIY HkBw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HQfM91uZ; 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 d23-20020a05620a159700b0078784bc4e64si9514516qkk.615.2024.02.28.04.09.42 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Feb 2024 04:09:42 -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=HQfM91uZ; 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 1rfIeY-00053x-05; Wed, 28 Feb 2024 07:03:14 -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 1rfIeR-0004qm-La for qemu-devel@nongnu.org; Wed, 28 Feb 2024 07:03:09 -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 1rfIeM-00035S-Jj for qemu-devel@nongnu.org; Wed, 28 Feb 2024 07:03:07 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-412a14299a4so30083385e9.1 for <qemu-devel@nongnu.org>; Wed, 28 Feb 2024 04:03:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709121781; x=1709726581; 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=2cnCNv8y43FexcD7a6Rtr0pLIxQ1zciWAgu6ycEDUXY=; b=HQfM91uZaFBNHPv4q42sC2CTcSwBQGZLSkMsUnM1BHvfLYO2vbw/f0hxXadl5gpJq1 i2/B+7dXrEywiZXBC4YyVaHm4wlCId2BBHCihkIAmGF7AiLZblZRjX8BlCkclCt9a6Wd kbUqSm9tM2il2F9FsUTssoVCs+MhWKlU0z9spcoeOLcZH1ztx3lLdfNPi8/6dPp/JoPG ao6ZTeRHsygrXaXFImCKACpDcJ6iAd1hWieTjVq/u/plXo7TPBSEv0Qi48dUNZ9o+fF1 uG/D1YFbUDadMbVXiHSP87LWDwtMfduZoRaaw9O65Db+1T9cxnA8W4Xuq+ZbCb80O3wL aDGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709121781; x=1709726581; 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=2cnCNv8y43FexcD7a6Rtr0pLIxQ1zciWAgu6ycEDUXY=; b=taJ86oxmDAj8Imqb9wiC9gpp9ixNkTqhbVK9nvmNc9lDMhQ3qeWM4IOlc2J0HBwYP1 +iUKdSixJ3mQL2+PszyvLKKjo80kXlhx81F2L/XjSh9a4ok8WG5pAu0p+R0Nj4cXDvPM wgjKqDhTl/mk45KbYIJIL7LLQ0XgP43PMJBdGybCjF+95dPAWgpUYfKRnu023sX75ygT 2Dbgk3Q3+m07P3iZ3W7crL81E6nRgRpfGuYZx6qlKPTvPaq4PTIOg2nY86+ewv9guxMR a0ePP++5chZkkM6xjUuJYbcvG60ljb4ROTX85EMazLE5adnPx+EgPc0H3piOdbtmEQEd wFMw== X-Gm-Message-State: AOJu0YzaQS5z6cCrl+piyOMDmNjY/IBJvSjV+L4okaoKRdDAcMs0TtQZ uUdC5VaLWOPaGzY5KDK9Z6z60EmUX+vs5KiZbM5hkbSqv0KTjqG8EF+mrj13ndA= X-Received: by 2002:a5d:484a:0:b0:33d:b01e:c4d6 with SMTP id n10-20020a5d484a000000b0033db01ec4d6mr8741219wrs.17.1709121781204; Wed, 28 Feb 2024 04:03:01 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id bw1-20020a0560001f8100b0033af3a43e91sm14608368wrb.46.2024.02.28.04.02.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 04:02:59 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 3CCA15F92B; Wed, 28 Feb 2024 11:57:04 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, Alexandre Iooss <erdnaxe@crans.org>, Mahmoud Mandour <ma.mandourr@gmail.com>, Pierrick Bouvier <pierrick.bouvier@linaro.org> Subject: [PULL 24/29] tests/tcg: expand insn test case to exercise register API Date: Wed, 28 Feb 2024 11:56:56 +0000 Message-Id: <20240228115701.1416107-25-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240228115701.1416107-1-alex.bennee@linaro.org> References: <20240228115701.1416107-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, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 autolearn=ham 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 |
[PULL,01/29] tests/tcg: update licenses to GPLv2 as intended
|
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> Message-Id: <20240227144335.1196131-25-alex.bennee@linaro.org>