From patchwork Fri Mar 10 19:52:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 661646 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp1033478wrb; Fri, 10 Mar 2023 11:54:19 -0800 (PST) X-Google-Smtp-Source: AK7set/dnXuQl5UJ4LV0/F7BN515cNEXBjLAskD/f7vlAlZFs7cbqRs4rkO48YN4amIrX1Sa9OTA X-Received: by 2002:a05:622a:1113:b0:3bf:c0fb:53a2 with SMTP id e19-20020a05622a111300b003bfc0fb53a2mr15487800qty.48.1678478059466; Fri, 10 Mar 2023 11:54:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678478059; cv=none; d=google.com; s=arc-20160816; b=l3cqCSMnoaZQHIOXFKdtEAl5neUiHLqrmVonRiadj+I6EzmPQaaF6Vt52xXS3wUcEC kZQdCqQ20F88LVIbzlWXcLcqWL2NQkRT9KGd5WE1auJtaXCFFjteamugqffrUoiOwW+1 fuOSlDLEdH0HKo27yTK1P6OJdENNqCy5LhBUJdndUMtKGZ73G9hk40g7a/4+9JgzBq8I zNZgS0aQQOyIjdAIU7r7GYGY+mMDRBxJTMVREL+qRjz8pl1H0wXTIVVkErpDuDj/dmVL wqznpgl119STD4x1ILY+zkfQNtGclbpi+iS4xx5e4hVXUPv0OSQXMtElofmTPzVPDNJe sv/g== 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=T5bbx8sg/Anm+07Z29jSPoGQLySawFafuCtWNzz/H14=; b=c2MIACTsWG5tvcn5qN+fy8yjMDrSlE/NL0tQXWW7LRuuLs3C78Jfu4GD2q/v6ZiapQ u3cgcbSa78NzDDQqEoqQWYyclmZttXsKBYcG4RVoTkPZxxNggElf2LUG03RMRjRwmpxV CCfiCXbYhTMIqnhus5yKw8p/djSM3jm2Q2r4I0LHPa0Qqw+YuM/8VyMdvlsU7xO4+A/r 0SvH2CO8YrBkgAzpY02TeJT0mCyHKPQNarMVrYp5A44leX0LYfu5+VoQQT2cVADmtuDH S2CO4WPivNolezPgV3vaxyYOwuFSH+FM7S8ImCCnwsQN/Idn/SzxJzbdbCd/qO4v7cyG NQoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cWJQDoMy; 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 125-20020a370883000000b0070528bfdf68si440938qki.280.2023.03.10.11.54.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Mar 2023 11:54:19 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cWJQDoMy; 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 1painY-0001HM-59; Fri, 10 Mar 2023 14:53:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1painV-0001GJ-Rc for qemu-devel@nongnu.org; Fri, 10 Mar 2023 14:53:01 -0500 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1painU-0004fZ-5n for qemu-devel@nongnu.org; Fri, 10 Mar 2023 14:53:01 -0500 Received: by mail-pj1-x102e.google.com with SMTP id p3-20020a17090ad30300b0023a1cd5065fso6222761pju.0 for ; Fri, 10 Mar 2023 11:52:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678477979; 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=T5bbx8sg/Anm+07Z29jSPoGQLySawFafuCtWNzz/H14=; b=cWJQDoMyjUWqWTPZReKRO0DZCX2VzSlsrzFVF3CHUF3xks7vKk0ORhv+BUtxaKD5jm ttA0HA3hGTk6IoB7WqTFggagE+ApdE9I1MsL4yXHWfzFi5Obje8KIhZX2injtICv4Wr7 e4diO2jQmLcPR42jNcG16qm1DlWx/JKiWFYQ4NrkygBTgbPkZ/yXsZCw2WUs87xccitJ Sc4S8LkqZP4wgrbWvgjLj3YfBPG9K8mlyaajqdVGdKOfZAfnR3rnG00RHEUTX3agxkyl TIZxD1Il/pzh5rH0BSLGgdVAi0NZqXEie4UWWp85gXFaqBOZF4MtLRzduA1iEmOuEA9v UVAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678477979; 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=T5bbx8sg/Anm+07Z29jSPoGQLySawFafuCtWNzz/H14=; b=kaLJg1FVAWtYj4UgGnwPMQbYUUYyig1fxrbUIS9a+9OzHQTZ+HIqYojV0teCXctqnc avJcWSzDkXXomzMRswQVqh2wyX3poUGTKFlw62nzN1VGoMPcHjxvieSTc2I7GTFPY8jV BcukujywnkB/1WWE9Dj8vAhH1vOSekJIEpT2MLOyB+X8rj1ykruwztmRohHDYtzx40TI i/Iu63ehT1PRDbfR3cAdo0pNwJwOAVgcwVZaahmPI8/MoxcFdNybVyGPfUvUMZfkl883 m2NTgp6CfGmutgsgGpeaMFAu1BdvnJvQLcqu4lj3J/h/6CCMBlwFcoVGyf0+++LHi/K9 y8nQ== X-Gm-Message-State: AO0yUKXwInFvplppprYPllnwhn2ZSmtQGzEkw67YZ+3KBDjgglwqox+A LvpVMt0hunHCj1e7NkTWJ6WfxS7A18HTzjrGBgQ= X-Received: by 2002:a17:902:da90:b0:19c:e405:4446 with SMTP id j16-20020a170902da9000b0019ce4054446mr31551859plx.30.1678477978841; Fri, 10 Mar 2023 11:52:58 -0800 (PST) Received: from stoup.. ([2602:ae:154a:9f01:cc1c:ced1:1ec5:bd62]) by smtp.gmail.com with ESMTPSA id l1-20020a170903244100b001991d6c6c64sm351465pls.185.2023.03.10.11.52.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 11:52:58 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: cota@braap.org, alex.bennee@linaro.org Subject: [PATCH v2 6/7] include/qemu: Split out plugin-event.h Date: Fri, 10 Mar 2023 11:52:51 -0800 Message-Id: <20230310195252.210956-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230310195252.210956-1-richard.henderson@linaro.org> References: <20230310195252.210956-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::102e; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x102e.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.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 The usage in hw/core/cpu.h only requires QEMU_PLUGIN_EV_MAX. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- 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.