From patchwork Mon Apr 29 21:30:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 793025 Delivered-To: patch@linaro.org Received: by 2002:adf:ec83:0:b0:34d:5089:5a9e with SMTP id z3csp317506wrn; Mon, 29 Apr 2024 14:31:39 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCV/t5qhfFGheg+NU4XV8tRdX4kCuJXSxX2vXy7eMcHI1Vta2vfFuqtJhpxMxHUMIiGi05cBqznTB3//p8xEWwbk X-Google-Smtp-Source: AGHT+IG7U/DBAKo7R0KK0OkqgjmkgvxGh1IVF2sykFwx5obviCaVhrGSD4iPjdUsvqGis4yUT90Q X-Received: by 2002:a25:ac61:0:b0:de5:51d0:9a8d with SMTP id r33-20020a25ac61000000b00de551d09a8dmr846807ybd.55.1714426298890; Mon, 29 Apr 2024 14:31:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1714426298; cv=none; d=google.com; s=arc-20160816; b=rDwNMq6mBSe8yk6WrL3Si72HDkORhB3ppPQvTc2F75nWKYxXMsCwawu+sxcrfTcKWz 34mRqzA44439H5POkWJ8O1cL3EhFBwQlxDtpmZy1UAyDg4QkWHnmcyzH4WXq0XKtoQxE Fl9OGQYCtoKsLNyOg0q6SuPGxxLnX+eZPOi7EB92QOY0oVsnUxcrxuBcQyn0qylYbJPR JeUaZNqwfW77btRjBhwWJuQM6LSGb1fTUvXIlrKCW1F4kHvgSQe2sEZSefqED03k8vLq Hz/zM5o/dFhPBKzlMSJ/X2RwaGlihj9VmjmbkfT5Hy5ejHOLnoqbIC7W69Vco5XKbnXW 88eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=FEPdW/cQwaGmjJpToMWNRsEfe9Fg4JUc+PIbVk1G56M=; fh=x18VqPfk518VgFMC9Ja1xVonTaPW77ZOVIwm6X4/hj8=; b=NHXXrbC4P48SQPDwdST9pFbjKeJTmhDN91D14PHto3Hdggu2bXJMXscPWn63/d9uSC srUzte4k+ZhvRIcMeQxP+ZbVTqDWX9QDbMHUtzZGXL+n7Xz3fuQ+O4vyzs0Ooz2fo8Ae W9zTGx1fa5NmJNSFiYFv7l19IvOXwwfGfhd5Rd3ZwfYWADk1ivFoDnBWuPGJp/GDsx20 yYppGA8hGQ2SgOSptRSyXQZ/O/WZ/rRwSC6kUYdkJxj/pxanJ/UgDlyj8p0M+gQKS41X ABxW8iZ2BJzJVtCqb+frrybiTT83g58f/EKFIBXlA2hX1IQJnq5nEBcC+rCdvOBWxD73 OAWw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UiGQLlpm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id hh5-20020a05622a618500b00434eff5c9a5si26469206qtb.432.2024.04.29.14.31.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Apr 2024 14:31:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UiGQLlpm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s1YaR-00073f-UE; Mon, 29 Apr 2024 17:30:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s1YaP-00072y-EB for qemu-devel@nongnu.org; Mon, 29 Apr 2024 17:30:57 -0400 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 1s1YaN-0003GY-34 for qemu-devel@nongnu.org; Mon, 29 Apr 2024 17:30:57 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-34d7b0dac54so55489f8f.0 for ; Mon, 29 Apr 2024 14:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714426253; x=1715031053; 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=FEPdW/cQwaGmjJpToMWNRsEfe9Fg4JUc+PIbVk1G56M=; b=UiGQLlpm4iG/oWvlM8DLSbWj3+WQpXf9Uf4NAOpFnUMi8AKVNxw3RaqpgryQnuiBpN CQWmVQOhESmHWKASsomLte8RFLp1QlaGFHpv0uRUsQ8mGfGDrKaNHPnMg9IgCKWe3VEz 0x78BwPWu8chPguvtdn5LgavCqEkymC8cJ2NdrTI6C8F1Ivwnrmv/mV8O98DFXd87YM6 dRHvIhhwFsYqw53Ol3n4ge0pHxR4LPeeJGzd1bgGgGLJjOPR9hvYct9qvCOfzG+10PX7 mcTCKU1y20/qoxA/03qC7Juu2s2r16G/MYEgYoY205rAwRu/l1c6EgzTUkBxEj3kklaf Mekw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714426253; x=1715031053; 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=FEPdW/cQwaGmjJpToMWNRsEfe9Fg4JUc+PIbVk1G56M=; b=Dp/o3I3+w1RetEO8lAXuq/q6SjHr+xPdvvYkv4VV0I+VXWrLDOUMA2euFlrl7R6TTN HFJz3Rp/lEWuXAPo8qMWcwrUagmtx80iYFqG8A3U4EKgpg8QflSsOU45BP0ns5lgp+t+ M6hJUxyGUbGbv5O2gBMXVpGy2VkiLGJyRKTDg3KTj8b8Ariu4oq6xmM8GIu/N1Pgc+ue glzm8Ekw7SNADKjrA59Sd4Td+0tczcY5uVWJAHYx9lpWtMbUXPwQkvZ0d4aD+Egstcxn /Wq6zLLHx5eChbhM8IDNHOsiWiC0R0763u3OXV4aRYmk1eIWz2VKdeaDLyvTjoPxyf5q IQqA== X-Gm-Message-State: AOJu0YxQY8latI4MD9eGYZQyKMoWDEz27Ol5tg4WWzU+SCqYrjMu1f8F xS3PwfToizNTQ3qw5bqvPawXJROeHpB/k87c+6bQQgabT9TFEYc6uXIXmG+NwR1fX5gv1yTPZXd DrPU= X-Received: by 2002:a5d:526d:0:b0:34a:6fac:6dab with SMTP id l13-20020a5d526d000000b0034a6fac6dabmr547954wrc.12.1714426252869; Mon, 29 Apr 2024 14:30:52 -0700 (PDT) Received: from m1x-phil.lan (bny92-h02-176-184-44-142.dsl.sta.abo.bbox.fr. [176.184.44.142]) by smtp.gmail.com with ESMTPSA id ay24-20020a05600c1e1800b0041bf29ab003sm9106641wmb.30.2024.04.29.14.30.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Apr 2024 14:30:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Anton Johansson , Philippe =?unknown-8bit?q?Mathieu-Daud=C3=A9?= Subject: [PATCH v2 00/13] exec: Rework around CPUState user fields (part 2) Date: Mon, 29 Apr 2024 23:30:37 +0200 Message-ID: <20240429213050.55177-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Missing review: 1, 3, 4, 10 Since v1: - First 13 patches queued - Restrict qemu_plugin_vcpu_exit_hook() to (TCG) plugins - Restrict cpu_plugin_mem_cbs_enabled() to TCG (plugins) - Addressed Richard review comments on the others: - Move cpu_plugin_mem_cbs_enabled() - Do not move mem_io_pc, waiting for [*] - Mention can_do_io restricted Finish extracting TCG fields from CPUState: - Extract tcg_cpu_exit() from cpu_exit() - Introduce AccelOpsClass::exit_vcpu_thread() - cpu_exit() calls exit_vcpu_thread=tcg_cpu_exit for TCG - Forward declare TaskState and more uses of get_task_state() - Introduce TCG AccelCPUState - Move TCG specific fields from CPUState to AccelCPUState - Restrict "exec/tlb-common.h" to TCG - Restrict iommu_notifiers, icount to system emulation [*] https://lore.kernel.org/qemu-devel/20240416040609.1313605-3-richard.henderson@linaro.org/ Based-on: <20240428214915.10339-1-philmd@linaro.org> Philippe Mathieu-Daudé (13): accel/tcg: Restrict qemu_plugin_vcpu_exit_hook() to TCG plugins accel/tcg: Restrict cpu_plugin_mem_cbs_enabled() to TCG accel/tcg: Move @plugin_mem_cbs from CPUState to CPUNegativeOffsetState accel/tcg: Move @plugin_state from CPUState to TCG AccelCPUState accel/tcg: Restrict IcountDecr / can_do_io / CPUTLB to TCG accel/tcg: Move @jmp_env from CPUState to TCG AccelCPUState accel/tcg: Move @cflags_next_tb from CPUState to TCG AccelCPUState accel/tcg: Move @iommu_notifiers from CPUState to TCG AccelCPUState accel/tcg: Move @tb_jmp_cache from CPUState to TCG AccelCPUState accel/tcg: Remove NULL check in tcg_flush_jmp_cache() accel/tcg: Move @tcg_cflags from CPUState to TCG AccelCPUState accel/tcg: Restrict icount to system emulation accel/tcg: Move icount fields from CPUState to TCG AccelCPUState accel/tcg/internal-common.h | 18 ++++++++++ accel/tcg/tb-jmp-cache.h | 4 +-- accel/tcg/tcg-accel-ops.h | 1 + accel/tcg/vcpu-state.h | 20 +++++++++++ include/exec/tlb-common.h | 4 +++ include/hw/core/cpu.h | 58 ++++++++------------------------ include/qemu/plugin.h | 2 +- include/qemu/typedefs.h | 1 - accel/tcg/cpu-exec-common.c | 2 +- accel/tcg/cpu-exec.c | 51 +++++++++++++++------------- accel/tcg/cputlb.c | 2 +- accel/tcg/icount-common.c | 7 ++-- accel/tcg/plugin-gen.c | 9 +++-- accel/tcg/tb-maint.c | 6 ++-- accel/tcg/tcg-accel-ops-icount.c | 14 ++++---- accel/tcg/tcg-accel-ops.c | 2 ++ accel/tcg/translate-all.c | 9 ++--- accel/tcg/watchpoint.c | 5 +-- hw/core/cpu-common.c | 9 +++-- linux-user/main.c | 2 +- plugins/core.c | 9 ++--- system/physmem.c | 37 +++++++++++++++----- 22 files changed, 157 insertions(+), 115 deletions(-)