From nobody Sat May 18 20:15:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615573498; cv=none; d=zohomail.com; s=zohoarc; b=M+5MQ5r3Ov2utrtGlFzlt2SVHXyMSZNNH+k5cgOi7gZd5VN3K2EMSFeNo8HoLHcsHVkCoaFJHZ/vWvFTl2S9IGe4cIAJUlRCqYUEHSNcI/pEAZoalbjxJx1U/Jrt7oybyx0XmCT/y0PjTmIAUXJBvN1xPtWB2L8GfuA8QSgGQxU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615573498; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=eRIYBL/UvBDgTYdklYBnpFFW+jkrI6mIBJA/5FnNiwo=; b=fny8hwe1sKzu8TIqMRwQGHibFiEKjYzcbt+7/DYzv7RBwKu141ICHPN+tzvHq71ofXmt4PROZZMPZ4/SY1qDl9ResSNQgOi7vVDr0fwww69xHxuJ1phi+UQXnDp1gbcFIzqCsZu4tSGX/ytW5HGXAx7iCYv4WapRuuEEFoarnPg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615573498331162.40563718516853; Fri, 12 Mar 2021 10:24:58 -0800 (PST) Received: from localhost ([::1]:34242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmT3-00070J-41 for importer@patchew.org; Fri, 12 Mar 2021 13:24:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59338) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKlac-0003z0-W9 for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:43 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]:41367) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKlaL-0002Bk-05 for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:42 -0500 Received: by mail-ej1-x632.google.com with SMTP id lr13so54869686ejb.8 for ; Fri, 12 Mar 2021 09:28:24 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id qo25sm3065199ejb.93.2021.03.12.09.28.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 09:28:22 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id C1DD01FF87; Fri, 12 Mar 2021 17:28:21 +0000 (GMT) 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=eRIYBL/UvBDgTYdklYBnpFFW+jkrI6mIBJA/5FnNiwo=; b=YWbyXKQ6eh1gJcyKn99m5zZV50Vycpt4cCKLP88F4S48R4HCyo3MDzUgmwhWaqd01G emsa6zI4vpnWYV/bfur/ceSGJ8pg9dyoWECAxhs8Fzik9OJTEbxA7seQOZw1s51hhqVt Dq7ASdQSamBMEho82c3Zp+qNV8KIlb+lxjotnNlNVcZkU3BuY7e0fk1LVyno/b1JQQMV AB/RqTbJjA7OGfu058qvWy2Sdt40u1dLNRvmx414ib091xAkSgwdn2+5u5ag6rF0rgOi 8Oofaqdf3aCPotiKSTygVOkH0cKU+ypNkXFgEqrwQfHn3M5IzxuK325BaYA1SscPO/x+ ZFGQ== 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=eRIYBL/UvBDgTYdklYBnpFFW+jkrI6mIBJA/5FnNiwo=; b=e7HdJgGIgLMg++XvcFjcabNwC3Wp6qjU0GBsH1irhhqq5ZfIjsH/DRPJjbv8e1jxzC zBZIO0ewiX17mZiS1FwwBqOiDVcFuXVKFYQIcRjAedUTrdOGm+4qyz1a58esLDO4x9ut o4YZOszM+xPsYwYwnSO4MKZ4zS2+l65dGBSL2f3xRmUKeNvj3l9PCtftYRglZ3dI8UAr rth80bVt95rpM7l1NQ5WRYEg79HnF4z8SNyxBPMlesK3p8OryyiFdEinxpmftNra0jHm eFVKn9HhF8bIq8WmZ0182a2S1G1y+vL7fkbU8/qaxnlPJwGV0LnoTA4/GfQHcW1KHVyn orTw== X-Gm-Message-State: AOAM530Ij1qy0b31Mz29H1TRV49sls/AKQdMWU72EQKFofEd/LATnksL O5TVBdtA7Ej4XEXliDluuLpa8Q== X-Google-Smtp-Source: ABdhPJzLVTKlmQuuSG+AgsaoKv2GP/VEEag/7HA47dpuBg5JzbmZ26DWnzB41isvGivP0tz9bl/xsA== X-Received: by 2002:a17:906:1ecc:: with SMTP id m12mr9678705ejj.4.1615570103330; Fri, 12 Mar 2021 09:28:23 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 01/14] plugins: new syscalls plugin Date: Fri, 12 Mar 2021 17:28:08 +0000 Message-Id: <20210312172821.31647-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210312172821.31647-1-alex.bennee@linaro.org> References: <20210312172821.31647-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x632.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 autolearn=ham autolearn_force=no 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: Matthias Weckbecker , robhenry@microsoft.com, mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Matthias Weckbecker This commit adds a new syscalls plugin that displays the syscalls as they are executed and returned. This plugin outputs the number of the syscall as well as the syscall return value. Works in *-user only. Essentially, this commit restores: https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg00846.html by using the new QEMU plugin API. Signed-off-by: Matthias Weckbecker Signed-off-by: Alex Benn=C3=A9e Message-Id: <20200812115816.4454-1-matthias@weckbecker.name> --- tests/plugin/syscall.c | 49 ++++++++++++++++++++++++++++++++++++++++ tests/plugin/meson.build | 2 +- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 tests/plugin/syscall.c diff --git a/tests/plugin/syscall.c b/tests/plugin/syscall.c new file mode 100644 index 0000000000..53ee2ab6c4 --- /dev/null +++ b/tests/plugin/syscall.c @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2020, Matthias Weckbecker + * + * License: GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ +#include +#include +#include +#include +#include +#include +#include + +#include + +QEMU_PLUGIN_EXPORT int qemu_plugin_version =3D QEMU_PLUGIN_VERSION; + +static void vcpu_syscall(qemu_plugin_id_t id, unsigned int vcpu_index, + int64_t num, uint64_t a1, uint64_t a2, + uint64_t a3, uint64_t a4, uint64_t a5, + uint64_t a6, uint64_t a7, uint64_t a8) +{ + g_autofree gchar *out =3D g_strdup_printf("syscall #%" PRIi64 "\n", nu= m); + qemu_plugin_outs(out); +} + +static void vcpu_syscall_ret(qemu_plugin_id_t id, unsigned int vcpu_idx, + int64_t num, int64_t ret) +{ + g_autofree gchar *out; + out =3D g_strdup_printf("syscall #%" PRIi64 " returned -> %" PRIi64 "\= n", + num, ret); + qemu_plugin_outs(out); +} + +/* ***********************************************************************= ** */ + +static void plugin_exit(qemu_plugin_id_t id, void *p) {} + +QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, + const qemu_info_t *info, + int argc, char **argv) +{ + qemu_plugin_register_vcpu_syscall_cb(id, vcpu_syscall); + qemu_plugin_register_vcpu_syscall_ret_cb(id, vcpu_syscall_ret); + qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); + return 0; +} diff --git a/tests/plugin/meson.build b/tests/plugin/meson.build index 1eacfa6e35..2bbfc4b19e 100644 --- a/tests/plugin/meson.build +++ b/tests/plugin/meson.build @@ -1,5 +1,5 @@ t =3D [] -foreach i : ['bb', 'empty', 'insn', 'mem'] +foreach i : ['bb', 'empty', 'insn', 'mem', 'syscall'] t +=3D shared_module(i, files(i + '.c'), include_directories: '../../include/qemu', dependencies: glib) --=20 2.20.1 From nobody Sat May 18 20:15:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615573652; cv=none; d=zohomail.com; s=zohoarc; b=fVpfF+VmhVqGz062omqC4+IZlN8kV5Q+Qlb1BgfjuSNzU0hvOAfM8NAGFc1gpEQEQMNQ9Mfxxw/G5aZSpIAz+tW25sBV8d5rRZxnIG2ZZFVA8PedRIHWHLzraSHJOhGvOh8UpLxsS2Y+SymK9jla+opXt46DY2ahfuMu2eM8gaA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615573652; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5JNRepraAPHTlu3+kN/T3414bS3r0zFc9RKsC+Bnhh0=; b=R3NXV6LI8YyAYUxaG0IulLnhhUefG7DrN/cmSYy3wtKCysIvAexqFrks/t5z6sIaXyjNxFO+EIkaAXUXfN/fhtXRhYkkW3ieqqpn5lMQOThRhEgMCysK2bEos/wId3FL40oQqGeB2u6nnjdM96rFQFHIQLUeZUWhhhinnGbwXXw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615573651995555.8502358727278; Fri, 12 Mar 2021 10:27:31 -0800 (PST) Received: from localhost ([::1]:42794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmVW-0002NL-Uo for importer@patchew.org; Fri, 12 Mar 2021 13:27:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKlaf-00043X-0P for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:45 -0500 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:34568) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKlaN-0002C3-71 for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:44 -0500 Received: by mail-ed1-x52b.google.com with SMTP id y6so9031581eds.1 for ; Fri, 12 Mar 2021 09:28:26 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 90sm3555711edr.69.2021.03.12.09.28.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 09:28:22 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E037C1FF8C; Fri, 12 Mar 2021 17:28:21 +0000 (GMT) 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=5JNRepraAPHTlu3+kN/T3414bS3r0zFc9RKsC+Bnhh0=; b=Jm22Vkh5yJbiYY4PmYX8BRxsYtvCVvxfF2/ZTKDgmD2SnF5QdzNhNWFnJZ/E7oRctn S8UuumFnLPlY75R3nNXvn4HQOeel7hTZ5X0nIMtrtCuAdD4ZG4KYF+3XlVPdbDm21LWb 1ZqjuFzraoPZkx9rMuOs+OWP8uVp4SxA+yo0R4vJwvm6NBJVV3tqK+mvYdXgdU767LLi O2O1UCRqpvMiGBeF6X4dsrcy8vZLJ5lXOqmNbV731XcyaOop5ap8u6+g9w4MRorD3KbV NaTY68n9WjkpEz7qyvxmVWR25lr254uLThCosRMsIfRQ4XVGHRkrY+em2tvSLEWcfMuY C1gA== 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=5JNRepraAPHTlu3+kN/T3414bS3r0zFc9RKsC+Bnhh0=; b=nL14Ska2MxnfnTJ+OY6s6cAkDGU9SLd6+wFR4pfeeHp9fAyoNkB1cGfZsw6dt94k3T 7BDfExgffr6N35Qzx0PMyKYwaeBOe50I05otiaMcUuTJV/tTOqcdg373VCwTmA09jz2q EsrrZtSzSkG3Lj89iiUqUtNN9GL5typXqb5wMfqnb+cQHiMxzZSd9OZQdo3KPOk36ntD TLosVGy80IYCe05HdRlmN99U6wVeG47EQ1ri0UktqS+1zcdjJLdfwLR2e8BAug6yCw9H bgMYIpLwWZyjMNA4ZGBDs+pxk/dimUkgvNm1oyhqPoXIoa0dWJQRcSGe6gS6rrwnVAGL HGtg== X-Gm-Message-State: AOAM530TmofQY/IpEGMSQhYmbJehCu3n57PL1yX8awLPPPsrWmWlut0/ Zl8ZlAS6aUln+J2NpGfs7Vz+JQ== X-Google-Smtp-Source: ABdhPJzki7ZMYY1WatOhrepc23lJzgh5aFTrE5beDjhqgfZr9lQz+W9j+NDiNFOUnT0e9VKf01dzYg== X-Received: by 2002:a05:6402:6cb:: with SMTP id n11mr15772141edy.198.1615570105853; Fri, 12 Mar 2021 09:28:25 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 02/14] plugins: Expose physical addresses instead of device offsets Date: Fri, 12 Mar 2021 17:28:09 +0000 Message-Id: <20210312172821.31647-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210312172821.31647-1-alex.bennee@linaro.org> References: <20210312172821.31647-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52b.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 autolearn=ham autolearn_force=no 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: robhenry@microsoft.com, mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Aaron Lindsay This allows plugins to query for full virtual-to-physical address translation for a given `qemu_plugin_hwaddr` and stops exposing the offset within the device itself. As this change breaks the API, QEMU_PLUGIN_VERSION is incremented. Signed-off-by: Aaron Lindsay Signed-off-by: Alex Benn=C3=A9e Message-Id: <20210309202802.211756-1-aaron@os.amperecomputing.com> --- include/qemu/qemu-plugin.h | 32 +++++++++++++++++++++++++------- contrib/plugins/hotpages.c | 2 +- contrib/plugins/hwprofile.c | 2 +- plugins/api.c | 17 ++++++++++++----- 4 files changed, 39 insertions(+), 14 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index c66507fe8f..3303dce862 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -47,7 +47,7 @@ typedef uint64_t qemu_plugin_id_t; =20 extern QEMU_PLUGIN_EXPORT int qemu_plugin_version; =20 -#define QEMU_PLUGIN_VERSION 0 +#define QEMU_PLUGIN_VERSION 1 =20 typedef struct { /* string describing architecture */ @@ -307,8 +307,8 @@ bool qemu_plugin_mem_is_sign_extended(qemu_plugin_memin= fo_t info); bool qemu_plugin_mem_is_big_endian(qemu_plugin_meminfo_t info); bool qemu_plugin_mem_is_store(qemu_plugin_meminfo_t info); =20 -/* - * qemu_plugin_get_hwaddr(): +/** + * qemu_plugin_get_hwaddr() - return handle for memory operation * @vaddr: the virtual address of the memory operation * * For system emulation returns a qemu_plugin_hwaddr handle to query @@ -323,12 +323,30 @@ struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qem= u_plugin_meminfo_t info, uint64_t vaddr); =20 /* - * The following additional queries can be run on the hwaddr structure - * to return information about it. For non-IO accesses the device - * offset will be into the appropriate block of RAM. + * The following additional queries can be run on the hwaddr structure to + * return information about it - namely whether it is for an IO access and= the + * physical address associated with the access. + */ + +/** + * qemu_plugin_hwaddr_is_io() - query whether memory operation is IO + * @haddr: address handle from qemu_plugin_get_hwaddr() + * + * Returns true if the handle's memory operation is to memory-mapped IO, or + * false if it is to RAM */ 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); + +/** + * qemu_plugin_hwaddr_phys_addr() - query physical address for memory oper= ation + * @haddr: address handle from qemu_plugin_get_hwaddr() + * + * Returns the physical address associated with the memory operation + * + * Note that the returned physical address may not be unique if you are de= aling + * with multiple address spaces. + */ +uint64_t qemu_plugin_hwaddr_phys_addr(const struct qemu_plugin_hwaddr *had= dr); =20 /* * Returns a string representing the device. The string is valid for diff --git a/contrib/plugins/hotpages.c b/contrib/plugins/hotpages.c index eacc678eac..bf53267532 100644 --- a/contrib/plugins/hotpages.c +++ b/contrib/plugins/hotpages.c @@ -122,7 +122,7 @@ static void vcpu_haddr(unsigned int cpu_index, qemu_plu= gin_meminfo_t meminfo, } } else { if (hwaddr && !qemu_plugin_hwaddr_is_io(hwaddr)) { - page =3D (uint64_t) qemu_plugin_hwaddr_device_offset(hwaddr); + page =3D (uint64_t) qemu_plugin_hwaddr_phys_addr(hwaddr); } else { page =3D vaddr; } diff --git a/contrib/plugins/hwprofile.c b/contrib/plugins/hwprofile.c index 6dac1d5f85..faf216ac00 100644 --- a/contrib/plugins/hwprofile.c +++ b/contrib/plugins/hwprofile.c @@ -201,7 +201,7 @@ static void vcpu_haddr(unsigned int cpu_index, qemu_plu= gin_meminfo_t meminfo, return; } else { const char *name =3D qemu_plugin_hwaddr_device_name(hwaddr); - uint64_t off =3D qemu_plugin_hwaddr_device_offset(hwaddr); + uint64_t off =3D qemu_plugin_hwaddr_phys_addr(hwaddr); bool is_write =3D qemu_plugin_mem_is_store(meminfo); DeviceCounts *counts; =20 diff --git a/plugins/api.c b/plugins/api.c index 0b04380d57..3c7dc406e3 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -40,6 +40,7 @@ #include "sysemu/sysemu.h" #include "tcg/tcg.h" #include "exec/exec-all.h" +#include "exec/ram_addr.h" #include "disas/disas.h" #include "plugin.h" #ifndef CONFIG_USER_ONLY @@ -298,19 +299,25 @@ bool qemu_plugin_hwaddr_is_io(const struct qemu_plugi= n_hwaddr *haddr) #endif } =20 -uint64_t qemu_plugin_hwaddr_device_offset(const struct qemu_plugin_hwaddr = *haddr) +uint64_t qemu_plugin_hwaddr_phys_addr(const struct qemu_plugin_hwaddr *had= dr) { #ifdef CONFIG_SOFTMMU if (haddr) { if (!haddr->is_io) { - ram_addr_t ram_addr =3D qemu_ram_addr_from_host((void *) haddr= ->v.ram.hostaddr); - if (ram_addr =3D=3D RAM_ADDR_INVALID) { + RAMBlock *block; + ram_addr_t offset; + void *hostaddr =3D (void *) haddr->v.ram.hostaddr; + + block =3D qemu_ram_block_from_host(hostaddr, false, &offset); + if (!block) { error_report("Bad ram pointer %"PRIx64"", haddr->v.ram.hos= taddr); abort(); } - return ram_addr; + + return block->offset + offset + block->mr->addr; } else { - return haddr->v.io.offset; + MemoryRegionSection *mrs =3D haddr->v.io.section; + return haddr->v.io.offset + mrs->mr->addr; } } #endif --=20 2.20.1 From nobody Sat May 18 20:15:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615573309; cv=none; d=zohomail.com; s=zohoarc; b=Knpp2IdmryANzvoCVbzDP9EK0CVlK7FAh8iv1pFJPq21/CDFmoyMUM+QdHYIhkIRtRGLWz2+rpLRIurpod8BBkCqZedtOoV3CXl+6X2Iwna9SAk+Z1cQI/v1PDjfDGJWyBs4GQx/QjCYFmYmT/z3YSlkVhB0RMhmLzaj1EJ/YrY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615573309; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Tgg01WFzYZWxtwMF3RzuONdmzCofqm4lYuJbp66nklY=; b=fxXxr+DuWidG+Lc+9dDBEiipDrYn6sCSqGIP8Z6zjHmDqKd8BwJPbWzcvTtEK0PqlYaNofwyXY4Fo+7mGQkQIcCOvUZuw+FQs2GYIz0RCT8XbIuzAYCDJcgS+ru39B12kkRG9rME+zDbnrrUJIs9ZgMJDKYCgOrNvXUlwRCC1bg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615573309204253.2615457702467; Fri, 12 Mar 2021 10:21:49 -0800 (PST) Received: from localhost ([::1]:51824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmQ0-00026i-0I for importer@patchew.org; Fri, 12 Mar 2021 13:21:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59368) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKlae-00042K-FT for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:44 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]:36892) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKlaN-0002C7-PJ for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:44 -0500 Received: by mail-ej1-x632.google.com with SMTP id bm21so54815017ejb.4 for ; Fri, 12 Mar 2021 09:28:27 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id rs24sm3108929ejb.75.2021.03.12.09.28.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 09:28:23 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 0155C1FF8F; Fri, 12 Mar 2021 17:28:22 +0000 (GMT) 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=Tgg01WFzYZWxtwMF3RzuONdmzCofqm4lYuJbp66nklY=; b=e9U5fnctqAaxTymmQbwTZNVKbCIAQrVQxTID9Ip8sWTCNHES88Sea+6VcDWvDJEsR3 UZYgek/HGQkqDDznOn5mHiHFGWO5d9wJfBaI8ZApBhwbSRRDlkuDML9tlRLC9x+wUlbn p/DtguzS2vnjtIyOIkRlCjJr6mNvQJE8sTwJYRKMvAePIPpKMpziIrUGo3V/GH9r30pw glfUQAXLHByXsIdN974w12G+luUCrcxzYH89uGvL6om5CV3hNQEYZ608ZLGMq7FuB2Gv 06TuIZQWo4CY70EES/udU9AkziZgISgyOam4F3BNtGKf7QknEqi4wX/aNve73n3U5bbt bZrQ== 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=Tgg01WFzYZWxtwMF3RzuONdmzCofqm4lYuJbp66nklY=; b=GjuAIoB8Hqet/pog0EDuCE7Sqmz1hxmtktVFbHrCk9Xwj/T+mIwcwoq6VKmP5P6S7d 34kBV9G9hzpmy9MGpqlKfVWiikNY7nGUez3tmPz+PgQ39QAlBHgK8E/HtRazm2kNfe9e kuVGvZRTlUyDEVZ4L2WPsYBt5WQHHlIHaedCOUJWv7eWw6q0m1/T7K3IoJT0SIMKlISr TYbMPhTgALLYvnPNj3w+3xd5xdC1h7M1U8+5NKcujIhKo3BPEYzC3NkFDO9mR2LBjIVx usDV2IumRYDsaC2lXZimPngmPt0Zh/iOppcXmMHaPnoyUnP+AsMME5jDbisko8kOjrey PdPQ== X-Gm-Message-State: AOAM531psw29jMDdpsN5kA8xA506E9DQkuIPTtHj6kCnunBTwOlViaWV G0euiBP1loeQwBB6WxzzcssAUQ== X-Google-Smtp-Source: ABdhPJzAZLhBnEXET17Ag+qIErmus0UvOM6NFlY/0Q+jxghxQrm5/VPwFYvhQKt+qAk/oLqhK5AtwQ== X-Received: by 2002:a17:907:d8a:: with SMTP id go10mr9892867ejc.46.1615570106553; Fri, 12 Mar 2021 09:28:26 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 03/14] docs/devel: include the plugin API information from the headers Date: Fri, 12 Mar 2021 17:28:10 +0000 Message-Id: <20210312172821.31647-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210312172821.31647-1-alex.bennee@linaro.org> References: <20210312172821.31647-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x632.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 autolearn=ham autolearn_force=no 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: robhenry@microsoft.com, mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) We have kerneldoc tags for the headers so we might as well extract them into our developer documentation whilst we are at it. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Aaron Lindsay --- docs/devel/tcg-plugins.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst index 39ce86ed96..18c6581d85 100644 --- a/docs/devel/tcg-plugins.rst +++ b/docs/devel/tcg-plugins.rst @@ -63,6 +63,11 @@ valid during the lifetime of the callback so it is impor= tant that any information that is needed is extracted during the callback and saved by the plugin. =20 +API +=3D=3D=3D + +.. kernel-doc:: include/qemu/qemu-plugin.h + Usage =3D=3D=3D=3D=3D =20 --=20 2.20.1 From nobody Sat May 18 20:15:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615574223; cv=none; d=zohomail.com; s=zohoarc; b=gUJtcSE1uZQZwGtMUTlB7ny69ePLRQDosZUgs+Gr07iiXeC9uxln3klniK1QQwCeR8WFvDCfvCBrSUM0QpEZDDeV3oSwVgwMtt3o2tB4v/K25pnsNvqITeexM9Lb+koO5+wR2DyM10XLG3+pKYIM2aOOgmhPWhbDXfBh1mCbpuc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615574223; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=gxzdJY5GtdkEi5yLqsd1wrt/9eSlH3NwjXudTzLe0d8=; b=NwyQtrYqxMEbicxE2dt1MvhzmJv/ZgvekLNAFY0faL5BV83qo8r8x2uYTBJOMTR5W5K9DUPIiVSPM7f5nen7U749t9/l2NSdH6B4qcrvzUWzHGmkMa6PauYBRfqHx9jJZOvCO9VUu3vGj1WegGiJltfky7u1wC7LdfbIR51Suz0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615574223427374.9547981784233; Fri, 12 Mar 2021 10:37:03 -0800 (PST) Received: from localhost ([::1]:40620 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmek-0007Yr-9v for importer@patchew.org; Fri, 12 Mar 2021 13:37:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59504) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKlak-0004Hm-MR for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:50 -0500 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:46841) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKlaQ-0002Cm-6t for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:50 -0500 Received: by mail-ed1-x533.google.com with SMTP id h10so9043654edt.13 for ; Fri, 12 Mar 2021 09:28:29 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id kj3sm3103716ejc.117.2021.03.12.09.28.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 09:28:25 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 1CDC31FF90; Fri, 12 Mar 2021 17:28:22 +0000 (GMT) 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=gxzdJY5GtdkEi5yLqsd1wrt/9eSlH3NwjXudTzLe0d8=; b=QCnMUO1d4RM9McroQ6nZRuJIkmEK80fVQGRb1rAnLSnee6ANXF/e7SjJaZ91p3Gm5B MZEcOhjIe/4HmVhAADoZyGI7MnTRe9fEiFEYeVQmWFaMqrWoM13+EMrAbEm4tGo3nYmE buthkhzJw7b/npo0XYGLchdo1/pu9P1ZRl28jNc+6QsD72FADH/dMdTTgF+4cMWH6mMh KFR07Y5qvJ+lPb0TTk4oU36HmD4ab/50MUufD7aH+Y/+90S8H/cBZTSRTsLvMC+1IuCH A06dL2ZWX7J1S7BeQz2dLJ7MtE9UufOR1FjLgziDZcRlAg3Q0Zh2duHVjdN05Ok+7+ro 8zzg== 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=gxzdJY5GtdkEi5yLqsd1wrt/9eSlH3NwjXudTzLe0d8=; b=MEPTHS/npSu3tSSg4cVIaKrSHd1ewb6DirO4a3cs27LA7TGzW7iuoTkE3NVhPTXmeC 7V3qABloniub08F62jMzfsBxeUyxboMQ7RV9WhbJGo6eLADazZSUCiNSdq3cYpXZYKic 4HZzEN0UYKHv7MK6GmdiN+NMZF7Tj6RE4uh0hQ33g0IrlnmVY4+6c03qs7ChF4jbRmNQ TXxBYVrFN/NhjzKercagoQWy1IX0zFj1zDWxRm5DOOc3VlG9r9mLWoc7A6HrCVF3KzMe 5b/BhabOLHV1IYTaAi9w9iSvWvmDk3wwYVBQnzpf+CbtaypMba5FfjVd/OAM4HSbLPvE a2jQ== X-Gm-Message-State: AOAM531s9uloGUg3XuftvwUeSI2emPl31E43XjbJ1Z3PDQJ71o/nJdjN 4u9Yux0KzoBcz9GFRTg+HY67XQ== X-Google-Smtp-Source: ABdhPJz/5QAaJBccKOsOTsdbB7hzHpIzut/+GJl/WYZ/0PPNbdhjEE/pqTd0HJXckNvZ65o9q8kBAQ== X-Received: by 2002:a05:6402:84b:: with SMTP id b11mr15270597edz.56.1615570108849; Fri, 12 Mar 2021 09:28:28 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 04/14] plugins: expand kernel-doc for qemu_info_t Date: Fri, 12 Mar 2021 17:28:11 +0000 Message-Id: <20210312172821.31647-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210312172821.31647-1-alex.bennee@linaro.org> References: <20210312172821.31647-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x533.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 autolearn=ham autolearn_force=no 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: robhenry@microsoft.com, mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) It seems kernel-doc struggles a bit with typedef structs but with enough encouragement we can get something out of it. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Aaron Lindsay --- include/qemu/qemu-plugin.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 3303dce862..4b84c6c293 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -49,22 +49,30 @@ extern QEMU_PLUGIN_EXPORT int qemu_plugin_version; =20 #define QEMU_PLUGIN_VERSION 1 =20 -typedef struct { - /* string describing architecture */ +/** + * struct qemu_info_t - system information for plugins + * + * This structure provides for some limited information about the + * system to allow the plugin to make decisions on how to proceed. For + * example it might only be suitable for running on some guest + * architectures or when under full system emulation. + */ +typedef struct qemu_info_t { + /** @target_name: string describing architecture */ const char *target_name; + /** @version: minimum and current plugin API level */ struct { int min; int cur; } version; - /* is this a full system emulation? */ + /** @system_emulation: is this a full system emulation? */ bool system_emulation; union { - /* - * smp_vcpus may change if vCPUs can be hot-plugged, max_vcpus - * is the system-wide limit. - */ + /** @system: information relevant to system emulation */ struct { + /** @system.smp_vcpus: initial number of vCPUs */ int smp_vcpus; + /** @system.max_vcpus: maximum possible number of vCPUs */ int max_vcpus; } system; }; --=20 2.20.1 From nobody Sat May 18 20:15:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615573799; cv=none; d=zohomail.com; s=zohoarc; b=eWxn6D25bU4jPdsPla56frh5Z4zPwSslkdUMRPzUlva4W09FbVjlpc0WQCRBwqeAW8EzQuXkzmS4+NSmHT7TuRbhBzNVuSVIjEcwhrxTNX2gCu0uftB7u4CE/MhDaobhbQ6nRMmLoVQXZXJLszLPnuRhzSgJ+HdiGYs6d5jvjJs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615573799; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=JlkkTcluzTbtq/zjZUoz2AwI7NG2npDobHU+H6XFiEM=; b=lr0Ix43buFJzzp7hzk+XgYcx2s0p11Gyu/HFevDzzhZpbaxZ5jRfsjrNQgpKSDD6UmdUI5KV+HacooxsRGaQHfpsR+1oqEZpo0qSLfXNw93kWhyX+FWhbJ301jVUvY1xLP5SUPEyP40DRso4aV8/+d3Lwmj+Po1GgF9D7rRKNkI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615573799664199.20175089380052; Fri, 12 Mar 2021 10:29:59 -0800 (PST) Received: from localhost ([::1]:51416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmXu-0006od-BP for importer@patchew.org; Fri, 12 Mar 2021 13:29:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59408) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKlaf-00045p-W4 for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:46 -0500 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]:46851) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKlaR-0002Cq-42 for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:45 -0500 Received: by mail-ej1-x62d.google.com with SMTP id r17so54796452ejy.13 for ; Fri, 12 Mar 2021 09:28:30 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id w24sm3393605edt.44.2021.03.12.09.28.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 09:28:27 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 32C031FF91; Fri, 12 Mar 2021 17:28:22 +0000 (GMT) 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=JlkkTcluzTbtq/zjZUoz2AwI7NG2npDobHU+H6XFiEM=; b=oxX0OTdmFfrpINhW2urx0EPuu+G/u7rN2H9A2ORXDRLO+yUbasiiItTY9Jj2C4wKa+ SX3znl0hG0vJRJGovpjDB6PzASKQgBpZ8WKZWvvpXz70NxlSl5PmYMod0owQSQXngyJ5 AAb3wropu/WKEQq2HXyjsz88ZOmAZKIQJtC/kPK4upiEZ4Xm86hvaJY9CH19hQRobXS2 Pak6ZLE7WOIEo0/eB1KYrPXO/2dPqwtjmO4VmALockPYekeVz0zRJXNa+jZuX1x7xQWQ ES2rSFDf3L0bm+aQRTPVl959wRtubyCDO2mWLiXqjfPdt4lWujOCAXlvXQyByS/wc+YQ mTHg== 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=JlkkTcluzTbtq/zjZUoz2AwI7NG2npDobHU+H6XFiEM=; b=FfwOHPIjGw5XUWwBy8lJ/Qq0ave9kGHpDbD9ztqI0Me8QyNC9K1b1AevOk/DucYADf AFu5EosD6+HxbDpfuWVwsh8K6lsM9pe5QW3FFSptoG/Cxvr6mNNwmQ3ljKUYu0T7kkER UH6oLTHSMsHXXVUEk4ZTpDMMALgseUqK1/wLuLQXRlcnEX2etCrV2QXQICKpap/Y6Nc2 kCFqqccqvLo1HP3oDCb0+fiHCm9Tc403FhUYp6fV9+tWBByZ4FPUqsmPujQxsIgZi9rp SRma2U4H2GyBX2S9wOKDFHzfER7qm3iS3wQY5TlvCtUhRA22Xz2pPtaqEVdtsa5G+qrJ /PQw== X-Gm-Message-State: AOAM530lN3PN8I0ThdLTHK/+rg1UVwib9lIVAdykFjTqwoQYwTanWP0s DRORxJQ04p5LNLtezUnFEya5ww== X-Google-Smtp-Source: ABdhPJwg9SR+psoThgU9QOviX0TfivB/Yc2GzwHTmnTyXFV9mZywJXPuWtSKs1OeG+TZF8jBeavcLQ== X-Received: by 2002:a17:906:3488:: with SMTP id g8mr9507564ejb.282.1615570109812; Fri, 12 Mar 2021 09:28:29 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 05/14] plugins: cleanup kernel-doc for qemu_plugin_install Date: Fri, 12 Mar 2021 17:28:12 +0000 Message-Id: <20210312172821.31647-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210312172821.31647-1-alex.bennee@linaro.org> References: <20210312172821.31647-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62d.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 autolearn=ham autolearn_force=no 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: robhenry@microsoft.com, mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) kernel-doc doesn't like multiple Note sections. Also add an explicit Return. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Aaron Lindsay --- include/qemu/qemu-plugin.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 4b84c6c293..ac1bb318da 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -85,15 +85,15 @@ typedef struct qemu_info_t { * @argc: number of arguments * @argv: array of arguments (@argc elements) * - * All plugins must export this symbol. - * - * Note: Calling qemu_plugin_uninstall() from this function is a bug. To r= aise - * an error during install, return !0. + * All plugins must export this symbol which is called when the plugin + * is first loaded. Calling qemu_plugin_uninstall() from this function + * is a bug. * * Note: @info is only live during the call. Copy any information we - * want to keep. + * want to keep. @argv remains valid throughout the lifetime of the + * loaded plugin. * - * Note: @argv remains valid throughout the lifetime of the loaded plugin. + * Return: 0 on successful loading, !0 for an error. */ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_id_t id, const qemu_info_t *info, --=20 2.20.1 From nobody Sat May 18 20:15:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615573778; cv=none; d=zohomail.com; s=zohoarc; b=Z/vpCQ8j2cMzUiYM+8szv40xWytd61lz5kHptr0lBGQsyZUhW49BkwQ3t/+41czzRYV+sCUkBzaZOPqX+Ll8w5h8YPebWdIlOa5y1oDW/8rYezzxeUpGlQ+wRfilBh4JCk1Lx2iU/8IhngKykI4uzG0ezpuWnpiM2HzTEodqh68= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615573778; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=YVUJJy2xlHw8BI+XuObyfKh7efsezZH+aMO25WODlwg=; b=Gx7MVLMvA9sgYocttKb1qcLW9qq64THaLDppQs6FpWaUWKEgmv+B5KoomhYmEOEU5V0VU0xSEabZbTaxLw8uW0q6qk4dZdf/LAQQiLr1TEJC6O+s3/1WxQicKS0lirFGdTr4KtDtGSDqJeUVfeZxXVaIjMdsNjX+iWjapVUmQzI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16155737789375.282068960937977; Fri, 12 Mar 2021 10:29:38 -0800 (PST) Received: from localhost ([::1]:49452 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmXZ-0005zH-Q8 for importer@patchew.org; Fri, 12 Mar 2021 13:29:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKlai-0004Cn-QD for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:48 -0500 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]:39756) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKlaT-0002D3-IT for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:48 -0500 Received: by mail-ed1-x533.google.com with SMTP id bf3so9046458edb.6 for ; Fri, 12 Mar 2021 09:28:33 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r17sm3274241edt.70.2021.03.12.09.28.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 09:28:27 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 478811FF92; Fri, 12 Mar 2021 17:28:22 +0000 (GMT) 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=YVUJJy2xlHw8BI+XuObyfKh7efsezZH+aMO25WODlwg=; b=QvFntIfZ1XxtI9NoPD4fAdJI7JPE7rk/U1ZXxHuDm9qIz5I9wr90J/HVH3qhijv7+Y sVUIHHk5+LMaZi2OFtOLZB3nMaJhLvDFIvzL41nlXxq11gvimX9l/NLXVjaAK45H1dEe tQc5Etj7koz6qptEO2gR/LhpPElG7bpI+IrEYtAEWEZyizi2y/Mn6N1ZPF9F05jgdzqB eydjlDMCUFaE4VWEHdnQms5QY7uFABGu6U3MtrmrOBQR8ueLWDMfuJbRxnuaShYFVAjB eTe/3izquMbq8XSz00lQNAum3xcGwcVXUVIjRHgoLxisCI/vyr1CQR6f7yXU8ilYilqh nskw== 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=YVUJJy2xlHw8BI+XuObyfKh7efsezZH+aMO25WODlwg=; b=YP+AvobBO12lSB3ShQrVMVRL8MV9XXxdQXshPtdXDwJs1wQCCJV6PVBrmkUyX4y7uY FBAaU+9QJHUDvd8D8TT7HJMmRQVVAu+6PZCBi4qLK3mW74U1JFfNrs5j57ZbzTCms9f9 KQG7XZIqgcDMWPQQgiXmj/6RE5hLcW7RicN3dLw+0EG/PUB6t4PxbarsCh56Zan4fT1l ht0fdQPrXZtnczp3b1uoF+VkiuIET+Rt7Z/Xgk1zHTVSYLMYy+37de3oj0ID+i40LYmv aNuGT6GY+DGXGAJmkCiUdoKy2tIgUaA5n5Gpa0oF8cokg7OGMdC9PgaX4j4/A8lRrOgd qLRw== X-Gm-Message-State: AOAM531fT0NDxJ2py7/wsjZtbRIIIppphUttTNUtHiDcwtnXF4DD22vh UPD1Y8ahwhhemvneZOxlTEHwkg== X-Google-Smtp-Source: ABdhPJyitOvvr4P4unZYTw0KbwRbeqRXPqM0GIFHXScw5czfOlIrCkH40bayyH8aMSe91SDMI/XbiQ== X-Received: by 2002:a05:6402:5189:: with SMTP id q9mr15320645edd.168.1615570112273; Fri, 12 Mar 2021 09:28:32 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 06/14] plugins: expand the callback typedef kernel-docs Date: Fri, 12 Mar 2021 17:28:13 +0000 Message-Id: <20210312172821.31647-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210312172821.31647-1-alex.bennee@linaro.org> References: <20210312172821.31647-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x533.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 autolearn=ham autolearn_force=no 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: robhenry@microsoft.com, mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Signed-off-by: Alex Benn=C3=A9e --- include/qemu/qemu-plugin.h | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index ac1bb318da..09b235f0b4 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -99,17 +99,36 @@ QEMU_PLUGIN_EXPORT int qemu_plugin_install(qemu_plugin_= id_t id, const qemu_info_t *info, int argc, char **argv); =20 -/* - * Prototypes for the various callback styles we will be registering - * in the following functions. +/** + * typedef qemu_plugin_simple_cb_t - simple callback + * @id: the unique qemu_plugin_id_t + * + * This call-back passes no information aside from the unique @id. */ typedef void (*qemu_plugin_simple_cb_t)(qemu_plugin_id_t id); =20 +/** + * typedef qemu_plugin_udata_cb_t - callback with user data + * @id: the unique qemu_plugin_id_t + * @userdata: a pointer to some user data supplied when the call-back + * was registered. + */ typedef void (*qemu_plugin_udata_cb_t)(qemu_plugin_id_t id, void *userdata= ); =20 +/** + * typedef qemu_plugin_vcpu_simple_cb_t - vcpu callback + * @id: the unique qemu_plugin_id_t + * @vcpu_index: the current vcpu context + */ typedef void (*qemu_plugin_vcpu_simple_cb_t)(qemu_plugin_id_t id, unsigned int vcpu_index); =20 +/** + * typedef qemu_plugin_vcpu_udata_cb_t - vcpu callback + * @vcpu_index: the current vcpu context + * @userdata: a pointer to some user data supplied when the call-back + * was registered. + */ typedef void (*qemu_plugin_vcpu_udata_cb_t)(unsigned int vcpu_index, void *userdata); =20 --=20 2.20.1 From nobody Sat May 18 20:15:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615573632; cv=none; d=zohomail.com; s=zohoarc; b=ONpMlcylExm52rQWQHp2ncBHgvDaV5vdKFCO0DJBrZBRldnstlFn7XH3+dGErk2IA1BfolxATyJ1VRv7rmonvk8pyNz+N7C1HYRzd4QKg1oeUzCL+Uw0hKQwVtMt6x5xxS4Rab3tZn3QMC6lshubfLvYjvwSWM2ZwfPBLBKhFWk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615573632; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=q9/ElEVS0uWbAzDSa5Cd31/3lKlIWsCn+W2Fat9oTvc=; b=mkUMl+3Feq4Th/Wq4P24enyDTqLWTXte94+CB0XV4xijqEU+vjbd/jda0q44XQd3hGXX3B+V0wAk0USORSiGNYwwQ4jtOPJuzkpuBi2Urp79ZJHJqpcKg9MJu9iJ9G9hWTXjQKDwsMPhpGtdDiskanDVfEZFrZ4I/8v73JIBq70= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615573632048230.1582369289731; Fri, 12 Mar 2021 10:27:12 -0800 (PST) Received: from localhost ([::1]:40882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmVD-0001ZW-2G for importer@patchew.org; Fri, 12 Mar 2021 13:27:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59440) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKlah-0004AU-SO for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:47 -0500 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]:42860) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKlaS-0002D0-Ts for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:47 -0500 Received: by mail-ej1-x634.google.com with SMTP id c10so54731650ejx.9 for ; Fri, 12 Mar 2021 09:28:32 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id ha5sm3135594ejb.39.2021.03.12.09.28.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 09:28:27 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5DD4D1FF93; Fri, 12 Mar 2021 17:28:22 +0000 (GMT) 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=q9/ElEVS0uWbAzDSa5Cd31/3lKlIWsCn+W2Fat9oTvc=; b=oQGsSwc1fMZdP4qpV2hPiStXtl4iaHwRQ6/s20wNb8VojAghQSnMwn9aD5NzdzCgrI vRIylJHijPmo8nluMFE9aEXXd3aoQgxK6ajsQUh6b4BrhEConjc64w7jLocwClvBwcWb XKy2i6sx+pP7NqRE/6OOFTpH24J52ULvKhF9AxYOQOF5iUmmU64DRIW0HQc/yT0IzSwv KzFZkFPo4jkHlrF39dSK769Q614oJNCRJs2csxTF5GV1YBnf4rwOS9oqUfpkmqOnyaNt l3hPvvXtI4RrZa62SbjG27yY6WqPQDLFcXaEOoH3iXVVsPkqAA78kCWODAIS2pleTiDQ ppFQ== 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=q9/ElEVS0uWbAzDSa5Cd31/3lKlIWsCn+W2Fat9oTvc=; b=bgZJgx9O85aAJRiaE8s2eDcl5KMXLO0Kip/CW/g/kq5GNcm4Mv0RpsGZ57aL8equ89 FNAFengto86LdN3jvyc06Ds/pMp2vXc1o4Vydc3eljQ10KURQShKKmm01KEaQhSrnM1f nsJAYNVyLKVPeedirHOyO9wYIhrx9f255nMBFYhi/jnjB/Mz7yV77+Bx2gLARI4Uaw1l k8kZmKDjzkbtCaG6ak7EUydC4WhHpSb6KyKwz0efjSIE6k86CTvvjKDCdE/KmnN14GzC nRjw/O7BHMJ/2NL6+6E9eabm6ze+ZAmZgRgA6IobaoSf3E4t09x47pQzzz3N8SXSYlPK m+0Q== X-Gm-Message-State: AOAM533IDI/cWS8I1hk70QOdPKj6ba59Xq80W2qANhbvu5KErXwjxT/r a+oAUu0KOjbbwYhQ07JRwoOV4A== X-Google-Smtp-Source: ABdhPJyBDFJRreQhKO43KI7YiOOvMYPVHL/hU5ytYrE5aijkdrItgWkpefJuZ3IkBl11tpE/c9JJsA== X-Received: by 2002:a17:906:c102:: with SMTP id do2mr9781486ejc.305.1615570111607; Fri, 12 Mar 2021 09:28:31 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 07/14] plugins: expand the typedef kernel-docs for translation Date: Fri, 12 Mar 2021 17:28:14 +0000 Message-Id: <20210312172821.31647-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210312172821.31647-1-alex.bennee@linaro.org> References: <20210312172821.31647-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x634.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 autolearn=ham autolearn_force=no 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: robhenry@microsoft.com, mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Aaron Lindsay --- include/qemu/qemu-plugin.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 09b235f0b4..9ae3940d89 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -202,11 +202,9 @@ void qemu_plugin_register_vcpu_idle_cb(qemu_plugin_id_= t id, void qemu_plugin_register_vcpu_resume_cb(qemu_plugin_id_t id, qemu_plugin_vcpu_simple_cb_t cb); =20 -/* - * Opaque types that the plugin is given during the translation and - * instrumentation phase. - */ +/** struct qemu_plugin_tb - Opaque handle for a translation block */ struct qemu_plugin_tb; +/** struct qemu_plugin_insn - Opaque handle for a translated instruction */ struct qemu_plugin_insn; =20 enum qemu_plugin_cb_flags { @@ -221,6 +219,14 @@ enum qemu_plugin_mem_rw { QEMU_PLUGIN_MEM_RW, }; =20 +/** + * typedef qemu_plugin_vcpu_tb_trans_cb_t - translation callback + * @id: unique plugin id + * @tb: opaque handle used for querying and instrumenting a block. + */ +typedef void (*qemu_plugin_vcpu_tb_trans_cb_t)(qemu_plugin_id_t id, + struct qemu_plugin_tb *tb); + /** * qemu_plugin_register_vcpu_tb_trans_cb() - register a translate cb * @id: plugin ID @@ -233,9 +239,6 @@ enum qemu_plugin_mem_rw { * callbacks to be triggered when the block or individual instruction * executes. */ -typedef void (*qemu_plugin_vcpu_tb_trans_cb_t)(qemu_plugin_id_t id, - struct qemu_plugin_tb *tb); - void qemu_plugin_register_vcpu_tb_trans_cb(qemu_plugin_id_t id, qemu_plugin_vcpu_tb_trans_cb_t = cb); =20 --=20 2.20.1 From nobody Sat May 18 20:15:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615573421; cv=none; d=zohomail.com; s=zohoarc; b=ZOk5r7smO7+fXFvsXnE+038EEI2GvObYqYwSpEuZS1X5j+10bUNcTXRNmK0dkVgShegGKxjOWWttA6kukoRPbeoXVNyxwC04zgLJ+GJnwzBgxbaALs2b3VD3aZ4xNrCyFQCRoAUDw/O4j31D3qtS/+zuD00eiS+GDmqEqa0StdY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615573421; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=X3N5gVRhyarUQz1NRBF4TPxPeA10Pzo0G2TS+ipcJTo=; b=hYKmJIIxqGiANdvmuPzkDUocF3pHq0HBluRTulG2YlbdWHYP/fJEpJFauNEI1zbe4NJgNrSI4mMXtBivA2D5jwRFveuyIuyqod3kRbAUM0m+jWEr6Qn2X4TVL/0sJk2Y10uulck9tnaaHu34mI5mSv3Y14VfIiAlkj4kjkQVej0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615573421759445.9491676827299; Fri, 12 Mar 2021 10:23:41 -0800 (PST) Received: from localhost ([::1]:56700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmRo-0004GD-LI for importer@patchew.org; Fri, 12 Mar 2021 13:23:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKlaf-00045e-Uj for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:46 -0500 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]:36884) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKlaP-0002Ce-2P for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:45 -0500 Received: by mail-ej1-x629.google.com with SMTP id bm21so54815132ejb.4 for ; Fri, 12 Mar 2021 09:28:28 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id j25sm3387101edy.9.2021.03.12.09.28.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 09:28:27 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 732A01FF96; Fri, 12 Mar 2021 17:28:22 +0000 (GMT) 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=X3N5gVRhyarUQz1NRBF4TPxPeA10Pzo0G2TS+ipcJTo=; b=EpKsXWwdTHxRJX4zFNRHSP2F709wUDbLQkqczRjz0A8PxnSvjK73QvCaaYQpwReWF0 a7tQg/PVTLfG27aG65avnIuw+dWhyOnw6quB6q6fPaMqp2kaSYRLu49qszU6yKln621r r9tjZZO+WzysQoJtNLHY3ZYHOichRr05eZvko/SVyZx1cv1TqmMeI2epoK58nWj4VvtC kdulqHSOF1TMDnyZOXvDwSLr3XXDEC67jXMciAjM49pAG8Up9M7XNJlQQxL0Zmv6wSle yLBvKVoIIc/X+SrxvsONb8S2UOjAL2xjrQIukUeobDADf8YZK6rmzbQwk5JVqdZkkQl0 ahDw== 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=X3N5gVRhyarUQz1NRBF4TPxPeA10Pzo0G2TS+ipcJTo=; b=qxfAwd67kNmrKG44UANFwtAX25MDBZ3vs/HhI3xo1nSJopit8qSW1ZIcFbYoivAmAr 1zwuSbzL7iREgPOJrhf2AcXj291YBc38NKrtYfnfnFfWQ8vgcSlM+EBzK0kYhdJZ7VJ6 A2YHu7HIoulA48xFJzNia85HtnxuXMhgC2q6QmB4GoXetY/cJkpO0KCyNC+9vWBJYtRM M++okki30NRjvUxg1YOfziw7yVNQfXDznS/05utvVx2PCsxmguOO1qtLW3l/7utLZaem wqiRsVTACMJRzJJmOg2Cr7M5puqg91Ej3fuHRCnQb7VB5Q+iI/PNMuYTjPX2SfkWE7o7 pjNg== X-Gm-Message-State: AOAM532b+s5VRj71/KL9iZ6KOskiPo8qGmJ3jCu7OiftigbGYfxrg4sa 8wf1ZGckvfMr6Hl+Kea50VTXbA== X-Google-Smtp-Source: ABdhPJyorgJmPkzH3Dgmrx3FwhVYaWyoPUVDdrksKmDes1OYZtTPA5BUCebJTDEOXuVknm7wJPEYwQ== X-Received: by 2002:a17:906:1c98:: with SMTP id g24mr9787381ejh.51.1615570107818; Fri, 12 Mar 2021 09:28:27 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 08/14] plugins: add qemu_plugin_cb_flags to kernel-doc Date: Fri, 12 Mar 2021 17:28:15 +0000 Message-Id: <20210312172821.31647-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210312172821.31647-1-alex.bennee@linaro.org> References: <20210312172821.31647-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x629.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 autolearn=ham autolearn_force=no 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: robhenry@microsoft.com, mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Also add a note to explain currently they are unused. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Aaron Lindsay --- include/qemu/qemu-plugin.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 9ae3940d89..c98866a637 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -207,10 +207,20 @@ struct qemu_plugin_tb; /** struct qemu_plugin_insn - Opaque handle for a translated instruction */ struct qemu_plugin_insn; =20 +/** + * enum qemu_plugin_cb_flags - type of callback + * + * @QEMU_PLUGIN_CB_NO_REGS: callback does not access the CPU's regs + * @QEMU_PLUGIN_CB_R_REGS: callback reads the CPU's regs + * @QEMU_PLUGIN_CB_RW_REGS: callback reads and writes the CPU's regs + * + * Note: currently unused, plugins cannot read or change system + * register state. + */ enum qemu_plugin_cb_flags { - QEMU_PLUGIN_CB_NO_REGS, /* callback does not access the CPU's regs */ - QEMU_PLUGIN_CB_R_REGS, /* callback reads the CPU's regs */ - QEMU_PLUGIN_CB_RW_REGS, /* callback reads and writes the CPU's regs */ + QEMU_PLUGIN_CB_NO_REGS, + QEMU_PLUGIN_CB_R_REGS, + QEMU_PLUGIN_CB_RW_REGS, }; =20 enum qemu_plugin_mem_rw { --=20 2.20.1 From nobody Sat May 18 20:15:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615574184; cv=none; d=zohomail.com; s=zohoarc; b=PWnQPBOMXtM126sIYdfgP2bLc+1JHn0Q56/QMa40kOLBKIsqtnCfrzQf1b3mtiPb8b8AB8h4JMQ2Fk2mNpJe0MNnjaPQQ1RbBv6QZZhMQGXOOV+JcJ+Upji/4ubCvRx8VOcrZlR34MNFxZGxmYpC/NTTImC5kO5zUfKFryiV+Mc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615574184; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=k8DQFH+cYnnVYfj1j2PU6D1luYpEilshUOxymY5Gvs8=; b=HIT8/ZwrD1lZlS3tc1R1lfLz8quZRSWmgHOb5QGjSLY56thNZ3yLBlFeDKc56jiZfrhP3JvmqkIV0xtUXQkk8sEhhlpR7DYSVCSoDmx4GjXLb48srHtBS8UZISdhO9LvPRIy3gDgz3CzMu6zAC7HGEvhBvQnhunlC01gVbjHaRk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615574184568643.6253840100603; Fri, 12 Mar 2021 10:36:24 -0800 (PST) Received: from localhost ([::1]:38426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKme7-0006K5-FM for importer@patchew.org; Fri, 12 Mar 2021 13:36:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59528) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKlam-0004Ml-Ma for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:52 -0500 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]:46861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKlaY-0002DZ-FB for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:52 -0500 Received: by mail-ej1-x636.google.com with SMTP id r17so54797194ejy.13 for ; Fri, 12 Mar 2021 09:28:38 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id jj16sm3117925ejc.19.2021.03.12.09.28.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 09:28:28 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 896211FF98; Fri, 12 Mar 2021 17:28:22 +0000 (GMT) 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=k8DQFH+cYnnVYfj1j2PU6D1luYpEilshUOxymY5Gvs8=; b=X3O1VLbhV2KYysJkJqtWs4oE28mJ/rEngWw87+elV5KdSm+JW9gQ+KN+G1kV2O6Fwm MkWUytZWB2Z1EPTVpKg2dRS/H1FY34wRrZT9GO45xaw7ECHyTZiHkDWAaYUis97jX9EZ 9kOhPjXSAqAimDWl4wOPy/ZAH0D81QFvsSTDBjErZFKMkBRL4O4+UDBAZaYh2O+r8GMc ThAtT8LBakZRZYmr+9HNZyf3nbtk8F2G0mRxNiy2kdWK3oMhJwo3eLKrDRp0Lnc6exWW SDBcBi4sFtOk3gh2v0rCs+CyMLJdwjWvEdnPt6iehyCl448yqvKkq6RvOR9AWxYu7uNc E03A== 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=k8DQFH+cYnnVYfj1j2PU6D1luYpEilshUOxymY5Gvs8=; b=FZmeOffstyat5uREo9iakPMXRZ2v3B2+64mvfSFppjIFtyK3n4FjPF6xg7NiBQtK1o Y71VydtPh29ig32Ow+LCm159VkgQJAqSXBGKs6wKtnicoCEFVoQt0IBDiwZL8Ah2crMV ppZhM5yGRNV2JcXxqK2Di2O10uOe7JFRxCexFgSXSlmLeOgjlAGZ/jIpamvDwCpuz6cT iQVlg5V1cNPv189xDklXrAk1mJGY1YmFUoL0soJFr6Akla8k9CuN47D963zT0FQVtsQj ytoq4H3MByOu8eKUQBk4GQSTkvq2a2+a/8wVj4q492bGkwUz2QsrcMuK4J/uGMDWN+0+ 98Hw== X-Gm-Message-State: AOAM530ZjAiU/b7NWELCu9nCH7/Z1v3c/xrhyzOc4ynxnNKmMRoKGuCW DeH3mVloi7GsTZp7pg91Oy3gEQ== X-Google-Smtp-Source: ABdhPJxPBNKxyH7KvUyYyV5kAUX2lBxn7iiXrbta43dwAD8YXbYv1lJTEv+Bk3pbDCihIfIWlN+YAA== X-Received: by 2002:a17:906:7f84:: with SMTP id f4mr9423469ejr.525.1615570117135; Fri, 12 Mar 2021 09:28:37 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 09/14] plugins: add qemu_plugin_id_t to kernel-doc Date: Fri, 12 Mar 2021 17:28:16 +0000 Message-Id: <20210312172821.31647-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210312172821.31647-1-alex.bennee@linaro.org> References: <20210312172821.31647-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x636.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 autolearn=ham autolearn_force=no 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: robhenry@microsoft.com, mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Aaron Lindsay --- include/qemu/qemu-plugin.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index c98866a637..5ac6fe5f02 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -32,6 +32,9 @@ #define QEMU_PLUGIN_LOCAL __attribute__((visibility("hidden"))) #endif =20 +/** + * typedef qemu_plugin_id_t - Unique plugin ID + */ typedef uint64_t qemu_plugin_id_t; =20 /* --=20 2.20.1 From nobody Sat May 18 20:15:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615574023; cv=none; d=zohomail.com; s=zohoarc; b=Qhpa2iJTDgAA4ly0/2rtlZnUm4i3EvWELABAFopyyWA4YqpfgGeW1BXYefTOJyQ5bz97kGpynW/E76kEDTmbnEqgASKYZGnsxH6lqHziQb/rU3XjYpQ9+FW76KCE0A25SG/glGW5odFvu0m1oqOIPRAnPJd3IVAMTjS0YlCFuWU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615574023; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/pMpGpLT9W1qrJCRw98saFflQK12KM24W0ofyXVsY7Q=; b=FMwQXvtplqEu+p8xkl/WkGsOxOFc98V8bCa9nTWBWV2aZ4lZ1k/CKTb/tuWVxy5N2dv3C6hQKL3UOjQgDpzizu9b3ZUDujCfqFi/8nxGu1xZlXo/w4Apv3ZfwARy5dUhGHIDhRQtvLLK0vJhJVAqzYl6VLPW7zpQ5Cs7K2M0Dyk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16155740235211007.1636026505912; Fri, 12 Mar 2021 10:33:43 -0800 (PST) Received: from localhost ([::1]:60166 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmbW-00030A-G2 for importer@patchew.org; Fri, 12 Mar 2021 13:33:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59438) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKlah-00049e-H7 for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:47 -0500 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]:35419) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKlaV-0002DA-D8 for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:47 -0500 Received: by mail-ej1-x62b.google.com with SMTP id dx17so54855240ejb.2 for ; Fri, 12 Mar 2021 09:28:34 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id fw3sm3055570ejb.82.2021.03.12.09.28.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 09:28:28 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A00E31FF99; Fri, 12 Mar 2021 17:28:22 +0000 (GMT) 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=/pMpGpLT9W1qrJCRw98saFflQK12KM24W0ofyXVsY7Q=; b=OGkDWIiDe+j+SqQDaj4KVbLJ4PneKy9xx9z91VNkZLRkCkxoZUns2FP3ULhJ72sxWp 7oAejT8Q8PNStBlgmuNsj2OMJDPlPRoIk7LoLAnNeOuMOKW0rlQiFHfhBduxx4FcF7y3 HXx0V9r0I1KDTL6VSxmRakrK192NPTeRLViwscJDOm7bEnGYELANHZNCSTX4XG3lcxt5 BgzxMBUmuHEIl7EohqVqAR/vVU0hcfLaqj0uq5rsoUKV0iRYTDmBtxKl1zI+nFhS4dkF UFKT2cZcYf0iEC3KyrMU8i3HJKJuEkCmA7Ldhld5QAyAZZQ5GjCpZWai4SMkPKITq2lf Xp1g== 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=/pMpGpLT9W1qrJCRw98saFflQK12KM24W0ofyXVsY7Q=; b=Bif2NNU8PwXOqr443EYQxF0NHshiCoRwuyy7Hd7TdubzXZnLIixWiz20wOfywbOHFS zM1Ds0EHe3d7roKpOwAM3QBKUxXjzeW8G+w5j8pYRay3oUZloPUELayF7Xd2RzJUCSK0 bjraeTjltF5iAn1CRIUxNSRd3d71RgqxhlamNiKnFQNYIKGmZInFKQkAa46/u/C9nT5f 6pmqX3BZwavIIAxsBoKwGis+rW/9vqN6F0kQq2ArvTJv8dyXVfAUeUDJ1MbSERcmLtaW 1blWGe/0rlRmX+Ps/Vbe0uSKFyl//D5iFK0syhrcaYnWqQi9wGRXvk51qEa8JipdqraJ u+KA== X-Gm-Message-State: AOAM533A+j0t7yLpwFucBDEt82E9aPdB8OTnXO7CvM76N3qNueOOfphu cJSmuxjW5yy7HpIWTJB43vNw4A== X-Google-Smtp-Source: ABdhPJwlYdKlGIsCXupDQw1wKydOs+ZCfXmH3NFhfM/Y75OFfcfHiPHUsP+t4c0UlRJfICXVl1qdnA== X-Received: by 2002:a17:906:7102:: with SMTP id x2mr9842502ejj.355.1615570114031; Fri, 12 Mar 2021 09:28:34 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 10/14] plugins: expand inline exec kernel-doc documentation. Date: Fri, 12 Mar 2021 17:28:17 +0000 Message-Id: <20210312172821.31647-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210312172821.31647-1-alex.bennee@linaro.org> References: <20210312172821.31647-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x62b.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 autolearn=ham autolearn_force=no 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: robhenry@microsoft.com, mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Remove the extraneous @cb parameter and document the non-atomic nature of the INLINE_ADD_U64 operation. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Aaron Lindsay --- include/qemu/qemu-plugin.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 5ac6fe5f02..dc05fc1932 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -269,6 +269,14 @@ void qemu_plugin_register_vcpu_tb_exec_cb(struct qemu_= plugin_tb *tb, enum qemu_plugin_cb_flags flags, void *userdata); =20 +/** + * enum qemu_plugin_op - describes an inline op + * + * @QEMU_PLUGIN_INLINE_ADD_U64: add an immediate value uint64_t + * + * Note: currently only a single inline op is supported. + */ + enum qemu_plugin_op { QEMU_PLUGIN_INLINE_ADD_U64, }; @@ -283,6 +291,9 @@ enum qemu_plugin_op { * Insert an inline op to every time a translated unit executes. * Useful if you just want to increment a single counter somewhere in * memory. + * + * Note: ops are not atomic so in multi-threaded/multi-smp situations + * you will get inexact results. */ void qemu_plugin_register_vcpu_tb_exec_inline(struct qemu_plugin_tb *tb, enum qemu_plugin_op op, @@ -305,7 +316,6 @@ void qemu_plugin_register_vcpu_insn_exec_cb(struct qemu= _plugin_insn *insn, /** * qemu_plugin_register_vcpu_insn_exec_inline() - insn execution inline op * @insn: the opaque qemu_plugin_insn handle for an instruction - * @cb: callback function * @op: the type of qemu_plugin_op (e.g. ADD_U64) * @ptr: the target memory location for the op * @imm: the op data (e.g. 1) --=20 2.20.1 From nobody Sat May 18 20:15:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615574511; cv=none; d=zohomail.com; s=zohoarc; b=ZMHUHiVLfrpb8PMb8GD9FUKdqmjfiwap8kgA1NAnLlQuetp0a7F1aSEJIvpeW62J4F+QSvdfm77ZZrDCuG2aTjI0e7M95X+O1bhjRA1WU2rA7p9mkv2BSCgEFfPgDS7bcOTgsswfw4472n29c17mSH+/QTRpHUrRhxN75ABRGn0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615574511; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=D25/pl4BFCseo4QTY1mxuXFeITzdlqswyd6ddGYq3qQ=; b=TcqE/VFFdQycDc+3NMfum55G30kicQ2Hm0igPt4GqQ6XKwLg6a7GFO0YTyA8avgSTxFaBLh8L336aiITV+qAeadpo0k+kXIYJ3RIUK+sGmZgF0H4w7Sfg5ZhNoOS/zrk4zQs25W8EZwOdlxkGgV9G4H49skMq1jq2zkNp9rfUoE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615574511211803.5636422613115; Fri, 12 Mar 2021 10:41:51 -0800 (PST) Received: from localhost ([::1]:49196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmjO-000485-17 for importer@patchew.org; Fri, 12 Mar 2021 13:41:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59526) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKlam-0004LJ-57 for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:52 -0500 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:41595) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKlaX-0002DV-TJ for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:51 -0500 Received: by mail-ed1-x52d.google.com with SMTP id z1so9066516edb.8 for ; Fri, 12 Mar 2021 09:28:37 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id r17sm3274316edt.70.2021.03.12.09.28.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 09:28:28 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id B84C51FF9A; Fri, 12 Mar 2021 17:28:22 +0000 (GMT) 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=D25/pl4BFCseo4QTY1mxuXFeITzdlqswyd6ddGYq3qQ=; b=Bshb7rtn95O/oN+mT2xU7Lv1ZxHBd1ouOhS/ffBzYqM0jdyJ/8GjmnwoTFYlZrpYwn fhS2eI7YDzy7Rzbi1wMLb2WOriiMdHV/3qb/A6qg19Gj52LX5SGrCRYCeow6xuhznrpi JqV58bcQ7wsY8NJe9geFsEMdGfOzYZhJi14pu6QF+0yJAf7IjUAF+rXo2Zzxel70Xo7v Z1yFsfVfc2vaDZTRgEYk4RF1Rx9k/mE+DHxW2+quFpm5wQOe+hFyQQJyHSydcZjeWf35 +40PmiDr3pVunt1VXIYZOqanV/YggpApxWwQsu7ANYl/R1UNsA2+yn9BSR5WfF78gZwq gj3w== 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=D25/pl4BFCseo4QTY1mxuXFeITzdlqswyd6ddGYq3qQ=; b=qchaDBWbc+Uns1Rd642PBkhWNSQlm9bTtRA36zhhz07zCHiaN0M5xsz6NmxFLZBg4N VJhoMf/1dT3WoBQs8nXkca6I8XMkgDH8srwjmSnehXSTzRsyY+mpOkLCH1YYSN2Vs/Rb KgFwOxMYyPD77+nruXW9pcfyyBRCnO4uwPILYHWPmicNLT2oTx0BQuUHeP/IbC/PFuqF Xi0NPINBrOzVmF0FSEShGgNstLsUwmdd3oDUOdk1Lwp4l0a1BcWasxGwkTpp3v8GS3my wlG36+3Y8IKEN2Ne/kN/5rYbCjLzsi8RtN9IB/dPg366pXb3fNiv3Iyd8tqDKdKmctgL L89w== X-Gm-Message-State: AOAM530MQZAv1otCewLebAjiz3SY0PTxBcr+G+j4l1DwqbzmkVnw0OH/ axTDRxiC5FUDLE6mSA3e9dumyg== X-Google-Smtp-Source: ABdhPJxmMwpKxGJEbnzdUb4aTbTY4bxj1NAFSx7I3nNDjcpVQjoJsc2AG9FMs7LB8UdtdJOG8XYt5Q== X-Received: by 2002:aa7:db0c:: with SMTP id t12mr15181022eds.34.1615570116571; Fri, 12 Mar 2021 09:28:36 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 11/14] plugins: expand kernel-doc for instruction query and instrumentation Date: Fri, 12 Mar 2021 17:28:18 +0000 Message-Id: <20210312172821.31647-12-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210312172821.31647-1-alex.bennee@linaro.org> References: <20210312172821.31647-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52d.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 autolearn=ham autolearn_force=no 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: robhenry@microsoft.com, mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Signed-off-by: Alex Benn=C3=A9e --- include/qemu/qemu-plugin.h | 52 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index dc05fc1932..d4adce730a 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -327,21 +327,69 @@ void qemu_plugin_register_vcpu_insn_exec_inline(struc= t qemu_plugin_insn *insn, enum qemu_plugin_op op, void *ptr, uint64_t imm); =20 -/* - * Helpers to query information about the instructions in a block +/** + * qemu_plugin_tb_n_insns() - query helper for number of insns in TB + * @tb: opaque handle to TB passed to callback + * + * Returns: number of instructions in this block */ size_t qemu_plugin_tb_n_insns(const struct qemu_plugin_tb *tb); =20 +/** + * qemu_plugin_tb_vaddr() - query helper for vaddr of TB start + * @tb: opaque handle to TB passed to callback + * + * Returns: virtual address of block start + */ uint64_t qemu_plugin_tb_vaddr(const struct qemu_plugin_tb *tb); =20 +/** + * qemu_plugin_tb_get_insn() - retrieve handle for instruction + * @tb: opaque handle to TB passed to callback + * @idx: instruction number, 0 indexed + * + * The returned handle can be used in follow up helper queries as well + * as when instrumenting an instruction. It is only valid for the + * lifetime of the callback. + * + * Returns: opaque handle to instruction + */ struct qemu_plugin_insn * qemu_plugin_tb_get_insn(const struct qemu_plugin_tb *tb, size_t idx); =20 +/** + * qemu_plugin_insn_data() - return ptr to instruction data + * @insn: opaque instruction handle from qemu_plugin_tb_get_insn() + * + * Note: data is only valid for duration of callback. See + * qemu_plugin_insn_size() to calculate size of stream. + * + * Returns: pointer to a stream of bytes + */ const void *qemu_plugin_insn_data(const struct qemu_plugin_insn *insn); =20 +/** + * qemu_plugin_insn_size() - return size of instruction + * @insn: opaque instruction handle from qemu_plugin_tb_get_insn() + * + * Returns: size of instruction + */ size_t qemu_plugin_insn_size(const struct qemu_plugin_insn *insn); =20 +/** + * qemu_plugin_insn_vaddr() - return vaddr of instruction + * @insn: opaque instruction handle from qemu_plugin_tb_get_insn() + * + * Returns: virtual address of instruction + */ uint64_t qemu_plugin_insn_vaddr(const struct qemu_plugin_insn *insn); + +/** + * qemu_plugin_insn_haddr() - return vaddr of instruction + * @insn: opaque instruction handle from qemu_plugin_tb_get_insn() + * + * Returns: hardware (physical) address of instruction + */ void *qemu_plugin_insn_haddr(const struct qemu_plugin_insn *insn); =20 /* --=20 2.20.1 From nobody Sat May 18 20:15:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615573572; cv=none; d=zohomail.com; s=zohoarc; b=VZNclexV/xjbfxVH9a61g/6GDbmIP0oPZE0cF/S41ugpW45cVwa1vIh8ZjqymGt+ae9o0kgE5BufBt7Bd3Ft0Q4mk91vWCr26XwnhFZNQgTPwKIVm2ZIUwXurptCCfHMhkA3cCrB38YZMMG7IEukIvTeDnkH2MynHWESPE+arFA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615573572; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Boqd6rm1XLHC3hQw2GCvlbMa6t0NNTObqUIRDgqZrqA=; b=lh2MgrMLt0S4BCscyR/a5+Vly8bdY+taCKol6jj/5BzUOVSZOlFQ5x7DPhClQ0mEwIDQxQn1xE+uTMQlkYLdnCE4WMVAO+3OpOHkaSZ5SXERMTTdML8PC/69tzBe6IY1LfoM3c7icBrZZV/tmb2BSR1dQurWvwEh6Fns/fJ8QMk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615573572723447.1186017499781; Fri, 12 Mar 2021 10:26:12 -0800 (PST) Received: from localhost ([::1]:37112 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmUF-0008E0-D8 for importer@patchew.org; Fri, 12 Mar 2021 13:26:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKlaj-0004DW-1X for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:49 -0500 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:43863) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKlaV-0002DI-Vk for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:48 -0500 Received: by mail-ed1-x52c.google.com with SMTP id e7so9045817edu.10 for ; Fri, 12 Mar 2021 09:28:35 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id h15sm3182719edb.74.2021.03.12.09.28.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 09:28:28 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CCD0D1FF9B; Fri, 12 Mar 2021 17:28:22 +0000 (GMT) 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=Boqd6rm1XLHC3hQw2GCvlbMa6t0NNTObqUIRDgqZrqA=; b=RSMR/6TkmfpReaT+2BBEz+JVrGhE96if+cscvhYoHYmKONVj/zl4trqMYhrkNaTLs9 yeMgMB6JG46j2k9ZSBEG9Bhd5FQtQ3XZ1UqkzFA4rEJFgPpwDZhdTH8oS00EkouT1qkd hk3cop37Wi87dIlsJaDfdoCqzTGxi2E5MqZPvod8JYEdTNSZRVTSSy3G8wWrfsGAFVvC dZAlBGtl/ka7fwiGiFSobpQxCQOqTrNBMjsN5Qx10kSQqZITZKROXNIzN8GDF7/xZeqK +U2rfbTPi70cW0WNX2Zgp1Dz+Wk213tP5YxTV/2uUwbUg2UYJlpSki5+LFMo17IcqKbj 6CeQ== 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=Boqd6rm1XLHC3hQw2GCvlbMa6t0NNTObqUIRDgqZrqA=; b=rQvdPbhC1PxB49beMInlihJyQU2RZTxb8Pj598aYrA5L/gBSH1Hfn8jEANmmwFWu2Q 7uEIWl8OleDx+a6yqZclkhaejH0Lqvr7Ps6hBK70zE+RNRrIW6kCDDuJHvDUal9e1F34 MRxyoXqjSy6beYKLYiQNY+geNhRhT3Jk0y5c2OBOjs98wl+97FsO5ghVkk3POq3IC4hn Hc1zKjOOoiyhkda/7dNzN+VQutQ/SPOiTcv94MyjUdAR/dP2lITMCt2qcYcr3uAIvPkG nezehgjfoYsMM3bLiAmDj5T2Dk+PG/AM1VdO5T56jbDFiLxzpEbHu+UWbmVSXAhQT1MT WlPA== X-Gm-Message-State: AOAM533o5+k2gdWzbGUUY2rji9U7zRcrGHihoUxdeNZdDXCe8TcGb7r8 aKMbynM3ECc9lNgGabqmtAfv1A== X-Google-Smtp-Source: ABdhPJzUOJUjtjHyp9pF/cpIlsMDUltABIefD9fWdb6k6xDb7M8tVN8zE/OhZyqDWMEt7MGbW1mAOg== X-Received: by 2002:aa7:d686:: with SMTP id d6mr15832640edr.146.1615570114705; Fri, 12 Mar 2021 09:28:34 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 12/14] plugins: expand kernel-doc for memory query and instrumentation Date: Fri, 12 Mar 2021 17:28:19 +0000 Message-Id: <20210312172821.31647-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210312172821.31647-1-alex.bennee@linaro.org> References: <20210312172821.31647-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52c.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 autolearn=ham autolearn_force=no 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: robhenry@microsoft.com, mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Aaron Lindsay --- include/qemu/qemu-plugin.h | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index d4adce730a..aed868d42a 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -392,24 +392,45 @@ uint64_t qemu_plugin_insn_vaddr(const struct qemu_plu= gin_insn *insn); */ void *qemu_plugin_insn_haddr(const struct qemu_plugin_insn *insn); =20 -/* - * Memory Instrumentation - * - * The anonymous qemu_plugin_meminfo_t and qemu_plugin_hwaddr types - * can be used in queries to QEMU to get more information about a - * given memory access. +/** + * typedef qemu_plugin_meminfo_t - opaque memory transaction handle */ typedef uint32_t qemu_plugin_meminfo_t; +/** struct qemu_plugin_hwaddr - opaque hw address handle */ struct qemu_plugin_hwaddr; =20 -/* meminfo queries */ +/** + * qemu_plugin_mem_size_shift() - get size of access + * @info: opaque memory transaction handle + * + * Returns: size of access in ^2 (0=3Dbyte, 1=3D16bit, 2=3D32bit etc...) + */ unsigned int qemu_plugin_mem_size_shift(qemu_plugin_meminfo_t info); +/** + * qemu_plugin_mem_is_sign_extended() - was the access sign extended + * @info: opaque memory transaction handle + * + * Returns: true if it was, otherwise false + */ bool qemu_plugin_mem_is_sign_extended(qemu_plugin_meminfo_t info); +/** + * qemu_plugin_mem_is_big_endian() - was the access big endian + * @info: opaque memory transaction handle + * + * Returns: true if it was, otherwise false + */ bool qemu_plugin_mem_is_big_endian(qemu_plugin_meminfo_t info); +/** + * qemu_plugin_mem_is_store() - was the access a store + * @info: opaque memory transaction handle + * + * Returns: true if it was, otherwise false + */ bool qemu_plugin_mem_is_store(qemu_plugin_meminfo_t info); =20 /** * qemu_plugin_get_hwaddr() - return handle for memory operation + * @info: opaque memory info structure * @vaddr: the virtual address of the memory operation * * For system emulation returns a qemu_plugin_hwaddr handle to query --=20 2.20.1 From nobody Sat May 18 20:15:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615573738; cv=none; d=zohomail.com; s=zohoarc; b=TjRGac4gbuhmID+3PzAcgZAxocXGCT33PEVr43sRB1T7i5cTMWesKM2cx0PZZwO5yVWxOndg/N17xXqJQN2ongt+wNRS0S5J0lbhjmkHVDIWx/m8+CGCGIAnxhUpEVXbbHdEiU8oJyC2C4FRATeX5Tq6mJke/6fmZNLUSWUBuiE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615573738; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=rQlXVzvhTGn5oQRAxN3PtvRgZpaSyD2V/Kc/eZauuUk=; b=D9fa/hRx3yXV9ZC55z1jgGYqV53VLYPELNNNP3uY4Wv5ta/l2P1h/zG7i9Z7EeyIWGOvJF9fkRlNhTQLmE/ednqW6iePeEtanW3wMiaP5o8My2oCDVi7MhLR7412/6xgLMId1Ih6QTC9O2QsxITlKm+e6bvEdIqtbUCap/rAns0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 161557373837838.89436937480184; Fri, 12 Mar 2021 10:28:58 -0800 (PST) Received: from localhost ([::1]:45628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmWv-0003Zo-9W for importer@patchew.org; Fri, 12 Mar 2021 13:28:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKlan-0004NY-0j for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:53 -0500 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]:36050) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKlaa-0002F1-7b for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:28:52 -0500 Received: by mail-ej1-x629.google.com with SMTP id e19so54916422ejt.3 for ; Fri, 12 Mar 2021 09:28:39 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id sb4sm3038732ejb.71.2021.03.12.09.28.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 09:28:33 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id E28701FF9C; Fri, 12 Mar 2021 17:28:22 +0000 (GMT) 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=rQlXVzvhTGn5oQRAxN3PtvRgZpaSyD2V/Kc/eZauuUk=; b=I3ZTiDXdf9gf0/tsKPfA8sySqIxY/H25ASyNxiLPGyxYehT4n5naIkqCBdHymfSYn5 pmCb9pcRTXMh0UXfBbHm7UCNikcF6NGrefjG0p/uByeiLHJqjJl+KcUAdxgb7mCGTa+W yHa42M2mXzYjKGd7o1mUGyyh2puVwr23ETeHVXydDVpmcyzJKD+RbvPojjxtgQotDu2y cxVtUwDPlCqr+DZATWMSwE42stXJ80WD4CXAkJHV4qZzUNUAOn68IM0oo7LdybPDr56m 9iDvSC0qQMRlerJcd0faqQpD6jkpGjCPE5FZ5sS+F9pUBrkcCP/ws8Qx8TRI6BPcw1jc ubKg== 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=rQlXVzvhTGn5oQRAxN3PtvRgZpaSyD2V/Kc/eZauuUk=; b=JWh030yb07eSyveR0llQ+b/sN5FNGiFj6Ktu/7WGISngQqapNRfTYpikQfYxam3X3i 77ByK6MyqsZS7+Z3abJdrhEK964wj+B7J+g5+1Ftg1jYuUVfO6Xqk6/mQA4wgdEiDh2r 0aJFFiuAC5yV7GO4MIR+rzme71zQckbxO0Afj9Hh9bMz50Aq5qwg4CyXcTdye2WHYmGF B/v0lajgqZrqLaXxa65Zybtb2cFe3No+thkonaXDnPMsxNtOBDTBt4KUNJ0yz8Wq/xwp 8SPSjHCtw8uOcSc3b0kkRFcgxfUKJXGCoJc/f/Ill03lJWAEKWFOglaLc/NndBMvpUEZ phFg== X-Gm-Message-State: AOAM531SbsE9aETYuMPNlrrpwKpxgx8Zh0bgTXJwonoYbBVox84xpr6K JbxvZ1acI/vxsTm9ivR6/gLGymI5XgyLXQ== X-Google-Smtp-Source: ABdhPJxO9acPOaagelidzELS+cHxP2oqeBG/jNDyxVo/Ch4SpNkp0aS4ZVd0FqfT2odn6joex/FkgA== X-Received: by 2002:a17:906:8147:: with SMTP id z7mr9291380ejw.436.1615570118876; Fri, 12 Mar 2021 09:28:38 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 13/14] plugins: getting qemu_plugin_get_hwaddr only expose one function prototype Date: Fri, 12 Mar 2021 17:28:20 +0000 Message-Id: <20210312172821.31647-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210312172821.31647-1-alex.bennee@linaro.org> References: <20210312172821.31647-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x629.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 autolearn=ham autolearn_force=no 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: Yonggang Luo , robhenry@microsoft.com, mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Yonggang Luo This is used for counting how much function are export to qemu plugin. Signed-off-by: Yonggang Luo Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Alex Benn=C3=A9e Message-Id: <20201013002806.1447-2-luoyonggang@gmail.com> --- plugins/api.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/api.c b/plugins/api.c index 3c7dc406e3..b22998cd7c 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -266,10 +266,12 @@ bool qemu_plugin_mem_is_store(qemu_plugin_meminfo_t i= nfo) =20 #ifdef CONFIG_SOFTMMU static __thread struct qemu_plugin_hwaddr hwaddr_info; +#endif =20 struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t in= fo, uint64_t vaddr) { +#ifdef CONFIG_SOFTMMU CPUState *cpu =3D current_cpu; unsigned int mmu_idx =3D info >> TRACE_MEM_MMU_SHIFT; hwaddr_info.is_store =3D info & TRACE_MEM_ST; @@ -281,14 +283,10 @@ struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qem= u_plugin_meminfo_t info, } =20 return &hwaddr_info; -} #else -struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t in= fo, - uint64_t vaddr) -{ return NULL; -} #endif +} =20 bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr) { --=20 2.20.1 From nobody Sat May 18 20:15:22 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1615574217; cv=none; d=zohomail.com; s=zohoarc; b=Y04wA5wapLb7bBA+9ukSECb9ua8xNSxeMNEnOKy97SK9Xr9ygPs0b+Wwd1nTocJgyxAawLDj9woYSVKSK1SOsfUmJRj3XErf1rLsrMcuJ6GQinS5fsf/5ZqoJMoK642yIhLbKl69HVFvUllRNZYw/9jmAXlA/rJflr4CZGpSRM0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615574217; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vL7/zplSiqfJqI6VGtUOhvXp9xtLO6YD7KZP8afIyD8=; b=ak8IDbUEpdFb4EqnJvGnlTah/OwTDG3wodzZoyU17RScpgK1AyIXZgCFiHBOjG7Lw319n6AbrKg0CN9twfxkuQf4aLnAF1HyV716zz8fBT7iYku+d/Fr1se+LSagx42+ZQ/EK/ZcqLAiXvc8/A9dDALHtCtF1j6Ae9KhLRbutdo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1615574217947708.4858213753782; Fri, 12 Mar 2021 10:36:57 -0800 (PST) Received: from localhost ([::1]:40132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmee-0007MN-SA for importer@patchew.org; Fri, 12 Mar 2021 13:36:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33824) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lKljx-0003pH-BF for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:38:21 -0500 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:38061) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lKljs-0006Ka-LF for qemu-devel@nongnu.org; Fri, 12 Mar 2021 12:38:21 -0500 Received: by mail-ej1-x635.google.com with SMTP id mj10so54869950ejb.5 for ; Fri, 12 Mar 2021 09:38:16 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id a12sm3014420ejj.121.2021.03.12.09.38.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 09:38:13 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 032421FF9D; Fri, 12 Mar 2021 17:28:23 +0000 (GMT) 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=vL7/zplSiqfJqI6VGtUOhvXp9xtLO6YD7KZP8afIyD8=; b=G7gVM1MTwDMnCl+moqElpQxHQSDepMb0RtkaPc74hADKyD+GzpIiJ6wPkk1HrL0TLh LDTUnNufqjylGHUfgW/n5wINbXJPZ9mU3oAyHbOqJs+jtNTOOqdSLZsxLbtfWygGWupI LIoNWQjXmy54ZuvsJRfP0s1ut4RzLOwcmE64Memo1+qB4lp/fIPAJJbBg4mcB+m3Ziax niAAeY6+/37nCNfU6ozm7XgTwo23C6hCNUKFNFmZ42h4zzuT4bbg3DC+8fEMFRANSAPI z551TyziTHqHkYuBUNZN7WWgUlMgUESicCmkDPwEyKcZ/uOmTLGlf5COUkhTna+uCGv8 zmQA== 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=vL7/zplSiqfJqI6VGtUOhvXp9xtLO6YD7KZP8afIyD8=; b=R7aKfyQF9O4zqMXRPHlPVj3JxvKxhWKyckFp2JwvpNQqs8XXZ9PmLjEpgAs/8mv2De u6agSmyHLIyUoaO63MlZfrYYOUF+5AAeX+RTzbWQQI9Vg65MqbmpavUDsIn21kkZyg/P EfWjWp6xgW3BitgMxvNrkcRx7WDPd3qvHKERMp6vMHNdbrdbJcyfdUTA1PfUUhyONm5g ZlSSf+i6/opzVfC324hUuM+Wa6soI91pNDudg00SlOMjzUuoEjj0SRkylsK1rMGAZg0u w/ouJxOTwyZus7asnmqRiGGqeobJq0pu0EwrSD1MBsjpfm3kKCEVrImGI+5VOkYiLyXA 6EPw== X-Gm-Message-State: AOAM5322dXk256dqBlOSVJMo6XVlwHR6uh4J4BnkC0VULNILsPHCpity WejDnS3pni2L8h9HezIJj7Z0FQ== X-Google-Smtp-Source: ABdhPJwIVzcwCstpWFFgUhE40IyJdYUeczOCAuqS7VtEOpeAsOF1BEUkCp1PUiDI/zjoyxO+aEtGxw== X-Received: by 2002:a17:906:e16:: with SMTP id l22mr9734408eji.173.1615570694758; Fri, 12 Mar 2021 09:38:14 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 14/14] plugins: Fixes typo in qemu-plugin.h Date: Fri, 12 Mar 2021 17:28:21 +0000 Message-Id: <20210312172821.31647-15-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210312172821.31647-1-alex.bennee@linaro.org> References: <20210312172821.31647-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x635.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 autolearn=ham autolearn_force=no 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: Yonggang Luo , robhenry@microsoft.com, mahmoudabdalghany@outlook.com, aaron@os.amperecomputing.com, cota@braap.org, kuhn.chenqun@huawei.com, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Yonggang Luo Getting the comment consistence with the function name Signed-off-by: Yonggang Luo Signed-off-by: Alex Benn=C3=A9e Message-Id: <20201013002806.1447-3-luoyonggang@gmail.com> --- include/qemu/qemu-plugin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index aed868d42a..19e77e345b 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -256,7 +256,7 @@ void qemu_plugin_register_vcpu_tb_trans_cb(qemu_plugin_= id_t id, qemu_plugin_vcpu_tb_trans_cb_t = cb); =20 /** - * qemu_plugin_register_vcpu_tb_trans_exec_cb() - register execution callb= ack + * qemu_plugin_register_vcpu_tb_exec_cb() - register execution callback * @tb: the opaque qemu_plugin_tb handle for the translation * @cb: callback function * @flags: does the plugin read or write the CPU's registers? @@ -282,7 +282,7 @@ enum qemu_plugin_op { }; =20 /** - * qemu_plugin_register_vcpu_tb_trans_exec_inline() - execution inline op + * qemu_plugin_register_vcpu_tb_exec_inline() - execution inline op * @tb: the opaque qemu_plugin_tb handle for the translation * @op: the type of qemu_plugin_op (e.g. ADD_U64) * @ptr: the target memory location for the op --=20 2.20.1