From patchwork Mon Jun 26 23:19:54 2023 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: 696521 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp3474992wrm; Mon, 26 Jun 2023 16:21:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ57OYtjKML7Rr+Cq2boPXrUTHt3ysuz4pxgNgBzxIabDj6UQJRqcZd69LoMKzTg1joCX7+D X-Received: by 2002:a05:6214:d87:b0:626:290f:3e80 with SMTP id e7-20020a0562140d8700b00626290f3e80mr28194664qve.50.1687821692084; Mon, 26 Jun 2023 16:21:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687821692; cv=none; d=google.com; s=arc-20160816; b=ekpshnQRWSAgPCilu6niNsKT5gVbRK1tMvAYB1mLuXe8qtw5TH3YDqtkyWsx58bwi9 itQsEaLKGeSK7yuyprTxI5SsBK5aOplq0w4uL/xdh9+omN+4K723L2zBIrNideF7pEvQ eW45cDfB04G3ZgTISz38U3M3xmtfdIkdMzUGRCAxsoRhsxpw/hTr4S3SLLNozrCUQHm2 dNWHCOEqcUh8RJoYVtX/152AAi7gPnyiYzGCS5nRgUdBpGmLbjIhAbM1Fo0k2e4ahUEK 1mYpGe/ETJOphHyMgvx6dGza1e3/0DsqtnwAbuL7xdguajM3CkTU1wBS1QtcJFm6gIqS 3iQw== 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=W8NcuMKsIMVo8BKREArVzU5buwOf6lSqGWRgcZxHDMo=; fh=Q5PWRR3YGPXeAkQ7IpHJrCtvtZBBd6Ig9aRmT7uxHvE=; b=UBHnDWvzdhgvaeNOxaZCpx87M2+VSl9MGwGJWJHRbtObIZ35gxSgwSgx4yzsEPzMzE 6TLRJ2tFLHXFzhQgi5Uqeu8VuR5IwNILSuyeyaRyudF/oYPMh2qjVwrWDzTs3lLDIacl wjupLAXzWlPB5BqlEaH4D4b5EW5HMIB7iYTjaloA5+5wUa/5Ts7gCvt8+D96sS4tv5sA mdz6QnRWvVFYr5Vvbzf6GhCgvkw7KC+Qxd4gSmsK8rogKeCbyw7rcGWmZLupvS/9n0Ek WYdIxVGO5aWOEGBZATTae9jsRH3CoMXY5xWVk5u6DRj3tRR94rRPWkdJ8QMm61AklBWO Hz1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fZ2pvKsG; 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 hr5-20020a05621423c500b0062df36bdb9dsi2545179qvb.242.2023.06.26.16.21.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jun 2023 16:21:32 -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=fZ2pvKsG; 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 1qDvVa-0004cT-TX; Mon, 26 Jun 2023 19:20:34 -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 1qDvVZ-0004br-2l for qemu-devel@nongnu.org; Mon, 26 Jun 2023 19:20:33 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDvVX-0008QC-G8 for qemu-devel@nongnu.org; Mon, 26 Jun 2023 19:20:32 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-991e69499d1so122028066b.2 for ; Mon, 26 Jun 2023 16:20:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687821629; x=1690413629; 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=W8NcuMKsIMVo8BKREArVzU5buwOf6lSqGWRgcZxHDMo=; b=fZ2pvKsGyFxNgeT02+WdLzkxKUwAjAzExJxd4w2IJztwMnPpGCFB10lidiEf/gbras AVKOILkyfsYXfQMGtjMABw0KZ9U71yOc3kinySzqFE/3nSgldUfCFM7zcz/qHWQbspjI pFr2ibiqKiz1lPMPmTCloL+mGy971cFwf3J1qcaMaUrnalInUVYV8we3A/W3v7aYl1Bj U4dOJOU7lW2+5MggUR5bAMwfXtrK1yy6nTHwPhicLb2nFSSd31s8vP/qd7LsHp3U1ecz KU7JF7PvcKEECU9u5aOABsISkf9psY22ZvGaHVP0EcGtEoPQ5vA2hfXb8mmh7uwnn+aA yvGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687821629; x=1690413629; 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=W8NcuMKsIMVo8BKREArVzU5buwOf6lSqGWRgcZxHDMo=; b=A8hW2ise/HZdoyqA8RqXVOjQqHdMbKPxM+DJHIR/vIGxZAVGyJrpntQnfgBCCuQlHz wlUAPH15tACMWwRULggCALlSA7u3frghN8qc53yoPmeGQUEQJlEiZt0526RY0bYpo9AW hOKFQ6p/xYbEG8qVN5GINKsmPJAFCzJBjBSU9kdLF/chpMsfOoYViCqIqV6rUSN7eJ2D 7zwJ+3G5v8pZrLC0DX5imJFyibYsp0IfB/ieafXhPbPyVHvuXwkAXFYG1N1SIbGnGI6U hJcoKpD2YReZHFKYU8ZtKUxQnO8zliP8+dJ1P5PapbpzvTXX1gn7wB1u9HnY469zh/QV ICxw== X-Gm-Message-State: AC+VfDxdESG585NsNFkmrEluXVLkjFgfUcV/Umus2cmFvJgknJIiwrxp JLdBlgx/I0owZg4ZtI5p9uzGHGQHYuWLdEfrg6g= X-Received: by 2002:a17:907:2ce2:b0:98a:ed3d:8917 with SMTP id hz2-20020a1709072ce200b0098aed3d8917mr16161605ejc.9.1687821629556; Mon, 26 Jun 2023 16:20:29 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.226]) by smtp.gmail.com with ESMTPSA id t23-20020a170906179700b00987f64b84afsm3757789eje.39.2023.06.26.16.20.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 26 Jun 2023 16:20:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Bin Meng , Liu Zhiwei , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Beraldo Leal , Alistair Francis , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Palmer Dabbelt , Wainer dos Santos Moschetta , Daniel Henrique Barboza , Weiwei Li , qemu-riscv@nongnu.org Subject: [PATCH 03/16] target/riscv: Restrict sysemu specific header to user emulation Date: Tue, 27 Jun 2023 01:19:54 +0200 Message-Id: <20230626232007.8933-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230626232007.8933-1-philmd@linaro.org> References: <20230626232007.8933-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=philmd@linaro.org; helo=mail-ej1-x631.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 Signed-off-by: Philippe Mathieu-Daudé --- target/riscv/cpu.c | 8 +++++--- target/riscv/cpu_helper.c | 2 ++ target/riscv/csr.c | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 4035fe0e62..175dbc9826 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -23,9 +23,13 @@ #include "qemu/log.h" #include "cpu.h" #include "cpu_vendorid.h" +#ifndef CONFIG_USER_ONLY #include "pmu.h" -#include "internals.h" #include "time_helper.h" +#include "sysemu/kvm.h" +#include "kvm_riscv.h" +#endif +#include "internals.h" #include "exec/exec-all.h" #include "qapi/error.h" #include "qapi/visitor.h" @@ -33,8 +37,6 @@ #include "hw/qdev-properties.h" #include "migration/vmstate.h" #include "fpu/softfloat-helpers.h" -#include "sysemu/kvm.h" -#include "kvm_riscv.h" #include "tcg/tcg.h" /* RISC-V CPU definitions */ diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index 90cef9856d..d871718e5d 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -28,7 +28,9 @@ #include "tcg/tcg-op.h" #include "trace.h" #include "semihosting/common-semi.h" +#ifndef CONFIG_USER_ONLY #include "sysemu/cpu-timers.h" +#endif #include "cpu_bits.h" #include "debug.h" #include "tcg/oversized-guest.h" diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 58499b5afc..936ba2be24 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -21,8 +21,10 @@ #include "qemu/log.h" #include "qemu/timer.h" #include "cpu.h" +#ifndef CONFIG_USER_ONLY #include "pmu.h" #include "time_helper.h" +#endif #include "qemu/main-loop.h" #include "exec/exec-all.h" #include "exec/tb-flush.h"