docs/requirements.txt | 3 + configs/targets/aarch64-softmmu.mak | 1 + configs/targets/i386-softmmu.mak | 1 + configs/targets/ppc-softmmu.mak | 1 + configs/targets/ppc64-softmmu.mak | 1 + configs/targets/s390x-softmmu.mak | 1 + configs/targets/x86_64-softmmu.mak | 1 + meson.build | 8 +- qapi/qom.json | 11 +- include/exec/confidential-guest-support.h | 34 +- include/exec/cpu-common.h | 2 + include/exec/memory.h | 20 +- include/exec/ram_addr.h | 2 +- include/exec/ramblock.h | 1 + include/hw/boards.h | 5 + include/hw/i386/pc.h | 4 + include/hw/pci-host/q35.h | 1 + include/hw/ppc/pef.h | 17 - include/qemu/config-file.h | 3 + include/standard-headers/asm-x86/bootparam.h | 17 +- include/standard-headers/asm-x86/kvm_para.h | 3 +- include/standard-headers/asm-x86/setup_data.h | 83 +++ include/standard-headers/linux/ethtool.h | 48 ++ include/standard-headers/linux/fuse.h | 39 +- include/standard-headers/linux/input-event-codes.h | 1 + include/standard-headers/linux/virtio_gpu.h | 2 + include/standard-headers/linux/virtio_pci.h | 10 +- include/standard-headers/linux/virtio_snd.h | 154 +++++ include/sysemu/hostmem.h | 1 + include/sysemu/kvm.h | 22 +- include/sysemu/kvm_int.h | 5 +- include/sysemu/sysemu.h | 2 - linux-headers/asm-arm64/kvm.h | 15 +- linux-headers/asm-arm64/sve_context.h | 11 + linux-headers/asm-generic/bitsperlong.h | 4 + linux-headers/asm-loongarch/kvm.h | 2 - linux-headers/asm-mips/kvm.h | 2 - linux-headers/asm-powerpc/kvm.h | 45 +- linux-headers/asm-riscv/kvm.h | 3 +- linux-headers/asm-s390/kvm.h | 315 +++++++++- linux-headers/asm-x86/kvm.h | 328 +++++++++- linux-headers/linux/bits.h | 15 + linux-headers/linux/kvm.h | 689 +-------------------- linux-headers/linux/psp-sev.h | 59 ++ linux-headers/linux/vhost.h | 7 + target/i386/confidential-guest.h | 59 ++ target/i386/cpu.h | 8 + target/i386/kvm/kvm_i386.h | 2 + target/i386/sev.h | 2 - target/s390x/kvm/pv.h | 14 - accel/kvm/kvm-accel-ops.c | 6 +- accel/kvm/kvm-all.c | 274 +++++++- accel/stubs/kvm-stub.c | 5 + accel/tcg/icount-common.c | 6 +- backends/hostmem-file.c | 1 + backends/hostmem-memfd.c | 1 + backends/hostmem-ram.c | 1 + backends/hostmem.c | 1 + hw/arm/virt.c | 11 +- hw/core/machine.c | 8 + stubs/ramfb.c => hw/display/ramfb-stubs.c | 0 hw/display/vga.c | 32 +- hw/i386/acpi-common.c | 4 +- hw/i386/pc.c | 6 + hw/i386/pc_piix.c | 17 +- hw/i386/pc_q35.c | 16 +- hw/i386/x86.c | 19 +- hw/m68k/virt.c | 11 +- .../mem/memory-device-stubs.c | 0 hw/pci-host/q35.c | 61 +- hw/ppc/pef.c | 9 +- hw/ppc/spapr.c | 27 +- hw/s390x/s390-virtio-ccw.c | 19 +- stubs/usb-dev-stub.c => hw/usb/bus-stub.c | 5 - .../virtio-md-pci.c => hw/virtio/virtio-md-stubs.c | 0 stubs/colo.c => migration/colo-stubs.c | 0 monitor/qemu-config-qmp.c | 206 ++++++ stubs/colo-compare.c => net/colo-stubs.c | 0 stubs/semihost-all.c => semihosting/stubs-all.c | 0 stubs/semihost.c => semihosting/stubs-system.c | 0 stubs/fdset.c | 6 + {hw/core => stubs}/hotplug-stubs.c | 0 stubs/isa-bus.c | 7 - stubs/module-opts.c | 2 - stubs/monitor-core.c | 6 - stubs/{monitor.c => monitor-internal.c} | 5 - stubs/pci-bus.c | 7 - stubs/qdev.c | 6 - stubs/qtest.c | 10 - stubs/replay-mode.c | 4 + stubs/replay.c | 2 - system/memory.c | 5 + system/physmem.c | 65 +- system/runstate.c | 15 +- target/arm/kvm.c | 5 - target/i386/confidential-guest.c | 33 + target/i386/cpu.c | 175 +++++- target/i386/host-cpu.c | 11 +- target/i386/kvm/kvm-cpu.c | 50 +- target/i386/kvm/kvm.c | 510 ++++++++------- target/i386/kvm/sev-stub.c | 21 - target/i386/sev.c | 178 ++++-- target/i386/tcg/translate.c | 14 +- target/loongarch/kvm/kvm.c | 5 - target/mips/kvm.c | 5 - target/ppc/kvm.c | 5 - target/riscv/kvm/kvm-cpu.c | 5 - target/s390x/kvm/kvm.c | 5 - target/s390x/kvm/pv.c | 10 +- util/qemu-config.c | 204 +----- accel/kvm/trace-events | 4 +- ebpf/meson.build | 2 +- hw/core/meson.build | 14 +- hw/display/meson.build | 2 +- hw/mem/meson.build | 1 + hw/usb/meson.build | 2 +- hw/virtio/meson.build | 2 + migration/meson.build | 2 + monitor/meson.build | 1 + net/meson.build | 2 + pythondeps.toml | 1 + scripts/update-linux-headers.sh | 8 +- semihosting/meson.build | 3 + stubs/meson.build | 133 ++-- target/i386/kvm/meson.build | 2 - target/i386/meson.build | 2 +- tests/meson.build | 2 +- tests/unit/meson.build | 12 +- util/meson.build | 2 +- 129 files changed, 2786 insertions(+), 1617 deletions(-) delete mode 100644 include/hw/ppc/pef.h create mode 100644 include/standard-headers/asm-x86/setup_data.h create mode 100644 linux-headers/linux/bits.h create mode 100644 target/i386/confidential-guest.h rename stubs/ramfb.c => hw/display/ramfb-stubs.c (100%) rename stubs/memory_device.c => hw/mem/memory-device-stubs.c (100%) rename stubs/usb-dev-stub.c => hw/usb/bus-stub.c (83%) rename stubs/virtio-md-pci.c => hw/virtio/virtio-md-stubs.c (100%) rename stubs/colo.c => migration/colo-stubs.c (100%) create mode 100644 monitor/qemu-config-qmp.c rename stubs/colo-compare.c => net/colo-stubs.c (100%) rename stubs/semihost-all.c => semihosting/stubs-all.c (100%) rename stubs/semihost.c => semihosting/stubs-system.c (100%) rename {hw/core => stubs}/hotplug-stubs.c (100%) delete mode 100644 stubs/isa-bus.c delete mode 100644 stubs/module-opts.c rename stubs/{monitor.c => monitor-internal.c} (79%) delete mode 100644 stubs/pci-bus.c create mode 100644 stubs/replay-mode.c create mode 100644 target/i386/confidential-guest.c delete mode 100644 target/i386/kvm/sev-stub.c