From patchwork Tue Feb 25 11:08:34 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: 868107 Delivered-To: patch@linaro.org Received: by 2002:a5d:5f56:0:b0:38f:210b:807b with SMTP id cm22csp236501wrb; Tue, 25 Feb 2025 03:11:15 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWqopTid3bICHL0kbEBr//rZ8eAJY/EHrTx/QYl/kYf4lOMNzrad3rEiqmRCdgZjkTAc8r3mg==@linaro.org X-Google-Smtp-Source: AGHT+IGRM3Nm/39I5lWG8S6VEJqktm6t91kgbSxHXV+d07sXH1oSO+XoFvtshj8kNViWppYvV+7j X-Received: by 2002:a05:620a:4723:b0:7c0:a843:6aed with SMTP id af79cd13be357-7c23be027c4mr354130985a.1.1740481875732; Tue, 25 Feb 2025 03:11:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740481875; cv=none; d=google.com; s=arc-20240605; b=Kg5tpVVozWfW1H82yZ3ycztw7RfOPAC3IXK2LevlU1458xkMs9zlampUsuwD/pKbtu qgHnU+wv0xrtz+GQWtt6ZfMPJCgj+3buiunaeZ1VTkthDWjxEjsHCybIuVguciZ0Rf9x SMCjs1Rb3bV6SuGbxxtOjm6SvSUjLxXRl0uyaT8XKyGFMU1WMyswbxkmUtglWuus5G/9 Zl887YadTVL56AOYwLAoG1ASpSq/+BZHxSKdDSAGuLiRF6FfXhXJYNwfsVMgg5S+Pjeh +hc9vfbRGaOK3RUEDiQ0LBH3UsHrOhGGwdnmmcfW4XDgumc7Nj3XW6RV+Jb7f5BC2I9Y kQ/w== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=QyNSTbsw1Rli9CIOsEEi/zV15lgdGHhsG9D/tniJcAU=; fh=Q4tFm0UZic7z2PuSm1lLqGQEamluTZIqa0ys1JCNIys=; b=GDE9DrVDbvr6rgEskYBcMK7ZxaBkOXC4qXT7PVUQF8YQf/SG68JJTEkz5thptmoyKU 2xRsHI5yikwETsadtyCS3PH+A4CV+ZD/nBODJquD1ThRchxVVgqZ50oe4WjAW6XJz/e5 fvopiLsiRpF3WhedihAjT4NMVZmiCWZnG8N1qNwHssDuBJmzqKe3W91VK3C6mfhM/AXc ZgWPQ/6jEzYDGxywREvNzZ2EVXXahWVNfpsAD9MinNdI4eQmuQ0UPbZzu+MLi0nWrY0w LpIW5LgHJB4CEyohb3CcdkKcMn/n55oab0uRYNKqCz5l28MP/ZtlECvMt7gO5VFu+h6R oh1w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nSIozgvj; 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-7c23c2361c8si150300985a.86.2025.02.25.03.11.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2025 03:11:15 -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=nSIozgvj; 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-0001bt-JW; 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 1tmso1-0001Xv-1c 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 1tmsnx-0007ko-Oa for qemu-devel@nongnu.org; Tue, 25 Feb 2025 06:08:51 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-43984e9cc90so37501795e9.1 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:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=QyNSTbsw1Rli9CIOsEEi/zV15lgdGHhsG9D/tniJcAU=; b=nSIozgvjSUGBZv2r6pGBqGgmV/Was7FlFIHkh5O3NUc+9D1MKBkUOli9O75PyL9tMy x4H7knHMfPwTQkZs2XZFycC+v0tNgGYLsM4G/WfSSFkClAjacpx/0b4JrF+WTBHObsEp LnnEcCQmBCVy/WE3jRgZ65YzvpwgUyjHoYzDraVe+YcDIKqXaeelhpeblsoBMjjpUOCV dJV2uwGqq+7T2e9XOjMWSzcJ2jRnLC/upemE12hOYVn4r90G5zKHti+LBkKOyRUXZ5II wD9ZFS+oEEAzoajzGU6zVBccoBXW9V709BvxfyXZ0kP+FJraJZ9WWDNRBw+EXUnuPZWr RVDw== 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:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=QyNSTbsw1Rli9CIOsEEi/zV15lgdGHhsG9D/tniJcAU=; b=vJuPZojIHko0MVsQMqa7eD2+bYuuBQtACeujswnNHkxzHzsHIf0H421KNjDkkADsgu 24uCyD3PWtEeMKHajW1PLqHgAr3vK/mtSGaWKf8ijS09gSIkQPMvqNMyLMD4N6lM/Oz+ /Mrts64zGoYrAkPPGepxMOmuotH62Q5rBcYUlpp15/YJ3lbF7Kn3T1dwb0I4po0s+i3x LG8IM+fVQpvhnhTPNdm9o2UcomW3pFClX1cKaEtEH6EHtb+FDN4JzbAdsOIPU/W/mz/C twZM7qniKiaIcVysoII2wBCfc+nqAVPYBNzScyoOeqF5dlpyyweWdTQTULbwITaTmNDp L3Fw== X-Gm-Message-State: AOJu0Yxvt9hkhcYud1BJOmCu3VpgWHBuTEgXef8VYIE1vM+QzRWjLbrJ e/ah33bkHt2wAAX4MU+qI270Jia0OdFDgsKru84vx38S7HifKNR/iVToJQ+EHEw= X-Gm-Gg: ASbGncvE9iPTeeAo9x0cSyh+uOGD3u4j+KFi8cJkRfghfcDmBQifdRm3yFP9sB6RHnD aoyTuxd7Lsq4Kfxm+7zhteo+U0DJHtIc3Z/jNydyQgMwSPQZJUd75oBJ9zPSY7TUGqy6ONlSUDh ZSIj/f7hMsKaGMBQwEdNsVfS8u0s1P56pGxTRBviR9rHuuHqoU1ce8oviF1FjqGBzPmiApVlH9A UMjab1WvhZmGIl2R/EFf0rNQdeuo7LT6V0DYSKj61xBnKbfq5kRLyF/aJzxIRy0uvQ8+PhzVIl7 3R0Yn+mUzcQoi/i+K2MewOblXYOI X-Received: by 2002:a05:600c:4e8d:b0:439:892c:dfd0 with SMTP id 5b1f17b1804b1-439a30e91femr179562495e9.14.1740481727925; Tue, 25 Feb 2025 03:08:47 -0800 (PST) Received: from draig.lan ([185.126.160.109]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-439b01346d1sm138824145e9.0.2025.02.25.03.08.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2025 03:08:46 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 2C39C5F7DC; 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 00/10] plugins: reduce total number of build objects Date: Tue, 25 Feb 2025 11:08:34 +0000 Message-Id: <20250225110844.3296991-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 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 As we move towards a more modular build this series converts both loader and api to build once objects. For both objects the only real difference is between user mode and system emulation so those bits have been hived off into those source sets. The remaining core plugin is more intimately aligned with the TCG backend so requires definitions like TCG_TARGET_LONG. Hopefully this can been cleaned up once Richards TCG rationalisation code is added. Please review. Alex. Alex Bennée (10): plugins/api: use tcg_ctx to get TARGET_PAGE_MASK plugins/loader: populate target_name with target_name() include/qemu: plugin-memory.h doesn't need cpu-defs.h plugins/api: clean-up the includes plugins/plugin.h: include queue.h plugins/loader: compile loader only once plugins/api: split out binary path/start/end/entry code plugins/api: split out the vaddr/hwaddr helpers plugins/api: split out time control helpers plugins/api: build only once include/qemu/plugin-memory.h | 1 - plugins/plugin.h | 7 ++ linux-user/plugin-api.c | 43 +++++++++ plugins/api-system.c | 131 +++++++++++++++++++++++++++ plugins/api-user.c | 57 ++++++++++++ plugins/api.c | 170 +---------------------------------- plugins/loader.c | 15 +--- plugins/system.c | 24 +++++ plugins/user.c | 19 ++++ linux-user/meson.build | 1 + plugins/meson.build | 8 +- 11 files changed, 292 insertions(+), 184 deletions(-) create mode 100644 linux-user/plugin-api.c create mode 100644 plugins/api-system.c create mode 100644 plugins/api-user.c create mode 100644 plugins/system.c create mode 100644 plugins/user.c Reviewed-by: Pierrick Bouvier