From patchwork Fri Mar 12 17:28:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 398689 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1424263jai; Fri, 12 Mar 2021 10:23:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJx6U/da4ClEMO8UoE8v6BIJTEqqJWRacfPTLXBqALYnbocCj3feYS9Xu0MA5JlRYVg8WrB5 X-Received: by 2002:a05:6602:1353:: with SMTP id i19mr412340iov.202.1615573433561; Fri, 12 Mar 2021 10:23:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615573433; cv=none; d=google.com; s=arc-20160816; b=OIGX5hY568mJ1o+R4FRfd1Ozvr/eHF2J1cQDZQZriEgSCMmG6xD1jXgGKI6CZCDRXz KYL5a0kxLFYlShPg8Fe78U/1Bke0LI2wLbbGJkBi3rU3jdBjaaoHQRHupgcWQ5dRhK0L THwr6s7WMDDhhoZprL02/K6JYtazQl3n2Iizcv1Ls5G+w75CnDlsJP4727XLSXxXZykT 3dqFDGDQ4nYfOYIFAx7kyNEDmS22Nj/kanmMhKOEcIJXxZaQuruJuYzuPDdP2XHMbJIw TBSFpR+BKJ+11Tylv1csUEzXVKu7yF9Xh2KP6Ipt4cv2ifzVR/Ur4TZ6ckZAPD5x7xHu Exkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=eRIYBL/UvBDgTYdklYBnpFFW+jkrI6mIBJA/5FnNiwo=; b=wCWMgYO+OkenBEkKq926Adzb5/I74DWDcabfPQ2+orHMPqSEgmmTJWIUxPbCQBg6zG LKMmzCYY+B9HfiZIbnnA8PFF6w1hdjXrY3BiOkj2oRtqh5ZcyQ+niLlSDUpADs/OBusq 1aeiimt7MN2y3a0Rq2CUIlHPBGgxK9pZ0Fo/Y5kogCZ+jwvtaJdaPOTqRtCR2ltn964h wgf+fN9ZYOizMyU94mt4LdeuCo3RdKKv4QRr0IotIYs1/3X8OJmEQG7RRMwQuVErAIsv Js/gGA51wgvTbLi3ez0AvEL9sOOW76nUmJ8+F2FJJU1CrTWsABKI70JC+A6wmNJnbgNZ rrjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YWbyXKQ6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z15si5314256iob.21.2021.03.12.10.23.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Mar 2021 10:23:53 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=YWbyXKQ6; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:58426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmS0-0005Df-U5 for patch@linaro.org; Fri, 12 Mar 2021 13:23:52 -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) 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-Received: by 2002:a17:906:1ecc:: with SMTP id m12mr9678705ejj.4.1615570103330; Fri, 12 Mar 2021 09:28:23 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée 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 -- 2.20.1 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 = 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 = g_strdup_printf("syscall #%" PRIi64 "\n", num); + 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 = 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 = [] -foreach i : ['bb', 'empty', 'insn', 'mem'] +foreach i : ['bb', 'empty', 'insn', 'mem', 'syscall'] t += shared_module(i, files(i + '.c'), include_directories: '../../include/qemu', dependencies: glib) From patchwork Fri Mar 12 17:28:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 398692 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1426229jai; Fri, 12 Mar 2021 10:26:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmzFg4DqRZyrUIYOWB2LtkA/VgxfrWMcywok/GT6txR3ws9JxBNXsuAwkmigJ6wzUCIeZu X-Received: by 2002:a05:6638:1653:: with SMTP id a19mr514673jat.113.1615573610278; Fri, 12 Mar 2021 10:26:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615573610; cv=none; d=google.com; s=arc-20160816; b=B9wHrw48kgedkuwbNf/fK8Ium86Um8Yc9w3OjKvC8rdtJROVKQz7tkTeTlHh1BD95x xNiXu33qTCHnzBsdbgq78L0IE6+06Nu1AJ7o53YXQdPIajzRJXzDrX5u3XZQYMkQGdqy jgL05psRUt+FXAt9DHvgrWlIZX9c9RCl+cz+1gAeZTimagrqzlW5zvaZUuxHW9w7kztY YGFxmeWpI+F3m2MMFZGT3MdbBhkrpFRmkS7wJaOrq/ZC25sWN0ej9tjA1t9GrrPslTBy 20azYIPEqojUUjcEaDcM/F7K20WPjTZbG2eTEniN0jchZa+9867Ck7QFNiyUasJg7tHo 0Urw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=5JNRepraAPHTlu3+kN/T3414bS3r0zFc9RKsC+Bnhh0=; b=gKMsVLh5PAkC0AE/Syf6plCFh8YPXeOCVORwzpcbg+qz8QHtHOXDCiPe/C9h9RbNMc 843ZTd8V0GjzxKgRv8aQRixynliwsSMo2sv13SDLUBoeiXB9MX6yKr1gC/lpElv9iD4h +IE+ZoZOMRDHNIn5+4IWwt7YJdWUBB+jft+qQ0ik0vo7pgQ0v4ANAVf1qpKmhDRby+bi SZ89aDaJdvpxxojX2HiUQaWl3iOed5yT/+TkLwi0XiZ/DSL2t/yd25H13/k9Cp0RD0/H ZZQcDHEvJU6I0OPyh3xNtgQi6cIwVgctOAM6L+sinqmmSssUnhwXDzeqpmaBCzQesdc/ JMfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Jm22Vkh5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g18si5448983ilk.155.2021.03.12.10.26.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Mar 2021 10:26:50 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Jm22Vkh5; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:38764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmUr-0000fL-MV for patch@linaro.org; Fri, 12 Mar 2021 13:26:49 -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) 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-Received: by 2002:a05:6402:6cb:: with SMTP id n11mr15772141edy.198.1615570105853; Fri, 12 Mar 2021 09:28:25 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée 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(-) -- 2.20.1 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; extern QEMU_PLUGIN_EXPORT int qemu_plugin_version; -#define QEMU_PLUGIN_VERSION 0 +#define QEMU_PLUGIN_VERSION 1 typedef struct { /* string describing architecture */ @@ -307,8 +307,8 @@ bool qemu_plugin_mem_is_sign_extended(qemu_plugin_meminfo_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); -/* - * 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(qemu_plugin_meminfo_t info, uint64_t vaddr); /* - * 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 operation + * @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 dealing + * with multiple address spaces. + */ +uint64_t qemu_plugin_hwaddr_phys_addr(const struct qemu_plugin_hwaddr *haddr); /* * 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_plugin_meminfo_t meminfo, } } else { if (hwaddr && !qemu_plugin_hwaddr_is_io(hwaddr)) { - page = (uint64_t) qemu_plugin_hwaddr_device_offset(hwaddr); + page = (uint64_t) qemu_plugin_hwaddr_phys_addr(hwaddr); } else { page = 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_plugin_meminfo_t meminfo, return; } else { const char *name = qemu_plugin_hwaddr_device_name(hwaddr); - uint64_t off = qemu_plugin_hwaddr_device_offset(hwaddr); + uint64_t off = qemu_plugin_hwaddr_phys_addr(hwaddr); bool is_write = qemu_plugin_mem_is_store(meminfo); DeviceCounts *counts; 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_plugin_hwaddr *haddr) #endif } -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 *haddr) { #ifdef CONFIG_SOFTMMU if (haddr) { if (!haddr->is_io) { - ram_addr_t ram_addr = qemu_ram_addr_from_host((void *) haddr->v.ram.hostaddr); - if (ram_addr == RAM_ADDR_INVALID) { + RAMBlock *block; + ram_addr_t offset; + void *hostaddr = (void *) haddr->v.ram.hostaddr; + + block = qemu_ram_block_from_host(hostaddr, false, &offset); + if (!block) { error_report("Bad ram pointer %"PRIx64"", haddr->v.ram.hostaddr); abort(); } - return ram_addr; + + return block->offset + offset + block->mr->addr; } else { - return haddr->v.io.offset; + MemoryRegionSection *mrs = haddr->v.io.section; + return haddr->v.io.offset + mrs->mr->addr; } } #endif From patchwork Fri Mar 12 17:28:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 398686 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1421391jai; Fri, 12 Mar 2021 10:20:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJy7tOuN+B8CuvXS2uFEwxOdPqYWnX/R7otbqqvldfVCsTHSzblsYoKLHLWRt4P8JnJVeGR5 X-Received: by 2002:a92:5411:: with SMTP id i17mr3615755ilb.22.1615573205238; Fri, 12 Mar 2021 10:20:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615573205; cv=none; d=google.com; s=arc-20160816; b=XiZab7rJ91QMhCsuL4AfI2HVWSQ+WYHN217gOg0jZQIiKeSocbgAfy69opFftyI9U9 40m8mWDZ997NOloa/D8fVJcCiAAGKMM8n8oXU0andz2xseZQHV82poifP7jjGG5VDKqQ uTDbVFP/oPQ1ReuPwM0yUr0ZQcwPil67O9q+d7+C4q5OOB5t2zQcv3xmH3e+rJ125Dh5 X+YHOT5IMHXq8jgVAa7N91X9+M1cPNK/xZQtzO/gMg4GFagfbNWTOqjYddMZoUJuvRr3 LeAk/0GH9YMW1XiWoNbKJH0r7peTJgEzpW4rpfaUip50KiWtdIbkINZAZZPMFA2HS7ib 6CHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Tgg01WFzYZWxtwMF3RzuONdmzCofqm4lYuJbp66nklY=; b=MjHHAVVs5XywvezWYETFE13H3rh8R0Fvjwre4JdLaUAav1nyEeJS+t5b6uYchhEYRa BCzaTQ/wOke69U6uHGlBpzuWdMOdLZbh3ib7/ww5NSrRs8S00ozhlRlinAAENfmsU+dA Oi42fOdEOgGq6SmnpXllfhEhNVB5wNIRuKKfAOlj4taBidXdaaY4QICBoP3VL1w9OMfS s9wvCvzCfQ+/zq3mY4RBeJ3Rr2rztxYSNBv38FbuLHiGUW35Ob55vseiUqpakpMOIG6h 0YYptcjbGA1aFyFyI1SAARg5WiX75Q64QEgQSXOnh28osSwi1ehdiBcPHpUdMLZOVMQp aGvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=e9U5fnct; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q126si6198043iod.60.2021.03.12.10.20.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Mar 2021 10:20:05 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=e9U5fnct; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:47754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmOK-0000DN-ML for patch@linaro.org; Fri, 12 Mar 2021 13:20:04 -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) 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-Received: by 2002:a17:907:d8a:: with SMTP id go10mr9892867ejc.46.1615570106553; Fri, 12 Mar 2021 09:28:26 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée --- docs/devel/tcg-plugins.rst | 5 +++++ 1 file changed, 5 insertions(+) -- 2.20.1 Reviewed-by: Aaron Lindsay 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 important that any information that is needed is extracted during the callback and saved by the plugin. +API +=== + +.. kernel-doc:: include/qemu/qemu-plugin.h + Usage ===== From patchwork Fri Mar 12 17:28:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 398699 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1432585jai; Fri, 12 Mar 2021 10:36:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJxlKYKCvweCHNKrpBn7UlTzjiXP/SZk95M6u/LrEBhQs/BfKu2DdcQjrUFC1y306l5mB7PK X-Received: by 2002:a92:da11:: with SMTP id z17mr3513190ilm.45.1615574183062; Fri, 12 Mar 2021 10:36:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615574183; cv=none; d=google.com; s=arc-20160816; b=lPnPiTBG7QBGXFoHDW+3rwAS4oEYu1gBTrFBj9cz1FwmOHPSTTHAllgvV6x18ZdWBh M7eYJpiZYL52mAs0DwMrIsCYxGJQzkn7gCEuLX4iWjwon/+RB+EZWvI8zuEK1C+1aKKA 472vM/fEq0QHaGGT2Mlgoq7o6R99C2Cn16Z1Z3gQtngX6zeYWOKE0WcK6Q6Fl1EGFwfy ZA3vqRni3BES2sU9XSitAYKaYAqSvX8wq8FUXTbxBw3hd2+2vDf4BPgdrw/ydXs6c0+6 x1aCDzJSkzHspmwlj0gSXBs9U2Mt7VNeMr+ENFh/SLa6j8ESBo4x7UZBBfJZwr1UrFHT J3UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=gxzdJY5GtdkEi5yLqsd1wrt/9eSlH3NwjXudTzLe0d8=; b=t0Lr3+Ha+dhhAQrISQpNjBQT2I2QnGen83Rgn+O+/V8x3iF46Ex5JqKUzLnd6RAOh6 GSo0XfWW/wXjFNlYWlLxe+IrtBoCsY0og5Un0ldmoAo5f1O1wzgXcjGV/1BV026mNSIb yEBsSJi3VvmGoJ1lvWqyvD2u+MwBqoR/NgBAIAPaGvfpsKDHJ/MZXOW89/d4wBoTAOfb HOdTwOVsW3ZOTSQxiqhPAUdblceG/oBPeOCwHhyY1sEAU9Aea5dMK366d5KG9yvrDi2R dsVru+MWNidepTkFjgnbAzafwZiLdj83XWbuYkG+sr8znMluTQ2oFqfQ9/2K0Br+uvMg rhPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QCnMUO1d; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i23si5693199jaq.67.2021.03.12.10.36.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Mar 2021 10:36:23 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QCnMUO1d; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:36442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKme6-00056e-IW for patch@linaro.org; Fri, 12 Mar 2021 13:36:22 -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) 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-Received: by 2002:a05:6402:84b:: with SMTP id b11mr15270597edz.56.1615570108849; Fri, 12 Mar 2021 09:28:28 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée --- include/qemu/qemu-plugin.h | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) -- 2.20.1 Reviewed-by: Aaron Lindsay 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; #define QEMU_PLUGIN_VERSION 1 -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; }; From patchwork Fri Mar 12 17:28:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 398695 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1427672jai; Fri, 12 Mar 2021 10:29:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJzghwH+TBlBG06AfJJkCe0UwbN+31n6RmOMZH1FPSqUnaz+AIAaCSU2g341/J5+8JqWPas2 X-Received: by 2002:a92:d8d1:: with SMTP id l17mr3913656ilo.85.1615573749312; Fri, 12 Mar 2021 10:29:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615573749; cv=none; d=google.com; s=arc-20160816; b=Y4z/8YDluraBMumSTQ83lV8Hrf5zMc6zyDgnxA0qeKiSUq8jgGR8Rj93lgxkf7X6t6 Iti+iVDI2mwt75jkyw5HD/BWRXvh7HLcAOT0eYlHEwCWWhfsJUsEJHHVOdkmgaJdSQW1 muEXIi6UunfBNd5PnDV5ifvZQn++3RgG2/H2eesN1PAk/fUQ53BF3rGXRwgZfoSDcrCL 9x8b2kTTkzj+jBzPR69oZ3CQPY8R81x27e9dDmDYmSk8UD59+GgEnjRf2HUe6DT5VVnP Rmr0LG2Ta58m+NDMBqlVa72uYhqq4ZMGYqIvOrbsnSqBvOMkJC5iMMnuv9tgAOI7QnP1 MjJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=JlkkTcluzTbtq/zjZUoz2AwI7NG2npDobHU+H6XFiEM=; b=mDIuqBbkKTWSnXMZoaXYB9XpRBYsGASrbw8XQ2NqMeWm7FTaXIGHVC/WyEY3OYtWP7 LPlSOkxNPWXnxpbuSgITfv9oisIGEaS7dDMyomeR8WwHIOPBlQM5EdiM822dMC6MdkXZ iTpQScTUoJuCXpazY22dSp1HQOwh3jN0neUzo/GLe2PAG57w8/W8joB6J8gO5jua0WaY W8TM8W27gUCTD8H26JNv4UshNNDHcUqj9p4kCwQrSJJLp4hStFBuV7mvDRVj1DCZSkJO Rjq3A7fByNae/DjYW9fCVNXpiEsvF9tfO67bPqNf/w23vIMT6Sd+EahqkxTqkdZfLs3g Uz0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=oxX0OTdm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id h14si5507422ilo.27.2021.03.12.10.29.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Mar 2021 10:29:09 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=oxX0OTdm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:47332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmX6-0004y7-Lh for patch@linaro.org; Fri, 12 Mar 2021 13:29:08 -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) 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-Received: by 2002:a17:906:3488:: with SMTP id g8mr9507564ejb.282.1615570109812; Fri, 12 Mar 2021 09:28:29 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" kernel-doc doesn't like multiple Note sections. Also add an explicit Return. Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.20.1 Reviewed-by: Aaron Lindsay 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 raise - * 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, From patchwork Fri Mar 12 17:28:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 398694 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1427440jai; Fri, 12 Mar 2021 10:28:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJxF7K1nEGj72QsOfGqDmRasmyc2cEyPw1BMWIujogOGTyTszdiVdsomfZPevxqfwIz3KD8w X-Received: by 2002:a92:c6d0:: with SMTP id v16mr3504210ilm.289.1615573727748; Fri, 12 Mar 2021 10:28:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615573727; cv=none; d=google.com; s=arc-20160816; b=nclOz64rrvIer6hNVibSTZNTMgVWni2FwSWqvTqO6Thpw/z+EhujuUmL5dlZgFFAEb 7XflJNyMfynAkQxW/x3jkY8l98IQUTwI71u2Ii3VNiotp3qrW9eoDSQt5VjumIOn7Uoc 5JSN4hvO+Gw5FonMb0QI8e50gUHhiWou3nwaxIIX2KTWAycEb6m7CcInaJUi6YXDAE0O a603sJF0/4vfK9jN36S9L4pw9FX+JzzzuXY/l66b0sopgsU+1TloY+j3fttuHne5cL+A pNi/K/3mA2/ogmVAs2qfjF+k4d7fwj7jCjH7w406dlVjZWrDuUaS4mHHBM7aPACHhCDV /k0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=YVUJJy2xlHw8BI+XuObyfKh7efsezZH+aMO25WODlwg=; b=kcT765Bc432ZPUPc+GhlcxHsI4Z2VrXxxqtqn/kEfBaWX6TNGYJhYzbSbs/y2fehem n4iI5nXLI8MfCxh9upWX3c5H+Cxa2NgGXn4ae3/ypgn+CPOZ5hd+6HHNGSjxaGvMvHOF iT2yu5K1bMwVuXELmM4LZ4WXnTR4fHuXpMDHWBnMZC5j1hAYoQO3yMB7YhvAaGOSIYaR d9TQt/XJ41/58hR27sC/j3DjYl6KtrZGqd+aKsoK8uvKcllleQpJgKb3/fVlzW2XdYug 8MZ1ASf5sFOhfwzjUOHo72j+za7YInVn2LiiiliO3Wr4yvoM7CLDRKDc6p+sP/AEferP T2QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QvFntIfZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id q8si5683621ilm.72.2021.03.12.10.28.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Mar 2021 10:28:47 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QvFntIfZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45344 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmWl-0003S4-5J for patch@linaro.org; Fri, 12 Mar 2021 13:28:47 -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) 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-Received: by 2002:a05:6402:5189:: with SMTP id q9mr15320645edd.168.1615570112273; Fri, 12 Mar 2021 09:28:32 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) -- 2.20.1 Reviewed-by: Aaron Lindsay 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); -/* - * 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); +/** + * 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); +/** + * 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); +/** + * 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); From patchwork Fri Mar 12 17:28:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 398691 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1425337jai; Fri, 12 Mar 2021 10:25:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyX/pIufC7ItLmREVyjbG7qErnmLlLNdyRvZp0YEvfRFF+qssrI/i0QV+V5tHGQYreuU9Vs X-Received: by 2002:a5e:8712:: with SMTP id y18mr387951ioj.65.1615573535821; Fri, 12 Mar 2021 10:25:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615573535; cv=none; d=google.com; s=arc-20160816; b=nE7SuRCAquyV6n3RBQsf1Zg+rYcGMF8kddV9SAnYovYk8qawjH0ej4dSb94kaipyhM Et1Um38U9qkOYNubfycQPuVN++cKVApmL3cMZXuFSzzNKiRyCfRrb3KquWCbAmrU7NT1 L7kIiFQFYnmtMpsJP03AotOj0mnIDr66k2dFDknZB/+OFYR3ZF2Sw6H1KNGC3AtNsY4k Xa5tlCQGAu0qxaasW1v1qI/R7TcvUn76VV4z547WBWjqhvFycYsZ6R5ZdzrRBh/bAzV3 UF7xTdS924/gzaMwZarokD915sNv0z6O4KkMfid9SyIobSOXxIHgI6GPbAZOTdZaXUHt 5Y3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=q9/ElEVS0uWbAzDSa5Cd31/3lKlIWsCn+W2Fat9oTvc=; b=eW+xBJBcHEgAiLBCdVSJyWAecBc3fYGA8XGEZq2fvbJRt/VpSNzFz0G9DCfMp7UYQU NReSOL0viJ3nflwCrBnj+/9MkZnebAyt9xESvtq0mILEInyAY5bJkxCn4VNWAawgbHJj 1LHagYm4LGa9hXde3befxn3kzziQDy+CWKTlVpPvNZHgkKnGbvFDPJCD3ZobFal6f0bb UYYjly5U3LIDvbCcD2nlXa758la7hG+pJF/h6CMQhWUzZ/UL7YmwIgCaLazQVdEiqv1e H+eCbpZ8FExbEvwC8HD5fBNlSnUgUbPMkAK5Yj8SlXfiAm6RYwZZiniqmopDvAkb9hm5 xBtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=oQGsSwc1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c11si5597226ioi.68.2021.03.12.10.25.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Mar 2021 10:25:35 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=oQGsSwc1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:36792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmTf-000863-6j for patch@linaro.org; Fri, 12 Mar 2021 13:25:35 -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) 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-Received: by 2002:a17:906:c102:: with SMTP id do2mr9781486ejc.305.1615570111607; Fri, 12 Mar 2021 09:28:31 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) -- 2.20.1 Reviewed-by: Aaron Lindsay 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); -/* - * 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; enum qemu_plugin_cb_flags { @@ -221,6 +219,14 @@ enum qemu_plugin_mem_rw { QEMU_PLUGIN_MEM_RW, }; +/** + * 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); From patchwork Fri Mar 12 17:28:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 398687 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1423476jai; Fri, 12 Mar 2021 10:22:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxt5WI1G3Wcb4ysIkdMiXV+FlpgjvkFQX9uPnnW7JneD6+7/KsoJttlWSnz4reAFcZR5QPZ X-Received: by 2002:a6b:ea08:: with SMTP id m8mr391454ioc.194.1615573363184; Fri, 12 Mar 2021 10:22:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615573363; cv=none; d=google.com; s=arc-20160816; b=hjmL6YryWobxqD33bbOTv2r+2E4GKXKMMFynTIc7U+NYa0pHQe55zEuwyq/BVrPr+D B1xx4UtP8/QYPcK63H/M3G7vdK2p4EXYf1KAc1VAcCSkn1AGNf5V89KLotUQswE1tZDU O8M1z1LtBFAnq3UjS2rlQOslvdB1qA0JjrPPIz2GFS59mONJlYZR9zgidvTJ3jJiEe+d yrDnjfgmFgVfW1aMeT59wdPVJisPO7dDuINQQnoomynU+uBZtlSQ34/1B5h0zhqE/UGc Ez50dCAkC0cjzG6Ab8G5wx3TM9vEe8i+OHVtV4/njtYIsMhMt04kxbGrtV7ugsZhatSo cGLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=X3N5gVRhyarUQz1NRBF4TPxPeA10Pzo0G2TS+ipcJTo=; b=rpXfrMd1+rKidYwWaPUUkaUhSEEHNwtX/bNWqdNF6E1jhFWku9Z1V+DwySeJgJ0EPI hHwAqV8KRmJyicoEylfQ6k963tmqvIpO00OERcI/UK2uHGocmSdd9y9sTrRhtnF1ZByY Gp/KhAUIcCH/sYtxbI5pXA1pXVhOyuC6391P8aXyY7M9hfcmashumZFoWz3o6GpW6GzF Dh3/UXMoOG4cn9+dvPuOO2pNtXMyIGvr1ssJj4/xvRKGhshBKUwVZqu7wABgfV6pV8bC cjqP4um4SLy+KamkhjNAiH6PfNgT+XmwrzSLLAcS5Yz7rRShKR2Hsut8xA0XncMCaTpY amCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EpKsXWwd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id w24si5420795jaq.43.2021.03.12.10.22.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Mar 2021 10:22:43 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EpKsXWwd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmQs-0002UG-IJ for patch@linaro.org; Fri, 12 Mar 2021 13:22:42 -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) 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-Received: by 2002:a17:906:1c98:: with SMTP id g24mr9787381ejh.51.1615570107818; Fri, 12 Mar 2021 09:28:27 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Also add a note to explain currently they are unused. Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) -- 2.20.1 Reviewed-by: Aaron Lindsay 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; +/** + * 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, }; enum qemu_plugin_mem_rw { From patchwork Fri Mar 12 17:28:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 398697 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1431200jai; Fri, 12 Mar 2021 10:34:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJwCzrEyqzYIjm2ivWYxY0T/BNaREr+dN0lzR7lEz+IX8hYWwlzROUQER/wNz05qzxaJ6aDI X-Received: by 2002:a05:6e02:20c3:: with SMTP id 3mr3609499ilq.164.1615574050577; Fri, 12 Mar 2021 10:34:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615574050; cv=none; d=google.com; s=arc-20160816; b=AW9Ga76UTWg0hDIq+AMelM7Zjn6W671Mhhdgq72i1peQQ+6sL2Ic1ZgPmOPLR20CEx aX36g1RCjBk6SNCIRXh+YyNh4EhcD9G1eo85lYynDJ4aSj/M8T07LUwOF25fDzZ6KXnt 4NhDeHF7tYb2C5J54D/NeAr5ofYysWMAX/8JhyH4GipeQjpmYVAA5WtJ0K+0MNYijwR8 DWbSg46ZmEOHLLF+mSVeErIVnv0/yXOxMB4KFsnBcuIGjtppPjm5NMCtcufciZ8pPafZ wnoSqaWCkG6NzfxVQqeXZh6GUhqzOxNb/Ird9xgWkgYJfOihC9nf1do2+r2EUUSzzAA5 681g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=k8DQFH+cYnnVYfj1j2PU6D1luYpEilshUOxymY5Gvs8=; b=k55NmXAvfHy5WPVYTBVW8lI48OuyQV5r32qGfV5kuKCpyW8zV3MsH3xMjnLyM1TweO GMVEXsq9YdQzwHCQf1w+HhoTi8wor3o5/J1kvBKQJzTyBQq+DBv+UExiVhXRiTeSZ+nQ eJjDBzUHTFypCVYybTYhpFdBgvZbZ6m2RP5o1Vd6Y6/yJqU/3k4ST6pk/Jr05KLF6GT+ 4FFNguJbFtHkhONj/8OQ46rNgawrEZ/mCdeK+0GF54+wRyyc600Mgob7n1zcCMf9SZyv 6GgWQfFA2xfDwcTlMbKROH4tqDdyH1eOXw08x7ZnBLMToamffjkaXa6S5qoVUe9Fz4Bj xb7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=X3O1VLbh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i1si5466199ilq.28.2021.03.12.10.34.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Mar 2021 10:34:10 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=X3O1VLbh; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmbx-0004Bf-Uu for patch@linaro.org; Fri, 12 Mar 2021 13:34:09 -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) 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-Received: by 2002:a17:906:7f84:: with SMTP id f4mr9423469ejr.525.1615570117135; Fri, 12 Mar 2021 09:28:37 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 3 +++ 1 file changed, 3 insertions(+) -- 2.20.1 Reviewed-by: Aaron Lindsay 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 +/** + * typedef qemu_plugin_id_t - Unique plugin ID + */ typedef uint64_t qemu_plugin_id_t; /* From patchwork Fri Mar 12 17:28:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 398696 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1430336jai; Fri, 12 Mar 2021 10:32:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrDhaSIkV+5We3BAVHobaaLG7F6g9accK4wjj0gNS6Wpy97l2ZPPmz6+QILuSNjesGk4Vt X-Received: by 2002:a92:cb49:: with SMTP id f9mr3618705ilq.0.1615573974326; Fri, 12 Mar 2021 10:32:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615573974; cv=none; d=google.com; s=arc-20160816; b=x7Z995WX9lMNuU/fq4ivUTQWfRczt7XuQRz4l/KnlDTX2cI453nZ7if18Fjgerc50v jkQF/9sj143Qu5NvOsptLT1HElyvLyTb5qhVP+0DomjBc894HCQbEk0pI7V27BZSf5vi YOrQD6R57YbUJcJEmn6ueufHfEAl80SgTSccUdOZZ1Qlc7it+YgoqC2hDEdfraC696Ac b6bE59j2K/mQy6HLzzER/VfAeyer2utmMaeZeeFYrap7suL5/G5JqgSXz5kB/YvQ3FGv rF3VGgrE33MBFlWtccDpzneDpgjs1E+DL3SWnd+j38GPXtEuXYrNtfOXZvRri+CS0pF0 T1lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=/pMpGpLT9W1qrJCRw98saFflQK12KM24W0ofyXVsY7Q=; b=v9ciY462E3vrWDzP82rLJ8kN9fgJ5Fd58LjyjFaQPL/o+eZZ/+LqWRHu+L8mrOYoLG 3R9Z9Yqf5rM6Zro15mTp6ce41VAJ7223Vu1ocHbEsSbXlx3xh6OOu5bHaIOgW48mxwLQ 1fHiHEWsIho2d9qoNSJOVTv2OQS8NtZekyuz8MWO3YVhOB+YHnG8F0ykVaQxf9CxhyYj /tRXZnLLcOjE8x2APZZz2vTq8vF+uuZY/+y+/dbXMjKRH6Ns3snsqcosLf+pwXbvh310 J95T4Q34HfsS5R3RqGgtqeTBYrZ4uvtsLnwhJlbNCRbowJrBn0kwPcTa8J4/ap04wIQX zZMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=OGkDWIiD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z15si5330815iob.21.2021.03.12.10.32.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Mar 2021 10:32:54 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=OGkDWIiD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmaj-0000QS-Ph for patch@linaro.org; Fri, 12 Mar 2021 13:32:53 -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) 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-Received: by 2002:a17:906:7102:: with SMTP id x2mr9842502ejj.355.1615570114031; 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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Remove the extraneous @cb parameter and document the non-atomic nature of the INLINE_ADD_U64 operation. Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) -- 2.20.1 Reviewed-by: Aaron Lindsay 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); +/** + * 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) From patchwork Fri Mar 12 17:28:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 398701 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1434049jai; Fri, 12 Mar 2021 10:38:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJw6zE24rpENTVXI24p4cNufX0MrgW650qaJThv30dtrIpEPlAxyPD87alACXO8irM43wUMN X-Received: by 2002:a5e:c911:: with SMTP id z17mr437380iol.153.1615574314466; Fri, 12 Mar 2021 10:38:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615574314; cv=none; d=google.com; s=arc-20160816; b=V5HeN3ul91PHGsoxB0hZSsVRjV3a+0+waammdvq/2yWZv9rEAQBkbdyPClReq/94Cz phGf1jhGrO+eigVpVbrJl2NzP5cXQIwNhf3wLkH2ldZ1vfJG8GujUD3iiLB0kl249oqb 4wPjAs3S1vqNauWgu30uWkJHliamvMcFOUJsVk0XJGTWWXmTNnGFFuyOQprgjLWwXlbQ 8MI1yTxGAN9yZUbh8UKBFSim+A0gnU6HVbOSkWLPJqlL2lb4uaYvcGMf8luqO/cQZu0M a1HSUgOU8R1gVCbBR/Pb2JBSJywy6T/NZ4YQAS0LTUHoSI2DlRt+UDIgjf7OMI24NKbc sANg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=D25/pl4BFCseo4QTY1mxuXFeITzdlqswyd6ddGYq3qQ=; b=RN5Gfdyx75pRDcMXJ/t8EwcJw6oD+mSzJdF5Puv70kY29JAYRd6hVoc2eidstrbRy5 TLEJCUiKdWbpXuwQcf8ze8c1dx6FQPHnihIu3O1sYLTTgL1gvNLYqUUCtVc8M7ML6eKA UlyPzCKbF/cet8Qt/RkLs35jYJLIlkOg/Y/8Ib3uNHbT8qrHZZBC3pa1B+FEhBH0hDVh Vv/sFRO+fOiIPJ7lcnAln+bVea6SHxDcSNShdEwYuOFlIQlduYQt9nT+YHru46VWg6qV 5Q3R/uiWJVfffUMgPsunHHuI6m/y2AZHd+/QfDv59sTSrGsfaYCAnk6PVdh29wZHhsZ6 OW1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Bshb7rtn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y11si6199520jat.103.2021.03.12.10.38.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Mar 2021 10:38:34 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Bshb7rtn; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:45180 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmg1-0001pB-Sr for patch@linaro.org; Fri, 12 Mar 2021 13:38:27 -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) 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-Received: by 2002:aa7:db0c:: with SMTP id t12mr15181022eds.34.1615570116571; Fri, 12 Mar 2021 09:28:36 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 52 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) -- 2.20.1 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(struct qemu_plugin_insn *insn, enum qemu_plugin_op op, void *ptr, uint64_t imm); -/* - * 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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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); +/** + * 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); /* From patchwork Fri Mar 12 17:28:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 398690 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1424998jai; Fri, 12 Mar 2021 10:25:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJyf80S5q/MXeHxY8t0FnAdJvYeVs1itO6T7ThvDOfVsox8X+oPKHU08qz4L28iFJ6fQmXix X-Received: by 2002:a02:8801:: with SMTP id r1mr543000jai.51.1615573504705; Fri, 12 Mar 2021 10:25:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615573504; cv=none; d=google.com; s=arc-20160816; b=y1VAxtPw/QzfjogwNjYlo2wcDygHqlVJykBgj65XzyPn9kNFuWpccrFARkj+Ik3FlU deH/X1Q0X5qeJEn9YE1HBWnYXy4KiALjsmW/IPNDMaI+m4lm67r0Fy0a42p2hqBjR9X1 nxujK8v6a59h6W041EU0daLzeM/PNHf7vQ987qxz7/m8uk/GyljvB4YrWKMHy3MCl9+d 4NNam4l/dlRyOHnwyZMfisFbgRb6uv05NqLJme7SMMVScmkCY+OGP4ShfMcHqfmx5y54 rmLX4iM/FJ2mNfXk7g6vlawllxXGprS/CazAxLvcDfzwXcgody2ldRxiQwKhU6yT/vE8 JT9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=Boqd6rm1XLHC3hQw2GCvlbMa6t0NNTObqUIRDgqZrqA=; b=0UwOjsC5VA95l3koYCFy9s7a1+ef2WF2m8SZ0byAFBj35bJDxhsWIaSTxFycQxF4Vc 9vDF1bKmJIcMGnkMQwp1v9UIkmL5p+tXpVhLf/xbYqsothRWQzcUOiyM6vNW86JnNv5X mpan3J9oL+1t3UXoG9hcZvuvx+0oqE9hZBEyxsnlnl1QUaJqKUTM02gH2jzOXc9jzXFe T6+JS7ZzDXaw4H/JoRa8nN7vC9u6OZxHJNUKtD1Z40IzWkbaozdhaxbR/itxVMrXb7/u Lh8Lq1olCYvOCs+yfra9GnpiON9J17BD/sh1ymKgQ+49lzu9ATsxTpWtc3nkWQ7tfx1r WLSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="RSMR/6Tk"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z6si1827398ilb.46.2021.03.12.10.25.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Mar 2021 10:25:04 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="RSMR/6Tk"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmT9-0006Ud-SV for patch@linaro.org; Fri, 12 Mar 2021 13:25:03 -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) 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-Received: by 2002:aa7:d686:: with SMTP id d6mr15832640edr.146.1615570114705; Fri, 12 Mar 2021 09:28:34 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) -- 2.20.1 Reviewed-by: Aaron Lindsay 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_plugin_insn *insn); */ void *qemu_plugin_insn_haddr(const struct qemu_plugin_insn *insn); -/* - * 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; -/* meminfo queries */ +/** + * qemu_plugin_mem_size_shift() - get size of access + * @info: opaque memory transaction handle + * + * Returns: size of access in ^2 (0=byte, 1=16bit, 2=32bit 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); /** * 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 From patchwork Fri Mar 12 17:28:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 398693 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1426819jai; Fri, 12 Mar 2021 10:27:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7r/zZZdEkYv4MuJxlp/LrSFDSZbSMAM1TP6DpHITB54dbVZk/nOzqzKzxxWZrFAqFd6yO X-Received: by 2002:a6b:8b0e:: with SMTP id n14mr393042iod.199.1615573670363; Fri, 12 Mar 2021 10:27:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615573670; cv=none; d=google.com; s=arc-20160816; b=SbXmBKAyriDvwe+VLZoqrwGVfh2mZQ83qXozT4I2LYQ05WTxoO5o6VwF4USpbSsnq+ prus/zL+BU34veoe4JTqQq0kawtMFq7ZkwtbBQOK6so22FId8eLnVONYMcK/jp5tcZby k4ZHtGqPNHgVoLVPBlqDKshhsR2cUy7nERGcAUy18aJ8mNfxjuedgpShKsqo6ZWtNBRh IiOgk7Fg5EnrNbJM2DtLkKiFSIC7KOCBlCsg55fXTObK1o8iQhw2xpVYjx/SosSJjlIQ rFWwisQPjoVz1Ls0A0oJ5fU0fn2kp/8RGRTCJUthFSjynA/OWLjoCy0XEcZnVReJ3f6J pWsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=rQlXVzvhTGn5oQRAxN3PtvRgZpaSyD2V/Kc/eZauuUk=; b=dJEqpPU3mPJTZKNoFIgKrEs2j4GHaRm9Itx5R3zXnuFNIa/tKUxJTcBEmCZEKb/Iiw HSUkcDQUjlAmJKFwiF7G8iiX8797WURkpdBBz+hYfWTpOHAf7hv4RD68zAss5ApZO1Jk /P7vTxMGQbqS+KKwyW3ihqUI74hgrgEIFVsH2TykxPVKNG1r0tuznfXdkGYaEKOKUx/u XCGNKkt58bo6lJ6xkyMBNuCnbD+FiNYNHGS7lEtiPY+qOkfGuj9Nw9sRKdMrPdw0WZ3O gIfDOomTQa2eF3sEBFxqKsdqiKnW0JDJSB0km1/0ME4WzDo0iCw+hAyHrSQ5Usr1yZ9x E5SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=I3ZTiDXd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l1si5614892jaj.50.2021.03.12.10.27.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Mar 2021 10:27:50 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=I3ZTiDXd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:41596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKmVp-0001rQ-RB for patch@linaro.org; Fri, 12 Mar 2021 13:27:49 -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) 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-Received: by 2002:a17:906:8147:: with SMTP id z7mr9291380ejw.436.1615570118876; Fri, 12 Mar 2021 09:28:38 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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ée Signed-off-by: Alex Bennée Message-Id: <20201013002806.1447-2-luoyonggang@gmail.com> --- plugins/api.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -- 2.20.1 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 info) #ifdef CONFIG_SOFTMMU static __thread struct qemu_plugin_hwaddr hwaddr_info; +#endif struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info, uint64_t vaddr) { +#ifdef CONFIG_SOFTMMU CPUState *cpu = current_cpu; unsigned int mmu_idx = info >> TRACE_MEM_MMU_SHIFT; hwaddr_info.is_store = info & TRACE_MEM_ST; @@ -281,14 +283,10 @@ struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info, } return &hwaddr_info; -} #else -struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info, - uint64_t vaddr) -{ return NULL; -} #endif +} bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr) { From patchwork Fri Mar 12 17:28:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 398698 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1432532jai; Fri, 12 Mar 2021 10:36:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJynM/ic9A5LBvGxFm4bsUBMorFVysKeOA3fOUYQtz/MXKoGZpug8ifUckSrXHR5w5oos0Br X-Received: by 2002:a05:6e02:1411:: with SMTP id n17mr3545031ilo.61.1615574177321; Fri, 12 Mar 2021 10:36:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615574177; cv=none; d=google.com; s=arc-20160816; b=ha+XIu9TyP/x0EYBzcCZh0CLfHcgECx0uGr0IPFGbQ1mIhaaE6EAYXqgpgf78eHT4I Hcj5/W5s/YcNeAnfG4Ck9MgdF8Njaixi/zPxtciVg5W1LxNp8dAtR3BHFinBjTBxZLJ0 jfsnsf1PCAY0HQIgEGe/xlQDh4+34Lg5rNQWV/dUM3hTsM5VKPfnOMWuTADqQRawYTAV OKzOXPkG9k8OFIkaedLoJDkS9SuT7fs2K6sviDkmkTy0n/79Hxszjt95oJ2IBhtGuPDQ iGCHe2cd5eI0HJARF9/Y8thjCTtXA+snZdjCgV85DEwacdPKgUdAj/+gzupup7jq18Qv lI7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=vL7/zplSiqfJqI6VGtUOhvXp9xtLO6YD7KZP8afIyD8=; b=lR2JszL0kseCWags3lw87r0uj2Z9DVSwgZKjmUuqaB9XCd0qJSGHfrAPPk5kmKUQ4p Yd/r6yCuK+czU69b0Q1Ln3+AksuIef8oY0bS+7xXuybLNz4HPHO4HDBlm7QFvLetm0YK yn0g4XiKHlN3SAHzTqDJJGFGLn7NlQokE9W4tMGmFXDdgvSHeCntFErxqGl08ZKXZK3Q iBBaWyIHM7vnHGBFzliZdXjWcHuMaVXN4cvBdk1WKRyFW6VrJo8WwgcB2EvrQYmJV8n6 PFjMLD4r87mb7mFGlzT8hoz5fyPidvkEeu3SwetJ5y6y5Hx/feEPr+2In5psthlTG0Ow dSiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=G7gVM1MT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l10si2906805ilh.37.2021.03.12.10.36.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 12 Mar 2021 10:36:17 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=G7gVM1MT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:35998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lKme0-0004vM-5k for patch@linaro.org; Fri, 12 Mar 2021 13:36:16 -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) 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-Received: by 2002:a17:906:e16:: with SMTP id l22mr9734408eji.173.1615570694758; Fri, 12 Mar 2021 09:38:14 -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) From: =?utf-8?q?Alex_Benn=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 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_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Yonggang Luo Getting the comment consistence with the function name Signed-off-by: Yonggang Luo Signed-off-by: Alex Bennée Message-Id: <20201013002806.1447-3-luoyonggang@gmail.com> --- include/qemu/qemu-plugin.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 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); /** - * qemu_plugin_register_vcpu_tb_trans_exec_cb() - register execution callback + * 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 { }; /** - * 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