From patchwork Tue Feb 25 11:08:35 2025 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: 868104 Delivered-To: patch@linaro.org Received: by 2002:a5d:5f56:0:b0:38f:210b:807b with SMTP id cm22csp236294wrb; Tue, 25 Feb 2025 03:10:49 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUwKmKP+aO2EFKN7J5bHJ/TfVf89SUkcPzMvPE5CUv97N0e4Ssz3wgtnZcbsbevTWMZXSq4zg==@linaro.org X-Google-Smtp-Source: AGHT+IEDixo9/2COgnQZLLNdGFJIRBq/2zDm+JdeC1Xha6c9WzOm7RcD/uM5BcBMvYM3rJsf+ArZ X-Received: by 2002:a05:620a:170d:b0:7c0:9f3d:7176 with SMTP id af79cd13be357-7c23c039965mr486812185a.40.1740481848999; Tue, 25 Feb 2025 03:10:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740481848; cv=none; d=google.com; s=arc-20240605; b=Mba4OvaBy6PUhP3Ssihpt+v79aBZE1iqyukTxm0QBQ5o9XUJ6r54nI0aOnNf8tYrb0 zwT938CLO/0FH9moRavjflYx6T/yksjudZOkiUmpnqN0v53lXk/X/RO7AW+NYjFzcsC4 tDXqpwqfNv9WZJ4X2P58D5qBrYsGc6ZWUYcrI0gF1OvZIYueV0lBOJ1YMnlhjCKy353j Rd8meRIQ+nLg+Cz7qA4I5KSVL/RY7RadjViOHMxcYUbPn1fkFtjZ/8UydaL6zfO4Vqh1 0h7Ga7j2hFDqVdngY6bysEcg2SO50kysRDV/+IiG33XcSiAWstTnLXcMcJAIdoMlsQNH UX3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=cXGP6wzkZErmn2F04TQmNlmyR3CeFAZYW4eH79gDg7o=; fh=Q4tFm0UZic7z2PuSm1lLqGQEamluTZIqa0ys1JCNIys=; b=OYVCCivFtSKsuL6xsDc+YFsGxp3YH9y2IekP564Qw+jv+mYHkYib9Ad1W/vAzqh7TY EqfQ5gG7zV8l2SxTNqCQ2iatWACxYGBKGoLFsSepgGNrCy1lfYLe8QtEILOftZWrUX2Z ud1/OJIRpkofdpW+l61RcQ2NBwP9MumXZTNOccyt59ot5/aZ0FYu+WMM2jiRZ/c3AhH8 uFZ/pvzcsncY+b9QmOIfaFVCqI/ybBle7Sq1FRSSaEjJ05DdaHM/xPlXcOLVVWXJpLzU xTP+82SHYXcJiAqrMr0rHORiO9ohiO+atMb/Oh7C7Bk6mKxyvQpZ2occLMhAoY0eUkb+ +/kg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YuWHG7bv; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c23c2e2516si150899485a.488.2025.02.25.03.10.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2025 03:10:48 -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=YuWHG7bv; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tmsoU-0001fV-G2; Tue, 25 Feb 2025 06:09:22 -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 1tmsnx-0001XY-Ae for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:50 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tmsnv-0007kI-OZ for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:49 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-4399deda38cso33192155e9.1 for ; Tue, 25 Feb 2025 03:08:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740481725; x=1741086525; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cXGP6wzkZErmn2F04TQmNlmyR3CeFAZYW4eH79gDg7o=; b=YuWHG7bvBaWPqP7QT3rkvU/Zv6mmG8v5HygVj3dPKRlKn05E/yUZECzsIzhTbfeGhz WAMykDpiYRK15O11cQkhXgaW2lOIcmWsIccXFp9lswMJ5hPMyLjPHSh1SYQbQRl73Z0H yPmTDEcZ2k81oIG1rzGaq02lZ0DMy6OEtABDZp/K0axp/3VO16IQeeAtuOR9ZbgYgaFd zHhO47l16HU/Syzyrv0QZv8pqZ5JmH1GqKk8W28mYFgBTGA07VF1j1f8bSyviJFIa9vJ OZ99/KrmfLqBaieNTcQdenRyMtIuCTRbecoerfeV5Mwv8CmBjNzDUt1hcoXbbF7XoQKo C8Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740481725; x=1741086525; 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=cXGP6wzkZErmn2F04TQmNlmyR3CeFAZYW4eH79gDg7o=; b=doNRiU2+f7BSDVenPFDR2I6KcF2POaOZZRh+F/HB0+btHExw/xvPZ4/ZI7oBfh1Fvr 1uYIiSmGpvt1/0liZE5CULO9Mg8e0FuOA99CiKBMMbaIz8cI7W7/DvPc9dHP5EpVsz0Z H4eUzqR5j1RgCWgvUjcR55evkrTtWqG8G6SZ2wbZ+x1qkq35Fi+F4PYKJZzSIj54d5bl JmgOmSYgcCh1imCinv6BiKElvcjlk4frWz+TQNONc7Udu/RPROOaETsVlPbSNN2pB1D3 Ej4uJgJbESIVGnGEk8Zk+oToE3dqMd8dutEuyp6zlsW0tnOdITUBXjd5Iqf1evqiVN44 Q9WQ== X-Gm-Message-State: AOJu0YzhBzlgSsEX97sNWcHNpcaM6Gi7E+Txw5CynqIvYjKnEQZ4+s85 /nzvhaQSE5/zmTauRaDlZlJ+gcXNEL2YHwK0K7LnCrr9V6+s6L29FEfvynXqWE8= X-Gm-Gg: ASbGncvqfvJB/yPfgYic0JuZ4IZUKG/L6L70Xpx/ak3bkc3jG2LjwA6QoiftF9xFKpq hBRej/hzS3cxVjat7Qajj/BLoEmJsTATBqqRLr+Eo0ZOlvGpApPWjtTvrMLNCsvTvUoCduSDrVw 8mMgtA2LD0J3KrwH0E1ssb6qNgSjX7a/tx1CVQfi8tvKRNIab+O3r+MQtFtmM+n3z0raiZt553O 8jGFWnbEWFAJt8VGfcDFhmgVdg1qSZpJCavT9x53tV3OeBGDNIfTqGLq1R7xXKVw4eXi83urHQu fCvak0u4Uwth0mn68rc5RlYtQ3tP X-Received: by 2002:a05:600c:4753:b0:439:9a28:9e8d with SMTP id 5b1f17b1804b1-43ab0f313a0mr24678915e9.12.1740481725626; Tue, 25 Feb 2025 03:08:45 -0800 (PST) Received: from draig.lan ([185.126.160.109]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-439b02ce65dsm136562215e9.1.2025.02.25.03.08.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2025 03:08:44 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 41A355F9D0; Tue, 25 Feb 2025 11:08:44 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier , Pierrick Bouvier , Alexandre Iooss , Mahmoud Mandour Subject: [PATCH 01/10] plugins/api: use tcg_ctx to get TARGET_PAGE_MASK Date: Tue, 25 Feb 2025 11:08:35 +0000 Message-Id: <20250225110844.3296991-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250225110844.3296991-1-alex.bennee@linaro.org> References: <20250225110844.3296991-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 Requiring TARGET_PAGE_MASK to be defined gets in the way of building this unit once. As tcg_ctx has the value lets use it. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- plugins/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/api.c b/plugins/api.c index cf8cdf076a..10b258b08d 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -287,7 +287,7 @@ uint64_t qemu_plugin_insn_vaddr(const struct qemu_plugin_insn *insn) void *qemu_plugin_insn_haddr(const struct qemu_plugin_insn *insn) { const DisasContextBase *db = tcg_ctx->plugin_db; - vaddr page0_last = db->pc_first | ~TARGET_PAGE_MASK; + vaddr page0_last = db->pc_first | ~tcg_ctx->page_mask; if (db->fake_insn) { return NULL; From patchwork Tue Feb 25 11:08:36 2025 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: 868106 Delivered-To: patch@linaro.org Received: by 2002:a5d:5f56:0:b0:38f:210b:807b with SMTP id cm22csp236481wrb; Tue, 25 Feb 2025 03:11:14 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCURF8yAVY580l6u48R0jJ6+GwwBWIIIl7onSn/QJ5uSGR/NuxDvkU/E0R0kSI98pViuSclGQg==@linaro.org X-Google-Smtp-Source: AGHT+IGMVJyqu++t+zri48fOXPGlCHVKPQLYoFwVKwLeEn22ulcoZi7LoIRP/Q3Wh77ODMuEt9Xl X-Received: by 2002:a05:620a:29d0:b0:7c0:ac2a:ed0 with SMTP id af79cd13be357-7c23be24e42mr377044685a.30.1740481874091; Tue, 25 Feb 2025 03:11:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740481874; cv=none; d=google.com; s=arc-20240605; b=BTR1O7R/k7z4nmsWqCD3zjWeWLQOlmSzdhr9xjCTxB33TlVmSAfAq7Oc1DjY9eNn9t 97esjOvcaaLOglUpuveYbPf9VKCsBmUDo77lqzdq+dW8Me5c180bopJPBQSmMRHU1HuA qAkn3GcEyAFtUUOMLKA1qgg5cyNZYV8D1hm8iqfng9Iory85OIwzag0nzrGUlWTeW9SG pDtg/q51ey//7Rr6+bmIijdPQVbICQt0IlV3TcyfoPk406q07J4SNkGOvltbbhgCHD00 //CPYkEJtVkqZxXTLV5utAkQscPRIYAiOp6hMGQuGoCm6gGVnS16ZI1U9R2Nb3NDxtpN eWYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=BXCoC3AjlvjFHfpG46LUtIZq27ESsMFw+aj5c/6HJiY=; fh=Q4tFm0UZic7z2PuSm1lLqGQEamluTZIqa0ys1JCNIys=; b=GXO0AmxUfK/7rHUTdHt/ct+Vf/Wcvnu5D5LEozYjdZi/XADA7Bkxt+viecUxAge8Zd hNGg9JE9zB6w6JTFUfrXFrLawSMx1JM02G/Q1+sjplD+xbcgNv0tCYJjGxbCodrb9wAO mHo+BQm9c7ctesnMA6HaALInygQB+bSBz7kAAe5WLXS69tYyK8CnHP8lB/tsMlZAazSZ AyFNofpqYrvHwN93udIN6/6msDJRqjEy15YFbm5N5C5py2dxWXBwI6OpccXhXYj3RnqL Twtx27bHYZYWs8NvOiIB4tI4xlqxeeQ83d3SC6uoSBRqAPZD4us8QjHiRW59xiYPGU+F c9fQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pI2JePBO; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c23c23610csi149290485a.1.2025.02.25.03.11.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2025 03:11:14 -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=pI2JePBO; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tmsoI-0001b4-JC; Tue, 25 Feb 2025 06:09:12 -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 1tmsnx-0001XX-A0 for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:50 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tmsnv-0007kL-Pv for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:49 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-439ac3216dcso31534665e9.1 for ; Tue, 25 Feb 2025 03:08:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740481726; x=1741086526; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BXCoC3AjlvjFHfpG46LUtIZq27ESsMFw+aj5c/6HJiY=; b=pI2JePBOnvXQUHQSo5AX3g+2f0Xwe5/c6MSSC3V2XSie8bh83+XtaKs9clCZ90nhkD ubHxRGwyMW5nHOUG+8Tknv1dUxmM4sWqgRLJ2GunwBW8onmoSrCMq0MVZ8B8CZqz6uCO okVTH9mQy67ncjHKuL1sfnTdH1kuCoINWY0ZlswvUiNLa5i5REiffuGIh0HAOMmZC6TM ydz1+jD/OIxW3wjF+ku+JxRMP5QtHYw9i7NIdcshQrRoeBPFRPe/AszdnORe+DgHphf3 lO0FB0rgvR0NCjkgal6OxTHJUUNt3I8eqrwh0qvXxflSw+SYS8e0k4dzWvgeh2gdFOI4 h6Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740481726; x=1741086526; 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=BXCoC3AjlvjFHfpG46LUtIZq27ESsMFw+aj5c/6HJiY=; b=XPKNl58SoC/q0hJtaiG/1Ni0UaTQs9qnk+hBp+uwt/NIiK2QR8VgxP0q3vjakuwPvL 7dMwI8CZ6wvxWNppZn6Q2Aa3V0XMIrkL0oUKZFCt7I+T5hTEoCpA9pYLFMlWiB51ss4d vWDlXP30/j+hgncDZLItae0KDSoSWGILRnZ2mMpkj9uadjDAYTJtmMMSOHiF5FBP4YA0 39ABrRvwIsBJaFKyNfcIM/et4j6CWHopBtiabjjGh1q9Q1yL10BRtrBeGGsKmBbOPg7h z3gz7Mf01oGgohLvTod8GA4zwnpIE+mELBFEJp/S5CBMIR8bKDDdDBRZIjFr1q6NjYvY GOLg== X-Gm-Message-State: AOJu0YxHZSCo3NQXFlhyD3K7iEo22l4dC7guDbGPgQydCMB1dNHMLvSm t7ajQQFMEzfvOza4Rq0kN88zYwMYT3V6PdcqHhOXXFS+7MO6lYHMjDXiQ27vWZglfkzwcKQON2M fTJU= X-Gm-Gg: ASbGnct9j/OUp17sjRShRtg28H9fF1YToy3ww0kQBDWE0kTiRQxywWfD5XlXzQ8GSoP KCvO2drVQ0GiWPMcdE2lUQDe9DFyGI8EvaRu453zZ9c435qCyL7AQEnKc3VHRT874jmJsvlrOSJ tjSTzE347geICq0M3Eqq+CCxY+XPxG2ObB5QnMJoULxqDEDdrFblncjSj+9BK1qby7xl4qgitIv etYgx6qgu4id+oWhydp0qAiW1s61JEmRepCdPDo+pHU6d5x49WAQHsTwKZmtoxhJZpDUI0BtrWH LMfjnbwGbnc3Zit4KAw5lmakxsiI X-Received: by 2002:a05:600c:474b:b0:439:9a40:aa19 with SMTP id 5b1f17b1804b1-43ab1823448mr19381435e9.12.1740481725960; Tue, 25 Feb 2025 03:08:45 -0800 (PST) Received: from draig.lan ([185.126.160.109]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ab1532f20sm22530435e9.8.2025.02.25.03.08.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2025 03:08:44 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 56A605F9D3; Tue, 25 Feb 2025 11:08:44 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier , Pierrick Bouvier , Alexandre Iooss , Mahmoud Mandour Subject: [PATCH 02/10] plugins/loader: populate target_name with target_name() Date: Tue, 25 Feb 2025 11:08:36 +0000 Message-Id: <20250225110844.3296991-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250225110844.3296991-1-alex.bennee@linaro.org> References: <20250225110844.3296991-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 We have a function we can call for this, lets not rely on macros that stop us building once. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- plugins/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/loader.c b/plugins/loader.c index 99686b5466..827473c8b6 100644 --- a/plugins/loader.c +++ b/plugins/loader.c @@ -297,7 +297,7 @@ int qemu_plugin_load_list(QemuPluginList *head, Error **errp) struct qemu_plugin_desc *desc, *next; g_autofree qemu_info_t *info = g_new0(qemu_info_t, 1); - info->target_name = TARGET_NAME; + info->target_name = target_name(); info->version.min = QEMU_PLUGIN_MIN_VERSION; info->version.cur = QEMU_PLUGIN_VERSION; #ifndef CONFIG_USER_ONLY From patchwork Tue Feb 25 11:08:37 2025 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: 868101 Delivered-To: patch@linaro.org Received: by 2002:a5d:5f56:0:b0:38f:210b:807b with SMTP id cm22csp235819wrb; Tue, 25 Feb 2025 03:09:47 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCW9hbGwrUi6rRg6A3NW+insEh5eMGHRTGFr0ZTkOJ+IjqMX9PA0dmoCQds+Nh0DOBQ6W/5qVQ==@linaro.org X-Google-Smtp-Source: AGHT+IFwcliHy+rIW8FCffzde3HxsEJHbifv99iKWh8Jo1ogr8B4g5VGMVdDNNKMgYuemG0WU+e0 X-Received: by 2002:a05:622a:554:b0:471:d415:cd75 with SMTP id d75a77b69052e-472228e71b9mr193812261cf.25.1740481787600; Tue, 25 Feb 2025 03:09:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740481787; cv=none; d=google.com; s=arc-20240605; b=Jtqd0F7Z/N66hLM1NM8DvFW54sz9gFkvohgvEEZHnYLST58iUioFPFCPzqp1f9iw9x JnfDi8jJBoEV57XBUOY08dVeChpm8yRs5fLfhI8SEUpLbUENyHqLXYivItRVNb494T+L sAcvF4m4LqQQ3vFc/RUp5sMayNwy8NGyvMuQuFuVw24WqSuDSokg7IBKNR1iswhx194s 24Qq9sWkdupu78t3xaqtPTMBZdZEFjDepr8PhLubTk36jxeYtpYMfLdig4xXZJawMt39 QYmM3Hrgw0pRkl3mLEx+R8Ij40Kty2HwwlogQ/3CO89r9PdvoQFqmg0vACDKUQmbeO1K Ytsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=A0C07sYpNo4u7rDsFsSfzCKqSXgRvbHOGJATtnHgpac=; fh=Q4tFm0UZic7z2PuSm1lLqGQEamluTZIqa0ys1JCNIys=; b=RrmDJNfo1P8D72eH03iwSFdiIM/Au7hZi+5Lb9jUOfyKse69hg6/ryyEje6uoEdoDb TYYXC3fOg2OQAV19RPnQZak9aCnAcpmatF0NXCuXeOS2dA79GPWKotngH88Xba/EYqrs kwrRxb46TerjR77mLhqF0sl0eGPQ80n7DmxO0IWfUOCwxURLOt+fq3sG5/bXxRy8MGH6 HI8isML1/zHn5VYQtpUrhWJ9pN6iSaae9wDzK47gdaxoUWICnurV6agD8piiihFonMzr tMR4w1WClMkR7TB/Z7EHwwH/Rh9QWOR0NvIfjGfGCUXmW/Z+G0Ursf1EjEUx+XFGRkdV OpzA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="x9/V855w"; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-473780a368dsi13995781cf.474.2025.02.25.03.09.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2025 03:09: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=pass header.i=@linaro.org header.s=google header.b="x9/V855w"; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tmsoS-0001ei-Tj; Tue, 25 Feb 2025 06:09:20 -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 1tmsnz-0001Xj-5t for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:54 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tmsnw-0007kS-39 for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:50 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4394345e4d5so35821315e9.0 for ; Tue, 25 Feb 2025 03:08:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740481726; x=1741086526; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=A0C07sYpNo4u7rDsFsSfzCKqSXgRvbHOGJATtnHgpac=; b=x9/V855wRzTevpCVybfEKd0VHp/zVyPA6lZlPD5nAC1m8Bc8Ow/d84o0y6wuYLX3OS vAaHn25OR/Pqj0CamWwAbh7WEmz5hoyPJtBgKrZKA9GzuRbMrSmXVsaM/hzoYuxJVkTJ aJANXQTlhSBy9X+NDM+CxU9UISY+vBvKBDAj3ZgVm4aCqYDYAOo2pC5RTv6Qh8ioFC4k qxcMS0zEbgukYR0a7RNwa+xES7QXZWNdd1XMNHRe/8s0oOMoW1T9CxGijFS0l9/UKKza 01ZJPoCOLbZbbJEPkjU6zhABzdT2AYpb6krnYpvve5arKt0EKVNa0QvqyoFlVYRqx1Hq UDnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740481726; x=1741086526; 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=A0C07sYpNo4u7rDsFsSfzCKqSXgRvbHOGJATtnHgpac=; b=IbWft3SR/hgipQ8U3S64LEU8nQ6GvMbg2kHQDDMlA6MGCk+EoSfI6lShuuBhryseFa vd4h8XWgVvFP27MA4Pc1BKbz3J/cBl2vojHy+bj4pH82eE8W4Q++S2D5j6Tax+Ik0LXp W+WqnWeefSJehYaPI3M01je5IFPoywVApDKP63axEf/CYHncI3rujWQpwbCeMGUgCjvk P0Y3ZxY3m7bLuf1ybybbp5LyR5tDG08AyhW6qEhVz93j9HkIrxwqMcrB+PD8FADAcGbi CVNSsSsAHLbmq9Pp9wBRB68Eq31EavFiZFGP2bgA3S2+o7HVzhj8SScU0yaoB+XCpqVM MsEA== X-Gm-Message-State: AOJu0YyDyJCvaZHmJyE7+lBeu4huK0amO/BlJ2J9eUxZnKAT4yNBInaQ G3LZfBbAVp0Tr5fafqyRLsF+kDnXL1NJnKyR/m17kpu6XA/Acfm7QLmAS9gUzKQ= X-Gm-Gg: ASbGncvDSdssdEcWscDjFG2/FCWxNNmDs80UZvz1J5EcoR7ADue06rq0qwfXG2jupBY J29JFodnkcsIj05aDUBwpPEQLktr4GKJ5sFvWHuF7fD1hIqFkmtm6h6CxfgC5Vx0nR3jU87c3OS XdakG9758fR4LynYiMnqdeZ8pKoPQCC29+VBYRzHKkBYw/l3+8nDu/pupXMhqmH9joqmz+H6fRt oQI4diwg3oqNGVYwteSX6vdiIgtW0YTYN50wDZnejGfJdx3GhRiiX4P4gueeuVTcOjw+xgFkEIG es9UUXt+0ZurHutOng60mC31oUmN X-Received: by 2002:a05:600c:5106:b0:439:a25a:1686 with SMTP id 5b1f17b1804b1-439aebda0bbmr120429185e9.25.1740481726320; Tue, 25 Feb 2025 03:08:46 -0800 (PST) Received: from draig.lan ([185.126.160.109]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-439b02d60c0sm135556145e9.12.2025.02.25.03.08.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2025 03:08:45 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 6B7FE5F9D7; Tue, 25 Feb 2025 11:08:44 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier , Pierrick Bouvier , Alexandre Iooss , Mahmoud Mandour Subject: [PATCH 03/10] include/qemu: plugin-memory.h doesn't need cpu-defs.h Date: Tue, 25 Feb 2025 11:08:37 +0000 Message-Id: <20250225110844.3296991-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250225110844.3296991-1-alex.bennee@linaro.org> References: <20250225110844.3296991-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: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 hwaddr is a fixed size on all builds. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- include/qemu/plugin-memory.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/qemu/plugin-memory.h b/include/qemu/plugin-memory.h index 71c1123308..6065ec7aaf 100644 --- a/include/qemu/plugin-memory.h +++ b/include/qemu/plugin-memory.h @@ -9,7 +9,6 @@ #ifndef PLUGIN_MEMORY_H #define PLUGIN_MEMORY_H -#include "exec/cpu-defs.h" #include "exec/hwaddr.h" struct qemu_plugin_hwaddr { From patchwork Tue Feb 25 11:08:38 2025 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: 868099 Delivered-To: patch@linaro.org Received: by 2002:a5d:5f56:0:b0:38f:210b:807b with SMTP id cm22csp235763wrb; Tue, 25 Feb 2025 03:09:37 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUSbWPJk/d8nu9IlwjGY2T4Je9KD3930prxTrYscGSniPddsuYSDnCUeveq+6YWmeQVdccXzg==@linaro.org X-Google-Smtp-Source: AGHT+IE9I5MQXKDDewXKECNTIfDH78wM6G2nP8CL3t8ULrNpRTJC/SNavbClSaC6Z8LsPWFIZvIQ X-Received: by 2002:a05:620a:17a0:b0:7c0:9f12:2b8a with SMTP id af79cd13be357-7c0cf8ea5f8mr2007797385a.28.1740481777522; Tue, 25 Feb 2025 03:09:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740481777; cv=none; d=google.com; s=arc-20240605; b=FoLwLCaDriEX+IH0dnn8rVESZT7MngavKeUuxsEyBUbpRvw3jps4/yzY0FHmjKU9Of 1p6kq9nFAlPEd4hkO76V/jdAhIvXXjZnWh3UiiWO1hZR/jHDtnupqE2sh2DiNOl/HB6E F3UhJsw3W50592mp61Tds6TE7snOlw4fEtNphDgIQSq7Ywtc9xhBIpgfoSVmvGdkl+aB HDEAaXd/p7frfrzIRkSvxgvau3Rl2KqF/jZQHvSj3hHFZ8r1aXk5DZXZ62PDG4GbO426 SmsPlK+sswZNgjip7JYwhfsHQmgXA6kKeqBZ6AMGdcYMZIsybb6xwR2OoZQG/NrjLX3c DtTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=Qb1orkQ+AqcTmWd0ljpleeeoHkiMqn4rSUOQc4oEDwE=; fh=Q4tFm0UZic7z2PuSm1lLqGQEamluTZIqa0ys1JCNIys=; b=JTny+ha/Jj6Xcblm8Nv8YBWDENkFgy0CHtzDs1LnLezuUhznOGjBZgBg8KnG5AIueb e6z+qPw34xbd3M3BbVsx72uIFV+LgqCC5fAj+g22P1B1kx+e6AAGX/6O21HpdwPGWHkl 6IAauAY8TuZlYOthUhPkkmRU/P8Yp5hOVBgi+fVp6N784dCx77Q/YKEe6QJ7+PLIU7bB WzVW7NbO8BGlxUiNca8VSORhG6t3NdMCCdpe7P9sZ89WXhQeq7LM+zArkYpiiphAhYwQ eFmt3OE+ufEOL9ZUbOGEUBW05j97DXDfFECnKhvVTQANCP66Y3aShf10vt6ygslLzTzQ sIlQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lnB3x4lj; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e87b11ae7asi13979836d6.411.2025.02.25.03.09.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2025 03:09:37 -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=lnB3x4lj; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tmsoP-0001dT-Vh; Tue, 25 Feb 2025 06:09:18 -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 1tmsnz-0001Xi-5R for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:54 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tmsnx-0007kk-CC for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:50 -0500 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-38a8b17d7a7so3045585f8f.2 for ; Tue, 25 Feb 2025 03:08:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740481727; x=1741086527; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Qb1orkQ+AqcTmWd0ljpleeeoHkiMqn4rSUOQc4oEDwE=; b=lnB3x4ljrfWTdtZzi8b0foad1PWvext1RnqxIKCMEU3G5Ah4P6FTmNhVaPrvGio16C qwh9ZIa2140bqwOWPi7cXEjusDw/j4/yEkYQskct/1bFEdBhKVilpFo2mTRomCRCjtQb HaWGiDoWxd5r/lTOaUYG1c3S1a9gDGn7/PV9pE2HiDifKJYiuK0XBLRgwRqugc1ibjhq pB/csvEBWUJHZF4bLvAyNKxthtz5fPlC6aKpe+/mV1COLmPQrU9DTTZ6WLPwNyJK36uK F3IRea11/icgfvnoFAgxOWvSJOl+N5uBICRVfgb5Nk71/UgCc5xo2mO4/F/psRholNKd Ej1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740481727; x=1741086527; 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=Qb1orkQ+AqcTmWd0ljpleeeoHkiMqn4rSUOQc4oEDwE=; b=qhiwQZlc8OPNj/YOe/GrKO63IV4VxdR7SqkxQQpvZ6Bk9SysbNvDsreTivkRqkOuNw 2+IOSHuTaACs7XZIrUa/CbkGjpmqa5TG9wttR1uSMJCwrjfp2cCdWNuqKfIYGztfr0lj 7wFrWb+n/rNlth1vhFuDrsqGOSzqcXdMNqSCnd8Ap2+iCTfp816EPsDgHbGGTSjZNCLF Fd18t3Ond4S/T6F75LBz5HzRfVZEsoK7pxiWg59G+80gvjKoWko4KfEm0JoMhwMr/bOQ +l1cHJeHGotqJZBPAvuLnqZPeDjkgWSZV8KhnEVR8v0+ZqjmEvmHvrk4ssveOf7u1/yL msfw== X-Gm-Message-State: AOJu0Yyj49kHhSrvdpxY1PCzIJal2g8DlZqgAPHJkpgGePVg3SrC4gVE A1sqFEiTRgaOrFS45J9feRz2NY1i2+/04BuOwmhf0s2PEV/dtdPERbxAH3Fs8GA= X-Gm-Gg: ASbGncsvJFW4kwAL9G0kZOe4lvKqHDWF1lsN/eXD+TCNeduCEcfWuiPkITV341ompgm Lw3L7IcNHWQWtM7AZzVj9Yi1ULiG7GwSoGDYFItV2jIrd7MVZiC6Dw7hZqDalzcqlS8iAugtxBf jWrvkCYANL1mkEUKBkey0YOEGJrLcA1C42co2lAKyqwVqH5uE5M5lQfxiseIBMkqRhEbVzU/SDt N+d2/t5hZupwx7Rbs6/TOrqDsttj4h3NaI2d/3SDE/Ppsj+JgO7lqIUXxmYngBjCMAh4N4xCZ2i gi9ZFhAPu6//4MK/FLzz22jsyQt2 X-Received: by 2002:a05:6000:2c3:b0:38f:4251:597b with SMTP id ffacd0b85a97d-38f6e754752mr14287017f8f.8.1740481727545; Tue, 25 Feb 2025 03:08:47 -0800 (PST) Received: from draig.lan ([185.126.160.109]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-390cd8fcca2sm1898230f8f.96.2025.02.25.03.08.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2025 03:08:45 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 83BFA5FA34; Tue, 25 Feb 2025 11:08:44 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier , Pierrick Bouvier , Alexandre Iooss , Mahmoud Mandour Subject: [PATCH 04/10] plugins/api: clean-up the includes Date: Tue, 25 Feb 2025 11:08:38 +0000 Message-Id: <20250225110844.3296991-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250225110844.3296991-1-alex.bennee@linaro.org> References: <20250225110844.3296991-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x436.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 Thanks to re-factoring and clean-up work (especially to exec-all) we no longer need such broad headers for the api. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- plugins/api.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/api.c b/plugins/api.c index 10b258b08d..3e1aac7bfb 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -39,9 +39,7 @@ #include "qemu/main-loop.h" #include "qemu/plugin.h" #include "qemu/log.h" -#include "qemu/timer.h" #include "tcg/tcg.h" -#include "exec/exec-all.h" #include "exec/gdbstub.h" #include "exec/translation-block.h" #include "exec/translator.h" @@ -50,7 +48,6 @@ #ifndef CONFIG_USER_ONLY #include "qapi/error.h" #include "migration/blocker.h" -#include "exec/ram_addr.h" #include "qemu/plugin-memory.h" #include "hw/boards.h" #else From patchwork Tue Feb 25 11:08:39 2025 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: 868102 Delivered-To: patch@linaro.org Received: by 2002:a5d:5f56:0:b0:38f:210b:807b with SMTP id cm22csp235848wrb; Tue, 25 Feb 2025 03:09:53 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXggSFIytCKD9AEORVlCeaiuAVwflrXKtHTZs4ovg82XWYEFEaVmnvG8itENrnIPFKZK0jcow==@linaro.org X-Google-Smtp-Source: AGHT+IHbrhffoKFMyO3MXbJpRO4AQf1IJ7cr7pQj0UPIL28sCKZ16SoVIs30N+vjnzMS7XESBfJ6 X-Received: by 2002:a05:620a:19a2:b0:7c0:ab10:113c with SMTP id af79cd13be357-7c0cf96d2c9mr2723351685a.48.1740481793368; Tue, 25 Feb 2025 03:09:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740481793; cv=none; d=google.com; s=arc-20240605; b=d46cwoduVq8f7czdTUK0upk8Gc0c6fJ8qj+2gL4bDFy39fBB3xeTa7+d2mFKeM7ahy XLHgkgsPen5j6S3jUBFlXJFgyGZQyRgCHgQbjtnYqP1UBUWKxbbHJvOn/7AYThfHrudU JAIGFZsX6OwULn8oD4YwivwfP1lbn9ydOIWJYZo9fikyAJHr9R4PONwdKGJn6b9iRJaD Pcj67BjaDYoZYH4B1uz8HEqc7eVcpWb54CoiNYONC37w3btLYA+GHdUKHE7AqG769Pmv OA7300pauXoa/r7KRJZfis+RjJ4tQCE2F7vRuZrp5SHt7aSP/SF/lw16LW2mY74n4obq AKbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=yzfASlzKsKSjymD2hL0UWygARz8YSW230udVTrSf3Pg=; fh=Q4tFm0UZic7z2PuSm1lLqGQEamluTZIqa0ys1JCNIys=; b=M1UZPwE0D5U1rR55zkKHq8BkSRjPuvPecGq80coMG13vSABLBPJdJgI7iNn9wcJ4Fd ogPCC7vwTy7t8cgKiKqPMNwgMXXpJwA1phPGLw9JiA9nADCF+I3Lli4X+mwwqGuY2EF6 RpQuqZ82Wh7KcV4ZL5p8x+q3h79D9/qtsUGioHsJjr0VxN9Yn8BnPA/3T/O1poUp84u2 DKnTUUju1ShwVBVezslFzxjcEtyBIzoZ+34oaCpOZ6zFyXWSuaK0i0XGvv4FC3h+gD5C eqyl6iV665Tk5VROqkwZ4Uj5QwvE6gtG9x2G9OJUWiB6ydCZKOrPzcR14fcXBFVz4rJZ oJ4w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ATxf8MhE; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c23c2d96e4si147168785a.414.2025.02.25.03.09.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2025 03:09: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=pass header.i=@linaro.org header.s=google header.b=ATxf8MhE; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tmsoP-0001dU-Vh; Tue, 25 Feb 2025 06:09:18 -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 1tmso1-0001Xw-2J for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:54 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tmsny-0007kr-UM for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:52 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-439a1e8ba83so51574225e9.3 for ; Tue, 25 Feb 2025 03:08:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740481728; x=1741086528; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yzfASlzKsKSjymD2hL0UWygARz8YSW230udVTrSf3Pg=; b=ATxf8MhEWcxPrIjwLXa9t9NFhkK0b1IhDM4l7Uq3mMlRmPbOfK8ITZEQ09v5tbizZG 1w+7XMcRdFN9CUcDEYE5ahH+jwA8RuRSAMpS8VojnGVIiBzYdK3pk8t1mruGsHhPcU4X oj/WpPcCWGQRIWKh22pPqlQy4kiOlhxPgr37JNiDbec8ccOukiJLtshYsMBIwDxTD93C 6poHgCXQJVwPFGAVJH/55AdxLn3QAgemYwpFNXtUQZnfxZCdQtez31tV5H2v2SLCOTjF pBR8eS/842In3DTQIz2mqaVQKXTNKrVPOQpjo19P93nzLqwJAKBCfTHLe7aasVC5KBMe H9wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740481728; x=1741086528; 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=yzfASlzKsKSjymD2hL0UWygARz8YSW230udVTrSf3Pg=; b=lS5CnyvpscHU805dF7183+n5Yz8jaYyOpV36MDRfs8q81+LoSpRoUP+nK+DqL6OZRq qysjSAvyfi3rj71FNbSANqbLfP4lSdOLofnR+bWG4imomzrGFBctvfhB8eDTBaWizEWz jXBFBamS7EjOGksb3p9hVs+cS98JV1r86ud9UJNbJX5KVtuNUNq3VS3ZwxNoe0/2/fnD oAPoBa7+nx97t4u7de0II10ednSs2ibNi1m80mDKBBT7AMA123Rymjbo94ZESHubSLNf 1qviox07xIu6lKFnx2XVnGUDq9KkIcCfQrLaq0WAQq8cHGCq2tm94bE5N6AiGzakChhb IAaQ== X-Gm-Message-State: AOJu0YyB/mDt8GvOafQnbP06sZSMXwYtuWW9dzFDQukqCF2tNaNUVd1U cikp9RIflKMNcJiKw+XB8cvX8ZsWZX3wuME975J6/yUJKp2hk8izh9ej3buy7HQ= X-Gm-Gg: ASbGncuTSU+mvRiAKxbDOs9PXSDo3iy8UFYFnRtMF6HFeWyduvDyFOOlIyEpeHpnbp/ k94fp/dH2aRJtEGgR9TvUwDTt76BRqdPVq1sWtU1ighjNH43UGU6m6Rs7i1AyCIDcjFNxO+TuOc BfaDBuzEJ1LcfNNWga/dYjC2BCNZhnn1VHFIk4hsEMLtWpHJsEbKXD0DRhFgpkrNGK8t2SS0cu9 BUzBZsy7Hgmy3qxCcSaoVI8XjvIR6xcED7OFKqEKOepXkqQfZ1M/sFQ7+tQLT7KCPf3XsUOrAOS X39gsPU847PfMvIjLMavH5iAlua4 X-Received: by 2002:a05:600c:1d1a:b0:439:9537:e96b with SMTP id 5b1f17b1804b1-439aeb34990mr165336405e9.14.1740481728362; Tue, 25 Feb 2025 03:08:48 -0800 (PST) Received: from draig.lan ([185.126.160.109]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-439b02f3e15sm136595585e9.22.2025.02.25.03.08.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2025 03:08:47 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 9B0715FA6C; Tue, 25 Feb 2025 11:08:44 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier , Pierrick Bouvier , Alexandre Iooss , Mahmoud Mandour Subject: [PATCH 05/10] plugins/plugin.h: include queue.h Date: Tue, 25 Feb 2025 11:08:39 +0000 Message-Id: <20250225110844.3296991-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250225110844.3296991-1-alex.bennee@linaro.org> References: <20250225110844.3296991-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x330.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 Headers should bring in what they need so don't rely on getting queue.h by side effects. This will help with clean-ups in the following patches. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- plugins/plugin.h | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/plugin.h b/plugins/plugin.h index 30e2299a54..9ed20b5c41 100644 --- a/plugins/plugin.h +++ b/plugins/plugin.h @@ -13,6 +13,7 @@ #define PLUGIN_H #include +#include "qemu/queue.h" #include "qemu/qht.h" #define QEMU_PLUGIN_MIN_VERSION 2 From patchwork Tue Feb 25 11:08:40 2025 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: 868109 Delivered-To: patch@linaro.org Received: by 2002:a5d:5f56:0:b0:38f:210b:807b with SMTP id cm22csp236606wrb; Tue, 25 Feb 2025 03:11:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXm7Syhruoi9tO7h5wZjmFFQ5/4vfH6Uj6dzs1SiPej4309fOKCApP0AmE56c4nyqS3CVfh7w==@linaro.org X-Google-Smtp-Source: AGHT+IFufx2cHQDzzCHZp6pLRM4btrvPqEKyG1HX0SED05Iw3JThYhaGEQVNh3yeQ80/rK89pyK+ X-Received: by 2002:a05:620a:450d:b0:7c0:c803:4e2 with SMTP id af79cd13be357-7c23c039861mr393165385a.46.1740481889745; Tue, 25 Feb 2025 03:11:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740481889; cv=none; d=google.com; s=arc-20240605; b=FC8SqXmVr3xQqLZ82X0K6txwRcla3tI5K7aVqQX7LAg/2z/mejQjw2PHYYwQ7M+t78 k6h0Dge/XaMnnYZ4cnZrENHFt3cXoI/ZGwAmcJrKfdpb7KmwvKbLCumiiKDTWmQfys7o f56LinjSOUV8yatXe4dkYO4MPUQeSZNmJq2U/A+Wu4qYTqVV/5j89P30fWaBuUP3Bzh+ JBIP2V4rHAn6aLNrMxioCCftHtw7HYM7IQKIDQRcPWRC93lHdI7t+tuk4iKSfNNqbDHB PY7hPPTpeTZhKi9o8FYrX8FvrUxarnJSYSOLM6Mmpit0I5dw90DAOB80jE+vFvSjhQXh Ef4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=ewr0cjB6f+D/BiqNnqVJdKZmiJnBgBiJmXhO/bcFtVA=; fh=Q4tFm0UZic7z2PuSm1lLqGQEamluTZIqa0ys1JCNIys=; b=PHgCfYX3ZPVkph7DezxC6ZF4Nqk6ifrymgxu7laGFbEAummxSaxrfZurbU3ygLI273 BCvbgdj7ZWcwXbPiYu/BDZBOd6pJbciitSkwRydpck5JE0ToKfChlEr1lD9tBR15P4Tb 7xZbyNXIJB7oe1bTibBMAP3sNzIhVKeBwasa+3XZbudDUxhEaqlEOE2asIVo9eN6/nAi xhADCpAoo8j/x3ohrVmkxWydfcLEiVditr0rAk4fQPVWpiZkHiO4AOo3UMpRtz4X/oH3 zv/ddtT6e2CQHurgCbMgdKFsNKrDknThnX2ZI0jo1ZjUS74hEtWmCVajRYYgLq+c7e90 qM3A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d5ffqIw2; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e87b04433csi14564416d6.134.2025.02.25.03.11.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2025 03:11:29 -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=d5ffqIw2; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tmsoK-0001cG-DN; Tue, 25 Feb 2025 06:09:12 -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 1tmso2-0001YA-8l for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:54 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tmsnz-0007lD-93 for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:54 -0500 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-38f3ac22948so2757051f8f.0 for ; Tue, 25 Feb 2025 03:08:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740481729; x=1741086529; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ewr0cjB6f+D/BiqNnqVJdKZmiJnBgBiJmXhO/bcFtVA=; b=d5ffqIw2wxI/DuGaUPN/uyxmPUlEBZTVA7kX87upAiJ4X7kF7y62Nyul3Fp/zx37Yh X+8kFPAUcutmqjgZPjRcp1EKYhTSKOF07g7HwpgpoPMQfMOUWcV1nM3FfrWfo6V+B11M 0zMwJL09qjpV7SAGHE6bNoEzwMwifIU2vlqPBI57zmMkLpn9MqPglvRCGb1FEOd36cJe Vg9inTnzy1eaPhWCPcCq/F2G4Ukh2GPG/Qa7kajO/14xofx4laBLT74/K0u7YKZQcUVf jEVWjH8A1uWORSE1lBOxv/v+55jMtMVz1Ua3Ku7WEZ4rdCxC9rTd1DaoWT0vbj58QPoP ZLwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740481729; x=1741086529; 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=ewr0cjB6f+D/BiqNnqVJdKZmiJnBgBiJmXhO/bcFtVA=; b=Vv7vDLT6gYIPqxuf1K/495LTdWO41CD9pgxE/iayaJ7cw1IZfT4tZgV54kDIkC9+D4 5IL/ds26lZ8H1qpCCFwdyb+BxaB9ZmeYT3EFAsA/2UJgV7cj06ZLDXLyHZPbuFK7Rkw6 89adNhytd7foe+f1fDSTvjM05l91GhexVHnx6OFSycppW85Hl29iLNAZT2tL6qPniYl9 pSGJNFMaCBRvNpfij5Sybkk2JPB54jTglOu5mwdY1I/eUsEZD1ifdu+Lochk5Xs0EoXH M1LbW/4BeX3GzCThN/LlvguQjDHnh8v1nhGH1mdPusdSd41tbOfEsp+NI0a8serbmPIg Nm+w== X-Gm-Message-State: AOJu0YwhLTkCfRkdmQa52PszPpbc5humIwjPtlANxq6wMEayHoaNAMne uiEJ/ng43s7HNLnBEHKOv0Ipq895E1xkWnC6UxZF//vboha15v5A2gIJb7tKBnw= X-Gm-Gg: ASbGnctgG+gyjBfD1wu6hYKFiG7obO4tAvDPeLzVIpjdktI+1hH9VTLltG9ss8wqCYO WLWo8doE5XnI8WTiaEKJwUfV+ECUv0EWSqbaHCgpVKVBx2TuYTNjWux0E0vb9/C+geIZBOgJE57 1iUPo41ROhgvQkgL/zVKIdE3C5BtWgY895yHvV9ZkuNRp7hi1Ozpf/BAg6Atz+Kdh0xK3AcdYC4 /YCA2mQd5JTj612mxVK67a6ur80oEUWYckUzJblkMfuxvihRyd5yMw6SWUu4ZoAPUvwle44JArX Jo7CO+SUqrExpvBHIzgoRO2TjQoK X-Received: by 2002:a05:6000:1447:b0:385:ee40:2d88 with SMTP id ffacd0b85a97d-390cc5f20e0mr2418672f8f.3.1740481729559; Tue, 25 Feb 2025 03:08:49 -0800 (PST) Received: from draig.lan ([185.126.160.109]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ab2ee361dsm10521075e9.0.2025.02.25.03.08.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2025 03:08:47 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id B77735FA77; Tue, 25 Feb 2025 11:08:44 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier , Pierrick Bouvier , Alexandre Iooss , Mahmoud Mandour Subject: [PATCH 06/10] plugins/loader: compile loader only once Date: Tue, 25 Feb 2025 11:08:40 +0000 Message-Id: <20250225110844.3296991-7-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250225110844.3296991-1-alex.bennee@linaro.org> References: <20250225110844.3296991-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 There is very little in loader that is different between builds save for a tiny user/system mode difference in the plugin_info structure. Create two new files, user and system to hold mode specific helpers and move loader into common_ss. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- plugins/plugin.h | 6 ++++++ plugins/loader.c | 13 ++----------- plugins/system.c | 24 ++++++++++++++++++++++++ plugins/user.c | 19 +++++++++++++++++++ plugins/meson.build | 7 ++++++- 5 files changed, 57 insertions(+), 12 deletions(-) create mode 100644 plugins/system.c create mode 100644 plugins/user.c diff --git a/plugins/plugin.h b/plugins/plugin.h index 9ed20b5c41..6fbc443b96 100644 --- a/plugins/plugin.h +++ b/plugins/plugin.h @@ -119,4 +119,10 @@ struct qemu_plugin_scoreboard *plugin_scoreboard_new(size_t element_size); void plugin_scoreboard_free(struct qemu_plugin_scoreboard *score); +/** + * qemu_plugin_fillin_mode_info() - populate mode specific info + * info: pointer to qemu_info_t structure + */ +void qemu_plugin_fillin_mode_info(qemu_info_t *info); + #endif /* PLUGIN_H */ diff --git a/plugins/loader.c b/plugins/loader.c index 827473c8b6..7523d554f0 100644 --- a/plugins/loader.c +++ b/plugins/loader.c @@ -31,9 +31,6 @@ #include "qemu/memalign.h" #include "hw/core/cpu.h" #include "exec/tb-flush.h" -#ifndef CONFIG_USER_ONLY -#include "hw/boards.h" -#endif #include "plugin.h" @@ -300,14 +297,8 @@ int qemu_plugin_load_list(QemuPluginList *head, Error **errp) info->target_name = target_name(); info->version.min = QEMU_PLUGIN_MIN_VERSION; info->version.cur = QEMU_PLUGIN_VERSION; -#ifndef CONFIG_USER_ONLY - MachineState *ms = MACHINE(qdev_get_machine()); - info->system_emulation = true; - info->system.smp_vcpus = ms->smp.cpus; - info->system.max_vcpus = ms->smp.max_cpus; -#else - info->system_emulation = false; -#endif + + qemu_plugin_fillin_mode_info(info); QTAILQ_FOREACH_SAFE(desc, head, entry, next) { int err; diff --git a/plugins/system.c b/plugins/system.c new file mode 100644 index 0000000000..b3ecc33ba5 --- /dev/null +++ b/plugins/system.c @@ -0,0 +1,24 @@ +/* + * QEMU Plugin system-emulation helpers + * + * Helpers that are specific to system emulation. + * + * Copyright (C) 2017, Emilio G. Cota + * Copyright (C) 2019-2025, Linaro + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qemu/plugin.h" +#include "hw/boards.h" + +#include "plugin.h" + +void qemu_plugin_fillin_mode_info(qemu_info_t *info) +{ + MachineState *ms = MACHINE(qdev_get_machine()); + info->system_emulation = true; + info->system.smp_vcpus = ms->smp.cpus; + info->system.max_vcpus = ms->smp.max_cpus; +} diff --git a/plugins/user.c b/plugins/user.c new file mode 100644 index 0000000000..250d542502 --- /dev/null +++ b/plugins/user.c @@ -0,0 +1,19 @@ +/* + * QEMU Plugin user-mode helpers + * + * Helpers that are specific to user-mode. + * + * Copyright (C) 2017, Emilio G. Cota + * Copyright (C) 2019-2025, Linaro + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qemu/plugin.h" +#include "plugin.h" + +void qemu_plugin_fillin_mode_info(qemu_info_t *info) +{ + info->system_emulation = false; +} diff --git a/plugins/meson.build b/plugins/meson.build index d60be2a4d6..f7820806d3 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -57,8 +57,13 @@ if host_os == 'windows' command: dlltool_cmd ) endif + +user_ss.add(files('user.c')) +system_ss.add(files('system.c')) + +common_ss.add(files('loader.c')) + specific_ss.add(files( - 'loader.c', 'core.c', 'api.c', )) From patchwork Tue Feb 25 11:08:41 2025 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: 868108 Delivered-To: patch@linaro.org Received: by 2002:a5d:5f56:0:b0:38f:210b:807b with SMTP id cm22csp236508wrb; Tue, 25 Feb 2025 03:11:16 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXCL6t1dxU6nhXgB83ngijVarJBkQPhnn1qmwBdTGRU0niGuOgxhVFRWA32/BMnYdmkT9w7Qg==@linaro.org X-Google-Smtp-Source: AGHT+IHninKmvmULT43TmNk1zfHReGYDAICtCfc5MejzdZfg5lciZTepTMHs+b6p8FAnYnr05J5S X-Received: by 2002:a05:6214:d47:b0:6d8:846b:cd8d with SMTP id 6a1803df08f44-6e87ab9fddemr24502226d6.30.1740481876699; Tue, 25 Feb 2025 03:11:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740481876; cv=none; d=google.com; s=arc-20240605; b=HCHKpJFDL7CHlsoX2fzRyS7Ayi6rLX0GbYZRjWFNYqPoYJIguaVt6saNzJFtjbRCNt xjjZqiQkj4MC8UZ2B4nlskXlSKhgqpv4EgdXvAbDkNv56G0XAZRDGOPUjQ2YEK2S9o8k zKSurH8eqvkOVO4Wp9uMkeqxKc211E3nmipaKh9b0JD4no71XKmPTTK8a6DiQgEf9F3l kAyHkh5FNQNI7T2xTN6hq0efJWUk/yjclkZ/7omalKPbTdbpd2XMrH5dpw/buJ+lppXF B2rjFmN8k8yDxWIYxGbu2iJO86X6at2811J+WLVXKtR18INBuBM+BVk9LtnwjPcOA5Io q2rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=95zpMPBQ4vqu24tnUZPYM2mX9mrk7ldJk6RK0AKliOA=; fh=Q4tFm0UZic7z2PuSm1lLqGQEamluTZIqa0ys1JCNIys=; b=Afr60ks5i1x8CeRA6fcDqSGq3woca+4sa7qoOJBZ4N1KnghT8w7yBK5r4SNO2xEIlh gErA3xjf9OwhXPaZhLzRuY+t1I0YSlgr1/bc0PgPVXeMDW5jBpueclVlxiNg+ln2zFyZ eTHpNvoVEvQznt1bZKyMxkDzHuk6pHyWL3uBho8DIrgnIlu+LPnH7+/tqmdlX4589vCb wefjDtNrgNvm9ESl8VU6NjPlNgKxccXDyCDUqAGSBYog25H562r+vpMs/s2rAMqyoqRM 0qKeJnz/Hb0mXHkuDdxmrTlCn47c3erxLXHsggxe8RFpp82Hiwsfs4gfOO7H7Y0C/UvS q5AA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cP1D6ikR; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e87b0c3a66si14631646d6.241.2025.02.25.03.11.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2025 03:11:16 -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=cP1D6ikR; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tmsoT-0001eo-OO; Tue, 25 Feb 2025 06:09:21 -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 1tmso3-0001ZG-UI for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:56 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tmso0-0007lI-Oz for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:55 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-439a4dec9d5so52160465e9.0 for ; Tue, 25 Feb 2025 03:08:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740481730; x=1741086530; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=95zpMPBQ4vqu24tnUZPYM2mX9mrk7ldJk6RK0AKliOA=; b=cP1D6ikRg+WT2KUyEkEDS9Qx6Vse6Pqcz4rLS1W508wCoivshD+N945B3B8Kb9SOio 4ny2qbp/TaPI6rnMu4avFPqfCWavcSj9zl2BxVOPodZJ0cqbaBzKcWOD6eVW/1eEQjXd rCJ69U7bctiu56U2fQkQHvR8ms2KXJXSL32Xte1YlyikuMUJasMQmzvOMCxR/CeE1fd0 41oJEc7MnfJV9XZjNM9QL9H1FqGyrcmozfIAJcVDMrtTGU7EzHHeQadjRVYRIcDKtEeg Otvv6YcsWYq2IIVgaM0ZktZAcXK47McDKPRK6THHkDZGlMbGT2kvcmODYBGrogeYz+Ym iinQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740481730; x=1741086530; 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=95zpMPBQ4vqu24tnUZPYM2mX9mrk7ldJk6RK0AKliOA=; b=Y9aHyeZeQhDAGlLDHGiuXb3AP9clSm+rLvm9aV8mqwUuDCIYl8SJqsBLabfOeZdX3A w/327PCLI0+DJ3N5YUkArhbZVx2b9OmsZBJv/HlCPyyL3Dl/wUBbId+Dr9lKCQhWVXNH xQqIpQd6szbPd94IpXONkV9RiQNLucKFx9brUzHt5AiiS1/ZsIEZK0Rsf6HYk2OkGyYY +rnBYiVSUJ6jJPjJuhOnM0kn6jqxd4LZjqQIq7iKUe9eAjQcfbbb1N4RZY5Pt0pmz8/6 l8kShyervtZQMI91caDUbwfMTeUrz0lUTCSCwdMFZ5VcLK/kc2SKbLCBUQkunf/4K2zn 77dA== X-Gm-Message-State: AOJu0YxT83smC08M1ksKT+XIX7j1oGDbZLhocdiaN76kZjIFLlBpbO6F +MRKA64xnUFuhJBY6WEhdnLT0+MD4rnuLBD52EkEXmfyGtlxdhHHnpk01Pcwciw= X-Gm-Gg: ASbGncvXzukWUW8AF8kk4hhAcKCcDawxvnPHtnlHkyqgdQNM/8BHwaKiX0W8RNX4AQv sG/z9zhu/nTeqH9fN2S/liyAwMSR3XuC60QtYXrBRFMI+0Kdh07yLXeDbmQ7LZHf2ht19xVXLIi utrv/1IsdRmJ9iMa3ZIuAU2M44nHf5/5D2G21aeuTdc92nXBEoRgnx0jpH4m8hBSvdnirJyTTDt fHEL0lZYMFSkgz92Q4AaNpFMNYj6jEAjEOG5Cmm1sbMCCk9ctMS4gzJko8MnvswDlDNYUHDfe3K JLyulibD1jePG0ZiBapOXcQxu7HN X-Received: by 2002:a05:600c:3d19:b0:43a:b186:8abc with SMTP id 5b1f17b1804b1-43ab1868ac3mr22306705e9.2.1740481729920; Tue, 25 Feb 2025 03:08:49 -0800 (PST) Received: from draig.lan ([185.126.160.109]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-390cd86cd10sm1944786f8f.37.2025.02.25.03.08.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2025 03:08:47 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id D3B015FB97; Tue, 25 Feb 2025 11:08:44 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier , Pierrick Bouvier , Alexandre Iooss , Mahmoud Mandour Subject: [PATCH 07/10] plugins/api: split out binary path/start/end/entry code Date: Tue, 25 Feb 2025 11:08:41 +0000 Message-Id: <20250225110844.3296991-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250225110844.3296991-1-alex.bennee@linaro.org> References: <20250225110844.3296991-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 To move the main api.c to a single build compilation object we need to start splitting out user and system specific code. As we need to grob around host headers we move these particular helpers into the *-user mode directories. The binary/start/end/entry helpers are all NOPs for system mode. Signed-off-by: Alex Bennée --- linux-user/plugin-api.c | 43 +++++++++++++++++++++++++++++++++++++++++ plugins/api-system.c | 39 +++++++++++++++++++++++++++++++++++++ plugins/api.c | 43 ----------------------------------------- linux-user/meson.build | 1 + plugins/meson.build | 2 +- 5 files changed, 84 insertions(+), 44 deletions(-) create mode 100644 linux-user/plugin-api.c create mode 100644 plugins/api-system.c diff --git a/linux-user/plugin-api.c b/linux-user/plugin-api.c new file mode 100644 index 0000000000..42e977c339 --- /dev/null +++ b/linux-user/plugin-api.c @@ -0,0 +1,43 @@ +/* + * QEMU Plugin API - linux-user-mode only implementations + * + * Common user-mode only APIs are in plugins/api-user. These helpers + * are only specific to linux-user. + * + * Copyright (C) 2017, Emilio G. Cota + * Copyright (C) 2019-2025, Linaro + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qemu/main-loop.h" +#include "qemu/plugin.h" +#include "qemu.h" + +/* + * Binary path, start and end locations. Host specific due to TaskState. + */ +const char *qemu_plugin_path_to_binary(void) +{ + TaskState *ts = get_task_state(current_cpu); + return g_strdup(ts->bprm->filename); +} + +uint64_t qemu_plugin_start_code(void) +{ + TaskState *ts = get_task_state(current_cpu); + return ts->info->start_code; +} + +uint64_t qemu_plugin_end_code(void) +{ + TaskState *ts = get_task_state(current_cpu); + return ts->info->end_code; +} + +uint64_t qemu_plugin_entry_code(void) +{ + TaskState *ts = get_task_state(current_cpu); + return ts->info->entry; +} diff --git a/plugins/api-system.c b/plugins/api-system.c new file mode 100644 index 0000000000..cb0dd8f730 --- /dev/null +++ b/plugins/api-system.c @@ -0,0 +1,39 @@ +/* + * QEMU Plugin API - System specific implementations + * + * This provides the APIs that have a specific system implementation + * or are only relevant to system-mode. + * + * Copyright (C) 2017, Emilio G. Cota + * Copyright (C) 2019-2025, Linaro + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qemu/main-loop.h" +#include "qemu/plugin.h" + +/* + * In system mode we cannot trace the binary being executed so the + * helpers all return NULL/0. + */ +const char *qemu_plugin_path_to_binary(void) +{ + return NULL; +} + +uint64_t qemu_plugin_start_code(void) +{ + return 0; +} + +uint64_t qemu_plugin_end_code(void) +{ + return 0; +} + +uint64_t qemu_plugin_entry_code(void) +{ + return 0; +} diff --git a/plugins/api.c b/plugins/api.c index 3e1aac7bfb..12a3b6a66d 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -470,49 +470,6 @@ bool qemu_plugin_bool_parse(const char *name, const char *value, bool *ret) return name && value && qapi_bool_parse(name, value, ret, NULL); } -/* - * Binary path, start and end locations - */ -const char *qemu_plugin_path_to_binary(void) -{ - char *path = NULL; -#ifdef CONFIG_USER_ONLY - TaskState *ts = get_task_state(current_cpu); - path = g_strdup(ts->bprm->filename); -#endif - return path; -} - -uint64_t qemu_plugin_start_code(void) -{ - uint64_t start = 0; -#ifdef CONFIG_USER_ONLY - TaskState *ts = get_task_state(current_cpu); - start = ts->info->start_code; -#endif - return start; -} - -uint64_t qemu_plugin_end_code(void) -{ - uint64_t end = 0; -#ifdef CONFIG_USER_ONLY - TaskState *ts = get_task_state(current_cpu); - end = ts->info->end_code; -#endif - return end; -} - -uint64_t qemu_plugin_entry_code(void) -{ - uint64_t entry = 0; -#ifdef CONFIG_USER_ONLY - TaskState *ts = get_task_state(current_cpu); - entry = ts->info->entry; -#endif - return entry; -} - /* * Create register handles. * diff --git a/linux-user/meson.build b/linux-user/meson.build index f75b4fe0e3..f47a213ca3 100644 --- a/linux-user/meson.build +++ b/linux-user/meson.build @@ -27,6 +27,7 @@ linux_user_ss.add(libdw) linux_user_ss.add(when: 'TARGET_HAS_BFLT', if_true: files('flatload.c')) linux_user_ss.add(when: 'TARGET_I386', if_true: files('vm86.c')) linux_user_ss.add(when: 'CONFIG_ARM_COMPATIBLE_SEMIHOSTING', if_true: files('semihost.c')) +linux_user_ss.add(when: 'CONFIG_TCG_PLUGINS', if_true: files('plugin-api.c')) syscall_nr_generators = {} diff --git a/plugins/meson.build b/plugins/meson.build index f7820806d3..9c9bc9e5bb 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -59,7 +59,7 @@ if host_os == 'windows' endif user_ss.add(files('user.c')) -system_ss.add(files('system.c')) +system_ss.add(files('system.c', 'api-system.c')) common_ss.add(files('loader.c')) From patchwork Tue Feb 25 11:08:42 2025 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: 868103 Delivered-To: patch@linaro.org Received: by 2002:a5d:5f56:0:b0:38f:210b:807b with SMTP id cm22csp236015wrb; Tue, 25 Feb 2025 03:10:13 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWBTDydRQ859+v4w1E1VL7lAqd02qbeqWzWoUJ+IvY3GJqPDnlA2N5k6oXS3EZtX5aJauOgUg==@linaro.org X-Google-Smtp-Source: AGHT+IHu7bUu8KEBC2W9pQ5TYW1vSFptGen0EkhCtfiFo9ecK0P1pIQldNBWmOOmnJGX6SX++Bqt X-Received: by 2002:a05:620a:1983:b0:7b6:67e1:b4ff with SMTP id af79cd13be357-7c0cf194c26mr2316466385a.28.1740481813587; Tue, 25 Feb 2025 03:10:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740481813; cv=none; d=google.com; s=arc-20240605; b=AOFolN1p+muYDSoMoMzyLLCsrH3WA+13K55JThzRqwaeOwTXoIJDIEjPFi4SW7KGD1 RHW+Jj6brRKwLfOaILJ5Iv2YZp3Ya6//c/X9X2UIeP7maUYAUoPt8iB9oRqB5S7ke8k2 0maxaQ0OGBimMIuAkWFLRpWWCvLzWS797Fd/Elcgaoq+OxlnK7cdnCFtEfQxmtUfGx2P 9ghXzP8Dv7rJK1Nt6ir16cvSJCjDbnF2usbDcjj2mykSkYCmXanFTA/HDQ4HBu0OhBPo 5A8ezz2GyjoLLhpONgkRybnEYYXOk52Df9d3eLt1w5cEaxetg8Ck/bNN5koV3Cptk2o2 D6Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=wOGEdNee22ihZNFYvdXhvyToWGXPcrh3omffan4xEow=; fh=Q4tFm0UZic7z2PuSm1lLqGQEamluTZIqa0ys1JCNIys=; b=QY7YMkypkJsZwsltUPD6V9qjuSF3gcaLwuujPGGjqjtkkE4MzfFi9ErVQLthMp3wkL oz9FvHBfI985v0/asLykKblR5fosdSKc3q4t5zotGWf2iABK1+5GFIbaibVTG5E89nF1 P2V/BuLnhgD0CoIViq5LpahsSXOAqwpUNdvSmutMS72XxYlgjsmG/e5cBcJSb7eDtrLQ OmCK+GjgeIQNR6mon+1UIfngW9XHPYqfY3kAV9OVtfl0bVsKlovmsuO7gm7JvFf5PLXP eo0vREf3QQbbOP6A7AW0r30MtF/4wrmoE66aY+SQOlWo8hr1Te4wGQ+dS0DDrRgheJY8 8Tug==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tVddNTMV; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e87b0c5259si14389046d6.189.2025.02.25.03.10.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2025 03:10:13 -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=tVddNTMV; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tmsoS-0001ee-AE; Tue, 25 Feb 2025 06:09:20 -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 1tmso2-0001YG-Ls for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:54 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tmso0-0007lK-Op for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:54 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-439350f1a0bso32432105e9.0 for ; Tue, 25 Feb 2025 03:08:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740481730; x=1741086530; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wOGEdNee22ihZNFYvdXhvyToWGXPcrh3omffan4xEow=; b=tVddNTMVckHB/wEVxwty7MhRbEQNkQCkI6HOF0kXWgKG1MelbdfSjE0jNlpVVzc/hM 8m7ekslgk6/Ld6gaZcVnWIMeYiRWvrmlAgTtphMzPMK4/4iBg6TL56BuSCQXOkcasmg/ 6pw1mPncQkT4Ap1xbWM14XncTEJMoOhaO+tWZDElyonXQhnrJ45kvFyNmY4dCCOoh4yE SDuJtLV+bIhYzJWD9OCZJphWOhMTtMuADArPzwOdXuzoI/pO5Ejek26G/1ZHM3rHB1Mh TEYPcuDk0DHF3QJJA0yGRzS2S87H7HIX8XwXcNpmRrT9fVeLIlRgV0/ILUgTCRpCZksz BZgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740481730; x=1741086530; 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=wOGEdNee22ihZNFYvdXhvyToWGXPcrh3omffan4xEow=; b=Wmm12/bUwTvDrdt1wVnSnfmhryj3Jh8m8EoRNXepIPkdcwNgtqRtg0Cu0SBwZ0HQ1P CrvOZO4iRXDspTgH6H6/v0yMxXIdkQlZGFvcPupQtNTunmMXu+X6PJQ5S0Zfa0MnSSBv y3CAbXTj5oUinYiShbTlEYi3YF13W0CMVHK4XkRPsFiC/hQ5O64xz7JqUQxh5M3tVNXm caaSugxvV0rAZ23KUfm7DCBnGGLP7sqMUFW8eadaPmuw+GVKZ5b82wCTFWLFo0JgE6HE 7nI+SuNAMlRqTDS5jxxGArLegGzTY+h2BRyly91I74NOrrj+KI2sHHWQc3fgQ18jdzK9 lbwA== X-Gm-Message-State: AOJu0Yx44Sz4eHDNrkt3qpQ9Zwi/YbTAVz/msQPT9dSJ871Qxwt4rzqS AZsb6TVTliRM7EAh6G5AxjrX9Zu6MPt6P1AshA3wgTX2FpScxVXe148wFUidH7Y= X-Gm-Gg: ASbGncvU/wM1r/h/L5BUuIFk3hac4QyQaf5lXt+CBAlHog6a2HClqEaAQEnwCgZWFOa 1t12JTtJueKvoIOI9d0DD7PDAZWWRiga4D8A8+9nktVmkqNB3OiFY35rXVHhMdyJhf3YUUfG8sI zHZFko7iszPJS1urNOoLAdsbnI6zXIPyLGkKvN4pMUeIUN5bk81nmnCVHzD330U1xxaDO/nuIpF t99aQkNLDMFOpJqoXrOCaWOcnEAMBo+Ed0D3cPTLPloxGbgdMQSwsGy8xjmlkDsoIalARQziwme oc4glj3VUHLGRjF/XiKYFto+Gc3b X-Received: by 2002:a05:600c:5949:b0:439:8345:17a6 with SMTP id 5b1f17b1804b1-439a30d38e9mr151142155e9.12.1740481730292; Tue, 25 Feb 2025 03:08:50 -0800 (PST) Received: from draig.lan ([185.126.160.109]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-439b02f23c2sm138795405e9.17.2025.02.25.03.08.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2025 03:08:47 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id EF0775FF26; Tue, 25 Feb 2025 11:08:44 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier , Pierrick Bouvier , Alexandre Iooss , Mahmoud Mandour Subject: [PATCH 08/10] plugins/api: split out the vaddr/hwaddr helpers Date: Tue, 25 Feb 2025 11:08:42 +0000 Message-Id: <20250225110844.3296991-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250225110844.3296991-1-alex.bennee@linaro.org> References: <20250225110844.3296991-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 These only work for system-mode and are NOPs for user-mode. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- plugins/api-system.c | 58 ++++++++++++++++++++++++++++++++++++ plugins/api-user.c | 40 +++++++++++++++++++++++++ plugins/api.c | 70 -------------------------------------------- plugins/meson.build | 2 +- 4 files changed, 99 insertions(+), 71 deletions(-) create mode 100644 plugins/api-user.c diff --git a/plugins/api-system.c b/plugins/api-system.c index cb0dd8f730..38560de342 100644 --- a/plugins/api-system.c +++ b/plugins/api-system.c @@ -12,6 +12,10 @@ #include "qemu/osdep.h" #include "qemu/main-loop.h" +#include "qapi/error.h" +#include "migration/blocker.h" +#include "hw/boards.h" +#include "qemu/plugin-memory.h" #include "qemu/plugin.h" /* @@ -37,3 +41,57 @@ uint64_t qemu_plugin_entry_code(void) { return 0; } + +/* + * Virtual Memory queries + */ + +static __thread struct qemu_plugin_hwaddr hwaddr_info; + +struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info, + uint64_t vaddr) +{ + CPUState *cpu = current_cpu; + unsigned int mmu_idx = get_mmuidx(info); + enum qemu_plugin_mem_rw rw = get_plugin_meminfo_rw(info); + hwaddr_info.is_store = (rw & QEMU_PLUGIN_MEM_W) != 0; + + assert(mmu_idx < NB_MMU_MODES); + + if (!tlb_plugin_lookup(cpu, vaddr, mmu_idx, + hwaddr_info.is_store, &hwaddr_info)) { + error_report("invalid use of qemu_plugin_get_hwaddr"); + return NULL; + } + + return &hwaddr_info; +} + +bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr) +{ + return haddr->is_io; +} + +uint64_t qemu_plugin_hwaddr_phys_addr(const struct qemu_plugin_hwaddr *haddr) +{ + if (haddr) { + return haddr->phys_addr; + } + return 0; +} + +const char *qemu_plugin_hwaddr_device_name(const struct qemu_plugin_hwaddr *h) +{ + if (h && h->is_io) { + MemoryRegion *mr = h->mr; + if (!mr->name) { + unsigned maddr = (uintptr_t)mr; + g_autofree char *temp = g_strdup_printf("anon%08x", maddr); + return g_intern_string(temp); + } else { + return g_intern_string(mr->name); + } + } else { + return g_intern_static_string("RAM"); + } +} diff --git a/plugins/api-user.c b/plugins/api-user.c new file mode 100644 index 0000000000..867b420339 --- /dev/null +++ b/plugins/api-user.c @@ -0,0 +1,40 @@ +/* + * QEMU Plugin API - user-mode only implementations + * + * This provides the APIs that have a user-mode specific + * implementations or are only relevant to user-mode. + * + * Copyright (C) 2017, Emilio G. Cota + * Copyright (C) 2019-2025, Linaro + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qemu/plugin.h" + +/* + * Virtual Memory queries - these are all NOPs for user-mode which + * only ever has visibility of virtual addresses. + */ + +struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_plugin_meminfo_t info, + uint64_t vaddr) +{ + return NULL; +} + +bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr) +{ + return false; +} + +uint64_t qemu_plugin_hwaddr_phys_addr(const struct qemu_plugin_hwaddr *haddr) +{ + return 0; +} + +const char *qemu_plugin_hwaddr_device_name(const struct qemu_plugin_hwaddr *h) +{ + return g_intern_static_string("Invalid"); +} diff --git a/plugins/api.c b/plugins/api.c index 12a3b6a66d..b04577424f 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -382,76 +382,6 @@ qemu_plugin_mem_value qemu_plugin_mem_get_value(qemu_plugin_meminfo_t info) return value; } -/* - * Virtual Memory queries - */ - -#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 = get_mmuidx(info); - enum qemu_plugin_mem_rw rw = get_plugin_meminfo_rw(info); - hwaddr_info.is_store = (rw & QEMU_PLUGIN_MEM_W) != 0; - - assert(mmu_idx < NB_MMU_MODES); - - if (!tlb_plugin_lookup(cpu, vaddr, mmu_idx, - hwaddr_info.is_store, &hwaddr_info)) { - error_report("invalid use of qemu_plugin_get_hwaddr"); - return NULL; - } - - return &hwaddr_info; -#else - return NULL; -#endif -} - -bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr) -{ -#ifdef CONFIG_SOFTMMU - return haddr->is_io; -#else - return false; -#endif -} - -uint64_t qemu_plugin_hwaddr_phys_addr(const struct qemu_plugin_hwaddr *haddr) -{ -#ifdef CONFIG_SOFTMMU - if (haddr) { - return haddr->phys_addr; - } -#endif - return 0; -} - -const char *qemu_plugin_hwaddr_device_name(const struct qemu_plugin_hwaddr *h) -{ -#ifdef CONFIG_SOFTMMU - if (h && h->is_io) { - MemoryRegion *mr = h->mr; - if (!mr->name) { - unsigned maddr = (uintptr_t)mr; - g_autofree char *temp = g_strdup_printf("anon%08x", maddr); - return g_intern_string(temp); - } else { - return g_intern_string(mr->name); - } - } else { - return g_intern_static_string("RAM"); - } -#else - return g_intern_static_string("Invalid"); -#endif -} - int qemu_plugin_num_vcpus(void) { return plugin_num_vcpus(); diff --git a/plugins/meson.build b/plugins/meson.build index 9c9bc9e5bb..942b59e904 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -58,7 +58,7 @@ if host_os == 'windows' ) endif -user_ss.add(files('user.c')) +user_ss.add(files('user.c', 'api-user.c')) system_ss.add(files('system.c', 'api-system.c')) common_ss.add(files('loader.c')) From patchwork Tue Feb 25 11:08:43 2025 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: 868105 Delivered-To: patch@linaro.org Received: by 2002:a5d:5f56:0:b0:38f:210b:807b with SMTP id cm22csp236357wrb; Tue, 25 Feb 2025 03:10:58 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU2vaDx45Dd1bogDgOokcFYyWvFJ1dv9ri59NyeQEkxdLQnaaKdBuYgF4cWL88oLxdAM3R+0A==@linaro.org X-Google-Smtp-Source: AGHT+IFhI6eywhFd96vJTA/m+azpc6S7nQ8Qyv1cEHBdPcJ270thBqOKahoOpckJTmavtiAQL+Ou X-Received: by 2002:a05:6214:48f:b0:6df:97a3:5e5a with SMTP id 6a1803df08f44-6e6ae967062mr235917516d6.28.1740481858320; Tue, 25 Feb 2025 03:10:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740481858; cv=none; d=google.com; s=arc-20240605; b=A81yYk5ICstFxn8LOFmpZEBnAfCFur5pnRITuHfbSQJgwNYY1+S3toHexitf0PEghF GBLeuJfzi1y1hv7pbsFlHFzEJQp3DOgFEo2B6C2bj0LO4XtO1BRbRTAgCpCKUf8PbtIc w5UFKeHHpe2ic0S1lo1wom9oIrcfKEeS3WS1wz0NFQSaddQDGr2zJRJO78rlLSYTwcDH YPyaqM27pYm8M/0BETaxKfgWT4Fw+9mW4ev3jvxy5OAkrKZx+XTbRprCAGsZDFaE9gGR P8aqO7rq7OS1jCHxoLuPVJ4F9q2msXOzRzs4F1dWEjS4gfEg5Z4fC8Os5CXL3D5oyLHQ Q04g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=6ziKeGk3G2q0jYp9Ya8g4Y6XfpCIgHNkybpH/GkwKVw=; fh=Q4tFm0UZic7z2PuSm1lLqGQEamluTZIqa0ys1JCNIys=; b=Cqygd2l2bw5Yfb/wjPxW4wSZQam+X6BeAe2TU2nOHEh6jeDArHkoGpYpuFKBFC36aG l3XbHLateTxLezixvihtW0PM5Tnzc5gjGdelcUpBNOlXAjz+1sVw9tIWF2EKY5dSLvDf TU9CTOG+r25AdAU7IqIBtI4XhvU70kL8bL3nUzmAlCzbqz8drPSF0H6r6ndY2LllA+Aj pRKzAYHeHxr0QIvKOb2W46n+iwJtRyxtIr/AT0OHTe4iayVW0vCAD+TK9HWmY/37c2ze tCdxeLSPrmtL9QPEvgH+br2NIq2K3il5UaNv0J3/Oh23MErbDRYvHMnlnW1NJtsd9V8d 6zoQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B1VoHVdA; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e87b044a0bsi14486136d6.122.2025.02.25.03.10.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2025 03:10:58 -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=B1VoHVdA; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tmsoT-0001eR-6w; Tue, 25 Feb 2025 06:09:21 -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 1tmso3-0001ZC-PH for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:58 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tmso1-0007lg-0Q for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:55 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4399d14334aso47596725e9.0 for ; Tue, 25 Feb 2025 03:08:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740481731; x=1741086531; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6ziKeGk3G2q0jYp9Ya8g4Y6XfpCIgHNkybpH/GkwKVw=; b=B1VoHVdAewwfOFojLzRWPPf7qEtj65m8Gdy0PinuTet4RuTgHsIZRnIYavktqDEPoC wM9okPJluDspqVzLMhIryqdcquujbUA4+wLVA0MlrSbrUNBnbBZDTBLY0cZwgNfw3Lct JQ2wVmKftCftIAL/GNqMfPqbUO/v9sasnYsdBa31InzZoWJnRRcNopfmO77Zp+mOu4jF +eE45uTE3yzMEYmAb8YrNxYljxMa7JPjVPmVR71RDtDyhPTc2A6wszM362UfsxYe3qMz nGAFCORzNepsd4ZpQafyzY1TJgiAa23FR/NpJd5Ri3lhPBDCN1iYrcz0l11s57/vVr1X hpBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740481731; x=1741086531; 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=6ziKeGk3G2q0jYp9Ya8g4Y6XfpCIgHNkybpH/GkwKVw=; b=DlVVpCSkIbUUGPHQ2mU0ZapVguwrgRBcEGzZ15oJY8dCGGPI2e72sAeQrHppHS4OhL CTnUK2m8wRSKZTMNnTpjsOfyWIcyGT52tqHoM2RMQq+XQep/kvNWLGegDHlaRW1bNYVN IITGJTg/WJ+eeas2Fnm4+dE9835ejY2DP65GMPlEaMj+gMr3t/DmpLWJC1L7507bf+Pl LPQXgdMx39xVK2IuIc0C0fctyai4BC7k42HhdzpMKNdWYI8C+que2jGasFuKdSf/jhsR dF2/wJie1MsmnLsGkvTaFrzAfAmWja/d2TLpYXzIJb3rqRvNCciMK2SdW7VO9XoqAidT dO7w== X-Gm-Message-State: AOJu0YwuhGuuEh4Kw+a+omKdPQeidUYCA2kGikHkxFQjtApgmbPKgc/P OxJOhxcidyr50/11Co10fLX55wSPiAX4rKGP3P1xGS9LNZMKrUjfeuHJN/HHyTs= X-Gm-Gg: ASbGncuyYYLA+bL6+jOAFVspkX9rE6gnyRo8wIboYmQKYwDCp5hh06ikDBpNB7VqHBH nkqQU/AWfft1OLECL0o4fgUEfk2nRzroB9XctHA5jDzXWElOF303pi+JgMzPJufHVQ3M6eD8plr wl4mmai7y69TLGq+UGmelrBITqUocSt69KoeX126+7VcRUSf84eyjLaxJDtpYQKwxeZ2wO69WRo 4LzBKRoS86ItJ+0OV6e/7Hei8ZyzAQkZRgxvfZxtqS2R9Oiboz4m3CnCT/7eB7KZtYpoboJ3Ho9 jGtEL30vfcJ0ABUyDM+XNKy6f656 X-Received: by 2002:a05:600c:19c9:b0:439:6a7b:7697 with SMTP id 5b1f17b1804b1-439ae1f349emr169043775e9.14.1740481731490; Tue, 25 Feb 2025 03:08:51 -0800 (PST) Received: from draig.lan ([185.126.160.109]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-439b02f23c2sm138795635e9.17.2025.02.25.03.08.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2025 03:08:47 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 167FD60346; Tue, 25 Feb 2025 11:08:45 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier , Pierrick Bouvier , Alexandre Iooss , Mahmoud Mandour Subject: [PATCH 09/10] plugins/api: split out time control helpers Date: Tue, 25 Feb 2025 11:08:43 +0000 Message-Id: <20250225110844.3296991-10-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250225110844.3296991-1-alex.bennee@linaro.org> References: <20250225110844.3296991-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: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 These are only usable in system mode where we control the timer. For user-mode make them NOPs. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- plugins/api-system.c | 34 ++++++++++++++++++++++++++++++++++ plugins/api-user.c | 17 +++++++++++++++++ plugins/api.c | 41 ----------------------------------------- 3 files changed, 51 insertions(+), 41 deletions(-) diff --git a/plugins/api-system.c b/plugins/api-system.c index 38560de342..cc190b167e 100644 --- a/plugins/api-system.c +++ b/plugins/api-system.c @@ -95,3 +95,37 @@ const char *qemu_plugin_hwaddr_device_name(const struct qemu_plugin_hwaddr *h) return g_intern_static_string("RAM"); } } + +/* + * Time control + */ +static bool has_control; +static Error *migration_blocker; + +const void *qemu_plugin_request_time_control(void) +{ + if (!has_control) { + has_control = true; + error_setg(&migration_blocker, + "TCG plugin time control does not support migration"); + migrate_add_blocker(&migration_blocker, NULL); + return &has_control; + } + return NULL; +} + +static void advance_virtual_time__async(CPUState *cpu, run_on_cpu_data data) +{ + int64_t new_time = data.host_ulong; + qemu_clock_advance_virtual_time(new_time); +} + +void qemu_plugin_update_ns(const void *handle, int64_t new_time) +{ + if (handle == &has_control) { + /* Need to execute out of cpu_exec, so bql can be locked. */ + async_run_on_cpu(current_cpu, + advance_virtual_time__async, + RUN_ON_CPU_HOST_ULONG(new_time)); + } +} diff --git a/plugins/api-user.c b/plugins/api-user.c index 867b420339..28704a89e8 100644 --- a/plugins/api-user.c +++ b/plugins/api-user.c @@ -12,6 +12,7 @@ #include "qemu/osdep.h" #include "qemu/plugin.h" +#include "exec/log.h" /* * Virtual Memory queries - these are all NOPs for user-mode which @@ -38,3 +39,19 @@ const char *qemu_plugin_hwaddr_device_name(const struct qemu_plugin_hwaddr *h) { return g_intern_static_string("Invalid"); } + +/* + * Time control - for user mode the only real time is wall clock time + * so realistically all you can do in user mode is slow down execution + * which doesn't require the ability to mess with the clock. + */ + +const void *qemu_plugin_request_time_control(void) +{ + return NULL; +} + +void qemu_plugin_update_ns(const void *handle, int64_t new_time) +{ + qemu_log_mask(LOG_UNIMP, "user-mode can't control time"); +} diff --git a/plugins/api.c b/plugins/api.c index b04577424f..61480d3dc1 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -525,44 +525,3 @@ uint64_t qemu_plugin_u64_sum(qemu_plugin_u64 entry) return total; } -/* - * Time control - */ -static bool has_control; -#ifdef CONFIG_SOFTMMU -static Error *migration_blocker; -#endif - -const void *qemu_plugin_request_time_control(void) -{ - if (!has_control) { - has_control = true; -#ifdef CONFIG_SOFTMMU - error_setg(&migration_blocker, - "TCG plugin time control does not support migration"); - migrate_add_blocker(&migration_blocker, NULL); -#endif - return &has_control; - } - return NULL; -} - -#ifdef CONFIG_SOFTMMU -static void advance_virtual_time__async(CPUState *cpu, run_on_cpu_data data) -{ - int64_t new_time = data.host_ulong; - qemu_clock_advance_virtual_time(new_time); -} -#endif - -void qemu_plugin_update_ns(const void *handle, int64_t new_time) -{ -#ifdef CONFIG_SOFTMMU - if (handle == &has_control) { - /* Need to execute out of cpu_exec, so bql can be locked. */ - async_run_on_cpu(current_cpu, - advance_virtual_time__async, - RUN_ON_CPU_HOST_ULONG(new_time)); - } -#endif -} From patchwork Tue Feb 25 11:08:44 2025 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: 868100 Delivered-To: patch@linaro.org Received: by 2002:a5d:5f56:0:b0:38f:210b:807b with SMTP id cm22csp235785wrb; Tue, 25 Feb 2025 03:09:41 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCV4N3Ftge7zDCK9e5kKzySFpOB8W3T0aizjEICdDyIHXfytUzyHRabG8N8JpM2a74onWqpZQw==@linaro.org X-Google-Smtp-Source: AGHT+IHX4Pgi7hpe/DffW5az1SFpdSlWMb7w+ZDreVDdX3B23ks7LozbtxJuyuCzmsQ1Vf0N9EoL X-Received: by 2002:a05:6214:230d:b0:6e6:5d62:b720 with SMTP id 6a1803df08f44-6e87abcd792mr41723226d6.42.1740481780929; Tue, 25 Feb 2025 03:09:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740481780; cv=none; d=google.com; s=arc-20240605; b=ktiEB4pCLKSMg6Z4kqcbcDeKccloEp4zV8I7XIixw/a93dfikoi52dkI+ARgDhcYW+ +mMdhUEG+OIId4Z9P3MV+7AdhkvUQ0sQwjRtuNUrOX+Bai4YD3l1+obShmNfRZNMG+Wh XLQtrABElFKWbxDBKttSFbazoecQKtMeZjKq7L+o1oM9zISprxYUh+EMuHECK09GkQ1C xTuqcCSOqwsMhmtzbSRogOV4e9CoEXlOST2E2Yd2T/j7LxGuaEyp0gJEagzJ0kID4LsT nxLq9KlxEnywrlnnfTBnDP5k7LEJznNnrYI+f0tr4IQhGtnQ7Cb0YmbadoNlEkU/KbrO mrzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=h6nrshHrtPOrifsqr2VPAodIduwL/dsvQHP+KKR3e9Q=; fh=Q4tFm0UZic7z2PuSm1lLqGQEamluTZIqa0ys1JCNIys=; b=XO646WPmuqRknoHCM44KCo+wNj3LP0aA38JaFdFBrwbVtm2zk9+JLy2PjSj1TbDKxA MINiqBzvevka8WFxKoETvS+HGsVSwIFjP1GBeU+TYfsH/xNlioeS8GPgvSVC89XPDod/ NCZ+Hjks7Bx2pqgJWD5tech4NrPAGth35/da/isYzEZrfkqJs6JnxkYzkl6C4blkxDdA DcmcILnjrxoySq0ljXljRi7QsVDe3BzaQloA54WnGUYsYqxBHzoru790mY96NalYo+p4 jT8y3Re/0ehpHgBpR2yD486ZLQWtlytZ5fV07iws+/a0y6YSJfi+lGrmR20OKecLIt9D L3Xw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qd+PHosD; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6e87b120fb1si14016336d6.450.2025.02.25.03.09.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2025 03:09:40 -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=Qd+PHosD; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tmsoE-0001aZ-FY; Tue, 25 Feb 2025 06:09:07 -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 1tmso3-0001ZD-Qe for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:56 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tmso1-0007li-Fk for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:55 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4398738217aso47551285e9.3 for ; Tue, 25 Feb 2025 03:08:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740481732; x=1741086532; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=h6nrshHrtPOrifsqr2VPAodIduwL/dsvQHP+KKR3e9Q=; b=Qd+PHosDoUPTLA0LrrOg88tAwOlRag5Gdeghxg3TJp38cYHvxdm2JjeAASA/h/+4bV eWM/8Kfg2ZLZVyvI5JieyyH0aobqgnKO8m7MlQDIXw10tlbYRBdphfSBJY6JZjmFyuKN PD9Sal/XsqIvSTrLkCxVC3XFhOeMUqIAmyHX6mEtuNhzxDBmUaUtFx1sTH/uTCYuvDO3 lbf0RJS4OWxlkeY9EDjKus3r2SpPxEEiYF18iQddVtdM2Jdpbxpo+s0OOBm+nTQvPnKg Bk7Lb87CJp3+J11GjaU/Vl0I+FtVLKI0KnQYPdQB1x2iOixlTWazOB/2P0ZSqmwq8tbs 3RbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740481732; x=1741086532; 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=h6nrshHrtPOrifsqr2VPAodIduwL/dsvQHP+KKR3e9Q=; b=N1DZafL8hcGaSqSVHfO7Bm5SWX1eWZf4uaoSWRHijPq6bl2GTKS91/6rxjgkVLy/DE bWPGgs0dvUAv8QSIIHCXT9tGOp0XNKayL0Bl4WOJAUuP61XHmazBCTFWyZ4DJFFtppn+ Eg8l1Z3W1tPt5BTLrtnHFsWlNeNJoSzmEWiGtlmGsTIZyu+Ea/MLw2AKtexZ7CBLc4w2 nZQD/LnSC0HSJKix7r2U4fulvP3E498C9xVnVznXvX7TX53rXKZ80daZcNPL53IndH4C iA//oXAS0eCt2WXls95wfziZ9DbeCo/u9mQSSU7ya3wlW77MNDOenh/3fMFndMq1PcLe e8Qw== X-Gm-Message-State: AOJu0Yw8x/DnF1CaMSnp3ki/y+6WgE5b13sPBLlBp7av/1PtNYQani4Z j0dQZabHe9+hsNc6zlcBoaELw0uGhDuVbi40IDdXZ/bKButKb447jEc7ydhg910= X-Gm-Gg: ASbGncuPZDUBtHGKO4qg38vNBkL/2ZFdEjPm2CNpg1AvE/naRt37lgrx7VCL5xfxoyt dlv6fiZeb1pdpHUrGeOOlHpReKgSVoQRlk5dRZiJncGma7mVbcvvEJMdXjOPmvm7tBe925xU6mY WJzG43hlg1YkWeNFXwreGnFd+dI5zR7eqRxcr7P7Xd7x905G2942qIMO3X/CAc6wR5aO6q0CKmk O9YfrUhMLy32sZkqpFt/Hdb2DGAAUDKvCJUV2IfQOf4JHfYwOYH2QGwAiMM65pvxdGbHbzqc7NG HHbeJNJkOs+UQS7CUEwY40YStLaT X-Received: by 2002:a05:600c:4451:b0:439:8e3d:fb58 with SMTP id 5b1f17b1804b1-439ae1e6dcemr155006875e9.11.1740481731887; Tue, 25 Feb 2025 03:08:51 -0800 (PST) Received: from draig.lan ([185.126.160.109]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-439b02f24acsm138006895e9.21.2025.02.25.03.08.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2025 03:08:47 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2E24761A5E; Tue, 25 Feb 2025 11:08:45 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Laurent Vivier , Pierrick Bouvier , Alexandre Iooss , Mahmoud Mandour Subject: [PATCH 10/10] plugins/api: build only once Date: Tue, 25 Feb 2025 11:08:44 +0000 Message-Id: <20250225110844.3296991-11-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250225110844.3296991-1-alex.bennee@linaro.org> References: <20250225110844.3296991-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 Now all the softmmu/user-mode stuff has been split out we can build this compilation unit only once. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- plugins/api.c | 11 ----------- plugins/meson.build | 3 +-- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/plugins/api.c b/plugins/api.c index 61480d3dc1..a292b5bff3 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -45,17 +45,6 @@ #include "exec/translator.h" #include "disas/disas.h" #include "plugin.h" -#ifndef CONFIG_USER_ONLY -#include "qapi/error.h" -#include "migration/blocker.h" -#include "qemu/plugin-memory.h" -#include "hw/boards.h" -#else -#include "qemu.h" -#ifdef CONFIG_LINUX -#include "loader.h" -#endif -#endif /* Uninstall and Reset handlers */ diff --git a/plugins/meson.build b/plugins/meson.build index 942b59e904..d27220d5ff 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -61,9 +61,8 @@ endif user_ss.add(files('user.c', 'api-user.c')) system_ss.add(files('system.c', 'api-system.c')) -common_ss.add(files('loader.c')) +common_ss.add(files('loader.c', 'api.c')) specific_ss.add(files( 'core.c', - 'api.c', ))