From patchwork Wed Mar 15 17:43:15 2023 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: 663367 Delivered-To: patch@linaro.org Received: by 2002:a5d:5602:0:0:0:0:0 with SMTP id l2csp1714081wrv; Wed, 15 Mar 2023 10:45:34 -0700 (PDT) X-Google-Smtp-Source: AK7set/hP4ey13CgmvapgV3DuaX8/deA3xsuCVMTDg2LfA4WaNzQ6qjyUQngDdFiD7qaRGADsDbq X-Received: by 2002:a05:622a:493:b0:3bf:e471:69a3 with SMTP id p19-20020a05622a049300b003bfe47169a3mr1183490qtx.65.1678902334213; Wed, 15 Mar 2023 10:45:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678902334; cv=none; d=google.com; s=arc-20160816; b=P0rkZwLTVeMribMsE+yHVLuh9F26bDdCxBULhZ3Krn8IxvgH/VUAm/qodXn2kMYUWr QbLKuAsqaBdcajMa1O6uRkh6zu7qeXB5OHec6Qcxj0oDh+MTXXHklznJOPg8DopjrOQm 7VMgsPv4762ydIzW4mEP2scXkHkZXMYKGYzdwoXG2DH1Xo9N9KKS7vqcXTeo+stfCR/M 8vBQb/wLBrNIbXvA4phWCSFEvj4JjQZ9g7VOru/wk10ZMfjzqg2YlycLLRGKri+bOFKp yokloiTQjeo4Ubr36Z7tThroBWvT2NeslcJEBjZbuTVTV6jcnli8uoByWsnEwjysN7kg 0owg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tRC8fgG8iCpSOIjOKosXJGOasPWQrMaIPqKcrWrmcng=; b=IgcugAjbrpETwTSh1+X3M1jIbvSjZ0cpKGKl+5hZI6w2HivTooZdRYPilyC0itK2wE dIChrXzCjphSzL7T1uqIQNzyN4OHJgO0TWHxzYkmxDbsXd1NqbbMvdL/oGIJ76vBfmHL gxKv1920LqPISWiBJWJdK7y3lGTSrCcukxUu4IO7eT3aMfJRkFMtSQ9JjOKFp2p7aYUh 3h8x4uCxv7RazyUa3XVORXgesGsEEiEmaNOimR80qgwNXgQmExll+7gfqqN/Ze5eX1JB 5JtZi9LvCAK+R64wpuTI6wFMVHrBrEoGQ51key7jSsPqoupPa7yJoREsGTjnkGuvMZCk a3gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jICR+apE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r4-20020ac85c84000000b003a4feedd996si4846045qta.555.2023.03.15.10.45.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Mar 2023 10:45:34 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jICR+apE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pcVAT-0002Ss-GS; Wed, 15 Mar 2023 13:44:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pcVAO-0002MN-MF for qemu-devel@nongnu.org; Wed, 15 Mar 2023 13:44:00 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pcVAA-0000iZ-V3 for qemu-devel@nongnu.org; Wed, 15 Mar 2023 13:44:00 -0400 Received: by mail-wm1-x32d.google.com with SMTP id j19-20020a05600c191300b003eb3e1eb0caso1581489wmq.1 for ; Wed, 15 Mar 2023 10:43:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678902225; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tRC8fgG8iCpSOIjOKosXJGOasPWQrMaIPqKcrWrmcng=; b=jICR+apECfEhCXQeArj+TuKXov5ECTX7lbhYOk4/YMFSqpqfP9y/INkz3jCDH6EmXk 0MY5FYH/b6+05FZPbTN4ZPIuQf7T5vkpVtBNHkgsLQHLB0D6cTgF0I4rHNU043JSA2V/ iQmZPDBdA8eZ+KYS+h6qXJKpnWjAlKPSubIfK1qySCvnGiXSBGI4YdcG7FvzWPYq+Lw/ vzwz9CRsjeDiqcpxaUhoaRru281652kpHQW1a7mp4MREBekcGHC/ZyWGkoJlkanwT1Pw +ME2Cgr+STkynH/9wM0zkyVOqn5uhCXdo/Ree+ynVyqtFycAOtco+/XWxtc4W3hYWqS5 tcJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678902225; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tRC8fgG8iCpSOIjOKosXJGOasPWQrMaIPqKcrWrmcng=; b=aLQn84sXnTt+eLgly5blIqFcOd4Gt6NkS9blnrwMTUlx4M5iXZrgR9Bxd/OF0FEJrK fnwGJeTskXirIi8P541V821n9J/HiXgSeJZss+W8SsJ0nJgpIzZjxRBGw+WBU2ZfM0DC GO17HAvN5tNTWy1es1v1oHzBGIbgtTdUze61GQbYPczpJe/rv0yhblsAzsAsqvOy5koz cqfSDlVR8DE64eFW4Mes5AaVi/IfBUUq+Ilepd+TZQ3bP/m/PUy00qGtZ4j2+6nwMlAa ppyqLiMOy8numS9ZZMt96fOoxZ/lR9oPptmHdlaupSryZA8KTKhU/VKMeNVQ7BXxo1F5 18aA== X-Gm-Message-State: AO0yUKVv7UtumgPRigzO4hy+dBZ1Bd0kZrLZGw93lRaBbT0gfkoeYMa8 mWP3stiKPTKCNRSprhexW384ZQ== X-Received: by 2002:a05:600c:a4c:b0:3ed:2e02:1c02 with SMTP id c12-20020a05600c0a4c00b003ed2e021c02mr5813762wmq.23.1678902225020; Wed, 15 Mar 2023 10:43:45 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id c15-20020adfef4f000000b002c55ec7f661sm5353013wrp.5.2023.03.15.10.43.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Mar 2023 10:43:44 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 6D4C51FFC8; Wed, 15 Mar 2023 17:43:43 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , =?utf-8?q?Marc-Andr=C3=A9_Lurea?= =?utf-8?q?u?= , qemu-riscv@nongnu.org, Riku Voipio , Igor Mammedov , Xiao Guangrong , Thomas Huth , Wainer dos Santos Moschetta , "Dr. David Alan Gilbert" , Alex Williamson , Hao Wu , Cleber Rosa , Daniel Henrique Barboza , Jan Kiszka , Aurelien Jarno , qemu-arm@nongnu.org, Marcelo Tosatti , Eduardo Habkost , Alexandre Iooss , Gerd Hoffmann , Palmer Dabbelt , Ilya Leoshkevich , qemu-ppc@nongnu.org, Juan Quintela , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Darren Kenny , kvm@vger.kernel.org, Marcel Apfelbaum , Peter Maydell , Richard Henderson , Stafford Horne , Weiwei Li , Sunil V L , Stefan Hajnoczi , Thomas Huth , Vijai Kumar K , Liu Zhiwei , David Gibson , Song Gao , Paolo Bonzini , "Michael S. Tsirkin" , Niek Linnenbank , Greg Kurz , Laurent Vivier , Qiuhao Li , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Xiaojuan Yang , Mahmoud Mandour , Alexander Bulekov , Jiaxun Yang , qemu-block@nongnu.org, Yanan Wang , David Woodhouse , qemu-s390x@nongnu.org, Strahinja Jankovic , Bandan Das , Alistair Francis , Aleksandar Rikalo , Tyrone Ting , Kevin Wolf , David Hildenbrand , Beraldo Leal , Beniamino Galvani , Paul Durrant , Bin Meng , Sunil Muthuswamy , Hanna Reitz , Peter Xu , =?utf-8?q?Al?= =?utf-8?q?ex_Benn=C3=A9e?= Subject: [PATCH v2 16/32] include/qemu: Split out plugin-event.h Date: Wed, 15 Mar 2023 17:43:15 +0000 Message-Id: <20230315174331.2959-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230315174331.2959-1-alex.bennee@linaro.org> References: <20230315174331.2959-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson The usage in hw/core/cpu.h only requires QEMU_PLUGIN_EV_MAX. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230310195252.210956-7-richard.henderson@linaro.org> Signed-off-by: Alex Bennée --- include/hw/core/cpu.h | 2 +- include/qemu/plugin-event.h | 26 ++++++++++++++++++++++++++ include/qemu/plugin.h | 17 +---------------- 3 files changed, 28 insertions(+), 17 deletions(-) create mode 100644 include/qemu/plugin-event.h diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 75689bff02..821e937020 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -30,7 +30,7 @@ #include "qemu/rcu_queue.h" #include "qemu/queue.h" #include "qemu/thread.h" -#include "qemu/plugin.h" +#include "qemu/plugin-event.h" #include "qom/object.h" typedef int (*WriteCoreDumpFunction)(const void *buf, size_t size, diff --git a/include/qemu/plugin-event.h b/include/qemu/plugin-event.h new file mode 100644 index 0000000000..7056d8427b --- /dev/null +++ b/include/qemu/plugin-event.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2017, Emilio G. Cota + * + * License: GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ +#ifndef QEMU_PLUGIN_EVENT_H +#define QEMU_PLUGIN_EVENT_H + +/* + * Events that plugins can subscribe to. + */ +enum qemu_plugin_event { + QEMU_PLUGIN_EV_VCPU_INIT, + QEMU_PLUGIN_EV_VCPU_EXIT, + QEMU_PLUGIN_EV_VCPU_TB_TRANS, + QEMU_PLUGIN_EV_VCPU_IDLE, + QEMU_PLUGIN_EV_VCPU_RESUME, + QEMU_PLUGIN_EV_VCPU_SYSCALL, + QEMU_PLUGIN_EV_VCPU_SYSCALL_RET, + QEMU_PLUGIN_EV_FLUSH, + QEMU_PLUGIN_EV_ATEXIT, + QEMU_PLUGIN_EV_MAX, /* total number of plugin events we support */ +}; + +#endif /* QEMU_PLUGIN_EVENT_H */ diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index e0ebedef84..6bf4bce188 100644 --- a/include/qemu/plugin.h +++ b/include/qemu/plugin.h @@ -12,24 +12,9 @@ #include "qemu/error-report.h" #include "qemu/queue.h" #include "qemu/option.h" +#include "qemu/plugin-event.h" #include "exec/memopidx.h" -/* - * Events that plugins can subscribe to. - */ -enum qemu_plugin_event { - QEMU_PLUGIN_EV_VCPU_INIT, - QEMU_PLUGIN_EV_VCPU_EXIT, - QEMU_PLUGIN_EV_VCPU_TB_TRANS, - QEMU_PLUGIN_EV_VCPU_IDLE, - QEMU_PLUGIN_EV_VCPU_RESUME, - QEMU_PLUGIN_EV_VCPU_SYSCALL, - QEMU_PLUGIN_EV_VCPU_SYSCALL_RET, - QEMU_PLUGIN_EV_FLUSH, - QEMU_PLUGIN_EV_ATEXIT, - QEMU_PLUGIN_EV_MAX, /* total number of plugin events we support */ -}; - /* * Option parsing/processing. * Note that we can load an arbitrary number of plugins.