From patchwork Tue Jun 20 08:26:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 694446 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp186483wrm; Tue, 20 Jun 2023 01:28:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5KBLc8rielN/pipEuc7KbSEAZQbbUJD/1zwHXMB03h5DOJeyCBQ2j9ENh/VCTHse9h4ah/ X-Received: by 2002:a05:6214:21ac:b0:630:2a0:46d7 with SMTP id t12-20020a05621421ac00b0063002a046d7mr10991792qvc.45.1687249713555; Tue, 20 Jun 2023 01:28:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687249713; cv=none; d=google.com; s=arc-20160816; b=J3XZpB9ctNgEJi9bgxIqDis+uzYLnQcWNeyNPtzAdt8gYK3s1wSHPeK1lM/c+SdFOb EyGAqsE4SmfpLuWXob/smthGx+j2ZVxrZQq10EqukfzLbrBSJOn3R25nrrvuQ1GgAUmO G2woNPt1tlDyGKN40xz5HsXlFRXnBaZSOGWNiZ+TfMefapUdn9sBRP4m1SDZyYfW0Vmo GB5ch3bmTpPhkCV0fspW2NvhqbtipgK3n3N87IdgKHOFP2E8FEGDCPb8BDiK/QyLgCGU NWUi740kdcTbSz1UmO2AiOw06X/3bX+JXe63cCSnM7W5JrGREXB96QqtlB9L2QfJ7v3K rzvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=TSMjgdnc7KTNApiM9DYxdqyr8twYlwTyuST8ZOwwTSA=; b=kM1yNNeeXZyXumUJt0qWd6KqUJ+6EG/7YCu/7MubhJTDXOwneTjJfCCvPuqQ2p/5UW Bnnfm3ztIc2uDgaaQ8RdjVlyZvghJyd3UysgTt6jtJgw0sAszIxMw+SGJcgSug6WKffL uhiu3mPq1ZSN4Kauf+lIy9UiS0z+UxkMhBQ4ZqgP7Xq2LpGmZQryTvOE1PIj8JD8Ua7x KzKzRDz3w2n9p+Pu9Y9+AQ34hSBwD0MPozkRhkcMn1nf/BewL7iohQe52DeFgPiAVxg/ 8U9Xql7QTFvyykQoDiC/R5gkxWvkWl5jvsQPgGyTTO6mxXnLn2SdFabcA3TBNLDc6DWt uqeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kqNrTkMY; 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 j19-20020ac85c53000000b003e255536c4fsi587406qtj.333.2023.06.20.01.28.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Jun 2023 01:28:33 -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=kqNrTkMY; 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 1qBWhB-0003tP-OK; Tue, 20 Jun 2023 04:26:37 -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 1qBWh8-0003rJ-AY for qemu-devel@nongnu.org; Tue, 20 Jun 2023 04:26:34 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBWh6-0006Av-HJ for qemu-devel@nongnu.org; Tue, 20 Jun 2023 04:26:34 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-988883b0d8fso354092766b.1 for ; Tue, 20 Jun 2023 01:26:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687249591; x=1689841591; 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=TSMjgdnc7KTNApiM9DYxdqyr8twYlwTyuST8ZOwwTSA=; b=kqNrTkMYWGCxu9lWQbNNtjQLYZsVA01a3RyVYe5qnBr2W8V9I9RUUBvN/bvDjEE09/ FtVNLXoqPAje1319qm5zatzImXAHzeYeCHjnH0afdAuNQLpyryG/Cx3f8L0J/c4G7xRw PJDHHCPnC/PPTIBSfRyIb+fUH1JxLSayu/VwEpKRcuV2bJw2+AoVOhT1Lr/Cu6IOcwoQ pZT71eoZasAySymOUBpbFt/2d4NisTmVi7gNjP1Xs55PHEJd7jsLanc5KpFiSmgonPPx axZT6UjkKTsocWgGxq/GKtmASCKXaVHEYpDzAvCDcCJGiFZtJdyhfwBhDWZTjaswuwCE 7j0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687249591; x=1689841591; 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=TSMjgdnc7KTNApiM9DYxdqyr8twYlwTyuST8ZOwwTSA=; b=GLZyqS0MLAN1vyhfqYxnrY4J/SHYAPBD+xdgF3TRTdQCAq4hY1iP6qQ92aPMhRv0ry OVj8uVnKoSGwlHZwIbEet/CR/hdHFjuCBSp1XYYzCEK13INAWjRlmZnl8/gL2lymrRFE Ypd54q5Cx+vcbnyCoPCrDMla4Yqb6oJ+u0inLKthShP8rgAEeC+QOkpBLBt3lzNLzjQ4 MUStSfOnPf3kV75k84/YbmVZoJxMjc8jvwWKDFMyWD/ksxupz+1DOSb6C9DTrCXJprui 6rAVIZQW2VX250vFhIDx0GYi1iLP0E4PYhuQDrRTuynOqY4l5+EtUnso10iebBOlyXcU uR9A== X-Gm-Message-State: AC+VfDy52+f4H1IEKkyagJvn2tG/I9zVQ1VL1ZXFb0okkjmTQYVaka4d tkDgYpDSYUACuzcFrXFq0o+wpBpI0KeMLBzfodduiKxf X-Received: by 2002:a17:907:2da4:b0:988:806c:62da with SMTP id gt36-20020a1709072da400b00988806c62damr5896584ejc.58.1687249591027; Tue, 20 Jun 2023 01:26:31 -0700 (PDT) Received: from stoup.lan ([176.176.183.29]) by smtp.gmail.com with ESMTPSA id z19-20020a170906669300b00977c7566ccbsm935901ejo.164.2023.06.20.01.26.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Jun 2023 01:26:30 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 16/16] cputlb: Restrict SavedIOTLB to system emulation Date: Tue, 20 Jun 2023 10:26:11 +0200 Message-Id: <20230620082611.770620-17-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230620082611.770620-1-richard.henderson@linaro.org> References: <20230620082611.770620-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=richard.henderson@linaro.org; helo=mail-ej1-x62e.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, T_SCC_BODY_TEXT_LINE=-0.01 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 From: Philippe Mathieu-Daudé Commit 2f3a57ee47 ("cputlb: ensure we save the IOTLB data in case of reset") added the SavedIOTLB structure -- which is system emulation specific -- in the generic CPUState structure. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221216215519.5522-3-philmd@linaro.org> Signed-off-by: Richard Henderson --- include/hw/core/cpu.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 4871ad85f0..ee8d6b40b3 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -226,7 +226,7 @@ struct CPUWatchpoint { QTAILQ_ENTRY(CPUWatchpoint) entry; }; -#ifdef CONFIG_PLUGIN +#if defined(CONFIG_PLUGIN) && !defined(CONFIG_USER_ONLY) /* * For plugins we sometime need to save the resolved iotlb data before * the memory regions get moved around by io_writex. @@ -410,9 +410,11 @@ struct CPUState { #ifdef CONFIG_PLUGIN GArray *plugin_mem_cbs; +#if !defined(CONFIG_USER_ONLY) /* saved iotlb data from io_writex */ SavedIOTLB saved_iotlb; -#endif +#endif /* !CONFIG_USER_ONLY */ +#endif /* CONFIG_PLUGIN */ /* TODO Move common fields from CPUArchState here. */ int cpu_index;