From patchwork Mon May 17 11:11:01 2021 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: 12261605 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84624C433ED for ; Mon, 17 May 2021 11:15:06 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 30F32611EE for ; Mon, 17 May 2021 11:15:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 30F32611EE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:36116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1libDF-0003Hh-9T for qemu-devel@archiver.kernel.org; Mon, 17 May 2021 07:15:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lib9e-0003IW-4N for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:22 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:46604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lib9c-0000FQ-Cw for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:21 -0400 Received: by mail-wr1-x42f.google.com with SMTP id y14so3848533wrm.13 for ; Mon, 17 May 2021 04:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qLQOffQ56ChDwPDQFXqHDh81gYGsb+M4QlmmpdLP3i4=; b=Vo5Vt2dbdbXNYc9WMveoBlJmneNxjKtdXnDRcE377/DACZhD5x5z7GpXtZ9hL6yHDh wOTD6h1MfBWrIBX8+VMAKyPQ3II+u1n4+z3ZSLY+M9pZgotdYqDKnYiaLFAuC5s+aKzb kfO5Fe8cN6tKIuzwFKg8MPuUbpsFEhjZlMBgzQShhoT59acuVdJk6TXARZjc+NVezTmH 0YUerYK7wkoEJaMVzZ/pvgMTDWLPaFBBg7UY7gZlUJtr+eH4SFd9mLogiZLgtyxs7nsE L5SvgVnqM5+RFr94bPrCso+gVNwknp8P3DxOX2EvbNgXWLdQdix/FHXgD9zMmoKwJGXJ nM4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=qLQOffQ56ChDwPDQFXqHDh81gYGsb+M4QlmmpdLP3i4=; b=baKFi4kEgnSEScHI+Sw+CSaRePkjpBuDv5qqWrfLs1MN3tNqVmxOMaRReK8QZiaRL4 Gpkc5C5KQBUF3sUVf8ee1NIYWYX1t7YdmD5TP+VLwpu3Qf3AcCm8ZxFRcGieG6I5iJso MV77761+Gncv3qdbAZyHgPH8DD6/3gGFAPEPRGAU5LOgBXDX1CqX61llITCuUe2cnGWd Ou2AMMvwrsNubJXFsETovMVgnUNELdaYDjGT0pgkrWzWe7XGIgUUKLoC2rZkpummEt9i ti1cpzykHiFX2/XrMoPKUm8Dct0y/BNq3JinTEeaj4HrdEud9yjK9LjOsw40l5WfExYV FEMA== X-Gm-Message-State: AOAM532tVkv/IF9uvHxSlKD/wDsddUZvstbRZhRvWKwSk00lLGRqd+LB 2uv33ZFxm0ca4gRbbGxGWHGbSxUmJnauVw== X-Google-Smtp-Source: ABdhPJw4RMM9/56YpVLS5fJwZEI6nXt4KzjwQ1kgrkiXBYV2RczYV3F6N/AL8g0IQXpbIiMSZI4XkA== X-Received: by 2002:a5d:650b:: with SMTP id x11mr38157311wru.186.1621249878899; Mon, 17 May 2021 04:11:18 -0700 (PDT) Received: from localhost.localdomain (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id x13sm6986619wro.31.2021.05.17.04.11.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 04:11:18 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 01/11] NOTFORMERGE target/arm: Restrict KVM files to softmmu Date: Mon, 17 May 2021 13:11:01 +0200 Message-Id: <20210517111111.1068153-2-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210517111111.1068153-1-f4bug@amsat.org> References: <20210517111111.1068153-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42f.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Richard Henderson , Claudio Fontana , Laurent Vivier Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The following patches require the "arm cleanup experiment for kvm-only build" [*] series with split various user/sysemu and tcg/kvm code from the target/arm/ directory. To be able to build the following patches waiting the series get merged, simply restrict the KVM files to the softmmu source set. [*] https://lists.gnu.org/archive/html/qemu-devel/2021-04/msg02908.html Signed-off-by: Philippe Mathieu-Daudé --- target/arm/cpu.c | 2 +- target/arm/cpu64.c | 2 +- target/arm/meson.build | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index f29649ecba7..e443cfb3d96 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -35,10 +35,10 @@ #if !defined(CONFIG_USER_ONLY) #include "hw/loader.h" #include "hw/boards.h" +#include "kvm_arm.h" #endif #include "sysemu/tcg.h" #include "sysemu/hw_accel.h" -#include "kvm_arm.h" #include "disas/capstone.h" #include "fpu/softfloat.h" diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index f0a9e968c9c..08fba3ec29a 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -27,9 +27,9 @@ #include "qemu/module.h" #if !defined(CONFIG_USER_ONLY) #include "hw/loader.h" +#include "kvm_arm.h" #endif #include "sysemu/kvm.h" -#include "kvm_arm.h" #include "qapi/visitor.h" #include "hw/qdev-properties.h" diff --git a/target/arm/meson.build b/target/arm/meson.build index 09802ba1a17..6143e736079 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -35,8 +35,6 @@ )) arm_ss.add(zlib) -arm_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c', 'kvm64.c'), if_false: files('kvm-stub.c')) - arm_ss.add(when: 'TARGET_AARCH64', if_true: files( 'cpu64.c', 'gdbstub64.c', @@ -49,6 +47,8 @@ arm_softmmu_ss = ss.source_set() +arm_softmmu_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c', 'kvm64.c'), if_false: files('kvm-stub.c')) + arm_softmmu_ss.add(when: 'TARGET_AARCH64', if_true: files( 'mte_helper.c', )) From patchwork Mon May 17 11:11:02 2021 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: 12261607 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B292C43460 for ; Mon, 17 May 2021 11:15:26 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CF072611EE for ; Mon, 17 May 2021 11:15:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CF072611EE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:37600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1libDY-0004Zx-RR for qemu-devel@archiver.kernel.org; Mon, 17 May 2021 07:15:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lib9k-0003eP-DM for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:28 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:52776) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lib9h-0000OA-KJ for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:28 -0400 Received: by mail-wm1-x336.google.com with SMTP id z130so3346823wmg.2 for ; Mon, 17 May 2021 04:11:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hDkfenxYgY7IcCzBW5Lq0Q1EdENSJ1H+02J5RavAOkg=; b=tT/yuHlkM0VRvuaOhrYbmnWyCx4FAvSQFVvy8DvXXnzUNTIfx+810GGBNQNZgalYoT IRuCOT44EWSrBdiBWj0573OYdgV5nY5KrSpNEIF/i3aBbGIcbZh7GIfPryPtdnSQatpG lO9+kbc8TNJe3t1bwzIPND1/waEDblAfYqBQH2pcrhIb4C3fsOgCUKkEC877zmQBIE1W Hdi2BtCDtuaworRDVc3K5OyIBanxx1nTY6XVt3AXO8RPUbA47V1DEP2Gue0BfEUHxBE+ dup/GL/YgEVmD2fTuTa1dzSfgwo5KXVeTy00Y3ddso15IkxXry+5LRi8yjmZVuuKvVCz 8qKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=hDkfenxYgY7IcCzBW5Lq0Q1EdENSJ1H+02J5RavAOkg=; b=aLj+6lA47wadcc1kJTJoiuCi5QXhCZ24cxo5DaiS4ByPr5ovONR39fZRbs6wsjgeVr rCyxjZdpC/zFWKb9dqruLnwmWfl4qCKA+6I9lbCPpWqgXYCC/wrWETI6s6Tpr7zDCqej MVouPNv8S0lzk+QdzhESHqWPoVysV2kP/LLMDxnLRmmmvO+FZZIjzPyux5LpNisTNQ7M iZL2PGAHoznDpj0NTaFl6Yo+wxQ4Uf95LflVctiy8n/jQb8WwyAUidHQNZr3lthfyOWf u3POeHdyYnXMqmQawO3VqFevuZ3FjFjeQICD7K0VpUGeT7Ci3Jv8AvrLm7acRut/i6Ey m90Q== X-Gm-Message-State: AOAM533zrV4sUGR5SYi+lB8TUF7MwlxexuXIdZ+XUGcTIrJa6FyAvim+ yZ8krh3cBT5cDT0AVxGKyuVAZwqGPYL3NQ== X-Google-Smtp-Source: ABdhPJxw6frlbDICWSNuTaO7Xg+LxmGqVTxkZcJFniB3rSfqm14KVJVYDjFYcs8eKLuxYxkF6yD4tQ== X-Received: by 2002:a05:600c:3646:: with SMTP id y6mr27230241wmq.143.1621249883611; Mon, 17 May 2021 04:11:23 -0700 (PDT) Received: from localhost.localdomain (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id f26sm12975045wmj.30.2021.05.17.04.11.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 04:11:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 02/11] exec: Restrict hwaddr.h to sysemu/ Date: Mon, 17 May 2021 13:11:02 +0200 Message-Id: <20210517111111.1068153-3-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210517111111.1068153-1-f4bug@amsat.org> References: <20210517111111.1068153-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x336.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Richard Henderson , Claudio Fontana , Laurent Vivier Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Guard declarations within hwaddr.h against inclusion from user-mode emulation. To make it clearer this header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/hwaddr.h,exec/sysemu/hwaddr.h, $(git grep -l exec/hwaddr.h) Signed-off-by: Philippe Mathieu-Daudé --- hw/audio/lm4549.h | 2 +- hw/net/can/can_sja1000.h | 2 +- hw/net/can/ctucan_core.h | 2 +- hw/net/net_tx_pkt.h | 2 +- include/disas/disas.h | 4 +++- include/exec/cpu-all.h | 2 +- include/exec/cpu-common.h | 2 +- include/exec/cpu-defs.h | 2 +- include/exec/memory.h | 2 +- include/exec/{ => sysemu}/hwaddr.h | 7 +++++-- include/hw/arm/sharpsl.h | 2 +- include/hw/arm/soc_dma.h | 2 +- include/hw/arm/sysbus-fdt.h | 2 +- include/hw/arm/virt.h | 2 +- include/hw/block/block.h | 2 +- include/hw/block/fdc.h | 2 +- include/hw/block/flash.h | 2 +- include/hw/core/cpu.h | 4 +++- include/hw/cris/etraxfs_dma.h | 2 +- include/hw/display/vga.h | 2 +- include/hw/i386/microvm.h | 2 +- include/hw/i386/x86.h | 2 +- include/hw/input/lasips2.h | 2 +- include/hw/loader-fit.h | 2 +- include/hw/misc/allwinner-h3-dramc.h | 2 +- include/hw/misc/empty_slot.h | 2 +- include/hw/nvram/fw_cfg.h | 2 +- include/hw/pci-host/gpex.h | 2 +- include/hw/remote/memory.h | 2 +- include/hw/remote/mpqemu-link.h | 2 +- include/hw/rtc/m48t59.h | 2 +- include/hw/rtc/sun4v-rtc.h | 2 +- include/hw/timer/tmu012.h | 2 +- include/hw/virtio/virtio-access.h | 2 +- include/monitor/monitor.h | 2 +- include/qemu/accel.h | 4 +++- include/qemu/iova-tree.h | 2 +- include/qemu/userfaultfd.h | 2 +- dump/dump.c | 2 +- dump/win_dump.c | 2 +- hw/arm/sbsa-ref.c | 2 +- hw/input/lasips2.c | 2 +- hw/m68k/next-cube.c | 2 +- hw/ppc/pnv_homer.c | 2 +- tests/qtest/microbit-test.c | 2 +- MAINTAINERS | 1 + scripts/codeconverter/codeconverter/test_regexps.py | 4 ++-- 47 files changed, 58 insertions(+), 48 deletions(-) rename include/exec/{ => sysemu}/hwaddr.h (81%) diff --git a/hw/audio/lm4549.h b/hw/audio/lm4549.h index aba9bb5b077..5d53c2f2179 100644 --- a/hw/audio/lm4549.h +++ b/hw/audio/lm4549.h @@ -13,7 +13,7 @@ #define HW_LM4549_H #include "audio/audio.h" -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" typedef void (*lm4549_callback)(void *opaque); diff --git a/hw/net/can/can_sja1000.h b/hw/net/can/can_sja1000.h index 7ca9cd681ed..57e6d4d34e4 100644 --- a/hw/net/can/can_sja1000.h +++ b/hw/net/can/can_sja1000.h @@ -27,7 +27,7 @@ #ifndef HW_CAN_SJA1000_H #define HW_CAN_SJA1000_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "net/can_emu.h" #define CAN_SJA_MEM_SIZE 128 diff --git a/hw/net/can/ctucan_core.h b/hw/net/can/ctucan_core.h index bbc09ae0678..c0e4beafba2 100644 --- a/hw/net/can/ctucan_core.h +++ b/hw/net/can/ctucan_core.h @@ -28,7 +28,7 @@ #ifndef HW_CAN_CTUCAN_CORE_H #define HW_CAN_CTUCAN_CORE_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "net/can_emu.h" #ifndef HOST_WORDS_BIGENDIAN diff --git a/hw/net/net_tx_pkt.h b/hw/net/net_tx_pkt.h index 4ec8bbe9bd9..86548b4f613 100644 --- a/hw/net/net_tx_pkt.h +++ b/hw/net/net_tx_pkt.h @@ -19,7 +19,7 @@ #define NET_TX_PKT_H #include "net/eth.h" -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" /* define to enable packet dump functions */ /*#define NET_TX_PKT_DEBUG*/ diff --git a/include/disas/disas.h b/include/disas/disas.h index d363e95edeb..1b85d121a7a 100644 --- a/include/disas/disas.h +++ b/include/disas/disas.h @@ -1,7 +1,9 @@ #ifndef QEMU_DISAS_H #define QEMU_DISAS_H -#include "exec/hwaddr.h" +#ifndef CONFIG_USER_ONLY +#include "exec/sysemu/hwaddr.h" +#endif #ifdef NEED_CPU_H #include "cpu.h" diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 32cfb634c6a..3e7edddead5 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -175,7 +175,7 @@ extern unsigned long reserved_va; #else -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #define SUFFIX #define ARG1 as diff --git a/include/exec/cpu-common.h b/include/exec/cpu-common.h index ccabed4003a..1a64b0b5ac6 100644 --- a/include/exec/cpu-common.h +++ b/include/exec/cpu-common.h @@ -4,7 +4,7 @@ /* CPU interfaces that are target independent. */ #ifndef CONFIG_USER_ONLY -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #endif /* The CPU list lock nests outside page_(un)lock or mmap_(un)lock */ diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index ba3cd32a1ec..52a2b93493d 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -26,7 +26,7 @@ #include "qemu/host-utils.h" #include "qemu/thread.h" #ifndef CONFIG_USER_ONLY -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #endif #include "exec/memattrs.h" #include "hw/core/cpu.h" diff --git a/include/exec/memory.h b/include/exec/memory.h index c8b90889241..52a2659b396 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -17,7 +17,7 @@ #ifndef CONFIG_USER_ONLY #include "exec/cpu-common.h" -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "exec/memattrs.h" #include "exec/memop.h" #include "exec/ramlist.h" diff --git a/include/exec/hwaddr.h b/include/exec/sysemu/hwaddr.h similarity index 81% rename from include/exec/hwaddr.h rename to include/exec/sysemu/hwaddr.h index 8f16d179a88..9693cd516b4 100644 --- a/include/exec/hwaddr.h +++ b/include/exec/sysemu/hwaddr.h @@ -1,8 +1,9 @@ /* Define hwaddr if it exists. */ -#ifndef HWADDR_H -#define HWADDR_H +#ifndef EXEC_SYSEMU_HWADDR_H +#define EXEC_SYSEMU_HWADDR_H +#ifndef CONFIG_USER_ONLY #define HWADDR_BITS 64 /* hwaddr is the type of a physical address (its size can @@ -23,4 +24,6 @@ typedef struct MemMapEntry { hwaddr size; } MemMapEntry; +#endif /* !CONFIG_USER_ONLY */ + #endif diff --git a/include/hw/arm/sharpsl.h b/include/hw/arm/sharpsl.h index e986b28c527..36ed1df72a7 100644 --- a/include/hw/arm/sharpsl.h +++ b/include/hw/arm/sharpsl.h @@ -7,7 +7,7 @@ #ifndef QEMU_SHARPSL_H #define QEMU_SHARPSL_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" /* zaurus.c */ diff --git a/include/hw/arm/soc_dma.h b/include/hw/arm/soc_dma.h index e93a7499a80..14b802c2330 100644 --- a/include/hw/arm/soc_dma.h +++ b/include/hw/arm/soc_dma.h @@ -21,7 +21,7 @@ #ifndef HW_SOC_DMA_H #define HW_SOC_DMA_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" struct soc_dma_s; struct soc_dma_ch_s; diff --git a/include/hw/arm/sysbus-fdt.h b/include/hw/arm/sysbus-fdt.h index 340c382cdde..7a8ace37b4c 100644 --- a/include/hw/arm/sysbus-fdt.h +++ b/include/hw/arm/sysbus-fdt.h @@ -24,7 +24,7 @@ #ifndef HW_ARM_SYSBUS_FDT_H #define HW_ARM_SYSBUS_FDT_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" /** * platform_bus_add_all_fdt_nodes - create all the platform bus nodes diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index 921416f918b..504b0bb6e57 100644 --- a/include/hw/arm/virt.h +++ b/include/hw/arm/virt.h @@ -30,7 +30,7 @@ #ifndef QEMU_ARM_VIRT_H #define QEMU_ARM_VIRT_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "qemu/notify.h" #include "hw/boards.h" #include "hw/arm/boot.h" diff --git a/include/hw/block/block.h b/include/hw/block/block.h index c172cbe65f1..0f36b1f0277 100644 --- a/include/hw/block/block.h +++ b/include/hw/block/block.h @@ -11,7 +11,7 @@ #ifndef HW_BLOCK_H #define HW_BLOCK_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "qapi/qapi-types-block-core.h" #include "hw/qdev-properties-system.h" diff --git a/include/hw/block/fdc.h b/include/hw/block/fdc.h index 1ecca7cac7f..7f0fb3d3986 100644 --- a/include/hw/block/fdc.h +++ b/include/hw/block/fdc.h @@ -1,7 +1,7 @@ #ifndef HW_FDC_H #define HW_FDC_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "qapi/qapi-types-block.h" /* fdc.c */ diff --git a/include/hw/block/flash.h b/include/hw/block/flash.h index 86d8363bb09..e184df092eb 100644 --- a/include/hw/block/flash.h +++ b/include/hw/block/flash.h @@ -3,7 +3,7 @@ /* NOR flash devices */ -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "qom/object.h" /* pflash_cfi01.c */ diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index e4328de8d41..7aa5c82fa20 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -22,7 +22,9 @@ #include "hw/qdev-core.h" #include "disas/dis-asm.h" -#include "exec/hwaddr.h" +#if !defined(CONFIG_USER_ONLY) +#include "exec/sysemu/hwaddr.h" +#endif #include "exec/memattrs.h" #include "qapi/qapi-types-run-state.h" #include "qemu/bitmap.h" diff --git a/include/hw/cris/etraxfs_dma.h b/include/hw/cris/etraxfs_dma.h index 095d76b9560..f0a4038c8ae 100644 --- a/include/hw/cris/etraxfs_dma.h +++ b/include/hw/cris/etraxfs_dma.h @@ -1,7 +1,7 @@ #ifndef HW_ETRAXFS_DMA_H #define HW_ETRAXFS_DMA_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" struct dma_context_metadata { /* data descriptor md */ diff --git a/include/hw/display/vga.h b/include/hw/display/vga.h index 5f7825e0e36..d63e0bb9c94 100644 --- a/include/hw/display/vga.h +++ b/include/hw/display/vga.h @@ -9,7 +9,7 @@ #ifndef QEMU_HW_DISPLAY_VGA_H #define QEMU_HW_DISPLAY_VGA_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" /* * modules can reference this symbol to avoid being loaded diff --git a/include/hw/i386/microvm.h b/include/hw/i386/microvm.h index f25f8374413..e6931917ed1 100644 --- a/include/hw/i386/microvm.h +++ b/include/hw/i386/microvm.h @@ -19,7 +19,7 @@ #define HW_I386_MICROVM_H #include "qemu-common.h" -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "qemu/notify.h" #include "hw/boards.h" diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h index c09b648dff2..b594f829cdb 100644 --- a/include/hw/i386/x86.h +++ b/include/hw/i386/x86.h @@ -18,7 +18,7 @@ #define HW_I386_X86_H #include "qemu-common.h" -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "qemu/notify.h" #include "hw/i386/topology.h" diff --git a/include/hw/input/lasips2.h b/include/hw/input/lasips2.h index 0cd7b59064a..f4c1e787d2b 100644 --- a/include/hw/input/lasips2.h +++ b/include/hw/input/lasips2.h @@ -7,7 +7,7 @@ #ifndef HW_INPUT_LASIPS2_H #define HW_INPUT_LASIPS2_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #define TYPE_LASIPS2 "lasips2" diff --git a/include/hw/loader-fit.h b/include/hw/loader-fit.h index 0832e379dc9..138da77d664 100644 --- a/include/hw/loader-fit.h +++ b/include/hw/loader-fit.h @@ -20,7 +20,7 @@ #ifndef HW_LOADER_FIT_H #define HW_LOADER_FIT_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" struct fit_loader_match { const char *compatible; diff --git a/include/hw/misc/allwinner-h3-dramc.h b/include/hw/misc/allwinner-h3-dramc.h index 0b6c877ef74..93e640b23af 100644 --- a/include/hw/misc/allwinner-h3-dramc.h +++ b/include/hw/misc/allwinner-h3-dramc.h @@ -22,7 +22,7 @@ #include "qom/object.h" #include "hw/sysbus.h" -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" /** * Constants diff --git a/include/hw/misc/empty_slot.h b/include/hw/misc/empty_slot.h index dec56e56ae4..d942aebd3e7 100644 --- a/include/hw/misc/empty_slot.h +++ b/include/hw/misc/empty_slot.h @@ -12,7 +12,7 @@ #ifndef HW_EMPTY_SLOT_H #define HW_EMPTY_SLOT_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" void empty_slot_init(const char *name, hwaddr addr, uint64_t slot_size); diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h index 0e7a8bc7af2..af1f8df9cf0 100644 --- a/include/hw/nvram/fw_cfg.h +++ b/include/hw/nvram/fw_cfg.h @@ -1,7 +1,7 @@ #ifndef FW_CFG_H #define FW_CFG_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "standard-headers/linux/qemu_fw_cfg.h" #include "hw/sysbus.h" #include "sysemu/dma.h" diff --git a/include/hw/pci-host/gpex.h b/include/hw/pci-host/gpex.h index fcf8b638200..52da437057e 100644 --- a/include/hw/pci-host/gpex.h +++ b/include/hw/pci-host/gpex.h @@ -20,7 +20,7 @@ #ifndef HW_GPEX_H #define HW_GPEX_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "hw/sysbus.h" #include "hw/pci/pci.h" #include "hw/pci/pcie_host.h" diff --git a/include/hw/remote/memory.h b/include/hw/remote/memory.h index bc2e30945f5..200fc982a00 100644 --- a/include/hw/remote/memory.h +++ b/include/hw/remote/memory.h @@ -11,7 +11,7 @@ #ifndef REMOTE_MEMORY_H #define REMOTE_MEMORY_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "hw/remote/mpqemu-link.h" void remote_sysmem_reconfig(MPQemuMsg *msg, Error **errp); diff --git a/include/hw/remote/mpqemu-link.h b/include/hw/remote/mpqemu-link.h index 4ec09158851..9b56b30a311 100644 --- a/include/hw/remote/mpqemu-link.h +++ b/include/hw/remote/mpqemu-link.h @@ -14,7 +14,7 @@ #include "qom/object.h" #include "qemu/thread.h" #include "io/channel.h" -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "io/channel-socket.h" #include "hw/remote/proxy.h" diff --git a/include/hw/rtc/m48t59.h b/include/hw/rtc/m48t59.h index d9b45eb1612..dda5ef4a20a 100644 --- a/include/hw/rtc/m48t59.h +++ b/include/hw/rtc/m48t59.h @@ -26,7 +26,7 @@ #ifndef HW_RTC_M48T59_H #define HW_RTC_M48T59_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "qom/object.h" #define TYPE_NVRAM "nvram" diff --git a/include/hw/rtc/sun4v-rtc.h b/include/hw/rtc/sun4v-rtc.h index fd868f6ed2f..b2e27447121 100644 --- a/include/hw/rtc/sun4v-rtc.h +++ b/include/hw/rtc/sun4v-rtc.h @@ -12,7 +12,7 @@ #ifndef HW_RTC_SUN4V #define HW_RTC_SUN4V -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" void sun4v_rtc_init(hwaddr addr); diff --git a/include/hw/timer/tmu012.h b/include/hw/timer/tmu012.h index 808ed8de1d7..ea98ff0b3f1 100644 --- a/include/hw/timer/tmu012.h +++ b/include/hw/timer/tmu012.h @@ -9,7 +9,7 @@ #ifndef HW_TIMER_TMU012_H #define HW_TIMER_TMU012_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #define TMU012_FEAT_TOCR (1 << 0) #define TMU012_FEAT_3CHAN (1 << 1) diff --git a/include/hw/virtio/virtio-access.h b/include/hw/virtio/virtio-access.h index 6818a23a2d3..b18e0109d9f 100644 --- a/include/hw/virtio/virtio-access.h +++ b/include/hw/virtio/virtio-access.h @@ -16,7 +16,7 @@ #ifndef QEMU_VIRTIO_ACCESS_H #define QEMU_VIRTIO_ACCESS_H -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "hw/virtio/virtio.h" #include "hw/virtio/virtio-bus.h" diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index af3887bb71d..b70fb361e3a 100644 --- a/include/monitor/monitor.h +++ b/include/monitor/monitor.h @@ -4,7 +4,7 @@ #include "block/block.h" #include "qapi/qapi-types-misc.h" #include "qemu/readline.h" -#include "include/exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" typedef struct MonitorHMP MonitorHMP; typedef struct MonitorOptions MonitorOptions; diff --git a/include/qemu/accel.h b/include/qemu/accel.h index 4f4c283f6fc..2fc5feddff2 100644 --- a/include/qemu/accel.h +++ b/include/qemu/accel.h @@ -24,7 +24,9 @@ #define QEMU_ACCEL_H #include "qom/object.h" -#include "exec/hwaddr.h" +#ifndef CONFIG_USER_ONLY +#include "exec/sysemu/hwaddr.h" +#endif typedef struct AccelState { /*< private >*/ diff --git a/include/qemu/iova-tree.h b/include/qemu/iova-tree.h index b66cf93c4bc..1530cf0e95e 100644 --- a/include/qemu/iova-tree.h +++ b/include/qemu/iova-tree.h @@ -24,7 +24,7 @@ */ #include "exec/memory.h" -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #define IOVA_OK (0) #define IOVA_ERR_INVALID (-1) /* Invalid parameters */ diff --git a/include/qemu/userfaultfd.h b/include/qemu/userfaultfd.h index 6b74f92792d..2cdce404edf 100644 --- a/include/qemu/userfaultfd.h +++ b/include/qemu/userfaultfd.h @@ -14,7 +14,7 @@ #define USERFAULTFD_H #include "qemu/osdep.h" -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include int uffd_query_features(uint64_t *features); diff --git a/dump/dump.c b/dump/dump.c index ab625909f30..544553d3579 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -15,7 +15,7 @@ #include "qemu-common.h" #include "qemu/cutils.h" #include "elf.h" -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "monitor/monitor.h" #include "sysemu/kvm.h" #include "sysemu/dump.h" diff --git a/dump/win_dump.c b/dump/win_dump.c index c5eb5a9aacd..6c30c98fb09 100644 --- a/dump/win_dump.c +++ b/dump/win_dump.c @@ -12,7 +12,7 @@ #include "qemu-common.h" #include "qemu/cutils.h" #include "elf.h" -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "monitor/monitor.h" #include "sysemu/kvm.h" #include "sysemu/dump.h" diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index 43c19b49234..d01d93eb8f9 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -27,7 +27,7 @@ #include "sysemu/numa.h" #include "sysemu/runstate.h" #include "sysemu/sysemu.h" -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "kvm_arm.h" #include "hw/arm/boot.h" #include "hw/block/flash.h" diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c index e7faf24058b..f84f37411fd 100644 --- a/hw/input/lasips2.c +++ b/hw/input/lasips2.c @@ -26,7 +26,7 @@ #include "hw/qdev-properties.h" #include "hw/input/ps2.h" #include "hw/input/lasips2.h" -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "trace.h" #include "exec/address-spaces.h" #include "migration/vmstate.h" diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c index de951ffe5d3..84c346e7420 100644 --- a/hw/m68k/next-cube.c +++ b/hw/m68k/next-cube.c @@ -10,7 +10,7 @@ */ #include "qemu/osdep.h" -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "sysemu/sysemu.h" #include "sysemu/qtest.h" #include "hw/irq.h" diff --git a/hw/ppc/pnv_homer.c b/hw/ppc/pnv_homer.c index 9a262629b73..394425232ed 100644 --- a/hw/ppc/pnv_homer.c +++ b/hw/ppc/pnv_homer.c @@ -19,7 +19,7 @@ #include "qemu/osdep.h" #include "qemu/log.h" #include "qapi/error.h" -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "exec/memory.h" #include "sysemu/cpus.h" #include "hw/qdev-core.h" diff --git a/tests/qtest/microbit-test.c b/tests/qtest/microbit-test.c index 2b255579dfd..4d1c7fd863b 100644 --- a/tests/qtest/microbit-test.c +++ b/tests/qtest/microbit-test.c @@ -15,7 +15,7 @@ #include "qemu/osdep.h" -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" #include "libqos/libqtest.h" #include "hw/arm/nrf51.h" diff --git a/MAINTAINERS b/MAINTAINERS index 78561a223f9..f1ae9934349 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -129,6 +129,7 @@ F: include/exec/cpu*.h F: include/exec/exec-all.h F: include/exec/helper*.h F: include/exec/tb-hash.h +F: include/exec/sysemu/hwaddr.h F: include/sysemu/cpus.h F: include/sysemu/tcg.h F: include/hw/core/tcg-cpu-ops.h diff --git a/scripts/codeconverter/codeconverter/test_regexps.py b/scripts/codeconverter/codeconverter/test_regexps.py index a445634d88a..41a2cd9c14c 100644 --- a/scripts/codeconverter/codeconverter/test_regexps.py +++ b/scripts/codeconverter/codeconverter/test_regexps.py @@ -228,7 +228,7 @@ def test_initial_includes(): /* NOR flash devices */ #include "qom/object.h" -#include "exec/hwaddr.h" +#include "exec/sysemu/hwaddr.h" /* pflash_cfi01.c */ ''' @@ -236,7 +236,7 @@ def test_initial_includes(): m = InitialIncludes.domatch(c) assert m print(repr(m.group(0))) - assert m.group(0).endswith('#include "exec/hwaddr.h"\n') + assert m.group(0).endswith('#include "exec/sysemu/hwaddr.h"\n') c = '''#ifndef QEMU_VIRTIO_9P_H #define QEMU_VIRTIO_9P_H From patchwork Mon May 17 11:11:03 2021 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: 12261665 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6C88C433ED for ; Mon, 17 May 2021 11:40:24 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6F53061073 for ; Mon, 17 May 2021 11:40:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6F53061073 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1libbj-00060K-A8 for qemu-devel@archiver.kernel.org; Mon, 17 May 2021 07:40:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lib9p-0003v6-FC for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:33 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:43864) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lib9l-0000Sn-Vu for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:33 -0400 Received: by mail-wm1-x32c.google.com with SMTP id b19-20020a05600c06d3b029014258a636e8so3347635wmn.2 for ; Mon, 17 May 2021 04:11:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KsOd4cFGdpWMT1est35/VbB1+PKurYa2ah3FsZXq+ZU=; b=UosgpI6v/evula3iHdrKnoUMdOyBKCaZghtIgUeBSXIoI49UE93NT09csovTgeRQyt CL1Bhz8kOoYJouRrQKxVCAqhDa+iINdbY3c7aYpQV+bJniVE7Gcf+OtPTuDZfjdpoqts eFOcbPAg6XAIpLEy/mM1O953dJACMzpXRkIXYXvEfA7GUrIKzWm8hd+SDB+1e7mbcbnf C75X+iBUI5MC2v4o4lTq0xzCzABR2H6La8CWK3joEwQaL+cL9quSQXQhP0Ibal9wlXeJ yGQAkfdWq6+YdzprK8CYiqbDrFhPAqhnxDg4uU/xc+ni6lM6a8NmSJmUhZcTbIIEmW0A eIrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=KsOd4cFGdpWMT1est35/VbB1+PKurYa2ah3FsZXq+ZU=; b=lf5sXkNO/u+BAwWhkFPtqHvT1trbduQQpuIxWVVurRWPn9zQMLXv8eETltFlRPmMBx DYtukRurcfrG41GmWP3cE6zAqwRyTmtlITLOj4ienkhy43hxK34aYBZLT1J9KlD73izX sd9mRVj0U6x6iJ+hFNt+ad+0Nlv08dCc+Q+VhXH3Ochj4ooUb1DNyMxAMuf3hnYpaB+/ Oax77FUdSvdqQdf65K0O9wcEcOsCoRD2adsBdXE3FU5o5dUqMHBGM8/QW+/WKsQlWiBl lYmqheD8K3fjwa1C6ygpb95L04QPcT5AiMlKfYEta6fhzTmFvF3rgntgjo45B4P2eb0q QayQ== X-Gm-Message-State: AOAM532hbi6Zk1wPYYPQjxQ+ssoHYv9wGT9QLZqhx+ddgCGcFKcc02vR UprBP+5ZdD0QWxwEbWAdgazEac8m6F2PpQ== X-Google-Smtp-Source: ABdhPJzEHqkIAhICNMdGYAVyEbl8cbr1w2U5cmscVYs3PFaUcNOGNhBllSO5ZhIrwLmibIyJAdQLvw== X-Received: by 2002:a1c:5582:: with SMTP id j124mr28476733wmb.0.1621249888171; Mon, 17 May 2021 04:11:28 -0700 (PDT) Received: from localhost.localdomain (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id 6sm16234139wry.60.2021.05.17.04.11.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 04:11:27 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 03/11] exec: Restrict cputlb.h to sysemu/ Date: Mon, 17 May 2021 13:11:03 +0200 Message-Id: <20210517111111.1068153-4-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210517111111.1068153-1-f4bug@amsat.org> References: <20210517111111.1068153-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32c.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Richard Henderson , Claudio Fontana , Laurent Vivier Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" To make it clearer the cputlb.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/cputlb.h,exec/sysemu/cputlb.h, $(git grep -l exec/cputlb.h) Then the #ifdef'ry conditional on CONFIG_USER_ONLY has been replaced by an #error. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/{ => sysemu}/cputlb.h | 11 +++++++---- accel/tcg/cputlb.c | 2 +- accel/tcg/translate-all.c | 6 +++--- MAINTAINERS | 1 + 4 files changed, 12 insertions(+), 8 deletions(-) rename include/exec/{ => sysemu}/cputlb.h (86%) diff --git a/include/exec/cputlb.h b/include/exec/sysemu/cputlb.h similarity index 86% rename from include/exec/cputlb.h rename to include/exec/sysemu/cputlb.h index 19b16e58f84..5a37a870343 100644 --- a/include/exec/cputlb.h +++ b/include/exec/sysemu/cputlb.h @@ -17,15 +17,18 @@ * License along with this library; if not, see . */ -#ifndef CPUTLB_H -#define CPUTLB_H +#ifndef EXEC_SYSEMU_CPUTLB_H +#define EXEC_SYSEMU_CPUTLB_H + +#ifdef CONFIG_USER_ONLY +#error Cannot include sysemu specific header from user emulation +#endif #include "exec/cpu-common.h" -#if !defined(CONFIG_USER_ONLY) /* cputlb.c */ void tlb_protect_code(ram_addr_t ram_addr); void tlb_unprotect_code(ram_addr_t ram_addr); void tlb_flush_counts(size_t *full, size_t *part, size_t *elide); -#endif + #endif diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 84e7d91a5ca..452029e8193 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -23,7 +23,7 @@ #include "exec/exec-all.h" #include "exec/memory.h" #include "exec/cpu_ldst.h" -#include "exec/cputlb.h" +#include "exec/sysemu/cputlb.h" #include "exec/tb-hash.h" #include "exec/memory-internal.h" #include "exec/ram_addr.h" diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index ae7e873713a..98a07ce4e4e 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -42,11 +42,11 @@ #include #endif #endif -#else +#else /* !CONFIG_USER_ONLY */ +#include "exec/sysemu/cputlb.h" #include "exec/ram_addr.h" -#endif +#endif /* CONFIG_USER_ONLY */ -#include "exec/cputlb.h" #include "exec/tb-hash.h" #include "exec/translate-all.h" #include "qemu/bitmap.h" diff --git a/MAINTAINERS b/MAINTAINERS index f1ae9934349..4378ec47a2c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -131,6 +131,7 @@ F: include/exec/helper*.h F: include/exec/tb-hash.h F: include/exec/sysemu/hwaddr.h F: include/sysemu/cpus.h +F: include/exec/sysemu/cputlb.h F: include/sysemu/tcg.h F: include/hw/core/tcg-cpu-ops.h From patchwork Mon May 17 11:11:04 2021 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: 12261669 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CEEF0C433B4 for ; Mon, 17 May 2021 11:43:32 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C0A761073 for ; Mon, 17 May 2021 11:43:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C0A761073 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:49156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1libel-0002iE-3b for qemu-devel@archiver.kernel.org; Mon, 17 May 2021 07:43:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lib9w-0004In-8Y for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:40 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:33382) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lib9r-0000Vo-G5 for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:39 -0400 Received: by mail-wm1-x32e.google.com with SMTP id z137-20020a1c7e8f0000b02901774f2a7dc4so1091114wmc.0 for ; Mon, 17 May 2021 04:11:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=F3xT3Oufi0Stl9YtwAKlM/UewCKyojtDIt7fPqgzDQ4=; b=s5QwHIwsXM24DwAdKJIJQPfAODSPP3xfLQhXKSnf7lzcmnG9Bhv+Ob+ZZ1ocEKaSZI OsDNG0hwkPVSadU1V70CJ/ynk2EJ9hZzRr5izsUcTi1OIBA+EBp+bB9HG/HunMfGAw+f DMkRuIW/KoqKEqgInC7tksPGk0ABEFwQT14RU2tn21vroUSpbIWrcDvppLDTgIoZwl1+ ZBNE31+7YJBfYk0n3+F/1jMfw4vQNTt5QJNmL2BfFkH+J2E3OiGZnsbjCnmzjZ1v2/Ob 6VK7tDr+LKiovwMbwiCD9ijSaDZuS/zOKmBQ+9iLDG9DX8pIFVI/ql4kcTvG2Os9L6in cE7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=F3xT3Oufi0Stl9YtwAKlM/UewCKyojtDIt7fPqgzDQ4=; b=DDST2vlMuR4vu7o7k5gz0WfyO0zB9JAOHkrl+tUOUMBMajkhDV91VXlDZqMxhwzvQM GLPppLuXVXpqTCMW0M0csrniXz0TSY3ZmpneseC1ggSAbsjASwW51Ib31PcVN0SRid2x /yNaxBhcVqjNrQBw2qmaJ9B6DyHoYlwKmLyjKFj4LHVT6OOTmfoIyHQMF182v1oJzzx+ /dcVuqJKFKlundZL5oXqdZm0Mg/bMugx0mmpIq4Sdb/OsKa28SA3xfUx4vj58w1Ev2Dc 9B8zkA7qI8AI+2GaE6TTwNhk30DJYDxFOMjf+yi2VBrLL/y4J95xrVKR3pjBC5ZYmenp CTJg== X-Gm-Message-State: AOAM532QxzGRBJtFrmeE/IdIGWmWyBjqEYxzWO7udI3HR6HGTxrPwv9W ojyUjniZcBFxPL1SrIa8RmtXDiP4l2EvrQ== X-Google-Smtp-Source: ABdhPJygypIRdX//GvhiByc5Q9EM2lCQbPIkqOKCGBbJ+6lKKG1uZ1/IMARBxvuV13U/bGMVq99O3g== X-Received: by 2002:a1c:4602:: with SMTP id t2mr22218661wma.173.1621249893032; Mon, 17 May 2021 04:11:33 -0700 (PDT) Received: from localhost.localdomain (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id f1sm18871811wrr.63.2021.05.17.04.11.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 04:11:32 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 04/11] exec: Restrict memory.h to sysemu/ Date: Mon, 17 May 2021 13:11:04 +0200 Message-Id: <20210517111111.1068153-5-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210517111111.1068153-1-f4bug@amsat.org> References: <20210517111111.1068153-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32e.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Richard Henderson , Claudio Fontana , Laurent Vivier Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" To make it clearer the memory.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/memory.h,exec/sysemu/memory.h, $(git grep -l exec/memory.h) Then the #ifdef'ry conditional on CONFIG_USER_ONLY has been replaced by an #error. Signed-off-by: Philippe Mathieu-Daudé --- docs/devel/memory.rst | 2 +- hw/arm/strongarm.h | 2 +- hw/display/framebuffer.h | 2 +- hw/display/vga_int.h | 2 +- hw/net/i82596.h | 2 +- hw/net/pcnet.h | 2 +- hw/ppc/mac.h | 2 +- hw/usb/hcd-uhci.h | 2 +- hw/vfio/pci.h | 2 +- include/exec/address-spaces.h | 2 +- include/exec/cpu-all.h | 4 +++- include/exec/ioport.h | 2 +- include/exec/{ => sysemu}/memory.h | 6 +++--- include/hw/acpi/acpi.h | 2 +- include/hw/acpi/tco.h | 2 +- include/hw/arm/fsl-imx25.h | 2 +- include/hw/arm/fsl-imx31.h | 2 +- include/hw/arm/fsl-imx6.h | 2 +- include/hw/arm/fsl-imx6ul.h | 2 +- include/hw/arm/omap.h | 2 +- include/hw/arm/pxa.h | 2 +- include/hw/boards.h | 2 +- include/hw/char/riscv_htif.h | 2 +- include/hw/char/serial.h | 2 +- include/hw/display/macfb.h | 2 +- include/hw/gpio/npcm7xx_gpio.h | 2 +- include/hw/i2c/npcm7xx_smbus.h | 2 +- include/hw/i2c/pm_smbus.h | 2 +- include/hw/i386/apic_internal.h | 2 +- include/hw/i386/ioapic_internal.h | 2 +- include/hw/ide.h | 2 +- include/hw/ipmi/ipmi.h | 2 +- include/hw/isa/apm.h | 2 +- include/hw/isa/isa.h | 2 +- include/hw/mem/npcm7xx_mc.h | 2 +- include/hw/mem/pc-dimm.h | 2 +- include/hw/mips/mips.h | 2 +- include/hw/misc/auxbus.h | 2 +- include/hw/misc/mac_via.h | 2 +- include/hw/misc/mos6522.h | 2 +- include/hw/misc/npcm7xx_clk.h | 2 +- include/hw/misc/npcm7xx_gcr.h | 2 +- include/hw/misc/npcm7xx_mft.h | 2 +- include/hw/net/msf2-emac.h | 2 +- include/hw/nvram/npcm7xx_otp.h | 2 +- include/hw/pci-host/pam.h | 2 +- include/hw/pci-host/remote.h | 2 +- include/hw/pci/pci.h | 2 +- include/hw/pci/pcie_host.h | 2 +- include/hw/pci/shpc.h | 2 +- include/hw/ppc/mac_dbdma.h | 2 +- include/hw/ppc/ppc4xx.h | 2 +- include/hw/ppc/xics.h | 2 +- include/hw/register.h | 2 +- include/hw/remote/proxy-memory-listener.h | 2 +- include/hw/sh4/sh_intc.h | 2 +- include/hw/sysbus.h | 2 +- include/hw/timer/npcm7xx_timer.h | 2 +- include/hw/tricore/tricore.h | 2 +- include/hw/usb.h | 2 +- include/hw/vfio/vfio-common.h | 2 +- include/hw/virtio/vhost-backend.h | 2 +- include/hw/virtio/vhost.h | 2 +- include/hw/virtio/virtio.h | 2 +- include/hw/xtensa/mx_pic.h | 2 +- include/qemu/iova-tree.h | 2 +- include/sysemu/dma.h | 2 +- include/sysemu/hostmem.h | 2 +- include/sysemu/kvm_int.h | 2 +- include/sysemu/memory_mapping.h | 2 +- include/sysemu/vhost-user-backend.h | 2 +- target/arm/kvm_arm.h | 2 +- accel/kvm/kvm-all.c | 2 +- accel/tcg/cputlb.c | 2 +- backends/tpm/tpm_util.c | 2 +- hw/avr/atmega.c | 2 +- hw/block/nvme.c | 2 +- hw/block/onenand.c | 2 +- hw/core/loader-fit.c | 2 +- hw/core/loader.c | 2 +- hw/display/edid-region.c | 2 +- hw/display/tc6393xb.c | 2 +- hw/i386/acpi-common.c | 2 +- hw/i386/acpi-microvm.c | 2 +- hw/i386/pc.c | 2 +- hw/i386/pc_piix.c | 2 +- hw/intc/mips_gic.c | 2 +- hw/intc/ompic.c | 2 +- hw/misc/omap_gpmc.c | 2 +- hw/net/ne2000.c | 2 +- hw/nios2/10m50_devboard.c | 2 +- hw/nios2/generic_nommu.c | 2 +- hw/pci-bridge/pci_bridge_dev.c | 2 +- hw/pci-host/remote.c | 2 +- hw/ppc/pnv_homer.c | 2 +- hw/ppc/ppc440_uc.c | 2 +- hw/ppc/sam460ex.c | 2 +- hw/remote/machine.c | 2 +- hw/remote/proxy-memory-listener.c | 2 +- hw/timer/sh_timer.c | 2 +- hw/vfio/common.c | 2 +- hw/vfio/platform.c | 2 +- hw/xtensa/sim.c | 2 +- hw/xtensa/virt.c | 2 +- hw/xtensa/xtensa_memory.c | 2 +- hw/xtensa/xtfpga.c | 2 +- migration/rdma.c | 2 +- migration/savevm.c | 2 +- monitor/misc.c | 2 +- softmmu/ioport.c | 2 +- softmmu/memory.c | 2 +- softmmu/memory_mapping.c | 2 +- softmmu/physmem.c | 2 +- softmmu/qtest.c | 2 +- stubs/ram-block.c | 2 +- target/s390x/misc_helper.c | 2 +- tests/qtest/fuzz/generic_fuzz.c | 2 +- tests/qtest/fuzz/qos_fuzz.c | 2 +- ui/console.c | 2 +- util/vfio-helpers.c | 2 +- MAINTAINERS | 2 +- scripts/analyze-inclusions | 2 +- 122 files changed, 126 insertions(+), 124 deletions(-) rename include/exec/{ => sysemu}/memory.h (99%) diff --git a/docs/devel/memory.rst b/docs/devel/memory.rst index 5dc8a126829..69d8d81f8ee 100644 --- a/docs/devel/memory.rst +++ b/docs/devel/memory.rst @@ -365,4 +365,4 @@ callbacks are called: API Reference ------------- -.. kernel-doc:: include/exec/memory.h +.. kernel-doc:: include/exec/sysemu/memory.h diff --git a/hw/arm/strongarm.h b/hw/arm/strongarm.h index 192821f6aab..a4d881b5b42 100644 --- a/hw/arm/strongarm.h +++ b/hw/arm/strongarm.h @@ -1,7 +1,7 @@ #ifndef STRONGARM_H #define STRONGARM_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "target/arm/cpu-qom.h" #define SA_CS0 0x00000000 diff --git a/hw/display/framebuffer.h b/hw/display/framebuffer.h index 38fa0dcec61..04bcf53ed59 100644 --- a/hw/display/framebuffer.h +++ b/hw/display/framebuffer.h @@ -1,7 +1,7 @@ #ifndef QEMU_FRAMEBUFFER_H #define QEMU_FRAMEBUFFER_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" /* Framebuffer device helper routines. */ diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h index 847e784ca6a..b923633cc4f 100644 --- a/hw/display/vga_int.h +++ b/hw/display/vga_int.h @@ -26,7 +26,7 @@ #define HW_VGA_INT_H #include "exec/ioport.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "ui/console.h" #include "hw/display/bochs-vbe.h" diff --git a/hw/net/i82596.h b/hw/net/i82596.h index f0bbe810eb2..de5cc7d0c5b 100644 --- a/hw/net/i82596.h +++ b/hw/net/i82596.h @@ -3,7 +3,7 @@ #define I82596_IOPORT_SIZE 0x20 -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/address-spaces.h" #define PORT_RESET 0x00 /* reset 82596 */ diff --git a/hw/net/pcnet.h b/hw/net/pcnet.h index f49b213c57f..0ad6bab1f90 100644 --- a/hw/net/pcnet.h +++ b/hw/net/pcnet.h @@ -7,7 +7,7 @@ #define PCNET_LOOPTEST_CRC 1 #define PCNET_LOOPTEST_NOCRC 2 -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/irq.h" /* BUS CONFIGURATION REGISTERS */ diff --git a/hw/ppc/mac.h b/hw/ppc/mac.h index 22c8408078d..104fab63ccf 100644 --- a/hw/ppc/mac.h +++ b/hw/ppc/mac.h @@ -27,7 +27,7 @@ #define PPC_MAC_H #include "qemu/units.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/boards.h" #include "hw/sysbus.h" #include "hw/input/adb.h" diff --git a/hw/usb/hcd-uhci.h b/hw/usb/hcd-uhci.h index e61d8fcb192..04a9a517318 100644 --- a/hw/usb/hcd-uhci.h +++ b/hw/usb/hcd-uhci.h @@ -28,7 +28,7 @@ #ifndef HW_USB_HCD_UHCI_H #define HW_USB_HCD_UHCI_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qemu/timer.h" #include "hw/pci/pci.h" #include "hw/usb.h" diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h index 64777516d16..ee647a03d6c 100644 --- a/hw/vfio/pci.h +++ b/hw/vfio/pci.h @@ -12,7 +12,7 @@ #ifndef HW_VFIO_VFIO_PCI_H #define HW_VFIO_VFIO_PCI_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/pci/pci.h" #include "hw/vfio/vfio-common.h" #include "qemu/event_notifier.h" diff --git a/include/exec/address-spaces.h b/include/exec/address-spaces.h index db8bfa9a92b..b7533b33f72 100644 --- a/include/exec/address-spaces.h +++ b/include/exec/address-spaces.h @@ -19,7 +19,7 @@ * you're one of them. */ -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #ifndef CONFIG_USER_ONLY diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 3e7edddead5..8f897b4fec6 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -20,7 +20,9 @@ #define CPU_ALL_H #include "exec/cpu-common.h" -#include "exec/memory.h" +#if !defined(CONFIG_USER_ONLY) +#include "exec/sysemu/memory.h" +#endif #include "qemu/thread.h" #include "hw/core/cpu.h" #include "qemu/rcu.h" diff --git a/include/exec/ioport.h b/include/exec/ioport.h index e34f668998d..d5ca8abff76 100644 --- a/include/exec/ioport.h +++ b/include/exec/ioport.h @@ -24,7 +24,7 @@ #ifndef IOPORT_H #define IOPORT_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #define MAX_IOPORTS (64 * 1024) #define IOPORTS_MASK (MAX_IOPORTS - 1) diff --git a/include/exec/memory.h b/include/exec/sysemu/memory.h similarity index 99% rename from include/exec/memory.h rename to include/exec/sysemu/memory.h index 52a2659b396..13288b110e0 100644 --- a/include/exec/memory.h +++ b/include/exec/sysemu/memory.h @@ -14,7 +14,9 @@ #ifndef MEMORY_H #define MEMORY_H -#ifndef CONFIG_USER_ONLY +#ifdef CONFIG_USER_ONLY +#error Cannot include sysemu specific header from user emulation +#endif #include "exec/cpu-common.h" #include "exec/sysemu/hwaddr.h" @@ -2632,5 +2634,3 @@ bool ram_block_discard_is_disabled(void); bool ram_block_discard_is_required(void); #endif - -#endif diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h index 9e8a76f2e2a..485cab42a93 100644 --- a/include/hw/acpi/acpi.h +++ b/include/hw/acpi/acpi.h @@ -21,7 +21,7 @@ */ #include "qemu/notify.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/acpi/acpi_dev_interface.h" /* diff --git a/include/hw/acpi/tco.h b/include/hw/acpi/tco.h index a1e0da82134..2bed10d1ab1 100644 --- a/include/hw/acpi/tco.h +++ b/include/hw/acpi/tco.h @@ -10,7 +10,7 @@ #ifndef HW_ACPI_TCO_H #define HW_ACPI_TCO_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" /* As per ICH9 spec, the internal timer has an error of ~0.6s on every tick */ #define TCO_TICK_NSEC 600000000LL diff --git a/include/hw/arm/fsl-imx25.h b/include/hw/arm/fsl-imx25.h index 1b1086e9458..e37e1c3afbd 100644 --- a/include/hw/arm/fsl-imx25.h +++ b/include/hw/arm/fsl-imx25.h @@ -30,7 +30,7 @@ #include "hw/sd/sdhci.h" #include "hw/usb/chipidea.h" #include "hw/watchdog/wdt_imx2.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "target/arm/cpu.h" #include "qom/object.h" diff --git a/include/hw/arm/fsl-imx31.h b/include/hw/arm/fsl-imx31.h index c116a73e0b3..28c819b6cde 100644 --- a/include/hw/arm/fsl-imx31.h +++ b/include/hw/arm/fsl-imx31.h @@ -26,7 +26,7 @@ #include "hw/i2c/imx_i2c.h" #include "hw/gpio/imx_gpio.h" #include "hw/watchdog/wdt_imx2.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "target/arm/cpu.h" #include "qom/object.h" diff --git a/include/hw/arm/fsl-imx6.h b/include/hw/arm/fsl-imx6.h index 83291457cf2..3b6e5b086ca 100644 --- a/include/hw/arm/fsl-imx6.h +++ b/include/hw/arm/fsl-imx6.h @@ -32,7 +32,7 @@ #include "hw/net/imx_fec.h" #include "hw/usb/chipidea.h" #include "hw/usb/imx-usb-phy.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "cpu.h" #include "qom/object.h" diff --git a/include/hw/arm/fsl-imx6ul.h b/include/hw/arm/fsl-imx6ul.h index 7812e516a52..0dbd6e74861 100644 --- a/include/hw/arm/fsl-imx6ul.h +++ b/include/hw/arm/fsl-imx6ul.h @@ -36,7 +36,7 @@ #include "hw/net/imx_fec.h" #include "hw/usb/chipidea.h" #include "hw/usb/imx-usb-phy.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "cpu.h" #include "qom/object.h" diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h index ff6a173f8a6..5e60cd3f0d5 100644 --- a/include/hw/arm/omap.h +++ b/include/hw/arm/omap.h @@ -20,7 +20,7 @@ #ifndef HW_ARM_OMAP_H #define HW_ARM_OMAP_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/input/tsc2xxx.h" #include "target/arm/cpu-qom.h" #include "qemu/log.h" diff --git a/include/hw/arm/pxa.h b/include/hw/arm/pxa.h index 1095504b86f..91360a1973f 100644 --- a/include/hw/arm/pxa.h +++ b/include/hw/arm/pxa.h @@ -10,7 +10,7 @@ #ifndef PXA_H #define PXA_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "target/arm/cpu-qom.h" #include "hw/pcmcia.h" #include "qom/object.h" diff --git a/include/hw/boards.h b/include/hw/boards.h index 3d55d2bd62c..e209b8ff3d0 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -3,7 +3,7 @@ #ifndef HW_BOARDS_H #define HW_BOARDS_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "sysemu/hostmem.h" #include "sysemu/blockdev.h" #include "qemu/accel.h" diff --git a/include/hw/char/riscv_htif.h b/include/hw/char/riscv_htif.h index fb9452cf51d..d7c6e0cce35 100644 --- a/include/hw/char/riscv_htif.h +++ b/include/hw/char/riscv_htif.h @@ -22,7 +22,7 @@ #include "chardev/char.h" #include "chardev/char-fe.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "target/riscv/cpu.h" #define TYPE_HTIF_UART "riscv.htif.uart" diff --git a/include/hw/char/serial.h b/include/hw/char/serial.h index 8ba7eca3d67..09310c27658 100644 --- a/include/hw/char/serial.h +++ b/include/hw/char/serial.h @@ -27,7 +27,7 @@ #define HW_SERIAL_H #include "chardev/char-fe.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qemu/fifo8.h" #include "chardev/char.h" #include "hw/sysbus.h" diff --git a/include/hw/display/macfb.h b/include/hw/display/macfb.h index 80806b0306a..34dde745fa9 100644 --- a/include/hw/display/macfb.h +++ b/include/hw/display/macfb.h @@ -13,7 +13,7 @@ #ifndef MACFB_H #define MACFB_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "ui/console.h" #include "qom/object.h" diff --git a/include/hw/gpio/npcm7xx_gpio.h b/include/hw/gpio/npcm7xx_gpio.h index b1d771bd776..fd7a98174db 100644 --- a/include/hw/gpio/npcm7xx_gpio.h +++ b/include/hw/gpio/npcm7xx_gpio.h @@ -15,7 +15,7 @@ #ifndef NPCM7XX_GPIO_H #define NPCM7XX_GPIO_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/sysbus.h" /* Number of pins managed by each controller. */ diff --git a/include/hw/i2c/npcm7xx_smbus.h b/include/hw/i2c/npcm7xx_smbus.h index 7d59ee917eb..f2092e37e34 100644 --- a/include/hw/i2c/npcm7xx_smbus.h +++ b/include/hw/i2c/npcm7xx_smbus.h @@ -16,7 +16,7 @@ #ifndef NPCM7XX_SMBUS_H #define NPCM7XX_SMBUS_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/i2c/i2c.h" #include "hw/irq.h" #include "hw/sysbus.h" diff --git a/include/hw/i2c/pm_smbus.h b/include/hw/i2c/pm_smbus.h index 0d74207efb5..c52e79de5e4 100644 --- a/include/hw/i2c/pm_smbus.h +++ b/include/hw/i2c/pm_smbus.h @@ -1,7 +1,7 @@ #ifndef PM_SMBUS_H #define PM_SMBUS_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/i2c/smbus_master.h" #define PM_SMBUS_MAX_MSG_SIZE 32 diff --git a/include/hw/i386/apic_internal.h b/include/hw/i386/apic_internal.h index c175e7e7181..ecf7cc3d156 100644 --- a/include/hw/i386/apic_internal.h +++ b/include/hw/i386/apic_internal.h @@ -22,7 +22,7 @@ #define QEMU_APIC_INTERNAL_H #include "cpu.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qemu/timer.h" #include "target/i386/cpu-qom.h" #include "qom/object.h" diff --git a/include/hw/i386/ioapic_internal.h b/include/hw/i386/ioapic_internal.h index 021e715f113..c824b7d138a 100644 --- a/include/hw/i386/ioapic_internal.h +++ b/include/hw/i386/ioapic_internal.h @@ -22,7 +22,7 @@ #ifndef QEMU_IOAPIC_INTERNAL_H #define QEMU_IOAPIC_INTERNAL_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/sysbus.h" #include "qemu/notify.h" #include "qom/object.h" diff --git a/include/hw/ide.h b/include/hw/ide.h index c5ce5da4f47..50d07d7e6fe 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -2,7 +2,7 @@ #define HW_IDE_H #include "hw/isa/isa.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" /* ide-isa.c */ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, diff --git a/include/hw/ipmi/ipmi.h b/include/hw/ipmi/ipmi.h index 77a7213ed93..03f71e6b9bd 100644 --- a/include/hw/ipmi/ipmi.h +++ b/include/hw/ipmi/ipmi.h @@ -25,7 +25,7 @@ #ifndef HW_IPMI_H #define HW_IPMI_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/hw/isa/apm.h b/include/hw/isa/apm.h index b6e070c00e9..e66f27badeb 100644 --- a/include/hw/isa/apm.h +++ b/include/hw/isa/apm.h @@ -1,7 +1,7 @@ #ifndef APM_H #define APM_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #define APM_CNT_IOPORT 0xb2 #define ACPI_PORT_SMI_CMD APM_CNT_IOPORT diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index ddaae89a853..9c9aabfc3b0 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -3,7 +3,7 @@ /* ISA bus */ -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/ioport.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/hw/mem/npcm7xx_mc.h b/include/hw/mem/npcm7xx_mc.h index 7ed38be2431..a10a29cea41 100644 --- a/include/hw/mem/npcm7xx_mc.h +++ b/include/hw/mem/npcm7xx_mc.h @@ -16,7 +16,7 @@ #ifndef NPCM7XX_MC_H #define NPCM7XX_MC_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/sysbus.h" /** diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h index 1473e6db625..5a88c767631 100644 --- a/include/hw/mem/pc-dimm.h +++ b/include/hw/mem/pc-dimm.h @@ -16,7 +16,7 @@ #ifndef QEMU_PC_DIMM_H #define QEMU_PC_DIMM_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/hw/mips/mips.h b/include/hw/mips/mips.h index 6c9c8805f3f..dc9fbea121e 100644 --- a/include/hw/mips/mips.h +++ b/include/hw/mips/mips.h @@ -7,7 +7,7 @@ /* Kernels can be configured with 64KB pages */ #define INITRD_PAGE_SIZE (64 * KiB) -#include "exec/memory.h" +#include "exec/sysemu/memory.h" /* gt64xxx.c */ PCIBus *gt64120_register(qemu_irq *pic); diff --git a/include/hw/misc/auxbus.h b/include/hw/misc/auxbus.h index b05799d2f7a..4e2db11d705 100644 --- a/include/hw/misc/auxbus.h +++ b/include/hw/misc/auxbus.h @@ -25,7 +25,7 @@ #ifndef HW_MISC_AUXBUS_H #define HW_MISC_AUXBUS_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/hw/misc/mac_via.h b/include/hw/misc/mac_via.h index 3058b30685a..56f44198e2e 100644 --- a/include/hw/misc/mac_via.h +++ b/include/hw/misc/mac_via.h @@ -9,7 +9,7 @@ #ifndef HW_MISC_MAC_VIA_H #define HW_MISC_MAC_VIA_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/sysbus.h" #include "hw/misc/mos6522.h" #include "qom/object.h" diff --git a/include/hw/misc/mos6522.h b/include/hw/misc/mos6522.h index fc95d22b0fd..9ae8d861c8e 100644 --- a/include/hw/misc/mos6522.h +++ b/include/hw/misc/mos6522.h @@ -27,7 +27,7 @@ #ifndef MOS6522_H #define MOS6522_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/sysbus.h" #include "hw/input/adb.h" #include "qom/object.h" diff --git a/include/hw/misc/npcm7xx_clk.h b/include/hw/misc/npcm7xx_clk.h index d5c8d16ca42..9a425b5cba6 100644 --- a/include/hw/misc/npcm7xx_clk.h +++ b/include/hw/misc/npcm7xx_clk.h @@ -16,7 +16,7 @@ #ifndef NPCM7XX_CLK_H #define NPCM7XX_CLK_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/clock.h" #include "hw/sysbus.h" diff --git a/include/hw/misc/npcm7xx_gcr.h b/include/hw/misc/npcm7xx_gcr.h index 13109d9d324..e1f0ebdef38 100644 --- a/include/hw/misc/npcm7xx_gcr.h +++ b/include/hw/misc/npcm7xx_gcr.h @@ -16,7 +16,7 @@ #ifndef NPCM7XX_GCR_H #define NPCM7XX_GCR_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/sysbus.h" /* diff --git a/include/hw/misc/npcm7xx_mft.h b/include/hw/misc/npcm7xx_mft.h index 36785e3ba81..dd6ec3dba94 100644 --- a/include/hw/misc/npcm7xx_mft.h +++ b/include/hw/misc/npcm7xx_mft.h @@ -16,7 +16,7 @@ #ifndef NPCM7XX_MFT_H #define NPCM7XX_MFT_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/clock.h" #include "hw/irq.h" #include "hw/sysbus.h" diff --git a/include/hw/net/msf2-emac.h b/include/hw/net/msf2-emac.h index 846ba6e6dce..eea742f9758 100644 --- a/include/hw/net/msf2-emac.h +++ b/include/hw/net/msf2-emac.h @@ -23,7 +23,7 @@ */ #include "hw/sysbus.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "net/net.h" #include "net/eth.h" #include "qom/object.h" diff --git a/include/hw/nvram/npcm7xx_otp.h b/include/hw/nvram/npcm7xx_otp.h index 156bbd151ab..f7700a2a8e7 100644 --- a/include/hw/nvram/npcm7xx_otp.h +++ b/include/hw/nvram/npcm7xx_otp.h @@ -16,7 +16,7 @@ #ifndef NPCM7XX_OTP_H #define NPCM7XX_OTP_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/sysbus.h" /* Each OTP module holds 8192 bits of one-time programmable storage */ diff --git a/include/hw/pci-host/pam.h b/include/hw/pci-host/pam.h index c1fd06ba2ae..5814a9dbc09 100644 --- a/include/hw/pci-host/pam.h +++ b/include/hw/pci-host/pam.h @@ -50,7 +50,7 @@ * 0xf0000 - 0xfffff System BIOS Area Memory Segments */ -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #define SMRAM_C_BASE 0xa0000 #define SMRAM_C_END 0xc0000 diff --git a/include/hw/pci-host/remote.h b/include/hw/pci-host/remote.h index 3dcf6aa51d1..1f71b9af138 100644 --- a/include/hw/pci-host/remote.h +++ b/include/hw/pci-host/remote.h @@ -11,7 +11,7 @@ #ifndef REMOTE_PCIHOST_H #define REMOTE_PCIHOST_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/pci/pcie_host.h" #define TYPE_REMOTE_PCIHOST "remote-pcihost" diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 6be4e0c460c..331421d02f5 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -1,7 +1,7 @@ #ifndef QEMU_PCI_H #define QEMU_PCI_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "sysemu/dma.h" /* PCI includes legacy ISA access. */ diff --git a/include/hw/pci/pcie_host.h b/include/hw/pci/pcie_host.h index 076457b270e..a084c4b2e81 100644 --- a/include/hw/pci/pcie_host.h +++ b/include/hw/pci/pcie_host.h @@ -22,7 +22,7 @@ #define PCIE_HOST_H #include "hw/pci/pci_host.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qom/object.h" #define TYPE_PCIE_HOST_BRIDGE "pcie-host-bridge" diff --git a/include/hw/pci/shpc.h b/include/hw/pci/shpc.h index d5683b73990..a51d47b5b9f 100644 --- a/include/hw/pci/shpc.h +++ b/include/hw/pci/shpc.h @@ -1,7 +1,7 @@ #ifndef SHPC_H #define SHPC_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/hotplug.h" #include "hw/pci/pci.h" #include "migration/vmstate.h" diff --git a/include/hw/ppc/mac_dbdma.h b/include/hw/ppc/mac_dbdma.h index 4a3f644516b..09cee8eff45 100644 --- a/include/hw/ppc/mac_dbdma.h +++ b/include/hw/ppc/mac_dbdma.h @@ -23,7 +23,7 @@ #ifndef HW_MAC_DBDMA_H #define HW_MAC_DBDMA_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qemu/iov.h" #include "sysemu/dma.h" #include "hw/sysbus.h" diff --git a/include/hw/ppc/ppc4xx.h b/include/hw/ppc/ppc4xx.h index 980f964b5a9..f6360ea1218 100644 --- a/include/hw/ppc/ppc4xx.h +++ b/include/hw/ppc/ppc4xx.h @@ -26,7 +26,7 @@ #define PPC4XX_H #include "hw/ppc/ppc.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" /* PowerPC 4xx core initialization */ PowerPCCPU *ppc4xx_init(const char *cpu_model, diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index 00b80b08c27..7ee4c6bb4a9 100644 --- a/include/hw/ppc/xics.h +++ b/include/hw/ppc/xics.h @@ -28,7 +28,7 @@ #ifndef XICS_H #define XICS_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/hw/register.h b/include/hw/register.h index b480e3882cd..e5d3ac63494 100644 --- a/include/hw/register.h +++ b/include/hw/register.h @@ -12,7 +12,7 @@ #define REGISTER_H #include "hw/qdev-core.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/registerfields.h" #include "qom/object.h" diff --git a/include/hw/remote/proxy-memory-listener.h b/include/hw/remote/proxy-memory-listener.h index c4f3efb9285..0158b9d599c 100644 --- a/include/hw/remote/proxy-memory-listener.h +++ b/include/hw/remote/proxy-memory-listener.h @@ -9,7 +9,7 @@ #ifndef PROXY_MEMORY_LISTENER_H #define PROXY_MEMORY_LISTENER_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "io/channel.h" typedef struct ProxyMemoryListener { diff --git a/include/hw/sh4/sh_intc.h b/include/hw/sh4/sh_intc.h index 65f34250572..0a1b8ae6edb 100644 --- a/include/hw/sh4/sh_intc.h +++ b/include/hw/sh4/sh_intc.h @@ -1,7 +1,7 @@ #ifndef SH_INTC_H #define SH_INTC_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" typedef unsigned char intc_enum; diff --git a/include/hw/sysbus.h b/include/hw/sysbus.h index 3564b7b6a22..79a757d8c90 100644 --- a/include/hw/sysbus.h +++ b/include/hw/sysbus.h @@ -4,7 +4,7 @@ /* Devices attached directly to the main system bus. */ #include "hw/qdev-core.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qom/object.h" #define QDEV_MAX_MMIO 32 diff --git a/include/hw/timer/npcm7xx_timer.h b/include/hw/timer/npcm7xx_timer.h index d45c051b56a..ad80f8be284 100644 --- a/include/hw/timer/npcm7xx_timer.h +++ b/include/hw/timer/npcm7xx_timer.h @@ -16,7 +16,7 @@ #ifndef NPCM7XX_TIMER_H #define NPCM7XX_TIMER_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/sysbus.h" #include "qemu/timer.h" diff --git a/include/hw/tricore/tricore.h b/include/hw/tricore/tricore.h index c19ed3f013e..f12edcc390b 100644 --- a/include/hw/tricore/tricore.h +++ b/include/hw/tricore/tricore.h @@ -1,7 +1,7 @@ #ifndef HW_TRICORE_H #define HW_TRICORE_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" struct tricore_boot_info { uint64_t ram_size; diff --git a/include/hw/usb.h b/include/hw/usb.h index 436e07b3040..81936ea296e 100644 --- a/include/hw/usb.h +++ b/include/hw/usb.h @@ -25,7 +25,7 @@ * THE SOFTWARE. */ -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/qdev-core.h" #include "qemu/iov.h" #include "qemu/queue.h" diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index 6141162d7ae..d9153b59eb9 100644 --- a/include/hw/vfio/vfio-common.h +++ b/include/hw/vfio/vfio-common.h @@ -21,7 +21,7 @@ #ifndef HW_VFIO_VFIO_COMMON_H #define HW_VFIO_VFIO_COMMON_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qemu/queue.h" #include "qemu/notify.h" #include "ui/console.h" diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h index 8a6f8e2a7a3..92e09ab4cd2 100644 --- a/include/hw/virtio/vhost-backend.h +++ b/include/hw/virtio/vhost-backend.h @@ -11,7 +11,7 @@ #ifndef VHOST_BACKEND_H #define VHOST_BACKEND_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" typedef enum VhostBackendType { VHOST_BACKEND_TYPE_NONE = 0, diff --git a/include/hw/virtio/vhost.h b/include/hw/virtio/vhost.h index 4a8bc75415f..58c61d44da0 100644 --- a/include/hw/virtio/vhost.h +++ b/include/hw/virtio/vhost.h @@ -3,7 +3,7 @@ #include "hw/virtio/vhost-backend.h" #include "hw/virtio/virtio.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" /* Generic structures common for any vhost based device. */ diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 8bab9cfb750..c0e7dec20ca 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -14,7 +14,7 @@ #ifndef QEMU_VIRTIO_H #define QEMU_VIRTIO_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/qdev-core.h" #include "net/net.h" #include "migration/vmstate.h" diff --git a/include/hw/xtensa/mx_pic.h b/include/hw/xtensa/mx_pic.h index 500424c8d35..a2baeb4bbbd 100644 --- a/include/hw/xtensa/mx_pic.h +++ b/include/hw/xtensa/mx_pic.h @@ -28,7 +28,7 @@ #ifndef XTENSA_MX_PIC_H #define XTENSA_MX_PIC_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" struct XtensaMxPic; typedef struct XtensaMxPic XtensaMxPic; diff --git a/include/qemu/iova-tree.h b/include/qemu/iova-tree.h index 1530cf0e95e..6cced122ac3 100644 --- a/include/qemu/iova-tree.h +++ b/include/qemu/iova-tree.h @@ -23,7 +23,7 @@ * for the thread safety issue. */ -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/sysemu/hwaddr.h" #define IOVA_OK (0) diff --git a/include/sysemu/dma.h b/include/sysemu/dma.h index 3201e7901db..d06482d8c54 100644 --- a/include/sysemu/dma.h +++ b/include/sysemu/dma.h @@ -10,7 +10,7 @@ #ifndef DMA_H #define DMA_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/address-spaces.h" #include "block/block.h" #include "block/accounting.h" diff --git a/include/sysemu/hostmem.h b/include/sysemu/hostmem.h index df5644723a3..1693e762e15 100644 --- a/include/sysemu/hostmem.h +++ b/include/sysemu/hostmem.h @@ -16,7 +16,7 @@ #include "sysemu/numa.h" #include "qapi/qapi-types-machine.h" #include "qom/object.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qemu/bitmap.h" #define TYPE_MEMORY_BACKEND "memory-backend" diff --git a/include/sysemu/kvm_int.h b/include/sysemu/kvm_int.h index ccb8869f01b..974179cbc4a 100644 --- a/include/sysemu/kvm_int.h +++ b/include/sysemu/kvm_int.h @@ -9,7 +9,7 @@ #ifndef QEMU_KVM_INT_H #define QEMU_KVM_INT_H -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qemu/accel.h" #include "sysemu/kvm.h" diff --git a/include/sysemu/memory_mapping.h b/include/sysemu/memory_mapping.h index 4b20f1a639e..435e99988d8 100644 --- a/include/sysemu/memory_mapping.h +++ b/include/sysemu/memory_mapping.h @@ -16,7 +16,7 @@ #include "qemu/queue.h" #include "exec/cpu-defs.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" typedef struct GuestPhysBlock { /* visible to guest, reflects PCI hole, etc */ diff --git a/include/sysemu/vhost-user-backend.h b/include/sysemu/vhost-user-backend.h index 327b0b84f1f..7c8bcfd4fc9 100644 --- a/include/sysemu/vhost-user-backend.h +++ b/include/sysemu/vhost-user-backend.h @@ -13,7 +13,7 @@ #define QEMU_VHOST_USER_BACKEND_H #include "qom/object.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qemu/option.h" #include "qemu/bitmap.h" #include "hw/virtio/vhost.h" diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h index 34f8daa3775..8aea3cd9171 100644 --- a/target/arm/kvm_arm.h +++ b/target/arm/kvm_arm.h @@ -12,7 +12,7 @@ #define QEMU_KVM_ARM_H #include "sysemu/kvm.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qemu/error-report.h" #define KVM_ARM_VGIC_V2 (1 << 0) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 4e0168e88b9..204fc0403ca 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -31,7 +31,7 @@ #include "sysemu/runstate.h" #include "sysemu/cpus.h" #include "qemu/bswap.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/ram_addr.h" #include "qemu/event_notifier.h" #include "qemu/main-loop.h" diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 452029e8193..9ecc45180a5 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -21,7 +21,7 @@ #include "qemu/main-loop.h" #include "hw/core/tcg-cpu-ops.h" #include "exec/exec-all.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/cpu_ldst.h" #include "exec/sysemu/cputlb.h" #include "exec/tb-hash.h" diff --git a/backends/tpm/tpm_util.c b/backends/tpm/tpm_util.c index a6e6d3e72f1..9a7ee6281db 100644 --- a/backends/tpm/tpm_util.c +++ b/backends/tpm/tpm_util.c @@ -24,7 +24,7 @@ #include "qapi/error.h" #include "qapi/visitor.h" #include "tpm_int.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/qdev-properties.h" #include "sysemu/tpm_backend.h" #include "sysemu/tpm_util.h" diff --git a/hw/avr/atmega.c b/hw/avr/atmega.c index 80b8a41cb5a..7ccbb80194c 100644 --- a/hw/avr/atmega.c +++ b/hw/avr/atmega.c @@ -12,7 +12,7 @@ #include "qemu/module.h" #include "qemu/units.h" #include "qapi/error.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/address-spaces.h" #include "sysemu/sysemu.h" #include "hw/qdev-properties.h" diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 5fe082ec34c..486a1a00f6d 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -147,7 +147,7 @@ #include "qapi/visitor.h" #include "sysemu/hostmem.h" #include "sysemu/block-backend.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qemu/log.h" #include "qemu/module.h" #include "qemu/cutils.h" diff --git a/hw/block/onenand.c b/hw/block/onenand.c index afc0cd3a0ff..15f18871344 100644 --- a/hw/block/onenand.c +++ b/hw/block/onenand.c @@ -26,7 +26,7 @@ #include "hw/qdev-properties.h" #include "hw/qdev-properties-system.h" #include "sysemu/block-backend.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/sysbus.h" #include "migration/vmstate.h" #include "qemu/error-report.h" diff --git a/hw/core/loader-fit.c b/hw/core/loader-fit.c index b7c7b3ba94d..37266aa19ee 100644 --- a/hw/core/loader-fit.c +++ b/hw/core/loader-fit.c @@ -20,7 +20,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/units.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/loader.h" #include "hw/loader-fit.h" #include "qemu/cutils.h" diff --git a/hw/core/loader.c b/hw/core/loader.c index 5b34869a541..8807367dd9e 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -56,7 +56,7 @@ #include "uboot_image.h" #include "hw/loader.h" #include "hw/nvram/fw_cfg.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/boards.h" #include "qemu/cutils.h" #include "sysemu/runstate.h" diff --git a/hw/display/edid-region.c b/hw/display/edid-region.c index 675429dc18b..174e26066f7 100644 --- a/hw/display/edid-region.c +++ b/hw/display/edid-region.c @@ -1,5 +1,5 @@ #include "qemu/osdep.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/display/edid.h" static uint64_t edid_region_read(void *ptr, hwaddr addr, unsigned size) diff --git a/hw/display/tc6393xb.c b/hw/display/tc6393xb.c index 1f28223c7be..f1dfa7f0b6b 100644 --- a/hw/display/tc6393xb.c +++ b/hw/display/tc6393xb.c @@ -16,7 +16,7 @@ #include "qemu/host-utils.h" #include "hw/irq.h" #include "hw/display/tc6393xb.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/block/flash.h" #include "ui/console.h" #include "ui/pixel_ops.h" diff --git a/hw/i386/acpi-common.c b/hw/i386/acpi-common.c index 1f5947fcf96..2c89ac4b53d 100644 --- a/hw/i386/acpi-common.c +++ b/hw/i386/acpi-common.c @@ -23,7 +23,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/acpi/acpi.h" #include "hw/acpi/aml-build.h" #include "hw/acpi/utils.h" diff --git a/hw/i386/acpi-microvm.c b/hw/i386/acpi-microvm.c index 1a0f77b9111..dd6eeead376 100644 --- a/hw/i386/acpi-microvm.c +++ b/hw/i386/acpi-microvm.c @@ -24,7 +24,7 @@ #include "qemu/cutils.h" #include "qapi/error.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/acpi/acpi.h" #include "hw/acpi/aml-build.h" #include "hw/acpi/bios-linker-loader.h" diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 8cfaf216e7b..c56dc38fde7 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -64,7 +64,7 @@ #include "hw/xen/xen.h" #include "hw/xen/start_info.h" #include "ui/qemu-spice.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "sysemu/arch_init.h" #include "qemu/bitmap.h" #include "qemu/config-file.h" diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 30b8bd6ea92..a310cd6d608 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -46,7 +46,7 @@ #include "sysemu/arch_init.h" #include "hw/i2c/smbus_eeprom.h" #include "hw/xen/xen-x86.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/acpi/acpi.h" #include "qapi/error.h" #include "qemu/error-report.h" diff --git a/hw/intc/mips_gic.c b/hw/intc/mips_gic.c index bda45499258..4f51fc5a1cc 100644 --- a/hw/intc/mips_gic.c +++ b/hw/intc/mips_gic.c @@ -14,7 +14,7 @@ #include "qemu/module.h" #include "qapi/error.h" #include "hw/sysbus.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "sysemu/kvm.h" #include "sysemu/reset.h" #include "kvm_mips.h" diff --git a/hw/intc/ompic.c b/hw/intc/ompic.c index 1f10314807d..6a899eef19d 100644 --- a/hw/intc/ompic.c +++ b/hw/intc/ompic.c @@ -13,7 +13,7 @@ #include "hw/qdev-properties.h" #include "hw/sysbus.h" #include "migration/vmstate.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qom/object.h" #define TYPE_OR1K_OMPIC "or1k-ompic" diff --git a/hw/misc/omap_gpmc.c b/hw/misc/omap_gpmc.c index 10de7a55236..cec48723d63 100644 --- a/hw/misc/omap_gpmc.c +++ b/hw/misc/omap_gpmc.c @@ -23,7 +23,7 @@ #include "hw/irq.h" #include "hw/block/flash.h" #include "hw/arm/omap.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/address-spaces.h" /* General-Purpose Memory Controller */ diff --git a/hw/net/ne2000.c b/hw/net/ne2000.c index 6c17ee1ae21..1cfdb8bb8ed 100644 --- a/hw/net/ne2000.c +++ b/hw/net/ne2000.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "net/eth.h" #include "qemu/module.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/irq.h" #include "migration/vmstate.h" #include "ne2000.h" diff --git a/hw/nios2/10m50_devboard.c b/hw/nios2/10m50_devboard.c index 3d1205b8bd7..1efc61ee7c4 100644 --- a/hw/nios2/10m50_devboard.c +++ b/hw/nios2/10m50_devboard.c @@ -30,7 +30,7 @@ #include "hw/qdev-properties.h" #include "sysemu/sysemu.h" #include "hw/boards.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/address-spaces.h" #include "qemu/config-file.h" diff --git a/hw/nios2/generic_nommu.c b/hw/nios2/generic_nommu.c index fbc18dbd04c..2888de27086 100644 --- a/hw/nios2/generic_nommu.c +++ b/hw/nios2/generic_nommu.c @@ -32,7 +32,7 @@ #include "hw/char/serial.h" #include "hw/boards.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/address-spaces.h" #include "qemu/config-file.h" diff --git a/hw/pci-bridge/pci_bridge_dev.c b/hw/pci-bridge/pci_bridge_dev.c index 657a06ddbe8..36e3abea0e2 100644 --- a/hw/pci-bridge/pci_bridge_dev.c +++ b/hw/pci-bridge/pci_bridge_dev.c @@ -28,7 +28,7 @@ #include "hw/pci/shpc.h" #include "hw/pci/slotid_cap.h" #include "hw/qdev-properties.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/pci/pci_bus.h" #include "hw/hotplug.h" #include "qom/object.h" diff --git a/hw/pci-host/remote.c b/hw/pci-host/remote.c index eee45444ef7..b1efe292f75 100644 --- a/hw/pci-host/remote.c +++ b/hw/pci-host/remote.c @@ -29,7 +29,7 @@ #include "hw/pci/pcie_host.h" #include "hw/qdev-properties.h" #include "hw/pci-host/remote.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" static const char *remote_pcihost_root_bus_path(PCIHostState *host_bridge, PCIBus *rootbus) diff --git a/hw/ppc/pnv_homer.c b/hw/ppc/pnv_homer.c index 394425232ed..164106d0628 100644 --- a/hw/ppc/pnv_homer.c +++ b/hw/ppc/pnv_homer.c @@ -20,7 +20,7 @@ #include "qemu/log.h" #include "qapi/error.h" #include "exec/sysemu/hwaddr.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "sysemu/cpus.h" #include "hw/qdev-core.h" #include "hw/qdev-properties.h" diff --git a/hw/ppc/ppc440_uc.c b/hw/ppc/ppc440_uc.c index 993e3ba955d..56cbec984a6 100644 --- a/hw/ppc/ppc440_uc.c +++ b/hw/ppc/ppc440_uc.c @@ -15,7 +15,7 @@ #include "qemu/log.h" #include "qemu/module.h" #include "hw/irq.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/ppc/ppc.h" #include "hw/qdev-properties.h" #include "hw/pci/pci.h" diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index 0737234d66e..0f3bf1c5e42 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -24,7 +24,7 @@ #include "sysemu/block-backend.h" #include "hw/loader.h" #include "elf.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "ppc440.h" #include "ppc405.h" #include "hw/block/flash.h" diff --git a/hw/remote/machine.c b/hw/remote/machine.c index 952105eab5a..3adac7186f5 100644 --- a/hw/remote/machine.c +++ b/hw/remote/machine.c @@ -17,7 +17,7 @@ #include "qemu-common.h" #include "hw/remote/machine.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qapi/error.h" #include "hw/pci/pci_host.h" #include "hw/remote/iohub.h" diff --git a/hw/remote/proxy-memory-listener.c b/hw/remote/proxy-memory-listener.c index 901dbf13573..d9bed35fa2f 100644 --- a/hw/remote/proxy-memory-listener.c +++ b/hw/remote/proxy-memory-listener.c @@ -12,7 +12,7 @@ #include "qemu/compiler.h" #include "qemu/int128.h" #include "qemu/range.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/cpu-common.h" #include "exec/ram_addr.h" #include "qapi/error.h" diff --git a/hw/timer/sh_timer.c b/hw/timer/sh_timer.c index 58af1a1edbd..c40c1fd7467 100644 --- a/hw/timer/sh_timer.c +++ b/hw/timer/sh_timer.c @@ -9,7 +9,7 @@ */ #include "qemu/osdep.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/hw.h" #include "hw/irq.h" #include "hw/sh4/sh.h" diff --git a/hw/vfio/common.c b/hw/vfio/common.c index ae5654fcdb8..472ab394109 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -28,7 +28,7 @@ #include "hw/vfio/vfio-common.h" #include "hw/vfio/vfio.h" #include "exec/address-spaces.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/ram_addr.h" #include "hw/hw.h" #include "qemu/error-report.h" diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index cc3f66f7e44..ea9bcdf2bf7 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -26,7 +26,7 @@ #include "qemu/main-loop.h" #include "qemu/module.h" #include "qemu/range.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/address-spaces.h" #include "qemu/queue.h" #include "hw/sysbus.h" diff --git a/hw/xtensa/sim.c b/hw/xtensa/sim.c index 2028fe793d9..5571f96728d 100644 --- a/hw/xtensa/sim.c +++ b/hw/xtensa/sim.c @@ -32,7 +32,7 @@ #include "hw/boards.h" #include "hw/loader.h" #include "elf.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qemu/error-report.h" #include "xtensa_memory.h" #include "xtensa_sim.h" diff --git a/hw/xtensa/virt.c b/hw/xtensa/virt.c index a18e3fc910e..c184919958c 100644 --- a/hw/xtensa/virt.c +++ b/hw/xtensa/virt.c @@ -33,7 +33,7 @@ #include "hw/pci-host/gpex.h" #include "net/net.h" #include "elf.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qemu/error-report.h" #include "xtensa_memory.h" #include "xtensa_sim.h" diff --git a/hw/xtensa/xtensa_memory.c b/hw/xtensa/xtensa_memory.c index 2c1095f0170..1793869a96e 100644 --- a/hw/xtensa/xtensa_memory.c +++ b/hw/xtensa/xtensa_memory.c @@ -27,7 +27,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qemu/error-report.h" #include "xtensa_memory.h" diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index 17f087b3951..caaf223a997 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw/xtensa/xtfpga.c @@ -34,7 +34,7 @@ #include "hw/loader.h" #include "hw/qdev-properties.h" #include "elf.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/char/serial.h" #include "net/net.h" #include "hw/sysbus.h" diff --git a/migration/rdma.c b/migration/rdma.c index 00eac34232e..7c541ffae0e 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -29,7 +29,7 @@ #include "qemu/sockets.h" #include "qemu/bitmap.h" #include "qemu/coroutine.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include #include #include diff --git a/migration/savevm.c b/migration/savevm.c index 52e2d72e4b0..83f3df249f1 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -48,7 +48,7 @@ #include "qapi/qmp/qerror.h" #include "qemu/error-report.h" #include "sysemu/cpus.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/target_page.h" #include "trace.h" #include "qemu/iov.h" diff --git a/monitor/misc.c b/monitor/misc.c index f3a393ea590..c1fcd995805 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -59,7 +59,7 @@ #ifdef CONFIG_TRACE_SIMPLE #include "trace/simple.h" #endif -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/exec-all.h" #include "qemu/option.h" #include "qemu/thread.h" diff --git a/softmmu/ioport.c b/softmmu/ioport.c index cb8adb0b936..dfb9fbc7ffa 100644 --- a/softmmu/ioport.c +++ b/softmmu/ioport.c @@ -28,7 +28,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/ioport.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/address-spaces.h" #include "trace.h" diff --git a/softmmu/memory.c b/softmmu/memory.c index 3bb533c0bce..d5ab46d76a9 100644 --- a/softmmu/memory.c +++ b/softmmu/memory.c @@ -16,7 +16,7 @@ #include "qemu/osdep.h" #include "qemu/log.h" #include "qapi/error.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qapi/visitor.h" #include "qemu/bitops.h" #include "qemu/error-report.h" diff --git a/softmmu/memory_mapping.c b/softmmu/memory_mapping.c index e7af2765466..60ff72790ea 100644 --- a/softmmu/memory_mapping.c +++ b/softmmu/memory_mapping.c @@ -15,7 +15,7 @@ #include "qapi/error.h" #include "sysemu/memory_mapping.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/address-spaces.h" //#define DEBUG_GUEST_PHYS_REGION_ADD diff --git a/softmmu/physmem.c b/softmmu/physmem.c index e1da81ed2f9..20e69b09d68 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -41,7 +41,7 @@ #include "qemu/config-file.h" #include "qemu/error-report.h" #include "qemu/qemu-print.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/ioport.h" #include "sysemu/dma.h" #include "sysemu/hostmem.h" diff --git a/softmmu/qtest.c b/softmmu/qtest.c index 130c3666154..f1ee4fbc369 100644 --- a/softmmu/qtest.c +++ b/softmmu/qtest.c @@ -18,7 +18,7 @@ #include "sysemu/runstate.h" #include "chardev/char-fe.h" #include "exec/ioport.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "hw/irq.h" #include "qemu/accel.h" #include "sysemu/cpu-timers.h" diff --git a/stubs/ram-block.c b/stubs/ram-block.c index 108197683bb..02ebd94ebaf 100644 --- a/stubs/ram-block.c +++ b/stubs/ram-block.c @@ -1,7 +1,7 @@ #include "qemu/osdep.h" #include "exec/ramlist.h" #include "exec/cpu-common.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" void *qemu_ram_get_host_addr(RAMBlock *rb) { diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c index 7ea90d414aa..286460bcc05 100644 --- a/target/s390x/misc_helper.c +++ b/target/s390x/misc_helper.c @@ -23,7 +23,6 @@ #include "qemu/main-loop.h" #include "cpu.h" #include "internal.h" -#include "exec/memory.h" #include "qemu/host-utils.h" #include "exec/helper-proto.h" #include "qemu/timer.h" @@ -34,6 +33,7 @@ #include "s390-tod.h" #if !defined(CONFIG_USER_ONLY) +#include "exec/sysemu/memory.h" #include "sysemu/cpus.h" #include "sysemu/sysemu.h" #include "hw/s390x/ebcdic.h" diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c index cea7d4058e8..05f9c9b06f9 100644 --- a/tests/qtest/fuzz/generic_fuzz.c +++ b/tests/qtest/fuzz/generic_fuzz.c @@ -20,7 +20,7 @@ #include "fuzz.h" #include "fork_fuzz.h" #include "string.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "exec/ramblock.h" #include "hw/qdev-core.h" #include "hw/pci/pci.h" diff --git a/tests/qtest/fuzz/qos_fuzz.c b/tests/qtest/fuzz/qos_fuzz.c index 7a244c951e5..8301c1d9c69 100644 --- a/tests/qtest/fuzz/qos_fuzz.c +++ b/tests/qtest/fuzz/qos_fuzz.c @@ -20,7 +20,7 @@ #include "qemu/units.h" #include "qapi/error.h" #include "qemu-common.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "qemu/main-loop.h" #include "tests/qtest/libqos/libqtest.h" diff --git a/ui/console.c b/ui/console.c index 2de5f4105b5..e9728a816d0 100644 --- a/ui/console.c +++ b/ui/console.c @@ -32,7 +32,7 @@ #include "qemu/timer.h" #include "chardev/char-fe.h" #include "trace.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "io/channel-file.h" #include "qom/object.h" diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c index 911115b86e6..28cca261c2c 100644 --- a/util/vfio-helpers.c +++ b/util/vfio-helpers.c @@ -16,7 +16,7 @@ #include "qapi/error.h" #include "exec/ramlist.h" #include "exec/cpu-common.h" -#include "exec/memory.h" +#include "exec/sysemu/memory.h" #include "trace.h" #include "qemu/error-report.h" #include "standard-headers/linux/pci_regs.h" diff --git a/MAINTAINERS b/MAINTAINERS index 4378ec47a2c..d515a954b2b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2400,7 +2400,7 @@ M: Paolo Bonzini S: Supported F: include/exec/ioport.h F: include/exec/memop.h -F: include/exec/memory.h +F: include/exec/sysemu/memory.h F: include/exec/ram_addr.h F: include/exec/ramblock.h F: softmmu/dma-helpers.c diff --git a/scripts/analyze-inclusions b/scripts/analyze-inclusions index 14806e18c6e..28e60791a61 100644 --- a/scripts/analyze-inclusions +++ b/scripts/analyze-inclusions @@ -54,7 +54,7 @@ echo $(grep_include -F 'trace/generated-tracers.h') files include generated-trac echo $(grep_include -F 'qapi/error.h') files include qapi/error.h echo $(grep_include -F 'qom/object.h') files include qom/object.h echo $(grep_include -F 'block/aio.h') files include block/aio.h -echo $(grep_include -F 'exec/memory.h') files include exec/memory.h +echo $(grep_include -F 'exec/sysemu/memory.h') files include exec/memory.h echo $(grep_include -F 'fpu/softfloat.h') files include fpu/softfloat.h echo $(grep_include -F 'qemu/bswap.h') files include qemu/bswap.h echo From patchwork Mon May 17 11:11:05 2021 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: 12261617 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AE244C433B4 for ; Mon, 17 May 2021 11:17:54 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 355A7611CA for ; Mon, 17 May 2021 11:17:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 355A7611CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:44368 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1libFx-0000uS-4o for qemu-devel@archiver.kernel.org; Mon, 17 May 2021 07:17:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1libA1-0004Ov-7r for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:46 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:41565) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lib9v-0000Xw-4u for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:45 -0400 Received: by mail-wm1-x330.google.com with SMTP id o6-20020a05600c4fc6b029015ec06d5269so3371773wmq.0 for ; Mon, 17 May 2021 04:11:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Gj0bMEmiMQOKWa3Cw2/RrMu8sFYu/fhui5y3HNfbFHU=; b=c9BeS92GNxiuTyCFCw9d2HZdSM8olP/DV6YkJD+VEnKOG6Ex9NkqvJGPFdd0Z5+tNz 14EFY3w/pnYEf3/6gVW5nhq4Vq1xEiAE/rhdvC9mGXqOVQDaRo4fnurQhQOnWaLcjSLr 358I9E835WzMWA0DFwHd7LmD/ncEukA8vgOPNemA9/NSAf8Hs2QKj75FaIcjS9u03iFn jTE+LDsXKpigz2rfazh5jGA6UxQBjACPNadDrTehcG+2xa+OToESIVkoGTs4LWAJvBu4 //JIFykLpeKczsWDA5jUz1/w4Txfwx0bfgmZdF8IEw03kHh9lEsVxe2wRC7sq8c/+E70 xZig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Gj0bMEmiMQOKWa3Cw2/RrMu8sFYu/fhui5y3HNfbFHU=; b=mRpPJZktCgqHWvWWW/oinxHvjt1ZBUs6G924mOYMQ//ouDAfq9CNoaRxg0geY54M0d YRugNriXpDRlNZEJry+HYPO2GXi1mM3tYCVBHbTLuCFfSEDQqKXi9OU8nOaRvKP4rfaU b16Ki567abHZBVMtZ082t2OijTQ8+x+euajB6MqKy1XL3WupFG4AswsllMbTvxr2c+4y mugswG4NqPbhS6kxbSZ0Z3DEG6iQ6L9RIFkcZp7YOv44+CQv1P0jF+JkwM+BlAFvNKzU pCWntFRvq5wac1E2DoJS4s8GZT5k4TsZw6RFNmbVq0Jn0Wb+9amKtItTvwxwWPze9IUH L93w== X-Gm-Message-State: AOAM532fD45GMajwBXUwcIP8AQWUKcjpFeULZ7Yz8R4phXZ7rTmQQxT2 gXaETyLIIemH4/6juSF1KN9knS0Y7cEMKg== X-Google-Smtp-Source: ABdhPJxF7sQfV1ROe97hJTo8g7HIRsc/4yNcE6tqXWf1mt1/r02MfIy6IaNydljrEjMd2jgbjJbaUg== X-Received: by 2002:a7b:c005:: with SMTP id c5mr35116237wmb.113.1621249897504; Mon, 17 May 2021 04:11:37 -0700 (PDT) Received: from localhost.localdomain (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id k9sm14441458wmk.5.2021.05.17.04.11.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 04:11:37 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 05/11] exec: Restrict memory-internal.h to sysemu/ Date: Mon, 17 May 2021 13:11:05 +0200 Message-Id: <20210517111111.1068153-6-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210517111111.1068153-1-f4bug@amsat.org> References: <20210517111111.1068153-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x330.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Richard Henderson , Claudio Fontana , Laurent Vivier Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" To make it clearer the memory-internal.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/memory-internal.h,exec/sysemu/memory-internal.h, $(git grep -l exec/memory-internal.h) Then the #ifdef'ry conditional on CONFIG_USER_ONLY has been replaced by an #error. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/{ => sysemu}/memory-internal.h | 7 +++++-- accel/tcg/cputlb.c | 2 +- hw/s390x/s390-pci-inst.c | 2 +- softmmu/memory.c | 2 +- softmmu/physmem.c | 2 +- MAINTAINERS | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) rename include/exec/{ => sysemu}/memory-internal.h (94%) diff --git a/include/exec/memory-internal.h b/include/exec/sysemu/memory-internal.h similarity index 94% rename from include/exec/memory-internal.h rename to include/exec/sysemu/memory-internal.h index 9fcc2af25c8..f3459d687ad 100644 --- a/include/exec/memory-internal.h +++ b/include/exec/sysemu/memory-internal.h @@ -20,9 +20,12 @@ #ifndef MEMORY_INTERNAL_H #define MEMORY_INTERNAL_H +#ifdef CONFIG_USER_ONLY +#error Cannot include sysemu specific header from user emulation +#endif + #include "cpu.h" -#ifndef CONFIG_USER_ONLY static inline AddressSpaceDispatch *flatview_to_dispatch(FlatView *fv) { return fv->dispatch; @@ -49,5 +52,5 @@ void address_space_dispatch_free(AddressSpaceDispatch *d); void mtree_print_dispatch(struct AddressSpaceDispatch *d, MemoryRegion *root); -#endif + #endif diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 9ecc45180a5..14a4ee4ed63 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -25,7 +25,7 @@ #include "exec/cpu_ldst.h" #include "exec/sysemu/cputlb.h" #include "exec/tb-hash.h" -#include "exec/memory-internal.h" +#include "exec/sysemu/memory-internal.h" #include "exec/ram_addr.h" #include "tcg/tcg.h" #include "qemu/error-report.h" diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index 9ec277d50e7..0c88787d134 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw/s390x/s390-pci-inst.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "exec/memop.h" -#include "exec/memory-internal.h" +#include "exec/sysemu/memory-internal.h" #include "qemu/error-report.h" #include "sysemu/hw_accel.h" #include "hw/s390x/s390-pci-inst.h" diff --git a/softmmu/memory.c b/softmmu/memory.c index d5ab46d76a9..cdc935cdd27 100644 --- a/softmmu/memory.c +++ b/softmmu/memory.c @@ -25,7 +25,7 @@ #include "qom/object.h" #include "trace.h" -#include "exec/memory-internal.h" +#include "exec/sysemu/memory-internal.h" #include "exec/ram_addr.h" #include "sysemu/kvm.h" #include "sysemu/runstate.h" diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 20e69b09d68..31e490185f3 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -58,7 +58,7 @@ #include "exec/translate-all.h" #include "sysemu/replay.h" -#include "exec/memory-internal.h" +#include "exec/sysemu/memory-internal.h" #include "exec/ram_addr.h" #include "exec/log.h" diff --git a/MAINTAINERS b/MAINTAINERS index d515a954b2b..48ae2145513 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2407,7 +2407,7 @@ F: softmmu/dma-helpers.c F: softmmu/ioport.c F: softmmu/memory.c F: softmmu/physmem.c -F: include/exec/memory-internal.h +F: include/exec/sysemu/memory-internal.h F: scripts/coccinelle/memory-region-housekeeping.cocci SPICE From patchwork Mon May 17 11:11:06 2021 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: 12261621 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B693C433B4 for ; Mon, 17 May 2021 11:18:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D5CEA6044F for ; Mon, 17 May 2021 11:18:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D5CEA6044F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:46264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1libGI-0002Ef-W0 for qemu-devel@archiver.kernel.org; Mon, 17 May 2021 07:18:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1libA5-0004Rv-2E for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:49 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:35411) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1libA0-0000al-7K for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:47 -0400 Received: by mail-wr1-x432.google.com with SMTP id a4so5969264wrr.2 for ; Mon, 17 May 2021 04:11:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7APzG3x41mko0SfaFm0KwH2t2u50MEWlP0EbYOzpKW8=; b=lfKQgdrzvyDI5SPpB5HRpXSzDskZktTJ8+Ot7dDxYWnJOjQ6VAogY4xzvpUjDjpkUl Sx6sSD6jv43wOaatLS9hgNYuyvE7gN14xEL5WY4h73yviNSVzCOQNSogCyzpT71GFxMW JtkcCZNwk5lplGntF/tixmoTXWwYUNTmaJMp7NN6m/I1Bv7I4VNLE41gHNiU6NhCE9dG ZwSFJGfQPPgxZ8msjm+OeeD2tJLpYReJq9zQp9+6nQupZXsNI2+eSmHRfxtyE1MSMJ53 DTkWsC4gRa1MUgDC1gd4ipkD6XskD89wv5iSrLHU5/a6UJ5kYsi712heg9UPJDdLr09L ePew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=7APzG3x41mko0SfaFm0KwH2t2u50MEWlP0EbYOzpKW8=; b=nAplPCicM7D9xbU/8KkTRNZ1mCIJS+cXp119u9uylZSLwktKAGoSuPRWJwfANqsn4D CoJw0kbsKjf1ThfxPAsNrVwfefPk7MUaM64ST4hnDt324wf6mGXSdZHnxH8L+6Bh7df7 jHfLtlYrjGu4CNznzvH+quDZz7w2lHiwjANgcbHohm0fzdp9d81T7X2gL9jKXqzoGoae +F1O8XTnax9FjYudbQvtZSRMERi5+SQMdF2R59l8lFSqG/NQkoyFw8JMBF/fs8gVZijn 41htfMov2E30LMGBAp1At2L58Fmvszv+ykGHA3Aw3fZ2/JUclojpviz/0adZt681zN+p icmw== X-Gm-Message-State: AOAM533BuvDwWaFeTLKuTwnnY4IFu2wxPEqE8a0toBE4RuetSfwMWZcA mP4UG475q8/ulQ+EaAb1jUihaKq1Od1hwA== X-Google-Smtp-Source: ABdhPJxRAZDbmYCUJWYXF3niAKglnFJr+jr4hhFj0tMoTftEElh3lg2cZLMyFzq2VJTkOCXxl3KkGQ== X-Received: by 2002:a5d:4c46:: with SMTP id n6mr38355624wrt.95.1621249902240; Mon, 17 May 2021 04:11:42 -0700 (PDT) Received: from localhost.localdomain (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id v12sm18958960wrv.76.2021.05.17.04.11.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 04:11:41 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 06/11] exec: Restrict address-spaces.h to sysemu/ Date: Mon, 17 May 2021 13:11:06 +0200 Message-Id: <20210517111111.1068153-7-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210517111111.1068153-1-f4bug@amsat.org> References: <20210517111111.1068153-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x432.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Richard Henderson , Claudio Fontana , Laurent Vivier Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" To make it clearer the address-spaces.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/address-spaces.h,exec/sysemu/address-spaces.h, $(git grep -l exec/address-spaces.h) Signed-off-by: Philippe Mathieu-Daudé --- hw/net/i82596.h | 2 +- hw/s390x/ipl.h | 2 +- hw/tpm/tpm_ppi.h | 2 +- include/exec/{ => sysemu}/address-spaces.h | 12 ++++++------ include/hw/nubus/nubus.h | 2 +- include/hw/tricore/triboard.h | 2 +- include/sysemu/dma.h | 2 +- target/i386/hvf/vmx.h | 2 +- cpu.c | 2 +- hw/arm/collie.c | 2 +- hw/arm/exynos4_boards.c | 2 +- hw/arm/fsl-imx31.c | 2 +- hw/arm/gumstix.c | 2 +- hw/arm/integratorcp.c | 2 +- hw/arm/kzm.c | 2 +- hw/arm/mainstone.c | 2 +- hw/arm/microbit.c | 2 +- hw/arm/mps2-tz.c | 2 +- hw/arm/mps2.c | 2 +- hw/arm/msf2-soc.c | 2 +- hw/arm/msf2-som.c | 2 +- hw/arm/musca.c | 2 +- hw/arm/omap1.c | 2 +- hw/arm/omap2.c | 2 +- hw/arm/omap_sx1.c | 2 +- hw/arm/orangepi.c | 2 +- hw/arm/spitz.c | 2 +- hw/arm/stellaris.c | 2 +- hw/arm/stm32f205_soc.c | 2 +- hw/arm/stm32f405_soc.c | 2 +- hw/arm/tosa.c | 2 +- hw/arm/z2.c | 2 +- hw/avr/atmega.c | 2 +- hw/char/goldfish_tty.c | 2 +- hw/char/omap_uart.c | 2 +- hw/core/null-machine.c | 2 +- hw/core/sysbus.c | 2 +- hw/dma/etraxfs_dma.c | 2 +- hw/dma/rc4030.c | 2 +- hw/hyperv/hyperv.c | 2 +- hw/input/lasips2.c | 2 +- hw/microblaze/petalogix_ml605_mmu.c | 2 +- hw/microblaze/petalogix_s3adsp1800_mmu.c | 2 +- hw/microblaze/xlnx-zynqmp-pmu.c | 2 +- hw/misc/allwinner-h3-dramc.c | 2 +- hw/misc/omap_gpmc.c | 2 +- hw/nios2/10m50_devboard.c | 2 +- hw/nios2/generic_nommu.c | 2 +- hw/pci-host/mv64361.c | 2 +- hw/ppc/pegasos2.c | 2 +- hw/ppc/ppc405_uc.c | 2 +- hw/ppc/ppc4xx_devs.c | 2 +- hw/ppc/prep_systemio.c | 2 +- hw/ppc/rs6000_mc.c | 2 +- hw/ppc/spapr_ovec.c | 2 +- hw/riscv/shakti_c.c | 2 +- hw/s390x/css.c | 2 +- hw/sparc/sun4m_iommu.c | 2 +- hw/sparc64/sun4u_iommu.c | 2 +- hw/timer/hpet.c | 2 +- hw/vfio/ap.c | 2 +- hw/vfio/ccw.c | 2 +- hw/vfio/common.c | 2 +- hw/vfio/platform.c | 2 +- hw/virtio/virtio-balloon.c | 2 +- hw/virtio/virtio-bus.c | 2 +- semihosting/arm-compat-semi.c | 2 +- softmmu/ioport.c | 2 +- softmmu/memory_mapping.c | 2 +- target/arm/kvm.c | 2 +- target/avr/helper.c | 2 +- target/i386/cpu-sysemu.c | 2 +- target/i386/cpu.c | 2 +- target/i386/hax/hax-all.c | 2 +- target/i386/hax/hax-mem.c | 2 +- target/i386/nvmm/nvmm-all.c | 2 +- target/i386/tcg/sysemu/misc_helper.c | 2 +- target/i386/tcg/sysemu/tcg-cpu.c | 2 +- target/i386/whpx/whpx-all.c | 2 +- target/s390x/excp_helper.c | 2 +- target/s390x/mmu_helper.c | 2 +- target/s390x/sigp.c | 2 +- target/xtensa/dbg_helper.c | 2 +- 83 files changed, 88 insertions(+), 88 deletions(-) rename include/exec/{ => sysemu}/address-spaces.h (84%) diff --git a/hw/net/i82596.h b/hw/net/i82596.h index de5cc7d0c5b..478b5237b3e 100644 --- a/hw/net/i82596.h +++ b/hw/net/i82596.h @@ -4,7 +4,7 @@ #define I82596_IOPORT_SIZE 0x20 #include "exec/sysemu/memory.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #define PORT_RESET 0x00 /* reset 82596 */ #define PORT_SELFTEST 0x01 /* selftest */ diff --git a/hw/s390x/ipl.h b/hw/s390x/ipl.h index dfc6dfd89c8..6f3ca5ba57f 100644 --- a/hw/s390x/ipl.h +++ b/hw/s390x/ipl.h @@ -14,7 +14,7 @@ #define HW_S390_IPL_H #include "cpu.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/hw/tpm/tpm_ppi.h b/hw/tpm/tpm_ppi.h index 6f773c25a0b..c88c24facdb 100644 --- a/hw/tpm/tpm_ppi.h +++ b/hw/tpm/tpm_ppi.h @@ -12,7 +12,7 @@ #ifndef TPM_TPM_PPI_H #define TPM_TPM_PPI_H -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" typedef struct TPMPPI { MemoryRegion ram; diff --git a/include/exec/address-spaces.h b/include/exec/sysemu/address-spaces.h similarity index 84% rename from include/exec/address-spaces.h rename to include/exec/sysemu/address-spaces.h index b7533b33f72..800c0206ddd 100644 --- a/include/exec/address-spaces.h +++ b/include/exec/sysemu/address-spaces.h @@ -11,8 +11,12 @@ * */ -#ifndef EXEC_ADDRESS_SPACES_H -#define EXEC_ADDRESS_SPACES_H +#ifndef EXEC_SYSEMU_ADDRESS_SPACES_H +#define EXEC_SYSEMU_ADDRESS_SPACES_H + +#ifdef CONFIG_USER_ONLY +#error Cannot include sysemu specific header from user emulation +#endif /* * Internal interfaces between memory.c/exec.c/vl.c. Do not #include unless @@ -21,8 +25,6 @@ #include "exec/sysemu/memory.h" -#ifndef CONFIG_USER_ONLY - /* Get the root memory region. This interface should only be used temporarily * until a proper bus interface is available. */ @@ -37,5 +39,3 @@ extern AddressSpace address_space_memory; extern AddressSpace address_space_io; #endif - -#endif diff --git a/include/hw/nubus/nubus.h b/include/hw/nubus/nubus.h index e2b5cf260ba..9ea894f2fd0 100644 --- a/include/hw/nubus/nubus.h +++ b/include/hw/nubus/nubus.h @@ -10,7 +10,7 @@ #define HW_NUBUS_NUBUS_H #include "hw/qdev-properties.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qom/object.h" #define NUBUS_SUPER_SLOT_SIZE 0x10000000U diff --git a/include/hw/tricore/triboard.h b/include/hw/tricore/triboard.h index f3844be447a..e2f1787df7c 100644 --- a/include/hw/tricore/triboard.h +++ b/include/hw/tricore/triboard.h @@ -23,7 +23,7 @@ #include "hw/boards.h" #include "hw/arm/boot.h" #include "sysemu/sysemu.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qom/object.h" #include "hw/tricore/tc27x_soc.h" diff --git a/include/sysemu/dma.h b/include/sysemu/dma.h index d06482d8c54..3f69547ef24 100644 --- a/include/sysemu/dma.h +++ b/include/sysemu/dma.h @@ -11,7 +11,7 @@ #define DMA_H #include "exec/sysemu/memory.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "block/block.h" #include "block/accounting.h" diff --git a/target/i386/hvf/vmx.h b/target/i386/hvf/vmx.h index 24c4cdf0be0..7ef6064ee94 100644 --- a/target/i386/hvf/vmx.h +++ b/target/i386/hvf/vmx.h @@ -31,7 +31,7 @@ #include "cpu.h" #include "x86.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" static inline uint64_t rreg(hv_vcpuid_t vcpu, hv_x86_reg_t reg) { diff --git a/cpu.c b/cpu.c index 164fefeaa35..0df444c7358 100644 --- a/cpu.c +++ b/cpu.c @@ -30,7 +30,7 @@ #include "qemu.h" #else #include "hw/core/sysemu-cpu-ops.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #endif #include "sysemu/tcg.h" #include "sysemu/kvm.h" diff --git a/hw/arm/collie.c b/hw/arm/collie.c index 8df31e27932..c989fcbbe93 100644 --- a/hw/arm/collie.c +++ b/hw/arm/collie.c @@ -16,7 +16,7 @@ #include "strongarm.h" #include "hw/arm/boot.h" #include "hw/block/flash.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "cpu.h" #include "qom/object.h" diff --git a/hw/arm/exynos4_boards.c b/hw/arm/exynos4_boards.c index 35dd9875da1..59cfd1d1e01 100644 --- a/hw/arm/exynos4_boards.c +++ b/hw/arm/exynos4_boards.c @@ -28,7 +28,7 @@ #include "hw/sysbus.h" #include "net/net.h" #include "hw/arm/boot.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/arm/exynos4210.h" #include "hw/net/lan9118.h" #include "hw/qdev-properties.h" diff --git a/hw/arm/fsl-imx31.c b/hw/arm/fsl-imx31.c index def27bb9136..1af0987b87f 100644 --- a/hw/arm/fsl-imx31.c +++ b/hw/arm/fsl-imx31.c @@ -23,7 +23,7 @@ #include "qapi/error.h" #include "hw/arm/fsl-imx31.h" #include "sysemu/sysemu.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/qdev-properties.h" #include "chardev/char.h" diff --git a/hw/arm/gumstix.c b/hw/arm/gumstix.c index 3a4bc332c42..aea5e69efc0 100644 --- a/hw/arm/gumstix.c +++ b/hw/arm/gumstix.c @@ -41,7 +41,7 @@ #include "hw/block/flash.h" #include "hw/net/smc91c111.h" #include "hw/boards.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "sysemu/qtest.h" #include "cpu.h" diff --git a/hw/arm/integratorcp.c b/hw/arm/integratorcp.c index 16e89859539..dd96c63e362 100644 --- a/hw/arm/integratorcp.c +++ b/hw/arm/integratorcp.c @@ -17,7 +17,7 @@ #include "hw/misc/arm_integrator_debug.h" #include "hw/net/smc91c111.h" #include "net/net.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "sysemu/runstate.h" #include "sysemu/sysemu.h" #include "qemu/log.h" diff --git a/hw/arm/kzm.c b/hw/arm/kzm.c index 39559c44c29..4a9996b3387 100644 --- a/hw/arm/kzm.c +++ b/hw/arm/kzm.c @@ -18,7 +18,7 @@ #include "hw/arm/fsl-imx31.h" #include "hw/boards.h" #include "qemu/error-report.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "net/net.h" #include "hw/net/lan9118.h" #include "hw/char/serial.h" diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c index 8454b654585..53a6f6a643e 100644 --- a/hw/arm/mainstone.c +++ b/hw/arm/mainstone.c @@ -21,7 +21,7 @@ #include "hw/boards.h" #include "hw/block/flash.h" #include "hw/sysbus.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "cpu.h" /* Device addresses */ diff --git a/hw/arm/microbit.c b/hw/arm/microbit.c index e9494334ce7..8c8dc96f75f 100644 --- a/hw/arm/microbit.c +++ b/hw/arm/microbit.c @@ -13,7 +13,7 @@ #include "hw/boards.h" #include "hw/arm/boot.h" #include "sysemu/sysemu.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/arm/nrf51_soc.h" #include "hw/i2c/microbit_i2c.h" diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c index 70aa31a7f6c..d8df945188d 100644 --- a/hw/arm/mps2-tz.c +++ b/hw/arm/mps2-tz.c @@ -53,7 +53,7 @@ #include "hw/arm/armv7m.h" #include "hw/or-irq.h" #include "hw/boards.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "sysemu/sysemu.h" #include "sysemu/reset.h" #include "hw/misc/unimp.h" diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index 81413b7133e..cb6cf03ecc5 100644 --- a/hw/arm/mps2.c +++ b/hw/arm/mps2.c @@ -33,7 +33,7 @@ #include "hw/arm/armv7m.h" #include "hw/or-irq.h" #include "hw/boards.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "sysemu/sysemu.h" #include "hw/misc/unimp.h" #include "hw/char/cmsdk-apb-uart.h" diff --git a/hw/arm/msf2-soc.c b/hw/arm/msf2-soc.c index 5cfe7caf834..e977aa4b378 100644 --- a/hw/arm/msf2-soc.c +++ b/hw/arm/msf2-soc.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/char/serial.h" #include "hw/arm/msf2-soc.h" #include "hw/misc/unimp.h" diff --git a/hw/arm/msf2-som.c b/hw/arm/msf2-som.c index 343ec977c07..e007bcbe1e4 100644 --- a/hw/arm/msf2-som.c +++ b/hw/arm/msf2-som.c @@ -29,7 +29,7 @@ #include "hw/boards.h" #include "hw/qdev-properties.h" #include "hw/arm/boot.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/arm/msf2-soc.h" #define DDR_BASE_ADDRESS 0xA0000000 diff --git a/hw/arm/musca.c b/hw/arm/musca.c index 7a83f7dda7d..71d34f0dac3 100644 --- a/hw/arm/musca.c +++ b/hw/arm/musca.c @@ -22,7 +22,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "sysemu/sysemu.h" #include "hw/arm/boot.h" #include "hw/arm/armsse.h" diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c index 180d3788f89..56e2ec3937b 100644 --- a/hw/arm/omap1.c +++ b/hw/arm/omap1.c @@ -23,7 +23,7 @@ #include "qapi/error.h" #include "qemu-common.h" #include "cpu.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/hw.h" #include "hw/irq.h" #include "hw/qdev-properties.h" diff --git a/hw/arm/omap2.c b/hw/arm/omap2.c index 02b1aa8c974..0984fdb46ad 100644 --- a/hw/arm/omap2.c +++ b/hw/arm/omap2.c @@ -22,7 +22,7 @@ #include "qemu/error-report.h" #include "qapi/error.h" #include "cpu.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "sysemu/blockdev.h" #include "sysemu/qtest.h" #include "sysemu/reset.h" diff --git a/hw/arm/omap_sx1.c b/hw/arm/omap_sx1.c index 57829b37441..5bc01c4645c 100644 --- a/hw/arm/omap_sx1.c +++ b/hw/arm/omap_sx1.c @@ -33,7 +33,7 @@ #include "hw/arm/boot.h" #include "hw/block/flash.h" #include "sysemu/qtest.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "cpu.h" #include "qemu/cutils.h" diff --git a/hw/arm/orangepi.c b/hw/arm/orangepi.c index 0cf9895ce79..ade08fb688d 100644 --- a/hw/arm/orangepi.c +++ b/hw/arm/orangepi.c @@ -19,7 +19,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qapi/error.h" #include "hw/boards.h" #include "hw/qdev-properties.h" diff --git a/hw/arm/spitz.c b/hw/arm/spitz.c index b45a929cbd9..9634138ce5d 100644 --- a/hw/arm/spitz.c +++ b/hw/arm/spitz.c @@ -32,7 +32,7 @@ #include "hw/sysbus.h" #include "hw/misc/max111x.h" #include "migration/vmstate.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "cpu.h" #include "qom/object.h" diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index 8b4dab9b79f..9f13c5f649f 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -17,7 +17,7 @@ #include "net/net.h" #include "hw/boards.h" #include "qemu/log.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "sysemu/sysemu.h" #include "hw/arm/armv7m.h" #include "hw/char/pl011.h" diff --git a/hw/arm/stm32f205_soc.c b/hw/arm/stm32f205_soc.c index 9cd41bf56da..5f0c603aabb 100644 --- a/hw/arm/stm32f205_soc.c +++ b/hw/arm/stm32f205_soc.c @@ -26,7 +26,7 @@ #include "qapi/error.h" #include "qemu/module.h" #include "hw/arm/boot.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/arm/stm32f205_soc.h" #include "hw/qdev-properties.h" #include "sysemu/sysemu.h" diff --git a/hw/arm/stm32f405_soc.c b/hw/arm/stm32f405_soc.c index cb04c111987..bdd93f0127a 100644 --- a/hw/arm/stm32f405_soc.c +++ b/hw/arm/stm32f405_soc.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu-common.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "sysemu/sysemu.h" #include "hw/arm/stm32f405_soc.h" #include "hw/misc/unimp.h" diff --git a/hw/arm/tosa.c b/hw/arm/tosa.c index d5a6763cf9a..73dd2cff0bb 100644 --- a/hw/arm/tosa.c +++ b/hw/arm/tosa.c @@ -25,7 +25,7 @@ #include "hw/ssi/ssi.h" #include "hw/sysbus.h" #include "hw/misc/led.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qom/object.h" #define TOSA_RAM 0x04000000 diff --git a/hw/arm/z2.c b/hw/arm/z2.c index 9c1e876207b..6d1c458b922 100644 --- a/hw/arm/z2.c +++ b/hw/arm/z2.c @@ -23,7 +23,7 @@ #include "ui/console.h" #include "hw/audio/wm8750.h" #include "audio/audio.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "cpu.h" #include "qom/object.h" diff --git a/hw/avr/atmega.c b/hw/avr/atmega.c index 7ccbb80194c..e9b218f0270 100644 --- a/hw/avr/atmega.c +++ b/hw/avr/atmega.c @@ -13,7 +13,7 @@ #include "qemu/units.h" #include "qapi/error.h" #include "exec/sysemu/memory.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "sysemu/sysemu.h" #include "hw/qdev-properties.h" #include "hw/sysbus.h" diff --git a/hw/char/goldfish_tty.c b/hw/char/goldfish_tty.c index 8365a187614..f882fd1ee25 100644 --- a/hw/char/goldfish_tty.c +++ b/hw/char/goldfish_tty.c @@ -15,7 +15,7 @@ #include "chardev/char-fe.h" #include "qemu/log.h" #include "trace.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/char/goldfish_tty.h" #define GOLDFISH_TTY_VERSION 1 diff --git a/hw/char/omap_uart.c b/hw/char/omap_uart.c index e8da9333782..7ac760f60b0 100644 --- a/hw/char/omap_uart.c +++ b/hw/char/omap_uart.c @@ -21,7 +21,7 @@ #include "chardev/char.h" #include "hw/arm/omap.h" #include "hw/char/serial.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" /* UARTs */ struct omap_uart_s { diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c index f586a4bef54..9586c1716ac 100644 --- a/hw/core/null-machine.c +++ b/hw/core/null-machine.c @@ -14,7 +14,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" #include "hw/boards.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/core/cpu.h" static void machine_none_init(MachineState *mch) diff --git a/hw/core/sysbus.c b/hw/core/sysbus.c index aaae8e23cc4..f7ae45677d2 100644 --- a/hw/core/sysbus.c +++ b/hw/core/sysbus.c @@ -22,7 +22,7 @@ #include "qemu/module.h" #include "hw/sysbus.h" #include "monitor/monitor.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" static void sysbus_dev_print(Monitor *mon, DeviceState *dev, int indent); static char *sysbus_get_fw_dev_path(DeviceState *dev); diff --git a/hw/dma/etraxfs_dma.c b/hw/dma/etraxfs_dma.c index c4334e87bf5..9356f54e846 100644 --- a/hw/dma/etraxfs_dma.c +++ b/hw/dma/etraxfs_dma.c @@ -27,7 +27,7 @@ #include "hw/irq.h" #include "qemu/main-loop.h" #include "sysemu/runstate.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/cris/etraxfs_dma.h" diff --git a/hw/dma/rc4030.c b/hw/dma/rc4030.c index e4d2f1725bc..e23bd30a10a 100644 --- a/hw/dma/rc4030.c +++ b/hw/dma/rc4030.c @@ -32,7 +32,7 @@ #include "qemu/timer.h" #include "qemu/log.h" #include "qemu/module.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "trace.h" #include "qom/object.h" diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c index cb1074f234c..c3ef86f4f16 100644 --- a/hw/hyperv/hyperv.c +++ b/hw/hyperv/hyperv.c @@ -11,7 +11,7 @@ #include "qemu/main-loop.h" #include "qemu/module.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "sysemu/kvm.h" #include "qemu/bitops.h" #include "qemu/error-report.h" diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c index f84f37411fd..f5bd98b65cd 100644 --- a/hw/input/lasips2.c +++ b/hw/input/lasips2.c @@ -28,7 +28,7 @@ #include "hw/input/lasips2.h" #include "exec/sysemu/hwaddr.h" #include "trace.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "migration/vmstate.h" #include "hw/irq.h" diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c index 159db6cbe22..17bd4a0f905 100644 --- a/hw/microblaze/petalogix_ml605_mmu.c +++ b/hw/microblaze/petalogix_ml605_mmu.c @@ -36,7 +36,7 @@ #include "hw/boards.h" #include "hw/char/serial.h" #include "hw/qdev-properties.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/ssi/ssi.h" #include "boot.h" diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c index 9d959d1ad80..82156e6e69f 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -33,7 +33,7 @@ #include "sysemu/sysemu.h" #include "hw/boards.h" #include "hw/misc/unimp.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/char/xilinx_uartlite.h" #include "boot.h" diff --git a/hw/microblaze/xlnx-zynqmp-pmu.c b/hw/microblaze/xlnx-zynqmp-pmu.c index 5a2016672a3..2982461559b 100644 --- a/hw/microblaze/xlnx-zynqmp-pmu.c +++ b/hw/microblaze/xlnx-zynqmp-pmu.c @@ -17,7 +17,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/boards.h" #include "cpu.h" #include "boot.h" diff --git a/hw/misc/allwinner-h3-dramc.c b/hw/misc/allwinner-h3-dramc.c index 1d37cf422cd..cc050049089 100644 --- a/hw/misc/allwinner-h3-dramc.c +++ b/hw/misc/allwinner-h3-dramc.c @@ -24,7 +24,7 @@ #include "migration/vmstate.h" #include "qemu/log.h" #include "qemu/module.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/qdev-properties.h" #include "qapi/error.h" #include "hw/misc/allwinner-h3-dramc.h" diff --git a/hw/misc/omap_gpmc.c b/hw/misc/omap_gpmc.c index cec48723d63..99c803baec8 100644 --- a/hw/misc/omap_gpmc.c +++ b/hw/misc/omap_gpmc.c @@ -24,7 +24,7 @@ #include "hw/block/flash.h" #include "hw/arm/omap.h" #include "exec/sysemu/memory.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" /* General-Purpose Memory Controller */ struct omap_gpmc_s { diff --git a/hw/nios2/10m50_devboard.c b/hw/nios2/10m50_devboard.c index 1efc61ee7c4..38452c0841c 100644 --- a/hw/nios2/10m50_devboard.c +++ b/hw/nios2/10m50_devboard.c @@ -31,7 +31,7 @@ #include "sysemu/sysemu.h" #include "hw/boards.h" #include "exec/sysemu/memory.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qemu/config-file.h" #include "boot.h" diff --git a/hw/nios2/generic_nommu.c b/hw/nios2/generic_nommu.c index 2888de27086..a1af8ba45d2 100644 --- a/hw/nios2/generic_nommu.c +++ b/hw/nios2/generic_nommu.c @@ -33,7 +33,7 @@ #include "hw/char/serial.h" #include "hw/boards.h" #include "exec/sysemu/memory.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qemu/config-file.h" #include "boot.h" diff --git a/hw/pci-host/mv64361.c b/hw/pci-host/mv64361.c index 20510d86803..ea7eb05c337 100644 --- a/hw/pci-host/mv64361.c +++ b/hw/pci-host/mv64361.c @@ -19,7 +19,7 @@ #include "hw/irq.h" #include "hw/intc/i8259.h" #include "hw/qdev-properties.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qemu/log.h" #include "qemu/error-report.h" #include "trace.h" diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c index 0bfd0928aa5..e9454f123af 100644 --- a/hw/ppc/pegasos2.c +++ b/hw/ppc/pegasos2.c @@ -30,7 +30,7 @@ #include "qemu/error-report.h" #include "sysemu/kvm.h" #include "kvm_ppc.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "trace.h" #include "qemu/datadir.h" #include "sysemu/device_tree.h" diff --git a/hw/ppc/ppc405_uc.c b/hw/ppc/ppc405_uc.c index e632c408bdf..bbc1fb06a88 100644 --- a/hw/ppc/ppc405_uc.c +++ b/hw/ppc/ppc405_uc.c @@ -34,7 +34,7 @@ #include "qemu/timer.h" #include "sysemu/reset.h" #include "sysemu/sysemu.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/intc/ppc-uic.h" #include "hw/qdev-properties.h" #include "qapi/error.h" diff --git a/hw/ppc/ppc4xx_devs.c b/hw/ppc/ppc4xx_devs.c index 980c48944fc..516c2bff74d 100644 --- a/hw/ppc/ppc4xx_devs.c +++ b/hw/ppc/ppc4xx_devs.c @@ -32,7 +32,7 @@ #include "hw/intc/ppc-uic.h" #include "hw/qdev-properties.h" #include "qemu/log.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qemu/error-report.h" #include "qapi/error.h" diff --git a/hw/ppc/prep_systemio.c b/hw/ppc/prep_systemio.c index b2bd7832487..a89d24b8881 100644 --- a/hw/ppc/prep_systemio.c +++ b/hw/ppc/prep_systemio.c @@ -28,7 +28,7 @@ #include "hw/isa/isa.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qom/object.h" #include "qemu/error-report.h" /* for error_report() */ #include "qemu/module.h" diff --git a/hw/ppc/rs6000_mc.c b/hw/ppc/rs6000_mc.c index c0bc212e924..f79df1cf01e 100644 --- a/hw/ppc/rs6000_mc.c +++ b/hw/ppc/rs6000_mc.c @@ -22,7 +22,7 @@ #include "hw/isa/isa.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qapi/error.h" #include "trace.h" #include "qom/object.h" diff --git a/hw/ppc/spapr_ovec.c b/hw/ppc/spapr_ovec.c index b2567caa5cf..5255d349c42 100644 --- a/hw/ppc/spapr_ovec.c +++ b/hw/ppc/spapr_ovec.c @@ -15,7 +15,7 @@ #include "hw/ppc/spapr_ovec.h" #include "migration/vmstate.h" #include "qemu/bitmap.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qemu/error-report.h" #include "trace.h" #include diff --git a/hw/riscv/shakti_c.c b/hw/riscv/shakti_c.c index 18f70fadaa9..4c60b97ac72 100644 --- a/hw/riscv/shakti_c.c +++ b/hw/riscv/shakti_c.c @@ -24,7 +24,7 @@ #include "hw/intc/sifive_clint.h" #include "sysemu/sysemu.h" #include "hw/qdev-properties.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/riscv/boot.h" diff --git a/hw/s390x/css.c b/hw/s390x/css.c index bed46f5ec3a..3b1fbb41295 100644 --- a/hw/s390x/css.c +++ b/hw/s390x/css.c @@ -14,7 +14,7 @@ #include "qapi/visitor.h" #include "qemu/bitops.h" #include "qemu/error-report.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/s390x/ioinst.h" #include "hw/qdev-properties.h" #include "hw/s390x/css.h" diff --git a/hw/sparc/sun4m_iommu.c b/hw/sparc/sun4m_iommu.c index 71f5465249f..4cdce4af5c5 100644 --- a/hw/sparc/sun4m_iommu.c +++ b/hw/sparc/sun4m_iommu.c @@ -29,7 +29,7 @@ #include "hw/sysbus.h" #include "migration/vmstate.h" #include "qemu/module.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "trace.h" /* diff --git a/hw/sparc64/sun4u_iommu.c b/hw/sparc64/sun4u_iommu.c index 9178277f824..189e2a13ec2 100644 --- a/hw/sparc64/sun4u_iommu.c +++ b/hw/sparc64/sun4u_iommu.c @@ -27,7 +27,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" #include "hw/sparc/sun4u_iommu.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qemu/log.h" #include "qemu/module.h" #include "trace.h" diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c index 9520471be2c..134fa55ecf5 100644 --- a/hw/timer/hpet.c +++ b/hw/timer/hpet.c @@ -36,7 +36,7 @@ #include "hw/rtc/mc146818rtc_regs.h" #include "migration/vmstate.h" #include "hw/timer/i8254.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qom/object.h" //#define HPET_DEBUG diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index 4b32aca1a05..18c35fd1982 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -25,7 +25,7 @@ #include "migration/vmstate.h" #include "hw/qdev-properties.h" #include "hw/s390x/ap-bridge.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qom/object.h" #define TYPE_VFIO_AP_DEVICE "vfio-ap" diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c index e752c845e9e..2e4d1f27b6c 100644 --- a/hw/vfio/ccw.c +++ b/hw/vfio/ccw.c @@ -26,7 +26,7 @@ #include "hw/s390x/vfio-ccw.h" #include "hw/qdev-properties.h" #include "hw/s390x/ccw-device.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" #include "qemu/module.h" diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 472ab394109..91171e4f658 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -27,7 +27,7 @@ #include "hw/vfio/vfio-common.h" #include "hw/vfio/vfio.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "exec/sysemu/memory.h" #include "exec/ram_addr.h" #include "hw/hw.h" diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c index ea9bcdf2bf7..9779aed8d8b 100644 --- a/hw/vfio/platform.c +++ b/hw/vfio/platform.c @@ -27,7 +27,7 @@ #include "qemu/module.h" #include "qemu/range.h" #include "exec/sysemu/memory.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qemu/queue.h" #include "hw/sysbus.h" #include "trace.h" diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 4b5d9e5e503..7d0533059d6 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -23,7 +23,7 @@ #include "hw/boards.h" #include "sysemu/balloon.h" #include "hw/virtio/virtio-balloon.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qapi/error.h" #include "qapi/qapi-events-machine.h" #include "qapi/visitor.h" diff --git a/hw/virtio/virtio-bus.c b/hw/virtio/virtio-bus.c index d6332d45c3b..a324e3e251e 100644 --- a/hw/virtio/virtio-bus.c +++ b/hw/virtio/virtio-bus.c @@ -28,7 +28,7 @@ #include "qapi/error.h" #include "hw/virtio/virtio-bus.h" #include "hw/virtio/virtio.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" /* #define DEBUG_VIRTIO_BUS */ diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index 1c29146dcfa..9dfbc7b5a1e 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -144,7 +144,7 @@ typedef struct GuestFD { static GArray *guestfd_array; #ifndef CONFIG_USER_ONLY -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" /* * Find the base of a RAM region containing the specified address */ diff --git a/softmmu/ioport.c b/softmmu/ioport.c index dfb9fbc7ffa..6ace5ec966a 100644 --- a/softmmu/ioport.c +++ b/softmmu/ioport.c @@ -29,7 +29,7 @@ #include "cpu.h" #include "exec/ioport.h" #include "exec/sysemu/memory.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "trace.h" typedef struct MemoryRegionPortioList { diff --git a/softmmu/memory_mapping.c b/softmmu/memory_mapping.c index 60ff72790ea..646d3d184d7 100644 --- a/softmmu/memory_mapping.c +++ b/softmmu/memory_mapping.c @@ -16,7 +16,7 @@ #include "sysemu/memory_mapping.h" #include "exec/sysemu/memory.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" //#define DEBUG_GUEST_PHYS_REGION_ADD diff --git a/target/arm/kvm.c b/target/arm/kvm.c index d8381ba2245..aff19af3561 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -28,7 +28,7 @@ #include "internals.h" #include "hw/pci/pci.h" #include "exec/memattrs.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/boards.h" #include "hw/irq.h" #include "qemu/log.h" diff --git a/target/avr/helper.c b/target/avr/helper.c index 35e10195940..1dba5ffa6eb 100644 --- a/target/avr/helper.c +++ b/target/avr/helper.c @@ -22,7 +22,7 @@ #include "cpu.h" #include "hw/core/tcg-cpu-ops.h" #include "exec/exec-all.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "exec/helper-proto.h" bool avr_cpu_exec_interrupt(CPUState *cs, int interrupt_request) diff --git a/target/i386/cpu-sysemu.c b/target/i386/cpu-sysemu.c index 6477584313a..2746a592d9b 100644 --- a/target/i386/cpu-sysemu.c +++ b/target/i386/cpu-sysemu.c @@ -29,7 +29,7 @@ #include "qapi/qapi-commands-machine-target.h" #include "hw/qdev-properties.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/i386/apic_internal.h" #include "cpu-internal.h" diff --git a/target/i386/cpu.c b/target/i386/cpu.c index 839b9d9f8b2..ec8b7745381 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -34,7 +34,7 @@ #include "hw/qdev-properties.h" #include "hw/i386/topology.h" #ifndef CONFIG_USER_ONLY -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "hw/boards.h" #endif diff --git a/target/i386/hax/hax-all.c b/target/i386/hax/hax-all.c index bf65ed6fa92..29fe6577e7d 100644 --- a/target/i386/hax/hax-all.c +++ b/target/i386/hax/hax-all.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qemu-common.h" #include "qemu/accel.h" diff --git a/target/i386/hax/hax-mem.c b/target/i386/hax/hax-mem.c index 8d44edbffdd..06c8f6ccfdd 100644 --- a/target/i386/hax/hax-mem.c +++ b/target/i386/hax/hax-mem.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "qemu/error-report.h" #include "hax-accel-ops.h" diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c index dfa690d65da..8adbfcb82d9 100644 --- a/target/i386/nvmm/nvmm-all.c +++ b/target/i386/nvmm/nvmm-all.c @@ -9,7 +9,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "exec/ioport.h" #include "qemu-common.h" #include "qemu/accel.h" diff --git a/target/i386/tcg/sysemu/misc_helper.c b/target/i386/tcg/sysemu/misc_helper.c index 66e7939537f..54c6bfeb2d5 100644 --- a/target/i386/tcg/sysemu/misc_helper.c +++ b/target/i386/tcg/sysemu/misc_helper.c @@ -22,7 +22,7 @@ #include "cpu.h" #include "exec/helper-proto.h" #include "exec/cpu_ldst.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "tcg/helper-tcg.h" void helper_outb(CPUX86State *env, uint32_t port, uint32_t data) diff --git a/target/i386/tcg/sysemu/tcg-cpu.c b/target/i386/tcg/sysemu/tcg-cpu.c index c223c0fe9bc..a6227564590 100644 --- a/target/i386/tcg/sysemu/tcg-cpu.c +++ b/target/i386/tcg/sysemu/tcg-cpu.c @@ -23,7 +23,7 @@ #include "sysemu/sysemu.h" #include "qemu/units.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "tcg/tcg-cpu.h" diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index f832f286ac3..7abc77d1c1f 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "exec/ioport.h" #include "qemu-common.h" #include "qemu/accel.h" diff --git a/target/s390x/excp_helper.c b/target/s390x/excp_helper.c index 20625c2c8f6..bcdde18e366 100644 --- a/target/s390x/excp_helper.c +++ b/target/s390x/excp_helper.c @@ -26,9 +26,9 @@ #include "exec/exec-all.h" #include "exec/cpu_ldst.h" #include "hw/s390x/ioinst.h" -#include "exec/address-spaces.h" #include "tcg_s390x.h" #ifndef CONFIG_USER_ONLY +#include "exec/sysemu/address-spaces.h" #include "hw/s390x/s390_flic.h" #include "hw/boards.h" #endif diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index d492b23a177..11dfb873df9 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -17,7 +17,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "cpu.h" #include "internal.h" #include "kvm_s390x.h" diff --git a/target/s390x/sigp.c b/target/s390x/sigp.c index c604f177100..2546675d5f0 100644 --- a/target/s390x/sigp.c +++ b/target/s390x/sigp.c @@ -13,7 +13,7 @@ #include "internal.h" #include "sysemu/hw_accel.h" #include "sysemu/runstate.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" #include "exec/exec-all.h" #include "sysemu/tcg.h" #include "trace.h" diff --git a/target/xtensa/dbg_helper.c b/target/xtensa/dbg_helper.c index be1f81107b4..5b1356b9792 100644 --- a/target/xtensa/dbg_helper.c +++ b/target/xtensa/dbg_helper.c @@ -31,7 +31,7 @@ #include "exec/helper-proto.h" #include "qemu/host-utils.h" #include "exec/exec-all.h" -#include "exec/address-spaces.h" +#include "exec/sysemu/address-spaces.h" static void tb_invalidate_virtual_addr(CPUXtensaState *env, uint32_t vaddr) { From patchwork Mon May 17 11:11:07 2021 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: 12261673 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B03DC433ED for ; Mon, 17 May 2021 11:45:39 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1C81D61073 for ; Mon, 17 May 2021 11:45:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1C81D61073 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:55502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1libgo-0006vw-42 for qemu-devel@archiver.kernel.org; Mon, 17 May 2021 07:45:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1libA6-0004US-VQ for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:50 -0400 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]:35411) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1libA4-0000d6-Q2 for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:50 -0400 Received: by mail-wr1-x431.google.com with SMTP id a4so5969469wrr.2 for ; Mon, 17 May 2021 04:11:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fh8JZNfaRTAyd35OyZJZlm411xR5tEWJA9zZrpAqL0s=; b=fx0k8U5d2cZZsHIWix9fsFxGTUBHR2k5hkduFXNepuv6k54DXMn3miPMYjpqVTLS7v FNnKB3N3/dNh/pyGdyQriO0LjdqR6GcscOGgas3xzsz3iwGfg8Fyb0X12Tmy9PRn9XZ9 cq9ITwop/bbmFFa9Ib3UICNcDiCf/b6ktgkY6URbk1JDdkqoLgzgTU5tAR71DaVwQ2EP M32vMWHlRXB0QudvmbhpftUncDpYRIMlGctqW2t5FN/fXWbd8uwxIXV9NTO6AXS4ATJr FtusnoByEduwgtK0lE2t5Veqg9xJVcz3vSJlTZ/LZ8rBtfo+rf3uz27kl6EzNOb4Din6 YdXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=fh8JZNfaRTAyd35OyZJZlm411xR5tEWJA9zZrpAqL0s=; b=jc+1zqtVHgZkGH9aTxcSF8T6roZe7DBFwYdSffp53FM6NqUrl6+sulV2Uu7rr40gs9 /0FenAtZXA348O7zWrrYyzv3tBJlLz0rwXBjS8adHk8UnM1AK8BWOjTSgWeMoo0DsCPK mRhNuDKVvBm8TwfJ6iLT+tRqmyWi9FLsdSzYF02d95PExu/FHZHAhPsUUzM/0R2nbBYq jJ5uSdW5ZeJrDWhHBVd/v94qWbjkQz4RWm3NgI2+aBguO9Z0D1MiAPPx7tysat3MaMD4 v+2MJIkDKqwfUwcgV5gbbq3uCBEPa34N8VNcvKt5DJENq2c9TPL3s/KU+cipH1XU2iQz sCLw== X-Gm-Message-State: AOAM533VSkrCWKkCfZ4C8wz19DYFJwH3YWtVurL11RvrOMPhJ2WsJIme r/ACuv9GpHkjjYGECPC8DHjggQ5yJTXL4g== X-Google-Smtp-Source: ABdhPJyWHvAvihaYh9Y/yoFNZc2L+1afBCVDOKn+teWTckfcuNhE0X3AHXzodctYHuC/7CQ+gnmfWw== X-Received: by 2002:a5d:6d81:: with SMTP id l1mr73349866wrs.17.1621249906773; Mon, 17 May 2021 04:11:46 -0700 (PDT) Received: from localhost.localdomain (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id g16sm17587223wmh.32.2021.05.17.04.11.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 04:11:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 07/11] exec: Extract CPU I/O instructions to "cpu-io.h" Date: Mon, 17 May 2021 13:11:07 +0200 Message-Id: <20210517111111.1068153-8-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210517111111.1068153-1-f4bug@amsat.org> References: <20210517111111.1068153-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x431.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Richard Henderson , Claudio Fontana , Laurent Vivier Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Not all architectures use an I/O bus. Extract the CPU I/O instruction helpers into a specific unit named cpu-io.c (and its equivalent "cpu-io.h" header). Since what is left in ioport.c is no more target specific, build the file with the other softmmu objects by moving the file to the softmmu_ss Meson source set. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/cpu-io.h | 30 +++++++++++ include/exec/ioport.h | 7 --- hw/i386/xen/xen-hvm.c | 1 + monitor/misc.c | 2 +- softmmu/cpu-io.c | 88 +++++++++++++++++++++++++++++++ softmmu/ioport.c | 60 --------------------- softmmu/qtest.c | 1 + tests/qtest/fuzz/qtest_wrappers.c | 3 +- softmmu/meson.build | 3 +- 9 files changed, 125 insertions(+), 70 deletions(-) create mode 100644 include/exec/cpu-io.h create mode 100644 softmmu/cpu-io.c diff --git a/include/exec/cpu-io.h b/include/exec/cpu-io.h new file mode 100644 index 00000000000..6538c451177 --- /dev/null +++ b/include/exec/cpu-io.h @@ -0,0 +1,30 @@ +/* + * QEMU CPU I/O instructions + * + * Copyright (c) 2003 Fabrice Bellard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#ifndef CPU_IO_H +#define CPU_IO_H + +void cpu_outb(uint32_t addr, uint8_t val); +void cpu_outw(uint32_t addr, uint16_t val); +void cpu_outl(uint32_t addr, uint32_t val); +uint8_t cpu_inb(uint32_t addr); +uint16_t cpu_inw(uint32_t addr); +uint32_t cpu_inl(uint32_t addr); + +#endif /* CPU_IO_H */ diff --git a/include/exec/ioport.h b/include/exec/ioport.h index d5ca8abff76..f94f71b19f0 100644 --- a/include/exec/ioport.h +++ b/include/exec/ioport.h @@ -44,13 +44,6 @@ typedef struct MemoryRegionPortio { extern const MemoryRegionOps unassigned_io_ops; #endif -void cpu_outb(uint32_t addr, uint8_t val); -void cpu_outw(uint32_t addr, uint16_t val); -void cpu_outl(uint32_t addr, uint32_t val); -uint8_t cpu_inb(uint32_t addr); -uint16_t cpu_inw(uint32_t addr); -uint32_t cpu_inl(uint32_t addr); - typedef struct PortioList { const struct MemoryRegionPortio *ports; Object *owner; diff --git a/hw/i386/xen/xen-hvm.c b/hw/i386/xen/xen-hvm.c index 9b432773f02..c8de325a809 100644 --- a/hw/i386/xen/xen-hvm.c +++ b/hw/i386/xen/xen-hvm.c @@ -33,6 +33,7 @@ #include "sysemu/xen.h" #include "sysemu/xen-mapcache.h" #include "trace.h" +#include "exec/cpu-io.h" #include #include diff --git a/monitor/misc.c b/monitor/misc.c index c1fcd995805..60ee9c91a9f 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -76,7 +76,7 @@ #include "qapi/qmp-event.h" #include "sysemu/cpus.h" #include "qemu/cutils.h" - +#include "exec/cpu-io.h" #if defined(TARGET_S390X) #include "hw/s390x/storage-keys.h" #include "hw/s390x/storage-attributes.h" diff --git a/softmmu/cpu-io.c b/softmmu/cpu-io.c new file mode 100644 index 00000000000..98da9d693f9 --- /dev/null +++ b/softmmu/cpu-io.c @@ -0,0 +1,88 @@ +/* + * QEMU CPU I/O instructions + * + * Copyright (c) 2003-2008 Fabrice Bellard + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "qemu/osdep.h" +#include "exec/sysemu/address-spaces.h" +#include "exec/cpu-io.h" +#include "cpu.h" +#include "trace.h" + +void cpu_outb(uint32_t addr, uint8_t val) +{ + trace_cpu_out(addr, 'b', val); + address_space_write(&address_space_io, addr, MEMTXATTRS_UNSPECIFIED, + &val, 1); +} + +void cpu_outw(uint32_t addr, uint16_t val) +{ + uint8_t buf[2]; + + trace_cpu_out(addr, 'w', val); + stw_p(buf, val); + address_space_write(&address_space_io, addr, MEMTXATTRS_UNSPECIFIED, + buf, 2); +} + +void cpu_outl(uint32_t addr, uint32_t val) +{ + uint8_t buf[4]; + + trace_cpu_out(addr, 'l', val); + stl_p(buf, val); + address_space_write(&address_space_io, addr, MEMTXATTRS_UNSPECIFIED, + buf, 4); +} + +uint8_t cpu_inb(uint32_t addr) +{ + uint8_t val; + + address_space_read(&address_space_io, addr, MEMTXATTRS_UNSPECIFIED, + &val, 1); + trace_cpu_in(addr, 'b', val); + return val; +} + +uint16_t cpu_inw(uint32_t addr) +{ + uint8_t buf[2]; + uint16_t val; + + address_space_read(&address_space_io, addr, MEMTXATTRS_UNSPECIFIED, buf, 2); + val = lduw_p(buf); + trace_cpu_in(addr, 'w', val); + return val; +} + +uint32_t cpu_inl(uint32_t addr) +{ + uint8_t buf[4]; + uint32_t val; + + address_space_read(&address_space_io, addr, MEMTXATTRS_UNSPECIFIED, buf, 4); + val = ldl_p(buf); + trace_cpu_in(addr, 'l', val); + return val; +} diff --git a/softmmu/ioport.c b/softmmu/ioport.c index 6ace5ec966a..6f297027cfe 100644 --- a/softmmu/ioport.c +++ b/softmmu/ioport.c @@ -26,7 +26,6 @@ */ #include "qemu/osdep.h" -#include "cpu.h" #include "exec/ioport.h" #include "exec/sysemu/memory.h" #include "exec/sysemu/address-spaces.h" @@ -54,65 +53,6 @@ const MemoryRegionOps unassigned_io_ops = { .endianness = DEVICE_NATIVE_ENDIAN, }; -void cpu_outb(uint32_t addr, uint8_t val) -{ - trace_cpu_out(addr, 'b', val); - address_space_write(&address_space_io, addr, MEMTXATTRS_UNSPECIFIED, - &val, 1); -} - -void cpu_outw(uint32_t addr, uint16_t val) -{ - uint8_t buf[2]; - - trace_cpu_out(addr, 'w', val); - stw_p(buf, val); - address_space_write(&address_space_io, addr, MEMTXATTRS_UNSPECIFIED, - buf, 2); -} - -void cpu_outl(uint32_t addr, uint32_t val) -{ - uint8_t buf[4]; - - trace_cpu_out(addr, 'l', val); - stl_p(buf, val); - address_space_write(&address_space_io, addr, MEMTXATTRS_UNSPECIFIED, - buf, 4); -} - -uint8_t cpu_inb(uint32_t addr) -{ - uint8_t val; - - address_space_read(&address_space_io, addr, MEMTXATTRS_UNSPECIFIED, - &val, 1); - trace_cpu_in(addr, 'b', val); - return val; -} - -uint16_t cpu_inw(uint32_t addr) -{ - uint8_t buf[2]; - uint16_t val; - - address_space_read(&address_space_io, addr, MEMTXATTRS_UNSPECIFIED, buf, 2); - val = lduw_p(buf); - trace_cpu_in(addr, 'w', val); - return val; -} - -uint32_t cpu_inl(uint32_t addr) -{ - uint8_t buf[4]; - uint32_t val; - - address_space_read(&address_space_io, addr, MEMTXATTRS_UNSPECIFIED, buf, 4); - val = ldl_p(buf); - trace_cpu_in(addr, 'l', val); - return val; -} - void portio_list_init(PortioList *piolist, Object *owner, const MemoryRegionPortio *callbacks, diff --git a/softmmu/qtest.c b/softmmu/qtest.c index f1ee4fbc369..2551296c727 100644 --- a/softmmu/qtest.c +++ b/softmmu/qtest.c @@ -31,6 +31,7 @@ #ifdef CONFIG_PSERIES #include "hw/ppc/spapr_rtas.h" #endif +#include "exec/cpu-io.h" #define MAX_IRQ 256 diff --git a/tests/qtest/fuzz/qtest_wrappers.c b/tests/qtest/fuzz/qtest_wrappers.c index 0580f8df860..25cf1b72705 100644 --- a/tests/qtest/fuzz/qtest_wrappers.c +++ b/tests/qtest/fuzz/qtest_wrappers.c @@ -12,8 +12,9 @@ */ #include "qemu/osdep.h" +#include "exec/sysemu/address-spaces.h" +#include "exec/cpu-io.h" #include "hw/core/cpu.h" -#include "exec/ioport.h" #include "fuzz.h" diff --git a/softmmu/meson.build b/softmmu/meson.build index d8e03018abf..ebf063b8990 100644 --- a/softmmu/meson.build +++ b/softmmu/meson.build @@ -2,11 +2,11 @@ 'arch_init.c', 'balloon.c', 'cpus.c', + 'cpu-io.c', 'cpu-throttle.c', 'datadir.c', 'globals.c', 'physmem.c', - 'ioport.c', 'rtc.c', 'runstate.c', 'memory.c', @@ -24,6 +24,7 @@ softmmu_ss.add(files( 'bootdevice.c', 'dma-helpers.c', + 'ioport.c', 'qdev-monitor.c', ), sdl, libpmem, libdaxctl) From patchwork Mon May 17 11:11:08 2021 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: 12261625 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11684C433ED for ; Mon, 17 May 2021 11:21:41 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A7B4E60FD8 for ; Mon, 17 May 2021 11:21:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A7B4E60FD8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:54198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1libJb-0007p6-PH for qemu-devel@archiver.kernel.org; Mon, 17 May 2021 07:21:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1libAB-0004cr-S9 for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:55 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:36759) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1libAA-0000f2-0z for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:55 -0400 Received: by mail-wr1-x430.google.com with SMTP id c14so4144613wrx.3 for ; Mon, 17 May 2021 04:11:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2mMu7otbU4f+0YP+cVnXWYR+lxt0gX0e1SgI1n/TCpI=; b=ajS/4Q5FdjS0D0HSFo59wi0yxS6puaoxX5Xeh99l8LdjgD5WGzw9fNzaVKKXuKdbxw Qf15hwGq48w3ioii7k691ky+KLEb4yVuLbt9TJHIBDcy0KA8+WzaLhso+P2715wZXsEa FlZ3bUxuAu58FlHYd//jjVag/D2Hrqvie5QoCCnnsMx5BbJivdzlWQFEtazA+wm7WEoy O1h3qDGYUvcGagBaGu5FKwRaa83PlYRMa9Tj9+edQyV7TjDxeC/VuXMAqfmfZrx2Equz ZgY3dgD59UBwZPSmneEfSdMVlDb8gEmZfbD6LOJ6ZdZGHyrzzQ2UKbYBEZUBodgVsJVt 5YtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=2mMu7otbU4f+0YP+cVnXWYR+lxt0gX0e1SgI1n/TCpI=; b=dw+vWV+yn14sYJ3W7UFV/67YPhY2SQUH3BLVQ1l+YnKLrjJU2vVc6pGOeXrxFUqCoD xC3mHXZ1zx7YvES2pXopQBDmBMQVRNsCJ73prIbhcib9zdL+bVdiU1tEywG4DXcjvsLV edBqNjC337Z0jL7uku4vVlzlnPUNSBbUMwWOsfFsFVCS0bZI/MVd8Xu3TmV8i/E0s6Uc /FKOmmsUYdHNF10hbm7mxji8zKyU0hEvY/+syZNwWVrY4lMx2j9HYxaZptQZ1K4+b4yk wE5KSJA4MTnQMOlBufn8GZS82MWAHULicom/+MTngnhYXB88mfIbd2UUVxDzMSjqit0u hCyQ== X-Gm-Message-State: AOAM531zhmewjMAJAWbBQc5FH87v8hDrW0w6reZjXznfHr63AwZ1gJRg bHRfn0NvQZmqm9Bac23ZbUdyeBfyOh7Wyw== X-Google-Smtp-Source: ABdhPJwGHDjffIIxBnVTFNlRL8R4GNWt/TfbyhUBDOWWAcJu6O0A0DmbcaS6I/MIRzAUc/MoCHD/JQ== X-Received: by 2002:a5d:6445:: with SMTP id d5mr4943917wrw.235.1621249911417; Mon, 17 May 2021 04:11:51 -0700 (PDT) Received: from localhost.localdomain (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id b15sm16628274wru.64.2021.05.17.04.11.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 04:11:50 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 08/11] exec: Restrict ioport.h to sysemu/ Date: Mon, 17 May 2021 13:11:08 +0200 Message-Id: <20210517111111.1068153-9-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210517111111.1068153-1-f4bug@amsat.org> References: <20210517111111.1068153-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Richard Henderson , Claudio Fontana , Laurent Vivier Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" To make it clearer the ioport.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/ioport.h,sysemu/ioport.h, $(git grep -l exec/ioport.h) Then the #ifdef'ry conditional on CONFIG_USER_ONLY has been replaced by an #error. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/vga_int.h | 2 +- include/hw/dma/i8257.h | 2 +- include/hw/isa/isa.h | 2 +- include/{exec => sysemu}/ioport.h | 10 ++++++---- softmmu/ioport.c | 2 +- softmmu/physmem.c | 2 +- softmmu/qtest.c | 2 +- target/i386/nvmm/nvmm-all.c | 2 +- target/i386/whpx/whpx-all.c | 2 +- MAINTAINERS | 2 +- 10 files changed, 15 insertions(+), 13 deletions(-) rename include/{exec => sysemu}/ioport.h (93%) diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h index b923633cc4f..8db43e898a3 100644 --- a/hw/display/vga_int.h +++ b/hw/display/vga_int.h @@ -25,7 +25,7 @@ #ifndef HW_VGA_INT_H #define HW_VGA_INT_H -#include "exec/ioport.h" +#include "sysemu/ioport.h" #include "exec/sysemu/memory.h" #include "ui/console.h" diff --git a/include/hw/dma/i8257.h b/include/hw/dma/i8257.h index f652345d65a..e987a22fdd8 100644 --- a/include/hw/dma/i8257.h +++ b/include/hw/dma/i8257.h @@ -2,7 +2,7 @@ #define HW_I8257_H #include "hw/isa/isa.h" -#include "exec/ioport.h" +#include "sysemu/ioport.h" #include "qom/object.h" #define TYPE_I8257 "i8257" diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 9c9aabfc3b0..a63f1841111 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -4,7 +4,7 @@ /* ISA bus */ #include "exec/sysemu/memory.h" -#include "exec/ioport.h" +#include "sysemu/ioport.h" #include "hw/qdev-core.h" #include "qom/object.h" diff --git a/include/exec/ioport.h b/include/sysemu/ioport.h similarity index 93% rename from include/exec/ioport.h rename to include/sysemu/ioport.h index f94f71b19f0..b37c54ce4e5 100644 --- a/include/exec/ioport.h +++ b/include/sysemu/ioport.h @@ -21,8 +21,12 @@ * IO ports API */ -#ifndef IOPORT_H -#define IOPORT_H +#ifndef SYSEMU_IOPORT_H +#define SYSEMU_IOPORT_H + +#ifdef CONFIG_USER_ONLY +#error Cannot include sysemu specific header from user emulation +#endif #include "exec/sysemu/memory.h" @@ -40,9 +44,7 @@ typedef struct MemoryRegionPortio { #define PORTIO_END_OF_LIST() { } -#ifndef CONFIG_USER_ONLY extern const MemoryRegionOps unassigned_io_ops; -#endif typedef struct PortioList { const struct MemoryRegionPortio *ports; diff --git a/softmmu/ioport.c b/softmmu/ioport.c index 6f297027cfe..5fabbb1832a 100644 --- a/softmmu/ioport.c +++ b/softmmu/ioport.c @@ -26,7 +26,7 @@ */ #include "qemu/osdep.h" -#include "exec/ioport.h" +#include "sysemu/ioport.h" #include "exec/sysemu/memory.h" #include "exec/sysemu/address-spaces.h" #include "trace.h" diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 31e490185f3..51f05eb989c 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -42,7 +42,7 @@ #include "qemu/error-report.h" #include "qemu/qemu-print.h" #include "exec/sysemu/memory.h" -#include "exec/ioport.h" +#include "sysemu/ioport.h" #include "sysemu/dma.h" #include "sysemu/hostmem.h" #include "sysemu/hw_accel.h" diff --git a/softmmu/qtest.c b/softmmu/qtest.c index 2551296c727..5faf99fca13 100644 --- a/softmmu/qtest.c +++ b/softmmu/qtest.c @@ -17,7 +17,7 @@ #include "sysemu/qtest.h" #include "sysemu/runstate.h" #include "chardev/char-fe.h" -#include "exec/ioport.h" +#include "sysemu/ioport.h" #include "exec/sysemu/memory.h" #include "hw/irq.h" #include "qemu/accel.h" diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c index 8adbfcb82d9..181e7378b41 100644 --- a/target/i386/nvmm/nvmm-all.c +++ b/target/i386/nvmm/nvmm-all.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/sysemu/address-spaces.h" -#include "exec/ioport.h" +#include "sysemu/ioport.h" #include "qemu-common.h" #include "qemu/accel.h" #include "sysemu/nvmm.h" diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index 7abc77d1c1f..c7aafa4140b 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -11,7 +11,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/sysemu/address-spaces.h" -#include "exec/ioport.h" +#include "sysemu/ioport.h" #include "qemu-common.h" #include "qemu/accel.h" #include "sysemu/whpx.h" diff --git a/MAINTAINERS b/MAINTAINERS index 48ae2145513..ca8d0feb2bd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2398,7 +2398,7 @@ F: tests/tcg/multiarch/gdbstub/ Memory API M: Paolo Bonzini S: Supported -F: include/exec/ioport.h +F: include/sysemu/ioport.h F: include/exec/memop.h F: include/exec/sysemu/memory.h F: include/exec/ram_addr.h From patchwork Mon May 17 11:11:09 2021 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: 12261601 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0F1EDC433ED for ; Mon, 17 May 2021 11:14:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 98486611CA for ; Mon, 17 May 2021 11:14:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 98486611CA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:33080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1libCk-00014w-JS for qemu-devel@archiver.kernel.org; Mon, 17 May 2021 07:14:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1libAF-0004jv-Ss for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:59 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:45908) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1libAD-0000hb-NE for qemu-devel@nongnu.org; Mon, 17 May 2021 07:11:59 -0400 Received: by mail-wr1-x42a.google.com with SMTP id h4so5916503wrt.12 for ; Mon, 17 May 2021 04:11:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qLnUMc2y6eDRItTW4VeORDdidVMiw8X3B7SFgMR2mX8=; b=t0cxv2irox1PvUN9N+cagqlKZ+LGoup/6zb8xTF3QRdh1nvuVWedfm4Tz/xqZAkFAS gf2ixGh+TKuxRNrau3HCE9KbiygO5a5dkxY+bsIJnUzsmUenQ1UVj4trFkBXzs+8/sIG ZOla/u+0Tdf7sMN1T1Hg07Q7FQcL0NZ+omUpcGlNtx1TPst3aIvO4y6vtOZz7SWUytDE +LsUgkrsig8r/oERwseGwk7//PzH9peYhs460uAs/pxnzc24sfRPsX5Tmkz3Qa0HH1Hd Ei0JxCeQHPv2r8lNt1PO01iRwiiFlXxQfs8jHp+TuQg+eC2G7AyElK8ksdHVKq9HuUGY +hxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=qLnUMc2y6eDRItTW4VeORDdidVMiw8X3B7SFgMR2mX8=; b=ZHwp/L155xRjO1oEKybIwBTj5bzi7NnO/HQYDNjY+NahCCNmaDzDiPP41/spW2EXO8 IgAXitotDXs4CKYN+iDpY3plK4MTLAc98y+iaMBtPycqVjD2WCaK5k6GINwSrAT6Huk3 nzsPL+pxa0T9HggSM1qA1JADPcf0vqo9oWeLl8XzIKGpi66Ku4ClXAe5s9Jlpm+o3AuR hZcQFX15aMtz9WmvYuUGQxqbnp+TeRRBTVoC5+zGFUqsbW82QhUvN5E757wp/GFb5SF6 0qCrY2PWgmFeHymUOHMDKs2CQvo/MmYvXZUHgEqX5RPG772NW7qQkHD0u5ECetZ7izfB ChAg== X-Gm-Message-State: AOAM5302FvW6FHi03qiAfbQt7RbLQ/a/2m5dt1Uf2ALLsCVAQaPAjKZZ iMa0bBJ5osxZFjwK1B+X44QJWNyWtB+eCQ== X-Google-Smtp-Source: ABdhPJwx1h2JI2XyVSUkbV0MdI3189JgVHF6ayHy3VYTbRQUbCObeIfXVGYffNnVNGkH6T0VxrF2bg== X-Received: by 2002:a5d:4b50:: with SMTP id w16mr5078022wrs.276.1621249916083; Mon, 17 May 2021 04:11:56 -0700 (PDT) Received: from localhost.localdomain (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id o21sm17467904wrf.91.2021.05.17.04.11.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 04:11:55 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 09/11] exec: Restrict ram_addr.h to sysemu/ Date: Mon, 17 May 2021 13:11:09 +0200 Message-Id: <20210517111111.1068153-10-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210517111111.1068153-1-f4bug@amsat.org> References: <20210517111111.1068153-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Richard Henderson , Claudio Fontana , Laurent Vivier Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" To make it clearer the ram_addr.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/ram_addr.h,sysemu/ram_addr.h, $(git grep -l exec/ram_addr.h) Then the #ifdef'ry conditional on CONFIG_USER_ONLY has been replaced by an #error. Signed-off-by: Philippe Mathieu-Daudé --- include/{exec => sysemu}/ram_addr.h | 11 +++++++---- accel/kvm/kvm-all.c | 2 +- accel/tcg/cputlb.c | 2 +- accel/tcg/translate-all.c | 2 +- hw/ppc/spapr.c | 2 +- hw/ppc/spapr_caps.c | 2 +- hw/ppc/spapr_pci.c | 2 +- hw/remote/memory.c | 2 +- hw/remote/proxy-memory-listener.c | 2 +- hw/s390x/s390-stattrib-kvm.c | 2 +- hw/s390x/s390-stattrib.c | 2 +- hw/s390x/s390-virtio-ccw.c | 2 +- hw/vfio/common.c | 2 +- hw/vfio/migration.c | 2 +- hw/vfio/spapr.c | 2 +- hw/virtio/virtio-mem.c | 2 +- migration/ram.c | 2 +- plugins/api.c | 2 +- softmmu/memory.c | 2 +- softmmu/physmem.c | 2 +- target/arm/mte_helper.c | 2 +- target/ppc/kvm.c | 2 +- target/s390x/kvm.c | 2 +- MAINTAINERS | 2 +- 24 files changed, 30 insertions(+), 27 deletions(-) rename include/{exec => sysemu}/ram_addr.h (99%) diff --git a/include/exec/ram_addr.h b/include/sysemu/ram_addr.h similarity index 99% rename from include/exec/ram_addr.h rename to include/sysemu/ram_addr.h index 3cb9791df3b..d495c969f9f 100644 --- a/include/exec/ram_addr.h +++ b/include/sysemu/ram_addr.h @@ -16,10 +16,13 @@ * The functions declared here will be removed soon. */ -#ifndef RAM_ADDR_H -#define RAM_ADDR_H +#ifndef SYSEMU_RAM_ADDR_H +#define SYSEMU_RAM_ADDR_H + +#ifdef CONFIG_USER_ONLY +#error Cannot include sysemu specific header from user emulation +#endif -#ifndef CONFIG_USER_ONLY #include "cpu.h" #include "sysemu/xen.h" #include "sysemu/tcg.h" @@ -513,5 +516,5 @@ uint64_t cpu_physical_memory_sync_dirty_bitmap(RAMBlock *rb, return num_dirty; } -#endif + #endif diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 204fc0403ca..bc40fa4fee7 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -32,7 +32,7 @@ #include "sysemu/cpus.h" #include "qemu/bswap.h" #include "exec/sysemu/memory.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "qemu/event_notifier.h" #include "qemu/main-loop.h" #include "trace.h" diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 14a4ee4ed63..d93e37c9c3e 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -26,7 +26,7 @@ #include "exec/sysemu/cputlb.h" #include "exec/tb-hash.h" #include "exec/sysemu/memory-internal.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "tcg/tcg.h" #include "qemu/error-report.h" #include "exec/log.h" diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 98a07ce4e4e..86340e4989b 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -44,7 +44,7 @@ #endif #else /* !CONFIG_USER_ONLY */ #include "exec/sysemu/cputlb.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #endif /* CONFIG_USER_ONLY */ #include "exec/tb-hash.h" diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 8f40319aee8..bf8f0a4b347 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -69,7 +69,7 @@ #include "hw/virtio/virtio-scsi.h" #include "hw/virtio/vhost-scsi-common.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "hw/usb.h" #include "qemu/config-file.h" #include "qemu/error-report.h" diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c index 9ea7ddd1e9a..97f2b5aafa3 100644 --- a/hw/ppc/spapr_caps.c +++ b/hw/ppc/spapr_caps.c @@ -27,7 +27,7 @@ #include "qapi/error.h" #include "qapi/visitor.h" #include "sysemu/hw_accel.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "target/ppc/cpu.h" #include "target/ppc/mmu-hash64.h" #include "cpu-models.h" diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 7a725855f91..b0b6204870f 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -34,7 +34,7 @@ #include "hw/pci/pci_host.h" #include "hw/ppc/spapr.h" #include "hw/pci-host/spapr.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include #include "trace.h" #include "qemu/error-report.h" diff --git a/hw/remote/memory.c b/hw/remote/memory.c index 2d4174614af..8606ae15eb5 100644 --- a/hw/remote/memory.c +++ b/hw/remote/memory.c @@ -12,7 +12,7 @@ #include "qemu-common.h" #include "hw/remote/memory.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "qapi/error.h" static void remote_sysmem_reset(void) diff --git a/hw/remote/proxy-memory-listener.c b/hw/remote/proxy-memory-listener.c index d9bed35fa2f..25779463523 100644 --- a/hw/remote/proxy-memory-listener.c +++ b/hw/remote/proxy-memory-listener.c @@ -14,7 +14,7 @@ #include "qemu/range.h" #include "exec/sysemu/memory.h" #include "exec/cpu-common.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "qapi/error.h" #include "hw/remote/mpqemu-link.h" #include "hw/remote/proxy-memory-listener.h" diff --git a/hw/s390x/s390-stattrib-kvm.c b/hw/s390x/s390-stattrib-kvm.c index f0b11a74e49..8354c4bc750 100644 --- a/hw/s390x/s390-stattrib-kvm.c +++ b/hw/s390x/s390-stattrib-kvm.c @@ -15,7 +15,7 @@ #include "hw/s390x/storage-attributes.h" #include "qemu/error-report.h" #include "sysemu/kvm.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "kvm_s390x.h" Object *kvm_s390_stattrib_create(void) diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c index 9eda1c3b2a2..4bc34fbd069 100644 --- a/hw/s390x/s390-stattrib.c +++ b/hw/s390x/s390-stattrib.c @@ -15,7 +15,7 @@ #include "migration/register.h" #include "hw/s390x/storage-attributes.h" #include "qemu/error-report.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "qapi/error.h" #include "qapi/qmp/qdict.h" diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 7af27ca3057..9a8d6405a13 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "hw/s390x/s390-virtio-hcall.h" #include "hw/s390x/sclp.h" #include "hw/s390x/s390_flic.h" diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 91171e4f658..66ecb1f458a 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -29,7 +29,7 @@ #include "hw/vfio/vfio.h" #include "exec/sysemu/address-spaces.h" #include "exec/sysemu/memory.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "hw/hw.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c index 201642d75e6..343069065e8 100644 --- a/hw/vfio/migration.c +++ b/hw/vfio/migration.c @@ -23,7 +23,7 @@ #include "migration/misc.h" #include "qapi/error.h" #include "exec/ramlist.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "pci.h" #include "trace.h" #include "hw/hw.h" diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c index ea3f70bd2fa..7db2901db86 100644 --- a/hw/vfio/spapr.c +++ b/hw/vfio/spapr.c @@ -14,7 +14,7 @@ #include "hw/vfio/vfio-common.h" #include "hw/hw.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "qemu/error-report.h" #include "qapi/error.h" #include "trace.h" diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c index 75aa7d6f1b1..b09cd5001ea 100644 --- a/hw/virtio/virtio-mem.c +++ b/hw/virtio/virtio-mem.c @@ -25,7 +25,7 @@ #include "hw/virtio/virtio-mem.h" #include "qapi/error.h" #include "qapi/visitor.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "migration/misc.h" #include "hw/boards.h" #include "hw/qdev-properties.h" diff --git a/migration/ram.c b/migration/ram.c index 60ea913c543..1a92983fb50 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -45,7 +45,7 @@ #include "qapi/qapi-events-migration.h" #include "qapi/qmp/qerror.h" #include "trace.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "exec/target_page.h" #include "qemu/rcu_queue.h" #include "migration/colo.h" diff --git a/plugins/api.c b/plugins/api.c index 817c9b6b69c..b114246c357 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -38,7 +38,7 @@ #include "qemu/plugin.h" #include "tcg/tcg.h" #include "exec/exec-all.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "disas/disas.h" #include "plugin.h" #ifndef CONFIG_USER_ONLY diff --git a/softmmu/memory.c b/softmmu/memory.c index cdc935cdd27..411f6f9ac25 100644 --- a/softmmu/memory.c +++ b/softmmu/memory.c @@ -26,7 +26,7 @@ #include "trace.h" #include "exec/sysemu/memory-internal.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "sysemu/kvm.h" #include "sysemu/runstate.h" #include "sysemu/tcg.h" diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 51f05eb989c..d8a5deb18ea 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -59,7 +59,7 @@ #include "sysemu/replay.h" #include "exec/sysemu/memory-internal.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "exec/log.h" #include "qemu/pmem.h" diff --git a/target/arm/mte_helper.c b/target/arm/mte_helper.c index a6fccc6e69e..455c2e80d31 100644 --- a/target/arm/mte_helper.c +++ b/target/arm/mte_helper.c @@ -21,7 +21,7 @@ #include "cpu.h" #include "internals.h" #include "exec/exec-all.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "exec/cpu_ldst.h" #include "exec/helper-proto.h" #include "qapi/error.h" diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 104a308abb5..5b9ce0a25a5 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -43,7 +43,7 @@ #include "trace.h" #include "exec/gdbstub.h" #include "exec/memattrs.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "sysemu/hostmem.h" #include "qemu/cutils.h" #include "qemu/main-loop.h" diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c index 4fb3bbfef50..aa135acb7aa 100644 --- a/target/s390x/kvm.c +++ b/target/s390x/kvm.c @@ -42,7 +42,7 @@ #include "sysemu/runstate.h" #include "sysemu/device_tree.h" #include "exec/gdbstub.h" -#include "exec/ram_addr.h" +#include "sysemu/ram_addr.h" #include "trace.h" #include "hw/s390x/s390-pci-inst.h" #include "hw/s390x/s390-pci-bus.h" diff --git a/MAINTAINERS b/MAINTAINERS index ca8d0feb2bd..8caf3891dba 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2401,7 +2401,7 @@ S: Supported F: include/sysemu/ioport.h F: include/exec/memop.h F: include/exec/sysemu/memory.h -F: include/exec/ram_addr.h +F: include/sysemu/ram_addr.h F: include/exec/ramblock.h F: softmmu/dma-helpers.c F: softmmu/ioport.c From patchwork Mon May 17 11:11:10 2021 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: 12261677 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B847CC433ED for ; Mon, 17 May 2021 11:47:36 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 419A160FD7 for ; Mon, 17 May 2021 11:47:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 419A160FD7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1libif-0001Wu-P3 for qemu-devel@archiver.kernel.org; Mon, 17 May 2021 07:47:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1libAM-00055O-C9 for qemu-devel@nongnu.org; Mon, 17 May 2021 07:12:06 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:41565) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1libAI-0000k6-QB for qemu-devel@nongnu.org; Mon, 17 May 2021 07:12:06 -0400 Received: by mail-wm1-x32d.google.com with SMTP id o6-20020a05600c4fc6b029015ec06d5269so3372444wmq.0 for ; Mon, 17 May 2021 04:12:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=21MwD1xvRVhA8I16eM1nxg+vXsRbeWwb/Kbif9L3QsM=; b=vGiP9QaoS3wdF7FHK6pPeKt6izqO1z8+Pcci5542gknK0pjX3PERdcL9HBDahB1qFr cICfiuRnwJVjO6XTc7I+5sRkv+BRl3tYO8Ijumg0mz3o1kgFqQDzMidHO19stOnDDp06 MBgFA0sje6BBb1ERHs01ku2/JqIwGHPxnEc5husjL+W4BkffRg/wL9qA1AkkJmHzg1b8 GuuU0h4gK+2iGR8J++gS9XbvN4p1UrMm4tq2StQeIYH/RswiL/IwZj3cLvIRVOf0ilGj ceQOXkmPmNo/LvX61d+5awrXm1+Vlc5Du51tRJA6bPF3ogrvXr0sNYxzQa+e36DZ050E RwxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=21MwD1xvRVhA8I16eM1nxg+vXsRbeWwb/Kbif9L3QsM=; b=rmvPvhdvFM44tcArT3PBeXF0YidC5M88SVFxEN+opfdSc3GzRFpKUjEUR9XmcYfJkX HaDhXqQhIAvt19yph3aXCwO5F3g3llPJR+SBrStKfNUfCdZdyp1J9Y5CorEtdgVUsyhn M8XuVs6wHA/vYN7lKtDTf7xxUfOsDYX/kC8cCFkbOcCUTy99XJlUAUt93g7cuAPx8C9+ 5YnYm94E8WPCrh+Iyb8ZLJmxRkXVCQDsJKSRQXMLw0PUk5FEVG7NuebB5t3qcQiYuqsY evTKqjbzwoqhSciQ2Qvo+HEoE1Wzu3mWhq95NHmk2REQ8PaRZs6oucYvloRCG8Q5GqEa N/rQ== X-Gm-Message-State: AOAM532uQPzE5t2x3H3lEwTFuEaX0coQNcOR7QYdzD1Y7h7ynDiKJmah /QkTL7yxvT7vHQI6WE83QoSY8BVDACxGig== X-Google-Smtp-Source: ABdhPJzKRoWRCs6oszN1DCNCHFx34Mc9kIJToD+X3rBQ94jP+QQ/MJJm47E7DIn1nsrD4z8quQct7Q== X-Received: by 2002:a7b:c056:: with SMTP id u22mr22676141wmc.181.1621249921208; Mon, 17 May 2021 04:12:01 -0700 (PDT) Received: from localhost.localdomain (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id e10sm17265551wrw.20.2021.05.17.04.11.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 04:12:00 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 10/11] exec: Restrict ramblock.h to sysemu/ Date: Mon, 17 May 2021 13:11:10 +0200 Message-Id: <20210517111111.1068153-11-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210517111111.1068153-1-f4bug@amsat.org> References: <20210517111111.1068153-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32d.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Richard Henderson , Claudio Fontana , Laurent Vivier Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" To make it clearer the ramblock.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/ramblock.h,sysemu/ramblock.h, $(git grep -l exec/ramblock.h) Then the #ifdef'ry conditional on CONFIG_USER_ONLY has been replaced by an #error. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/ram_addr.h | 2 +- include/{exec => sysemu}/ramblock.h | 13 ++++++++----- migration/dirtyrate.c | 2 +- migration/multifd.c | 2 +- migration/postcopy-ram.c | 2 +- tests/qtest/fuzz/generic_fuzz.c | 2 +- MAINTAINERS | 2 +- 7 files changed, 14 insertions(+), 11 deletions(-) rename include/{exec => sysemu}/ramblock.h (92%) diff --git a/include/sysemu/ram_addr.h b/include/sysemu/ram_addr.h index d495c969f9f..aea30dfeb4e 100644 --- a/include/sysemu/ram_addr.h +++ b/include/sysemu/ram_addr.h @@ -27,7 +27,7 @@ #include "sysemu/xen.h" #include "sysemu/tcg.h" #include "exec/ramlist.h" -#include "exec/ramblock.h" +#include "sysemu/ramblock.h" /** * clear_bmap_size: calculate clear bitmap size diff --git a/include/exec/ramblock.h b/include/sysemu/ramblock.h similarity index 92% rename from include/exec/ramblock.h rename to include/sysemu/ramblock.h index 664701b7594..12a1b90a19b 100644 --- a/include/exec/ramblock.h +++ b/include/sysemu/ramblock.h @@ -16,11 +16,14 @@ * The functions declared here will be removed soon. */ -#ifndef QEMU_EXEC_RAMBLOCK_H -#define QEMU_EXEC_RAMBLOCK_H +#ifndef QEMU_SYSEMU_RAMBLOCK_H +#define QEMU_SYSEMU_RAMBLOCK_H -#ifndef CONFIG_USER_ONLY -#include "cpu-common.h" +#ifdef CONFIG_USER_ONLY +#error Cannot include sysemu specific header from user emulation +#endif + +#include "exec/cpu-common.h" struct RAMBlock { struct rcu_head rcu; @@ -70,5 +73,5 @@ struct RAMBlock { */ ram_addr_t postcopy_length; }; -#endif + #endif diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c index ccb98147e89..5422b39784f 100644 --- a/migration/dirtyrate.c +++ b/migration/dirtyrate.c @@ -14,7 +14,7 @@ #include #include "qapi/error.h" #include "cpu.h" -#include "exec/ramblock.h" +#include "sysemu/ramblock.h" #include "qemu/rcu_queue.h" #include "qapi/qapi-commands-migration.h" #include "ram.h" diff --git a/migration/multifd.c b/migration/multifd.c index 0a4803cfccb..519f8dd4393 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -14,7 +14,7 @@ #include "qemu/rcu.h" #include "exec/target_page.h" #include "sysemu/sysemu.h" -#include "exec/ramblock.h" +#include "sysemu/ramblock.h" #include "qemu/error-report.h" #include "qapi/error.h" #include "ram.h" diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 2e9697bdd2e..fb8c625ffc3 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -31,7 +31,7 @@ #include "qemu/error-report.h" #include "trace.h" #include "hw/boards.h" -#include "exec/ramblock.h" +#include "sysemu/ramblock.h" /* Arbitrary limit on size of each discard command, * keeps them around ~200 bytes diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz/generic_fuzz.c index 05f9c9b06f9..613427f1a57 100644 --- a/tests/qtest/fuzz/generic_fuzz.c +++ b/tests/qtest/fuzz/generic_fuzz.c @@ -21,7 +21,7 @@ #include "fork_fuzz.h" #include "string.h" #include "exec/sysemu/memory.h" -#include "exec/ramblock.h" +#include "sysemu/ramblock.h" #include "hw/qdev-core.h" #include "hw/pci/pci.h" #include "hw/boards.h" diff --git a/MAINTAINERS b/MAINTAINERS index 8caf3891dba..cea4f2e438a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2402,7 +2402,7 @@ F: include/sysemu/ioport.h F: include/exec/memop.h F: include/exec/sysemu/memory.h F: include/sysemu/ram_addr.h -F: include/exec/ramblock.h +F: include/sysemu/ramblock.h F: softmmu/dma-helpers.c F: softmmu/ioport.c F: softmmu/memory.c From patchwork Mon May 17 11:11:11 2021 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: 12261615 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70344C433B4 for ; Mon, 17 May 2021 11:17:00 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 03F9860BBB for ; Mon, 17 May 2021 11:16:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03F9860BBB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1libF5-0007HQ-1e for qemu-devel@archiver.kernel.org; Mon, 17 May 2021 07:16:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1libAR-0005By-62 for qemu-devel@nongnu.org; Mon, 17 May 2021 07:12:12 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:43873) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1libAO-0000n5-Fl for qemu-devel@nongnu.org; Mon, 17 May 2021 07:12:10 -0400 Received: by mail-wm1-x332.google.com with SMTP id b19-20020a05600c06d3b029014258a636e8so3348576wmn.2 for ; Mon, 17 May 2021 04:12:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=EMgUQW0usIbC3Xh5eHeXBZBc/9XCoZrI2HXiiIOGatY=; b=G8UIhZOxwi+kZfVpn2N+AUxeaawT3KAaro3nMtlmbQLZdQCXXzFWbNooteGR77hwqa xISrj2GZ2QQFXaXSDAjEWizmDGNLWlb/wYo8QukB5MpizUi6tu2mwNYkQhAJQ0IAjelQ jduY7aT+E0j1cvsHbMB7cizASg3VMvSod3Qg8D4cb04/ndeoknZ/IVNugzAUEsXNqAOx TizyYgVss1x+y1MepFiEszQAMEuhImbATnsCE6o/DriroSes3hft2WcfFVkInTtZOHm/ vFatVv1CXrMEFTJc98h0pOUbM6hBm7okzxHsAZjUZDvIMGIXD0E4NVUcfoebYLck3myx P/YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=EMgUQW0usIbC3Xh5eHeXBZBc/9XCoZrI2HXiiIOGatY=; b=clgvlekjUeFsEANiC4jHNHKnzsDP+SZEwxOz2OYsHf/kDmGS2kxsm5sF9jxfngHf+m 4tweRUdYVNyXO75j884nCugcMfLKCfOo8lO8lJybXsHg7B7tch/mA3KqPY/EvDLTmA6E E/0oZlywVirQXaZkjykKK83aCocWGc7aWxWW9hAQm6AQQAgVHEiK3i7BUI05sPEt4mPz 7Z9AA7/c9e8DxQbF4aFUomIBMnxmqd0OpADfJNLWct1YMgySvxojTnK/OSN0W+3mklnN tPDvcJLaV1tfVfvdOUwYXpkSYcIi78aRoocw/kL0kQXdJxy8OlsUvVaEzRc9xnR1Pelv /V6g== X-Gm-Message-State: AOAM530ttbc+GyKxh94tble4yEPKv7n0AMPiRdo6J3K5YF98wwgZy1Ph +Ad867E4jC48UF7fCzXMd7+mz05g885Qbw== X-Google-Smtp-Source: ABdhPJwRYqtg8TClglBQpnVlli5s5Oy/nls+QqQ6ID60kt61sUh/ePFt6ZVKFJf7pWr3NJsB9JHn1w== X-Received: by 2002:a05:600c:2298:: with SMTP id 24mr61695580wmf.167.1621249926034; Mon, 17 May 2021 04:12:06 -0700 (PDT) Received: from localhost.localdomain (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id c8sm16619684wrx.4.2021.05.17.04.12.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 04:12:05 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 11/11] exec: Restrict confidential-guest-support.h to sysemu/ Date: Mon, 17 May 2021 13:11:11 +0200 Message-Id: <20210517111111.1068153-12-f4bug@amsat.org> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210517111111.1068153-1-f4bug@amsat.org> References: <20210517111111.1068153-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x332.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Richard Henderson , Claudio Fontana , Laurent Vivier Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" To make it clearer the confidential-guest-support.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/confidential-guest-support.h,sysemu/confidential-guest-support.h, \ $(git grep -l exec/confidential-guest-support.h) Then the #ifdef'ry conditional on CONFIG_USER_ONLY has been replaced by an #error. Signed-off-by: Philippe Mathieu-Daudé --- include/{exec => sysemu}/confidential-guest-support.h | 6 +++--- backends/confidential-guest-support.c | 2 +- hw/core/machine.c | 2 +- hw/ppc/pef.c | 2 +- hw/s390x/pv.c | 2 +- softmmu/vl.c | 2 +- target/i386/sev.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) rename include/{exec => sysemu}/confidential-guest-support.h (95%) diff --git a/include/exec/confidential-guest-support.h b/include/sysemu/confidential-guest-support.h similarity index 95% rename from include/exec/confidential-guest-support.h rename to include/sysemu/confidential-guest-support.h index ba2dd4b5dfc..3b52d086642 100644 --- a/include/exec/confidential-guest-support.h +++ b/include/sysemu/confidential-guest-support.h @@ -18,7 +18,9 @@ #ifndef QEMU_CONFIDENTIAL_GUEST_SUPPORT_H #define QEMU_CONFIDENTIAL_GUEST_SUPPORT_H -#ifndef CONFIG_USER_ONLY +#ifdef CONFIG_USER_ONLY +#error Cannot include sysemu specific header from user emulation +#endif #include "qom/object.h" @@ -57,6 +59,4 @@ typedef struct ConfidentialGuestSupportClass { ObjectClass parent; } ConfidentialGuestSupportClass; -#endif /* !CONFIG_USER_ONLY */ - #endif /* QEMU_CONFIDENTIAL_GUEST_SUPPORT_H */ diff --git a/backends/confidential-guest-support.c b/backends/confidential-guest-support.c index 052fde8db04..bc141504451 100644 --- a/backends/confidential-guest-support.c +++ b/backends/confidential-guest-support.c @@ -13,7 +13,7 @@ #include "qemu/osdep.h" -#include "exec/confidential-guest-support.h" +#include "sysemu/confidential-guest-support.h" OBJECT_DEFINE_ABSTRACT_TYPE(ConfidentialGuestSupport, confidential_guest_support, diff --git a/hw/core/machine.c b/hw/core/machine.c index 1bf0e687b94..6ab11140ef0 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -32,7 +32,7 @@ #include "hw/mem/nvdimm.h" #include "migration/global_state.h" #include "migration/vmstate.h" -#include "exec/confidential-guest-support.h" +#include "sysemu/confidential-guest-support.h" #include "hw/virtio/virtio.h" #include "hw/virtio/virtio-pci.h" diff --git a/hw/ppc/pef.c b/hw/ppc/pef.c index 573be3ed79b..d469326a480 100644 --- a/hw/ppc/pef.c +++ b/hw/ppc/pef.c @@ -14,7 +14,7 @@ #include "qom/object_interfaces.h" #include "sysemu/kvm.h" #include "migration/blocker.h" -#include "exec/confidential-guest-support.h" +#include "sysemu/confidential-guest-support.h" #include "hw/ppc/pef.h" #define TYPE_PEF_GUEST "pef-guest" diff --git a/hw/s390x/pv.c b/hw/s390x/pv.c index 401b63d6cb6..799d8b047b2 100644 --- a/hw/s390x/pv.c +++ b/hw/s390x/pv.c @@ -17,7 +17,7 @@ #include "qemu/error-report.h" #include "sysemu/kvm.h" #include "qom/object_interfaces.h" -#include "exec/confidential-guest-support.h" +#include "sysemu/confidential-guest-support.h" #include "hw/s390x/ipl.h" #include "hw/s390x/pv.h" diff --git a/softmmu/vl.c b/softmmu/vl.c index 93e78469bce..d79c15cd4dc 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -102,7 +102,7 @@ #include "qemu/plugin.h" #include "qemu/queue.h" #include "sysemu/arch_init.h" -#include "exec/confidential-guest-support.h" +#include "sysemu/confidential-guest-support.h" #include "ui/qemu-spice.h" #include "qapi/string-input-visitor.h" diff --git a/target/i386/sev.c b/target/i386/sev.c index 41f7800b5f7..f2a92cf9126 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -31,7 +31,7 @@ #include "migration/blocker.h" #include "qom/object.h" #include "monitor/monitor.h" -#include "exec/confidential-guest-support.h" +#include "sysemu/confidential-guest-support.h" #include "hw/i386/pc.h" #define TYPE_SEV_GUEST "sev-guest"