[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 00/11] exec: Restrict various system emulation specific headers (
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 00/11] exec: Restrict various system emulation specific headers (to sysemu) |
Date: |
Mon, 17 May 2021 13:11:00 +0200 |
Hi,
This series restricts various system emulation specific headers
by moving them under sysemu/ and adding #error if included from
user emulation.
We could avoid the sysemu/ rename if too much churn, but enforcing
error of headers that must not be included in user emulation allows
further cleanups (to be sent later).
I had to split the ioport.c file to cpu-io (generic to any target
having access to I/O bus, but I haven't checked the TCG implementation
details for user emulation) VS ioport (system specific, access to
hardware).
Many files are changed, but this is mostly one-line mechanical
updates of old path to new path using sed.
Regards,
Phil.
Philippe Mathieu-Daudé (11):
NOTFORMERGE target/arm: Restrict KVM files to softmmu
exec: Restrict hwaddr.h to sysemu/
exec: Restrict cputlb.h to sysemu/
exec: Restrict memory.h to sysemu/
exec: Restrict memory-internal.h to sysemu/
exec: Restrict address-spaces.h to sysemu/
exec: Extract CPU I/O instructions to "cpu-io.h"
exec: Restrict ioport.h to sysemu/
exec: Restrict ram_addr.h to sysemu/
exec: Restrict ramblock.h to sysemu/
exec: Restrict confidential-guest-support.h to sysemu/
docs/devel/memory.rst | 2 +-
hw/arm/strongarm.h | 2 +-
hw/audio/lm4549.h | 2 +-
hw/display/framebuffer.h | 2 +-
hw/display/vga_int.h | 4 +-
hw/net/can/can_sja1000.h | 2 +-
hw/net/can/ctucan_core.h | 2 +-
hw/net/i82596.h | 4 +-
hw/net/net_tx_pkt.h | 2 +-
hw/net/pcnet.h | 2 +-
hw/ppc/mac.h | 2 +-
hw/s390x/ipl.h | 2 +-
hw/tpm/tpm_ppi.h | 2 +-
hw/usb/hcd-uhci.h | 2 +-
hw/vfio/pci.h | 2 +-
include/disas/disas.h | 4 +-
include/exec/cpu-all.h | 6 +-
include/exec/cpu-common.h | 2 +-
include/exec/cpu-defs.h | 2 +-
include/exec/cpu-io.h | 30 +++++++
include/exec/{ => sysemu}/address-spaces.h | 14 +--
include/exec/{ => sysemu}/cputlb.h | 11 ++-
include/exec/{ => sysemu}/hwaddr.h | 7 +-
include/exec/{ => sysemu}/memory-internal.h | 7 +-
include/exec/{ => sysemu}/memory.h | 8 +-
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/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/boards.h | 2 +-
include/hw/char/riscv_htif.h | 2 +-
include/hw/char/serial.h | 2 +-
include/hw/core/cpu.h | 4 +-
include/hw/cris/etraxfs_dma.h | 2 +-
include/hw/display/macfb.h | 2 +-
include/hw/display/vga.h | 2 +-
include/hw/dma/i8257.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/i386/microvm.h | 2 +-
include/hw/i386/x86.h | 2 +-
include/hw/ide.h | 2 +-
include/hw/input/lasips2.h | 2 +-
include/hw/ipmi/ipmi.h | 2 +-
include/hw/isa/apm.h | 2 +-
include/hw/isa/isa.h | 4 +-
include/hw/loader-fit.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/allwinner-h3-dramc.h | 2 +-
include/hw/misc/auxbus.h | 2 +-
include/hw/misc/empty_slot.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/nubus/nubus.h | 2 +-
include/hw/nvram/fw_cfg.h | 2 +-
include/hw/nvram/npcm7xx_otp.h | 2 +-
include/hw/pci-host/gpex.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/memory.h | 2 +-
include/hw/remote/mpqemu-link.h | 2 +-
include/hw/remote/proxy-memory-listener.h | 2 +-
include/hw/rtc/m48t59.h | 2 +-
include/hw/rtc/sun4v-rtc.h | 2 +-
include/hw/sh4/sh_intc.h | 2 +-
include/hw/sysbus.h | 2 +-
include/hw/timer/npcm7xx_timer.h | 2 +-
include/hw/timer/tmu012.h | 2 +-
include/hw/tricore/triboard.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-access.h | 2 +-
include/hw/virtio/virtio.h | 2 +-
include/hw/xtensa/mx_pic.h | 2 +-
include/monitor/monitor.h | 2 +-
include/qemu/accel.h | 4 +-
include/qemu/iova-tree.h | 4 +-
include/qemu/userfaultfd.h | 2 +-
.../confidential-guest-support.h | 6 +-
include/sysemu/dma.h | 4 +-
include/sysemu/hostmem.h | 2 +-
include/{exec => sysemu}/ioport.h | 19 ++--
include/sysemu/kvm_int.h | 2 +-
include/sysemu/memory_mapping.h | 2 +-
include/{exec => sysemu}/ram_addr.h | 13 +--
include/{exec => sysemu}/ramblock.h | 13 +--
include/sysemu/vhost-user-backend.h | 2 +-
target/arm/kvm_arm.h | 2 +-
target/i386/hvf/vmx.h | 2 +-
accel/kvm/kvm-all.c | 4 +-
accel/tcg/cputlb.c | 8 +-
accel/tcg/translate-all.c | 8 +-
backends/confidential-guest-support.c | 2 +-
backends/tpm/tpm_util.c | 2 +-
cpu.c | 2 +-
dump/dump.c | 2 +-
dump/win_dump.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/sbsa-ref.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 | 4 +-
hw/block/nvme.c | 2 +-
hw/block/onenand.c | 2 +-
hw/char/goldfish_tty.c | 2 +-
hw/char/omap_uart.c | 2 +-
hw/core/loader-fit.c | 2 +-
hw/core/loader.c | 2 +-
hw/core/machine.c | 2 +-
hw/core/null-machine.c | 2 +-
hw/core/sysbus.c | 2 +-
hw/display/edid-region.c | 2 +-
hw/display/tc6393xb.c | 2 +-
hw/dma/etraxfs_dma.c | 2 +-
hw/dma/rc4030.c | 2 +-
hw/hyperv/hyperv.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/i386/xen/xen-hvm.c | 1 +
hw/input/lasips2.c | 4 +-
hw/intc/mips_gic.c | 2 +-
hw/intc/ompic.c | 2 +-
hw/m68k/next-cube.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 | 4 +-
hw/net/ne2000.c | 2 +-
hw/nios2/10m50_devboard.c | 4 +-
hw/nios2/generic_nommu.c | 4 +-
hw/pci-bridge/pci_bridge_dev.c | 2 +-
hw/pci-host/mv64361.c | 2 +-
hw/pci-host/remote.c | 2 +-
hw/ppc/pef.c | 2 +-
hw/ppc/pegasos2.c | 2 +-
hw/ppc/pnv_homer.c | 4 +-
hw/ppc/ppc405_uc.c | 2 +-
hw/ppc/ppc440_uc.c | 2 +-
hw/ppc/ppc4xx_devs.c | 2 +-
hw/ppc/prep_systemio.c | 2 +-
hw/ppc/rs6000_mc.c | 2 +-
hw/ppc/sam460ex.c | 2 +-
hw/ppc/spapr.c | 2 +-
hw/ppc/spapr_caps.c | 2 +-
hw/ppc/spapr_ovec.c | 2 +-
hw/ppc/spapr_pci.c | 2 +-
hw/remote/machine.c | 2 +-
hw/remote/memory.c | 2 +-
hw/remote/proxy-memory-listener.c | 4 +-
hw/riscv/shakti_c.c | 2 +-
hw/s390x/css.c | 2 +-
hw/s390x/pv.c | 2 +-
hw/s390x/s390-pci-inst.c | 2 +-
hw/s390x/s390-stattrib-kvm.c | 2 +-
hw/s390x/s390-stattrib.c | 2 +-
hw/s390x/s390-virtio-ccw.c | 2 +-
hw/sparc/sun4m_iommu.c | 2 +-
hw/sparc64/sun4u_iommu.c | 2 +-
hw/timer/hpet.c | 2 +-
hw/timer/sh_timer.c | 2 +-
hw/vfio/ap.c | 2 +-
hw/vfio/ccw.c | 2 +-
hw/vfio/common.c | 6 +-
hw/vfio/migration.c | 2 +-
hw/vfio/platform.c | 4 +-
hw/vfio/spapr.c | 2 +-
hw/virtio/virtio-balloon.c | 2 +-
hw/virtio/virtio-bus.c | 2 +-
hw/virtio/virtio-mem.c | 2 +-
hw/xtensa/sim.c | 2 +-
hw/xtensa/virt.c | 2 +-
hw/xtensa/xtensa_memory.c | 2 +-
hw/xtensa/xtfpga.c | 2 +-
migration/dirtyrate.c | 2 +-
migration/multifd.c | 2 +-
migration/postcopy-ram.c | 2 +-
migration/ram.c | 2 +-
migration/rdma.c | 2 +-
migration/savevm.c | 2 +-
monitor/misc.c | 4 +-
plugins/api.c | 2 +-
semihosting/arm-compat-semi.c | 2 +-
softmmu/cpu-io.c | 88 +++++++++++++++++++
softmmu/ioport.c | 66 +-------------
softmmu/memory.c | 6 +-
softmmu/memory_mapping.c | 4 +-
softmmu/physmem.c | 8 +-
softmmu/qtest.c | 5 +-
softmmu/vl.c | 2 +-
stubs/ram-block.c | 2 +-
target/arm/cpu.c | 2 +-
target/arm/cpu64.c | 2 +-
target/arm/kvm.c | 2 +-
target/arm/mte_helper.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 | 4 +-
target/i386/sev.c | 2 +-
target/i386/tcg/sysemu/misc_helper.c | 2 +-
target/i386/tcg/sysemu/tcg-cpu.c | 2 +-
target/i386/whpx/whpx-all.c | 4 +-
target/ppc/kvm.c | 2 +-
target/s390x/excp_helper.c | 2 +-
target/s390x/kvm.c | 2 +-
target/s390x/misc_helper.c | 2 +-
target/s390x/mmu_helper.c | 2 +-
target/s390x/sigp.c | 2 +-
target/xtensa/dbg_helper.c | 2 +-
tests/qtest/fuzz/generic_fuzz.c | 4 +-
tests/qtest/fuzz/qos_fuzz.c | 2 +-
tests/qtest/fuzz/qtest_wrappers.c | 3 +-
tests/qtest/microbit-test.c | 2 +-
ui/console.c | 2 +-
util/vfio-helpers.c | 2 +-
MAINTAINERS | 12 +--
scripts/analyze-inclusions | 2 +-
.../codeconverter/test_regexps.py | 4 +-
softmmu/meson.build | 3 +-
target/arm/meson.build | 4 +-
275 files changed, 491 insertions(+), 409 deletions(-)
create mode 100644 include/exec/cpu-io.h
rename include/exec/{ => sysemu}/address-spaces.h (80%)
rename include/exec/{ => sysemu}/cputlb.h (86%)
rename include/exec/{ => sysemu}/hwaddr.h (81%)
rename include/exec/{ => sysemu}/memory-internal.h (94%)
rename include/exec/{ => sysemu}/memory.h (99%)
rename include/{exec => sysemu}/confidential-guest-support.h (95%)
rename include/{exec => sysemu}/ioport.h (86%)
rename include/{exec => sysemu}/ram_addr.h (99%)
rename include/{exec => sysemu}/ramblock.h (92%)
create mode 100644 softmmu/cpu-io.c
--
2.26.3
- [PATCH 00/11] exec: Restrict various system emulation specific headers (to sysemu),
Philippe Mathieu-Daudé <=
- [PATCH 01/11] NOTFORMERGE target/arm: Restrict KVM files to softmmu, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 02/11] exec: Restrict hwaddr.h to sysemu/, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 03/11] exec: Restrict cputlb.h to sysemu/, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 04/11] exec: Restrict memory.h to sysemu/, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 05/11] exec: Restrict memory-internal.h to sysemu/, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 07/11] exec: Extract CPU I/O instructions to "cpu-io.h", Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 06/11] exec: Restrict address-spaces.h to sysemu/, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 08/11] exec: Restrict ioport.h to sysemu/, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 09/11] exec: Restrict ram_addr.h to sysemu/, Philippe Mathieu-Daudé, 2021/05/17