From patchwork Thu Dec 8 15:35:25 2022 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: 631882 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp294944pvb; Thu, 8 Dec 2022 07:36:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf69YzHnqP1ExsI/uV2Ien36m2m7a5ThMFFSRUmhW2ke9ODL1G8dANV3uXqIDVAbq/LXF33J X-Received: by 2002:a05:6214:3310:b0:4c7:364c:60f3 with SMTP id mo16-20020a056214331000b004c7364c60f3mr3950829qvb.12.1670513788422; Thu, 08 Dec 2022 07:36:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670513788; cv=none; d=google.com; s=arc-20160816; b=UtMn7WfIsX4kpQ3/j3LduFx7yN8R50Zlq9UPnm0zwKspeGklJzJgBC0OsHqn/+4RNz EL4vjhS2fGMZRYZ7OI5qR7DN5zBX8FinVYSb1Sn+O9jfwBrd/n23ycTpV+qPXzF30a2b HE8VmgXhe3FHyjZrxZb+SB03eS6RoB0lyDCcMEX8NfzUdWLcf5RlbqFbR+m37581L71l Y9z8qnKykKDVTqBSltB/66xwrom69j6kh3d/jxlfop7KmGUOcNP5oAc4l+khe8mYns89 1o6qHhKG3HFejOuQZhvrlaGfEmOTk8v+vLepP0B2HtHHwGufC0V/2KyQVuNmkCXJJFkO V14Q== 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=Q7RS6UvhOjqcYyu9Kw9e2FPYxya3Ny6m4Myksv2MLL4=; b=gR99JIbkmZb/VQIHXMzGBy/0lJfAtLy2UAXLvSZisMMiNVwnCwgjoCBibXpxj5jIvy zJsY66ztr/izjnyXRtPFA/LptovcqAH1i7qxY9Pqq6NqRCyYmjzh/4ONZZBPXDHlpZY6 3GjdYYLd9WFTOkNYWVlfHj0OJ7XvBsSDwNDEV+/P+NYoY1RXW1zX/NmxYsoE01UlcaRs 2/i50j1LbHemoskwLhrLjoffnIztIHMa9FT0/+iyY93D0znIZ5XlLW5C6pSBCBCjGIr4 ddX1L27L1EMDkwvJ5wIxJ5tDANVTqisoaSIGvIh/OJ+MMJRfwPz+k/yFBIcLXPZGLYpV ovEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Jb/HWx35"; 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 e2-20020a0562141d0200b004970f7307f8si11911459qvd.534.2022.12.08.07.36.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Dec 2022 07:36:28 -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="Jb/HWx35"; 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 1p3Iw5-0003JM-MK; Thu, 08 Dec 2022 10:35:45 -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 1p3Iw1-0003HU-4N for qemu-devel@nongnu.org; Thu, 08 Dec 2022 10:35:41 -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 1p3Ivz-0006Gp-Lr for qemu-devel@nongnu.org; Thu, 08 Dec 2022 10:35:40 -0500 Received: by mail-wm1-x329.google.com with SMTP id v7so1354546wmn.0 for ; Thu, 08 Dec 2022 07:35:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=Q7RS6UvhOjqcYyu9Kw9e2FPYxya3Ny6m4Myksv2MLL4=; b=Jb/HWx35b+MtI6qBxIsRwbEw6joOnDCickQMBxUWMv8ACprcbix5ALhfED1cXn7zyP 1e39u8vTM4eEAUw86m3FLwmt8IPHqE1LoYRyA0VP1apn/ZHnZrsoxZJYG/imRavJfplr O8PFqGz9twAjDzSFzgCvbXviB/s7n4P2xjJlqHXDyV+RoLEmUE+wU2HRXjaf5BoN9Pcs cyhnIASf7v2t63hX7ZpSLSFH9Mrn7NoQ/mwoVfizSw3m77UL4Xz0MOoxxN73ZeLtiVir o8CgfsmLIotwTbS3EfxSzBftxkvWvH1bY5hxcuVW30VPTET/qr9fXy6QGoGxJIDdLmxv g6OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=Q7RS6UvhOjqcYyu9Kw9e2FPYxya3Ny6m4Myksv2MLL4=; b=lehwYQdDO3MJhPJJkd47PVnYkDaJkpxCWqIQ8f9NVZLhEzQHIyAqzw8VfpcVNLSDuw D+6AzuoSWSf1esElQgiTNm2YB/eAEeB8+LRGSpxUxlaBujk1JOetKPmnWWFEmxib14qA ittLmLLqUo4nJi/TvM2ZVru7nq02CRhAGwOXXRmJfHEiLzukZPaB3CQrt+GGQQPDMuXO qIKzvvnpTi4J0xKgnB6ltjKCbWUUVY8KHwGjyY3BC2Ga5BoQ6Xk5ZbNqP9gq08d2H1b8 u6opxGCjdyrq3brJtK7CwxLn/aauv746nXcgGTlxjoW3ue0SIhFjsPEfQVKBBZDgueWk t+/Q== X-Gm-Message-State: ANoB5pmibUsY6qAMKZtfG4KClMsqY8LuTwXS+ofDE9H2MLRa9DNi2yes p+0OGR6otTgTwh74BTvMhA3ij5k7C9rkjPl+GbI= X-Received: by 2002:a7b:c358:0:b0:3d1:f882:43eb with SMTP id l24-20020a7bc358000000b003d1f88243ebmr1952493wmj.10.1670513738126; Thu, 08 Dec 2022 07:35:38 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id f16-20020a05600c4e9000b003c6c182bef9sm7940862wmq.36.2022.12.08.07.35.35 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 08 Dec 2022 07:35:37 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Greg Kurz , Paolo Bonzini , David Gibson , kvm@vger.kernel.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mark Cave-Ayland , Richard Henderson , "Edgar E. Iglesias" , Stafford Horne , Anton Johansson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , qemu-ppc@nongnu.org, Eduardo Habkost , Chris Wulff , Yanan Wang , Fabiano Rosas , =?utf-8?q?Alex_Benn=C3=A9e?= , Marek Vasut , Max Filippov , Yoshinori Sato , Laurent Vivier , Daniel Henrique Barboza , Marcel Apfelbaum , Artyom Tarasenko Subject: [PATCH-for-8.0 v2 1/4] cputlb: Restrict SavedIOTLB to system emulation Date: Thu, 8 Dec 2022 16:35:25 +0100 Message-Id: <20221208153528.27238-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221208153528.27238-1-philmd@linaro.org> References: <20221208153528.27238-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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 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. Signed-off-by: Philippe Mathieu-Daudé --- 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 8830546121..bc3229ae13 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -222,7 +222,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. @@ -406,9 +406,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;