From patchwork Fri Dec 16 22:05:36 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: 634503 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1088931pvb; Fri, 16 Dec 2022 14:33:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXvwIiXoGOR8EqcbtV0x5ikrZ6zOMazHw6n61N+7Tg7gJpLcLZex/eQ8O9vzh7RZTw3+lEZ4 X-Received: by 2002:a05:6214:5446:b0:4c7:1ebf:717c with SMTP id kz6-20020a056214544600b004c71ebf717cmr120195qvb.7.1671230039742; Fri, 16 Dec 2022 14:33:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671230039; cv=none; d=google.com; s=arc-20160816; b=pvEdM2/VjxUO0eP/OfSSz/PL99naT76Our8M52px4PzRCIY8f/TpPfGD2jTBc40DZ2 5mAHc1M9lXUCKgdGySrsEqXRjrtQ0KrxaglZtRPRY2jVIaIjna223jjUu7iQ6B62usOB RBMsCxxaeGw5YsVqemak9I0ysTqh6/lCauXRLT8wJXCmN0SR9XCb8TZXgb0o+i7a6cjr YjGs1/ruUrYz0S/vX33Wjfu2d6UqZ7VkWWzUdhrz2qjUc5Xf/JNSbowFg28CF1SwVAzB F4ygK9g7f3BX4d0zWIv/Bo4p02hhpWuBpfMXGtBbqGlQFU4TXq1IhNV5EeK8i6v/EBpe N5mQ== 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=FgRh+J8ugBdTp+hBAPKxvrVE6x2miNoYmydbOZW5heo=; b=f27ppLyQT1x1Gd41/JtGeiZwEIJUUnpZ28UhlYEdbPHQ+N3GOcD+r8xu4lZPIGfXlQ pq3T3zhzHXhTGTiT3ubDM7x7+PUVgnhYMknCuvWECvujWu8f9gn4POiwmdUlIZ2eH2uQ mIDnY5orxSKMcuP2wburcl/RRZWw5BLdpYp9iyfHCyeUb2HrXX6lHhIW5HPJJ0i62BT6 qtNaK8BgXjuD++lWo533KlrPA0fabb/skBaAkYHAxre6DoW0lO7xZsR0RQiEQmjEh1sB /DbhPmKCaf11Qy16cnj5Fwuxj5cOgdSOLU5EcXltxId730u2XaZArVUyUf0JBdFQxWyj K10w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HNUeMPgz; 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 p9-20020ad45f49000000b004c6b3730971si1565907qvg.465.2022.12.16.14.33.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Dec 2022 14:33:59 -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=HNUeMPgz; 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 1p6Iqt-0000iK-Oz; Fri, 16 Dec 2022 17:06:47 -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 1p6Iqj-0000bo-EF for qemu-devel@nongnu.org; Fri, 16 Dec 2022 17:06:39 -0500 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6Iqe-0005me-GM for qemu-devel@nongnu.org; Fri, 16 Dec 2022 17:06:34 -0500 Received: by mail-ej1-x62c.google.com with SMTP id kw15so9219161ejc.10 for ; Fri, 16 Dec 2022 14:06:32 -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=FgRh+J8ugBdTp+hBAPKxvrVE6x2miNoYmydbOZW5heo=; b=HNUeMPgzvuf6AsZmElsdhHeaksTRLQtyPVlctzXt0s+RftDHFpCzUNFYprNzhhJbOY o7NZ8KpQbPujdhQqVFK2K/eHcYw9gDbOQo16JfxsQL1dJHZv8gGs3T+8cFP6fTWXxpZr tvMxjF1uC9UDQLtTA6zQ9u/yAJINT5VlGns1UzWYWi222Go/JAwbniNEcoMntAZoEde1 BwRxGn9bmKJCgxfw2T3mFM8pjloOyF26G6ZwOs6qsoN1Y5snYZQwtb6GYaxgpiWOmxoZ 6xidAvRxPjlU3mUtrs6lOEPiIEmW4Hofzoe20PxgFr/foQ43Ypj1zzoW2sHNGDoEPrIp SI/A== 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=FgRh+J8ugBdTp+hBAPKxvrVE6x2miNoYmydbOZW5heo=; b=FVLyVDjrQq0jMThYsSEZWtCOo4e2AISG+l65T0AVwnbGcuJcWS+kButOmVxxdeZPF8 1wg9Ccnm9cRk43wlKMbTKiKlidj7PG1lh0OHEhR+WwHOWjJVTW0Hqgb67EMPx2CTPujT Lww37pWEMo8QC0aEfl7DFekHCHyaxQW76GdDfTvHQe1uY8TVBKkmxv2e5d6p4hZLbAXR 6Bqu6LqDzFUs6MFlbpOg7H6XJktxzM14q9IKWayF04xSvtg39djcCzSLfF23ZolmdNcJ FAELerm71J9ldzwYo1h1oS5NsF1hM7PkfELULda9kHQozZyBLapUskKz3U4wOQaNNBdR 4NQA== X-Gm-Message-State: ANoB5pmYSIbRlEW4uCmtc7x3RiATHaTmi3nvyqagZDJ1b4tX5KJbEuOU Pe45kLu1uzkhFvIDUY4YU1+lADz7MgNS3pLZcRc= X-Received: by 2002:a17:906:a886:b0:7c1:8f53:83a0 with SMTP id ha6-20020a170906a88600b007c18f5383a0mr13347269ejb.13.1671228390734; Fri, 16 Dec 2022 14:06:30 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id k1-20020a17090632c100b007c10ad73927sm1293554ejk.28.2022.12.16.14.06.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 16 Dec 2022 14:06:30 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Daniel Henrique Barboza , David Gibson , Xiaojuan Yang , Mark Cave-Ayland , Bin Meng , Richard Henderson , Artyom Tarasenko , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Song Gao , Alistair Francis , qemu-ppc@nongnu.org, Laurent Vivier , Palmer Dabbelt , Taylor Simpson , Greg Kurz , qemu-riscv@nongnu.org, Max Filippov , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 07/10] target/ppc/internal: Restrict MMU declarations to sysemu Date: Fri, 16 Dec 2022 23:05:36 +0100 Message-Id: <20221216220539.7065-8-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221216220539.7065-1-philmd@linaro.org> References: <20221216220539.7065-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=philmd@linaro.org; helo=mail-ej1-x62c.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=unavailable 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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/ppc/internal.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/ppc/internal.h b/target/ppc/internal.h index 337a362205..901bae6d39 100644 --- a/target/ppc/internal.h +++ b/target/ppc/internal.h @@ -242,9 +242,12 @@ static inline int prot_for_access_type(MMUAccessType access_type) g_assert_not_reached(); } +#ifndef CONFIG_USER_ONLY + /* PowerPC MMU emulation */ typedef struct mmu_ctx_t mmu_ctx_t; + bool ppc_xlate(PowerPCCPU *cpu, vaddr eaddr, MMUAccessType access_type, hwaddr *raddrp, int *psizep, int *protp, int mmu_idx, bool guest_visible); @@ -266,6 +269,8 @@ struct mmu_ctx_t { int nx; /* Non-execute area */ }; +#endif /* !CONFIG_USER_ONLY */ + /* Common routines used by software and hardware TLBs emulation */ static inline int pte_is_valid(target_ulong pte0) {