aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.editorconfig21
-rw-r--r--.gitignore72
-rw-r--r--.gitmodules34
-rw-r--r--.mailmap3
-rw-r--r--.shippable.yml9
-rw-r--r--.travis.yml182
-rw-r--r--MAINTAINERS468
-rw-r--r--Makefile228
-rw-r--r--Makefile.objs82
-rw-r--r--Makefile.target8
-rw-r--r--README4
-rw-r--r--VERSION2
-rw-r--r--accel/accel.c25
-rw-r--r--accel/kvm/kvm-all.c60
-rw-r--r--accel/tcg/atomic_template.h20
-rw-r--r--accel/tcg/cpu-exec.c2
-rw-r--r--accel/tcg/cputlb.c516
-rw-r--r--accel/tcg/softmmu_template.h64
-rw-r--r--accel/tcg/tcg-all.c2
-rw-r--r--accel/tcg/translate-all.c14
-rw-r--r--accel/tcg/user-exec.c80
-rw-r--r--audio/alsaaudio.c2
-rw-r--r--audio/audio_int.h4
-rw-r--r--audio/paaudio.c4
-rw-r--r--backends/hostmem-file.c36
-rw-r--r--backends/hostmem-memfd.c10
-rw-r--r--backends/hostmem-ram.c9
-rw-r--r--backends/hostmem.c53
-rw-r--r--block.c304
-rw-r--r--block/Makefile.objs24
-rw-r--r--block/backup.c43
-rw-r--r--block/block-backend.c11
-rw-r--r--block/bochs.c39
-rw-r--r--block/cloop.c16
-rw-r--r--block/commit.c23
-rw-r--r--block/crypto.c1
-rw-r--r--block/curl.c8
-rw-r--r--block/dirty-bitmap.c148
-rw-r--r--block/dmg-lzfse.c49
-rw-r--r--block/dmg.c104
-rw-r--r--block/dmg.h3
-rw-r--r--block/file-posix.c523
-rw-r--r--block/file-win32.c8
-rw-r--r--block/gluster.c14
-rw-r--r--block/iscsi.c59
-rw-r--r--block/linux-aio.c4
-rw-r--r--block/mirror.c70
-rw-r--r--block/nbd-client.c61
-rw-r--r--block/nvme.c16
-rw-r--r--block/qcow.c20
-rw-r--r--block/qcow2-bitmap.c44
-rw-r--r--block/qcow2-cluster.c72
-rw-r--r--block/qcow2-refcount.c38
-rw-r--r--block/qcow2.c330
-rw-r--r--block/qcow2.h10
-rw-r--r--block/qed.c4
-rw-r--r--block/quorum.c45
-rw-r--r--block/rbd.c18
-rw-r--r--block/replication.c67
-rw-r--r--block/sheepdog.c10
-rw-r--r--block/stream.c20
-rw-r--r--block/trace-events4
-rw-r--r--block/vdi.c68
-rw-r--r--block/vhdx-endian.c118
-rw-r--r--block/vhdx-log.c4
-rw-r--r--block/vhdx.c18
-rw-r--r--block/vhdx.h14
-rw-r--r--block/vpc.c12
-rw-r--r--block/vvfat.c67
-rw-r--r--blockdev-nbd.c40
-rw-r--r--blockdev.c279
-rw-r--r--bsd-user/elfload.c2
-rw-r--r--bsd-user/x86_64/target_syscall.h2
-rw-r--r--chardev/char-pty.c2
-rw-r--r--chardev/char-socket.c123
-rw-r--r--chardev/char.c23
-rw-r--r--chardev/spice.c10
-rwxr-xr-xconfigure632
-rw-r--r--contrib/elf2dmp/main.c2
-rw-r--r--contrib/elf2dmp/pdb.h2
-rw-r--r--contrib/elf2dmp/pe.h1
-rw-r--r--contrib/elf2dmp/qemu_elf.h1
-rw-r--r--contrib/gitdm/aliases27
-rw-r--r--contrib/gitdm/domain-map21
-rw-r--r--contrib/gitdm/filetypes.txt146
-rw-r--r--contrib/gitdm/group-map-academics14
-rw-r--r--contrib/gitdm/group-map-cadence3
-rw-r--r--contrib/gitdm/group-map-codeweavers1
-rw-r--r--contrib/gitdm/group-map-ibm13
-rw-r--r--contrib/gitdm/group-map-individuals10
-rw-r--r--contrib/gitdm/group-map-redhat7
-rw-r--r--contrib/gitdm/group-map-wavecomp19
-rw-r--r--contrib/ivshmem-client/ivshmem-client.h4
-rw-r--r--contrib/ivshmem-server/ivshmem-server.h5
-rw-r--r--contrib/rdmacm-mux/Makefile.objs3
-rw-r--r--contrib/rdmacm-mux/main.c800
-rw-r--r--contrib/rdmacm-mux/rdmacm-mux.h61
-rw-r--r--contrib/vhost-user-blk/vhost-user-blk.c1
-rw-r--r--contrib/vhost-user-scsi/vhost-user-scsi.c1
-rw-r--r--cpus-common.c2
-rw-r--r--cpus.c38
-rw-r--r--crypto/Makefile.objs8
-rw-r--r--crypto/aes.c28
-rw-r--r--crypto/block-luks.c57
-rw-r--r--crypto/block-qcow.c28
-rw-r--r--crypto/block.c225
-rw-r--r--crypto/blockpriv.h42
-rw-r--r--crypto/init.c23
-rw-r--r--crypto/tlscredsx509.c21
-rw-r--r--crypto/tlssession.c11
-rw-r--r--crypto/xts.c200
-rw-r--r--default-configs/aarch64-softmmu.mak1
-rw-r--r--default-configs/alpha-softmmu.mak2
-rw-r--r--default-configs/hyperv.mak2
-rw-r--r--default-configs/i386-softmmu.mak5
-rw-r--r--default-configs/ppc-softmmu.mak1
-rw-r--r--default-configs/ppc64-softmmu.mak6
-rw-r--r--default-configs/riscv32-softmmu.mak9
-rw-r--r--default-configs/riscv64-softmmu.mak9
-rw-r--r--default-configs/sparc64-softmmu.mak1
-rw-r--r--default-configs/virtio.mak3
-rw-r--r--device-hotplug.c5
-rw-r--r--device_tree.c2
-rw-r--r--disas.c15
-rw-r--r--disas/Makefile.objs1
-rw-r--r--disas/alpha.c8
-rw-r--r--disas/arm.c2
-rw-r--r--disas/i386.c4
-rw-r--r--disas/m68k.c4
-rw-r--r--disas/microblaze.c1
-rw-r--r--disas/nanomips.cpp22241
-rw-r--r--disas/nanomips.h1076
-rw-r--r--disas/ppc.c2
-rw-r--r--docs/COLO-FT.txt36
-rw-r--r--docs/cpu-hotplug.rst142
-rw-r--r--docs/devel/build-system.txt2
-rw-r--r--docs/devel/loads-stores.rst35
-rw-r--r--docs/devel/migration.rst10
-rw-r--r--docs/devel/qapi-code-gen.txt21
-rw-r--r--docs/devel/testing.rst45
-rw-r--r--docs/interop/nbd.txt19
-rw-r--r--docs/interop/qcow2.txt38
-rw-r--r--docs/interop/qmp-spec.txt7
-rw-r--r--docs/nvdimm.txt5
-rw-r--r--docs/pvrdma.txt128
-rw-r--r--docs/specs/ivshmem-spec.txt8
-rw-r--r--docs/specs/pci-testdev.txt15
-rw-r--r--docs/specs/tpm.txt119
-rw-r--r--dump.c2
-rw-r--r--exec.c36
-rw-r--r--fpu/softfloat.c865
-rw-r--r--fsdev/qemu-fsdev-dummy.c2
-rw-r--r--fsdev/qemu-fsdev.c17
-rw-r--r--fsdev/qemu-fsdev.h2
-rw-r--r--gdbstub.c664
-rw-r--r--gitdm.config50
-rw-r--r--hmp-commands.hx6
-rw-r--r--hmp.c12
-rw-r--r--hw/9pfs/9p-handle.c708
-rw-r--r--hw/9pfs/9p-local.c4
-rw-r--r--hw/9pfs/9p.c22
-rw-r--r--hw/9pfs/Makefile.objs1
-rw-r--r--hw/9pfs/cofile.c6
-rw-r--r--hw/9pfs/xen-9p-backend.c29
-rw-r--r--hw/Makefile.objs3
-rw-r--r--hw/acpi/Makefile.objs1
-rw-r--r--hw/acpi/aml-build.c68
-rw-r--r--hw/acpi/core.c21
-rw-r--r--hw/acpi/memory_hotplug.c10
-rw-r--r--hw/acpi/nvdimm.c16
-rw-r--r--hw/acpi/pcihp.c47
-rw-r--r--hw/acpi/piix4.c40
-rw-r--r--hw/acpi/tpm.c459
-rw-r--r--hw/alpha/typhoon.c72
-rw-r--r--hw/arm/Makefile.objs1
-rw-r--r--hw/arm/allwinner-a10.c6
-rw-r--r--hw/arm/armv7m.c5
-rw-r--r--hw/arm/aspeed.c4
-rw-r--r--hw/arm/boot.c61
-rw-r--r--hw/arm/exynos4210.c2
-rw-r--r--hw/arm/microbit.c2
-rw-r--r--hw/arm/mps2-tz.c1
-rw-r--r--hw/arm/musicpal.c14
-rw-r--r--hw/arm/nrf51_soc.c133
-rw-r--r--hw/arm/stellaris.c2
-rw-r--r--hw/arm/strongarm.c4
-rw-r--r--hw/arm/sysbus-fdt.c12
-rw-r--r--hw/arm/virt-acpi-build.c41
-rw-r--r--hw/arm/virt.c127
-rw-r--r--hw/arm/xilinx_zynq.c2
-rw-r--r--hw/arm/xlnx-versal-virt.c495
-rw-r--r--hw/arm/xlnx-versal.c323
-rw-r--r--hw/arm/xlnx-zynqmp.c23
-rw-r--r--hw/audio/ac97.c12
-rw-r--r--hw/audio/es1370.c10
-rw-r--r--hw/audio/fmopl.h4
-rw-r--r--hw/audio/intel-hda.c6
-rw-r--r--hw/audio/marvell_88w8618.c15
-rw-r--r--hw/block/Makefile.objs2
-rw-r--r--hw/block/dataplane/Makefile.objs1
-rw-r--r--hw/block/dataplane/xen-block.c827
-rw-r--r--hw/block/dataplane/xen-block.h29
-rw-r--r--hw/block/fdc.c2
-rw-r--r--hw/block/nvme.c22
-rw-r--r--hw/block/nvme.h8
-rw-r--r--hw/block/onenand.c40
-rw-r--r--hw/block/tc58128.c3
-rw-r--r--hw/block/trace-events14
-rw-r--r--hw/block/vhost-user-blk.c32
-rw-r--r--hw/block/virtio-blk.c14
-rw-r--r--hw/block/xen-block.c963
-rw-r--r--hw/block/xen_disk.c1011
-rw-r--r--hw/char/Makefile.objs1
-rw-r--r--hw/char/grlib_apbuart.c12
-rw-r--r--hw/char/nrf51_uart.c330
-rw-r--r--hw/char/serial.c2
-rw-r--r--hw/char/sh_serial.c18
-rw-r--r--hw/char/stm32f2xx_usart.c5
-rw-r--r--hw/char/trace-events4
-rw-r--r--hw/char/virtio-serial-bus.c2
-rw-r--r--hw/char/xen_console.c70
-rw-r--r--hw/core/Makefile.objs3
-rw-r--r--hw/core/empty_slot.c9
-rw-r--r--hw/core/hotplug.c10
-rw-r--r--hw/core/loader.c76
-rw-r--r--hw/core/machine.c159
-rw-r--r--hw/core/null-machine.c2
-rw-r--r--hw/core/qdev-properties-system.c4
-rw-r--r--hw/core/qdev-properties.c249
-rw-r--r--hw/core/qdev.c38
-rw-r--r--hw/core/reset.c2
-rw-r--r--hw/core/sysbus.c15
-rw-r--r--hw/core/uboot_image.h1
-rw-r--r--hw/cpu/Makefile.objs2
-rw-r--r--hw/cpu/cluster.c50
-rw-r--r--hw/display/cg3.c2
-rw-r--r--hw/display/cirrus_vga.c5
-rw-r--r--hw/display/edid-generate.c2
-rw-r--r--hw/display/g364fb.c9
-rw-r--r--hw/display/qxl.c21
-rw-r--r--hw/display/qxl.h1
-rw-r--r--hw/display/ramfb-standalone.c1
-rw-r--r--hw/display/tc6393xb.c6
-rw-r--r--hw/display/tcx.c2
-rw-r--r--hw/display/vga.c8
-rw-r--r--hw/display/vga_int.h1
-rw-r--r--hw/display/virtio-gpu-3d.c6
-rw-r--r--hw/display/virtio-gpu-pci.c21
-rw-r--r--hw/display/virtio-gpu.c4
-rw-r--r--hw/display/virtio-vga.c8
-rw-r--r--hw/display/xenfb.c25
-rw-r--r--hw/dma/puv3_dma.c10
-rw-r--r--hw/dma/pxa2xx_dma.c4
-rw-r--r--hw/dma/soc_dma.c2
-rw-r--r--hw/gpio/Makefile.objs1
-rw-r--r--hw/gpio/max7310.c2
-rw-r--r--hw/gpio/nrf51_gpio.c300
-rw-r--r--hw/gpio/puv3_gpio.c29
-rw-r--r--hw/gpio/trace-events7
-rw-r--r--hw/hppa/dino.c7
-rw-r--r--hw/hyperv/Makefile.objs2
-rw-r--r--hw/hyperv/hyperv.c658
-rw-r--r--hw/hyperv/hyperv_testdev.c327
-rw-r--r--hw/i2c/bitbang_i2c.h2
-rw-r--r--hw/i2c/i2c-ddc.c2
-rw-r--r--hw/i2c/pm_smbus.c3
-rw-r--r--hw/i2c/smbus.c6
-rw-r--r--hw/i386/acpi-build.c108
-rw-r--r--hw/i386/amd_iommu.c414
-rw-r--r--hw/i386/amd_iommu.h96
-rw-r--r--hw/i386/intel_iommu.c199
-rw-r--r--hw/i386/intel_iommu_internal.h3
-rw-r--r--hw/i386/kvm/ioapic.c2
-rw-r--r--hw/i386/multiboot.c6
-rw-r--r--hw/i386/pc.c285
-rw-r--r--hw/i386/pc_piix.c486
-rw-r--r--hw/i386/pc_q35.c117
-rw-r--r--hw/i386/trace-events20
-rw-r--r--hw/i386/x86-iommu.c47
-rw-r--r--hw/i386/xen/xen-hvm.c14
-rw-r--r--hw/i386/xen/xen-mapcache.c4
-rw-r--r--hw/i386/xen/xen_platform.c2
-rw-r--r--hw/ide/core.c94
-rw-r--r--hw/ide/pci.c1
-rw-r--r--hw/ide/piix.c1
-rw-r--r--hw/ide/via.c1
-rw-r--r--hw/input/lm832x.c2
-rw-r--r--hw/input/milkymist-softusb.c16
-rw-r--r--hw/input/pckbd.c2
-rw-r--r--hw/input/pl050.c11
-rw-r--r--hw/input/ps2.c8
-rw-r--r--hw/input/tsc210x.c2
-rw-r--r--hw/intc/Makefile.objs2
-rw-r--r--hw/intc/apic.c9
-rw-r--r--hw/intc/arm_gicv3_cpuif.c21
-rw-r--r--hw/intc/armv7m_nvic.c12
-rw-r--r--hw/intc/ioapic.c10
-rw-r--r--hw/intc/puv3_intc.c11
-rw-r--r--hw/intc/s390_flic_kvm.c4
-rw-r--r--hw/intc/spapr_xive.c1481
-rw-r--r--hw/intc/xics.c19
-rw-r--r--hw/intc/xics_kvm.c11
-rw-r--r--hw/intc/xics_spapr.c14
-rw-r--r--hw/intc/xive.c1596
-rw-r--r--hw/isa/Makefile.objs3
-rw-r--r--hw/lm32/milkymist.c5
-rw-r--r--hw/mem/Makefile.objs4
-rw-r--r--hw/mem/memory-device.c155
-rw-r--r--hw/mem/nvdimm.c10
-rw-r--r--hw/mem/pc-dimm.c84
-rw-r--r--hw/mem/trace-events5
-rw-r--r--hw/microblaze/boot.c2
-rw-r--r--hw/microblaze/petalogix_s3adsp1800_mmu.c4
-rw-r--r--hw/mips/cps.c8
-rw-r--r--hw/mips/gt64xxx_pci.c24
-rw-r--r--hw/mips/mips_malta.c13
-rw-r--r--hw/mips/mips_r4k.c4
-rw-r--r--hw/misc/Makefile.objs2
-rw-r--r--hw/misc/edu.c5
-rw-r--r--hw/misc/hyperv_testdev.c174
-rw-r--r--hw/misc/ivshmem.c209
-rw-r--r--hw/misc/macio/mac_dbdma.c1
-rw-r--r--hw/misc/macio/pmu.c1
-rw-r--r--hw/misc/max111x.c6
-rw-r--r--hw/misc/milkymist-hpdmc.c9
-rw-r--r--hw/misc/milkymist-pfpu.c12
-rw-r--r--hw/misc/mips_itu.c73
-rw-r--r--hw/misc/nrf51_rng.c262
-rw-r--r--hw/misc/omap_l4.c4
-rw-r--r--hw/misc/pc-testdev.c2
-rw-r--r--hw/misc/pci-testdev.c19
-rw-r--r--hw/misc/puv3_pm.c10
-rw-r--r--hw/misc/tmp105.c2
-rw-r--r--hw/misc/tmp421.c2
-rw-r--r--hw/misc/tz-mpc.c4
-rw-r--r--hw/moxie/moxiesim.c1
-rw-r--r--hw/net/cadence_gem.c10
-rw-r--r--hw/net/e1000.c16
-rw-r--r--hw/net/etraxfs_eth.c44
-rw-r--r--hw/net/ftgmac100.c80
-rw-r--r--hw/net/lan9118.c9
-rw-r--r--hw/net/lance.c8
-rw-r--r--hw/net/milkymist-minimac2.c24
-rw-r--r--hw/net/mipsnet.c25
-rw-r--r--hw/net/ne2000.c48
-rw-r--r--hw/net/opencores_eth.c8
-rw-r--r--hw/net/pcnet.c4
-rw-r--r--hw/net/rocker/rocker.c2
-rw-r--r--hw/net/rtl8139.c8
-rw-r--r--hw/net/smc91c111.c8
-rw-r--r--hw/net/stellaris_enet.c15
-rw-r--r--hw/net/trace-events3
-rw-r--r--hw/net/virtio-net.c679
-rw-r--r--hw/net/vmxnet3.c122
-rw-r--r--hw/net/vmxnet3_defs.h133
-rw-r--r--hw/net/xen_nic.c14
-rw-r--r--hw/net/xgmac.c9
-rw-r--r--hw/nios2/boot.c2
-rw-r--r--hw/nvram/Makefile.objs2
-rw-r--r--hw/nvram/ds1225y.c12
-rw-r--r--hw/nvram/eeprom93xx.c6
-rw-r--r--hw/nvram/fw_cfg.c77
-rw-r--r--hw/pci-bridge/dec.c12
-rw-r--r--hw/pci-bridge/gen_pcie_root_port.c4
-rw-r--r--hw/pci-bridge/ioh3420.c2
-rw-r--r--hw/pci-bridge/ioh3420.h6
-rw-r--r--hw/pci-bridge/pci_bridge_dev.c31
-rw-r--r--hw/pci-bridge/pcie_pci_bridge.c32
-rw-r--r--hw/pci-bridge/pcie_root_port.c14
-rw-r--r--hw/pci-bridge/xio3130_downstream.c28
-rw-r--r--hw/pci-bridge/xio3130_downstream.h11
-rw-r--r--hw/pci-bridge/xio3130_upstream.c24
-rw-r--r--hw/pci-bridge/xio3130_upstream.h10
-rw-r--r--hw/pci-host/bonito.c9
-rw-r--r--hw/pci-host/pam.c2
-rw-r--r--hw/pci-host/piix.c40
-rw-r--r--hw/pci-host/ppce500.c14
-rw-r--r--hw/pci-host/q35.c33
-rw-r--r--hw/pci/msix.c8
-rw-r--r--hw/pci/pci.c95
-rw-r--r--hw/pci/pci_bridge.c6
-rw-r--r--hw/pci/pci_host.c26
-rw-r--r--hw/pci/pcie.c178
-rw-r--r--hw/pci/pcie_port.c6
-rw-r--r--hw/pci/shpc.c32
-rw-r--r--hw/ppc/Makefile.objs3
-rw-r--r--hw/ppc/e500.c19
-rw-r--r--hw/ppc/mac_newworld.c41
-rw-r--r--hw/ppc/mac_oldworld.c10
-rw-r--r--hw/ppc/pnv.c27
-rw-r--r--hw/ppc/pnv_core.c8
-rw-r--r--hw/ppc/pnv_lpc.c8
-rw-r--r--hw/ppc/pnv_psi.c7
-rw-r--r--hw/ppc/ppc405_boards.c16
-rw-r--r--hw/ppc/ppc405_uc.c6
-rw-r--r--hw/ppc/ppc440_bamboo.c7
-rw-r--r--hw/ppc/ppc440_pcix.c14
-rw-r--r--hw/ppc/ppc440_uc.c6
-rw-r--r--hw/ppc/ppc4xx_devs.c3
-rw-r--r--hw/ppc/ppc4xx_pci.c14
-rw-r--r--hw/ppc/prep.c4
-rw-r--r--hw/ppc/sam460ex.c4
-rw-r--r--hw/ppc/spapr.c502
-rw-r--r--hw/ppc/spapr_caps.c32
-rw-r--r--hw/ppc/spapr_cpu_core.c11
-rw-r--r--hw/ppc/spapr_hcall.c93
-rw-r--r--hw/ppc/spapr_iommu.c4
-rw-r--r--hw/ppc/spapr_irq.c439
-rw-r--r--hw/ppc/spapr_pci.c53
-rw-r--r--hw/ppc/spapr_rng.c23
-rw-r--r--hw/ppc/spapr_rtas_ddw.c19
-rw-r--r--hw/ppc/spapr_vio.c2
-rw-r--r--hw/ppc/trace-events3
-rw-r--r--hw/ppc/virtex_ml507.c2
-rw-r--r--hw/rdma/rdma_backend.c559
-rw-r--r--hw/rdma/rdma_backend.h40
-rw-r--r--hw/rdma/rdma_backend_defs.h20
-rw-r--r--hw/rdma/rdma_rm.c127
-rw-r--r--hw/rdma/rdma_rm.h17
-rw-r--r--hw/rdma/rdma_rm_defs.h21
-rw-r--r--hw/rdma/rdma_utils.c1
-rw-r--r--hw/rdma/rdma_utils.h26
-rw-r--r--hw/rdma/vmw/pvrdma.h10
-rw-r--r--hw/rdma/vmw/pvrdma_cmd.c273
-rw-r--r--hw/rdma/vmw/pvrdma_dev_ring.c29
-rw-r--r--hw/rdma/vmw/pvrdma_dev_ring.h1
-rw-r--r--hw/rdma/vmw/pvrdma_main.c80
-rw-r--r--hw/rdma/vmw/pvrdma_qp_ops.c102
-rw-r--r--hw/rdma/vmw/pvrdma_qp_ops.h4
-rw-r--r--hw/riscv/sifive_clint.c16
-rw-r--r--hw/riscv/sifive_e.c5
-rw-r--r--hw/riscv/sifive_plic.c6
-rw-r--r--hw/riscv/sifive_u.c29
-rw-r--r--hw/riscv/sifive_uart.c24
-rw-r--r--hw/riscv/spike.c12
-rw-r--r--hw/riscv/virt.c154
-rw-r--r--hw/s390x/css.c32
-rw-r--r--hw/s390x/s390-pci-bus.c105
-rw-r--r--hw/s390x/s390-pci-bus.h30
-rw-r--r--hw/s390x/s390-pci-inst.c133
-rw-r--r--hw/s390x/s390-pci-inst.h1
-rw-r--r--hw/s390x/s390-virtio-ccw.c156
-rw-r--r--hw/s390x/tod-kvm.c102
-rw-r--r--hw/s390x/virtio-ccw.c42
-rw-r--r--hw/scsi/Makefile.objs2
-rw-r--r--hw/scsi/emulation.c42
-rw-r--r--hw/scsi/esp-pci.c10
-rw-r--r--hw/scsi/esp.c33
-rw-r--r--hw/scsi/lsi53c895a.c73
-rw-r--r--hw/scsi/scsi-bus.c6
-rw-r--r--hw/scsi/scsi-disk.c121
-rw-r--r--hw/scsi/scsi-generic.c60
-rw-r--r--hw/scsi/trace-events1
-rw-r--r--hw/scsi/vhost-scsi.c5
-rw-r--r--hw/scsi/vhost-user-scsi.c3
-rw-r--r--hw/scsi/virtio-scsi.c11
-rw-r--r--hw/sd/sdhci.c5
-rw-r--r--hw/sd/ssi-sd.c2
-rw-r--r--hw/sh4/r2d.c16
-rw-r--r--hw/sh4/sh_pci.c20
-rw-r--r--hw/smbios/smbios-stub.c2
-rw-r--r--hw/smbios/smbios.c95
-rw-r--r--hw/smbios/smbios_build.h4
-rw-r--r--hw/smbios/smbios_type_38-stub.c2
-rw-r--r--hw/smbios/smbios_type_38.c3
-rw-r--r--hw/sparc/sun4m.c6
-rw-r--r--hw/sparc64/niagara.c4
-rw-r--r--hw/ssi/xilinx_spi.c9
-rw-r--r--hw/timer/Makefile.objs1
-rw-r--r--hw/timer/aspeed_timer.c3
-rw-r--r--hw/timer/etraxfs_timer.c14
-rw-r--r--hw/timer/grlib_gptimer.c11
-rw-r--r--hw/timer/i8254.c1
-rw-r--r--hw/timer/mc146818rtc.c11
-rw-r--r--hw/timer/nrf51_timer.c393
-rw-r--r--hw/timer/puv3_ost.c13
-rw-r--r--hw/timer/stm32f2xx_timer.c2
-rw-r--r--hw/timer/sun4v-rtc.c23
-rw-r--r--hw/timer/trace-events11
-rw-r--r--hw/timer/twl92230.c4
-rw-r--r--hw/tpm/Makefile.objs1
-rw-r--r--hw/tpm/tpm_crb.c13
-rw-r--r--hw/tpm/tpm_emulator.c1
-rw-r--r--hw/tpm/tpm_ppi.c53
-rw-r--r--hw/tpm/tpm_ppi.h46
-rw-r--r--hw/tpm/tpm_tis.c27
-rw-r--r--hw/tpm/trace-events3
-rw-r--r--hw/usb/bus.c11
-rw-r--r--hw/usb/ccid-card-emulated.c33
-rw-r--r--hw/usb/combined-packet.c2
-rw-r--r--hw/usb/dev-audio.c3
-rw-r--r--hw/usb/dev-bluetooth.c2
-rw-r--r--hw/usb/dev-hid.c6
-rw-r--r--hw/usb/dev-hub.c14
-rw-r--r--hw/usb/dev-mtp.c49
-rw-r--r--hw/usb/dev-network.c2
-rw-r--r--hw/usb/hcd-ehci-pci.c53
-rw-r--r--hw/usb/hcd-ehci-sysbus.c17
-rw-r--r--hw/usb/hcd-ehci.c14
-rw-r--r--hw/usb/hcd-ehci.h3
-rw-r--r--hw/usb/hcd-ohci.c6
-rw-r--r--hw/usb/hcd-uhci.c8
-rw-r--r--hw/usb/host-libusb.c5
-rw-r--r--hw/usb/redirect.c12
-rw-r--r--hw/usb/tusb6010.c8
-rw-r--r--hw/usb/xen-usb.c43
-rw-r--r--hw/vfio/ap.c12
-rw-r--r--hw/vfio/common.c4
-rw-r--r--hw/vfio/pci-quirks.c4
-rw-r--r--hw/vfio/pci.c34
-rw-r--r--hw/vfio/platform.c6
-rw-r--r--hw/virtio/Makefile.objs15
-rw-r--r--hw/virtio/vhost-scsi-pci.c97
-rw-r--r--hw/virtio/vhost-user-blk-pci.c103
-rw-r--r--hw/virtio/vhost-user-scsi-pci.c103
-rw-r--r--hw/virtio/vhost-user.c2
-rw-r--r--hw/virtio/vhost-vsock-pci.c86
-rw-r--r--hw/virtio/virtio-9p-pci.c88
-rw-r--r--hw/virtio/virtio-balloon-pci.c95
-rw-r--r--hw/virtio/virtio-balloon.c2
-rw-r--r--hw/virtio/virtio-blk-pci.c100
-rw-r--r--hw/virtio/virtio-crypto-pci.c21
-rw-r--r--hw/virtio/virtio-input-host-pci.c48
-rw-r--r--hw/virtio/virtio-input-pci.c157
-rw-r--r--hw/virtio/virtio-net-pci.c98
-rw-r--r--hw/virtio/virtio-pci.c856
-rw-r--r--hw/virtio/virtio-pci.h288
-rw-r--r--hw/virtio/virtio-rng-pci.c88
-rw-r--r--hw/virtio/virtio-rng.c2
-rw-r--r--hw/virtio/virtio-scsi-pci.c107
-rw-r--r--hw/virtio/virtio-serial-pci.c115
-rw-r--r--hw/virtio/virtio.c18
-rw-r--r--hw/watchdog/watchdog.c2
-rw-r--r--hw/watchdog/wdt_i6300esb.c1
-rw-r--r--hw/xen/Makefile.objs2
-rw-r--r--hw/xen/trace-events26
-rw-r--r--hw/xen/xen-backend.c165
-rw-r--r--hw/xen/xen-bus-helper.c184
-rw-r--r--hw/xen/xen-bus.c1199
-rw-r--r--hw/xen/xen-common.c31
-rw-r--r--hw/xen/xen-legacy-backend.c (renamed from hw/xen/xen_backend.c)87
-rw-r--r--hw/xen/xen_devconfig.c4
-rw-r--r--hw/xen/xen_pt.c10
-rw-r--r--hw/xen/xen_pt_config_init.c14
-rw-r--r--hw/xen/xen_pt_graphics.c18
-rw-r--r--hw/xen/xen_pt_msi.c2
-rw-r--r--hw/xen/xen_pvdev.c22
-rw-r--r--hw/xenpv/Makefile.objs2
-rw-r--r--hw/xenpv/xen_domainbuild.c299
-rw-r--r--hw/xenpv/xen_domainbuild.h13
-rw-r--r--hw/xenpv/xen_machine_pv.c21
-rw-r--r--hw/xtensa/xtfpga.c10
-rw-r--r--include/block/aio.h59
-rw-r--r--include/block/block.h11
-rw-r--r--include/block/block_backup.h13
-rw-r--r--include/block/block_int.h2
-rw-r--r--include/block/dirty-bitmap.h12
-rw-r--r--include/block/nbd.h46
-rw-r--r--include/chardev/char.h3
-rw-r--r--include/crypto/block.h2
-rw-r--r--include/disas/bfd.h1
-rw-r--r--include/elf.h102
-rw-r--r--include/exec/cpu-common.h2
-rw-r--r--include/exec/cpu-defs.h50
-rw-r--r--include/exec/cpu_ldst.h30
-rw-r--r--include/exec/cpu_ldst_template.h25
-rw-r--r--include/exec/cputlb.h2
-rw-r--r--include/exec/exec-all.h8
-rw-r--r--include/exec/helper-head.h13
-rw-r--r--include/exec/helper-tcg.h21
-rw-r--r--include/exec/memory.h67
-rw-r--r--include/exec/poison.h2
-rw-r--r--include/exec/ram_addr.h1
-rw-r--r--include/exec/tb-hash.h4
-rw-r--r--include/fpu/softfloat-macros.h4
-rw-r--r--include/fpu/softfloat.h30
-rw-r--r--include/glib-compat.h56
-rw-r--r--include/hw/acpi/acpi-defs.h30
-rw-r--r--include/hw/acpi/acpi.h14
-rw-r--r--include/hw/acpi/acpi_dev_interface.h6
-rw-r--r--include/hw/acpi/aml-build.h2
-rw-r--r--include/hw/acpi/pcihp.h5
-rw-r--r--include/hw/acpi/tpm.h21
-rw-r--r--include/hw/arm/allwinner-a10.h1
-rw-r--r--include/hw/arm/linux-boot-if.h5
-rw-r--r--include/hw/arm/nrf51.h45
-rw-r--r--include/hw/arm/nrf51_soc.h12
-rw-r--r--include/hw/arm/pxa.h1
-rw-r--r--include/hw/arm/xlnx-versal.h122
-rw-r--r--include/hw/arm/xlnx-zynqmp.h3
-rw-r--r--include/hw/audio/wm8750.h1
-rw-r--r--include/hw/boards.h60
-rw-r--r--include/hw/char/nrf51_uart.h77
-rw-r--r--include/hw/char/serial.h4
-rw-r--r--include/hw/compat.h288
-rw-r--r--include/hw/cpu/cluster.h58
-rw-r--r--include/hw/devices.h1
-rw-r--r--include/hw/elf_ops.h6
-rw-r--r--include/hw/firmware/smbios.h (renamed from include/hw/smbios/smbios.h)0
-rw-r--r--include/hw/fw-path-provider.h4
-rw-r--r--include/hw/gpio/nrf51_gpio.h69
-rw-r--r--include/hw/hotplug.h17
-rw-r--r--include/hw/hyperv/hyperv-proto.h130
-rw-r--r--include/hw/hyperv/hyperv.h83
-rw-r--r--include/hw/i2c/i2c.h2
-rw-r--r--include/hw/i2c/ppc4xx_i2c.h3
-rw-r--r--include/hw/i2c/smbus.h2
-rw-r--r--include/hw/i386/intel_iommu.h60
-rw-r--r--include/hw/i386/ioapic.h3
-rw-r--r--include/hw/i386/pc.h711
-rw-r--r--include/hw/i386/x86-iommu.h70
-rw-r--r--include/hw/ide/ahci.h4
-rw-r--r--include/hw/ide/internal.h2
-rw-r--r--include/hw/input/ps2.h2
-rw-r--r--include/hw/intc/arm_gicv3_common.h2
-rw-r--r--include/hw/intc/intc.h4
-rw-r--r--include/hw/ipmi/ipmi.h4
-rw-r--r--include/hw/isa/isa.h4
-rw-r--r--include/hw/loader.h24
-rw-r--r--include/hw/mem/memory-device.h78
-rw-r--r--include/hw/mem/pc-dimm.h10
-rw-r--r--include/hw/misc/mips_itu.h8
-rw-r--r--include/hw/misc/nrf51_rng.h83
-rw-r--r--include/hw/nmi.h4
-rw-r--r--include/hw/pci-host/spapr.h9
-rw-r--r--include/hw/pci/pci.h16
-rw-r--r--include/hw/pci/pci_bridge.h6
-rw-r--r--include/hw/pci/pci_bus.h2
-rw-r--r--include/hw/pci/pci_ids.h2
-rw-r--r--include/hw/pci/pcie.h13
-rw-r--r--include/hw/pci/pcie_port.h4
-rw-r--r--include/hw/pci/pcie_regs.h23
-rw-r--r--include/hw/pci/shpc.h10
-rw-r--r--include/hw/pcmcia.h4
-rw-r--r--include/hw/ppc/openpic.h2
-rw-r--r--include/hw/ppc/pnv.h2
-rw-r--r--include/hw/ppc/pnv_psi.h1
-rw-r--r--include/hw/ppc/spapr.h44
-rw-r--r--include/hw/ppc/spapr_irq.h14
-rw-r--r--include/hw/ppc/spapr_xive.h50
-rw-r--r--include/hw/ppc/xics.h13
-rw-r--r--include/hw/ppc/xics_spapr.h37
-rw-r--r--include/hw/ppc/xive.h424
-rw-r--r--include/hw/ppc/xive_regs.h235
-rw-r--r--include/hw/qdev-core.h30
-rw-r--r--include/hw/qdev-properties.h38
-rw-r--r--include/hw/riscv/sifive_u.h3
-rw-r--r--include/hw/riscv/sifive_uart.h3
-rw-r--r--include/hw/riscv/virt.h15
-rw-r--r--include/hw/s390x/tod.h10
-rw-r--r--include/hw/scsi/emulation.h16
-rw-r--r--include/hw/scsi/esp.h2
-rw-r--r--include/hw/scsi/scsi.h1
-rw-r--r--include/hw/sh4/sh_intc.h20
-rw-r--r--include/hw/smbios/ipmi.h15
-rw-r--r--include/hw/stream.h4
-rw-r--r--include/hw/sysbus.h3
-rw-r--r--include/hw/timer/m48t59.h4
-rw-r--r--include/hw/timer/nrf51_timer.h80
-rw-r--r--include/hw/usb.h4
-rw-r--r--include/hw/vfio/vfio-common.h7
-rw-r--r--include/hw/vfio/vfio-platform.h2
-rw-r--r--include/hw/virtio/virtio-net.h86
-rw-r--r--include/hw/xen/io/ring.h4
-rw-r--r--include/hw/xen/xen-backend.h39
-rw-r--r--include/hw/xen/xen-block.h94
-rw-r--r--include/hw/xen/xen-bus-helper.h45
-rw-r--r--include/hw/xen/xen-bus.h137
-rw-r--r--include/hw/xen/xen-legacy-backend.h (renamed from include/hw/xen/xen_backend.h)43
-rw-r--r--include/hw/xen/xen.h3
-rw-r--r--include/hw/xen/xen_common.h19
-rw-r--r--include/hw/xen/xen_pvdev.h38
-rw-r--r--include/io/channel-tls.h1
-rw-r--r--include/io/channel.h6
-rw-r--r--include/migration/colo.h11
-rw-r--r--include/migration/vmstate.h7
-rw-r--r--include/monitor/monitor.h3
-rw-r--r--include/net/eth.h2
-rw-r--r--include/net/filter.h5
-rw-r--r--include/net/net.h8
-rw-r--r--include/qapi/error.h14
-rw-r--r--include/qapi/qmp/qerror.h6
-rw-r--r--include/qapi/string-input-visitor.h4
-rw-r--r--include/qemu/acl.h14
-rw-r--r--include/qemu/atomic.h5
-rw-r--r--include/qemu/atomic128.h153
-rw-r--r--include/qemu/compiler.h38
-rw-r--r--include/qemu/cutils.h8
-rw-r--r--include/qemu/hbitmap.h54
-rw-r--r--include/qemu/host-utils.h4
-rw-r--r--include/qemu/iov.h2
-rw-r--r--include/qemu/module.h3
-rw-r--r--include/qemu/option.h2
-rw-r--r--include/qemu/option_int.h2
-rw-r--r--include/qemu/osdep.h29
-rw-r--r--include/qemu/queue.h153
-rw-r--r--include/qemu/range.h68
-rw-r--r--include/qemu/rcu_queue.h45
-rw-r--r--include/qemu/thread.h22
-rw-r--r--include/qemu/timer.h127
-rw-r--r--include/qemu/typedefs.h26
-rw-r--r--include/qemu/units.h18
-rw-r--r--include/qemu/vfio-helpers.h1
-rw-r--r--include/qemu/xxhash.h (renamed from include/exec/tb-hash-xx.h)47
-rw-r--r--include/qom/cpu.h18
-rw-r--r--include/qom/object.h11
-rw-r--r--include/qom/object_interfaces.h10
-rw-r--r--include/scsi/constants.h2
-rw-r--r--include/scsi/pr-manager.h8
-rw-r--r--include/sysemu/accel.h6
-rw-r--r--include/sysemu/balloon.h2
-rw-r--r--include/sysemu/block-backend.h6
-rw-r--r--include/sysemu/blockdev.h3
-rw-r--r--include/sysemu/bt.h4
-rw-r--r--include/sysemu/hostmem.h3
-rw-r--r--include/sysemu/hvf.h4
-rw-r--r--include/sysemu/kvm.h4
-rw-r--r--include/sysemu/memory_mapping.h2
-rw-r--r--include/sysemu/numa.h3
-rw-r--r--include/sysemu/replay.h10
-rw-r--r--include/sysemu/rng.h2
-rw-r--r--include/sysemu/sysemu.h26
-rw-r--r--include/sysemu/tpm.h6
-rw-r--r--include/sysemu/whpx.h1
-rw-r--r--include/ui/console.h30
-rw-r--r--include/ui/egl-helpers.h2
-rw-r--r--include/ui/input.h3
-rw-r--r--include/ui/qemu-pixman.h10
-rw-r--r--include/ui/qemu-spice.h6
-rw-r--r--include/ui/sdl2.h3
-rw-r--r--io/channel-tls.c5
-rw-r--r--io/channel-websock.c1
-rw-r--r--job.c4
-rw-r--r--linux-headers/asm-powerpc/kvm.h1
-rw-r--r--linux-headers/asm-x86/kvm.h8
-rw-r--r--linux-headers/linux/kvm.h16
-rw-r--r--linux-user/aarch64/cpu_loop.c13
-rw-r--r--linux-user/aarch64/signal.c4
-rw-r--r--linux-user/alpha/cpu_loop.c12
-rw-r--r--linux-user/arm/cpu_loop.c16
-rw-r--r--linux-user/cris/cpu_loop.c16
-rw-r--r--linux-user/elfload.c97
-rw-r--r--linux-user/flatload.c8
-rw-r--r--linux-user/host/riscv32/hostdep.h11
-rw-r--r--linux-user/host/riscv64/hostdep.h34
-rw-r--r--linux-user/host/riscv64/safe-syscall.inc.S77
-rw-r--r--linux-user/hppa/cpu_loop.c11
-rw-r--r--linux-user/i386/cpu_loop.c16
-rw-r--r--linux-user/ioctls.h46
-rw-r--r--linux-user/linuxload.c14
-rw-r--r--linux-user/m68k/cpu_loop.c17
-rw-r--r--linux-user/m68k/signal.c3
-rw-r--r--linux-user/main.c4
-rw-r--r--linux-user/microblaze/cpu_loop.c16
-rw-r--r--linux-user/mips/cpu_loop.c91
-rw-r--r--linux-user/mips/target_elf.h3
-rw-r--r--linux-user/mips/target_syscall.h6
-rw-r--r--linux-user/mips64/target_syscall.h6
-rw-r--r--linux-user/mmap.c10
-rw-r--r--linux-user/nios2/cpu_loop.c17
-rw-r--r--linux-user/openrisc/cpu_loop.c11
-rw-r--r--linux-user/ppc/cpu_loop.c15
-rw-r--r--linux-user/ppc/signal.c28
-rw-r--r--linux-user/qemu.h80
-rw-r--r--linux-user/riscv/cpu_loop.c2
-rw-r--r--linux-user/s390x/cpu_loop.c9
-rw-r--r--linux-user/sh4/cpu_loop.c17
-rw-r--r--linux-user/sh4/signal.c4
-rw-r--r--linux-user/signal.c16
-rw-r--r--linux-user/sparc/cpu_loop.c16
-rw-r--r--linux-user/sparc/signal.c22
-rw-r--r--linux-user/strace.c7
-rw-r--r--linux-user/syscall.c343
-rw-r--r--linux-user/syscall_defs.h32
-rw-r--r--linux-user/syscall_types.h68
-rw-r--r--linux-user/uaccess.c2
-rw-r--r--linux-user/vm86.c2
-rw-r--r--linux-user/x86_64/target_syscall.h2
-rw-r--r--linux-user/xtensa/cpu_loop.c11
-rw-r--r--linux-user/xtensa/target_flat.h10
-rw-r--r--memory.c142
-rw-r--r--memory_mapping.c5
-rw-r--r--migration/Makefile.objs2
-rw-r--r--migration/block-dirty-bitmap.c14
-rw-r--r--migration/block.c4
-rw-r--r--migration/colo-comm.c76
-rw-r--r--migration/colo-failover.c2
-rw-r--r--migration/colo.c250
-rw-r--r--migration/global_state.c15
-rw-r--r--migration/migration.c73
-rw-r--r--migration/migration.h2
-rw-r--r--migration/ram.c168
-rw-r--r--migration/ram.h4
-rw-r--r--migration/savevm.c91
-rw-r--r--migration/savevm.h5
-rw-r--r--migration/trace-events3
-rw-r--r--migration/vmstate-types.c119
-rw-r--r--migration/vmstate.c44
-rw-r--r--monitor.c204
-rw-r--r--nbd/client.c816
-rw-r--r--nbd/nbd-internal.h8
-rw-r--r--nbd/server.c171
-rw-r--r--nbd/trace-events18
-rw-r--r--net/checksum.c2
-rw-r--r--net/colo-compare.c132
-rw-r--r--net/colo-compare.h24
-rw-r--r--net/colo.c11
-rw-r--r--net/colo.h14
-rw-r--r--net/filter-rewriter.c176
-rw-r--r--net/filter.c19
-rw-r--r--net/hub.c3
-rw-r--r--net/l2tpv3.c25
-rw-r--r--net/net.c44
-rw-r--r--net/queue.c2
-rw-r--r--net/slirp.c84
-rw-r--r--net/socket.c4
-rw-r--r--net/util.h55
-rw-r--r--numa.c21
-rw-r--r--pc-bios/README8
-rw-r--r--pc-bios/bios-256k.binbin262144 -> 262144 bytes
-rw-r--r--pc-bios/bios.binbin131072 -> 131072 bytes
-rw-r--r--pc-bios/efi-e1000.rombin240128 -> 240128 bytes
-rw-r--r--pc-bios/efi-e1000e.rombin240128 -> 240128 bytes
-rw-r--r--pc-bios/efi-eepro100.rombin240128 -> 240128 bytes
-rw-r--r--pc-bios/efi-ne2k_pci.rombin238080 -> 238592 bytes
-rw-r--r--pc-bios/efi-pcnet.rombin238080 -> 238592 bytes
-rw-r--r--pc-bios/efi-rtl8139.rombin241664 -> 242688 bytes
-rw-r--r--pc-bios/efi-virtio.rombin242176 -> 242688 bytes
-rw-r--r--pc-bios/efi-vmxnet3.rombin236032 -> 236032 bytes
-rw-r--r--pc-bios/keymaps/common157
-rw-r--r--pc-bios/keymaps/modifiers18
-rw-r--r--pc-bios/keymaps/nl-be3
-rw-r--r--pc-bios/keymaps/sl177
-rw-r--r--pc-bios/keymaps/sv176
-rw-r--r--pc-bios/palcode-clipperbin152680 -> 155968 bytes
-rw-r--r--pc-bios/qemu-icon.bmpbin630 -> 0 bytes
-rw-r--r--pc-bios/s390-ccw/start.S14
-rw-r--r--pc-bios/vgabios-bochs-display.binbin27648 -> 27648 bytes
-rw-r--r--pc-bios/vgabios-cirrus.binbin38400 -> 38400 bytes
-rw-r--r--pc-bios/vgabios-qxl.binbin38912 -> 38912 bytes
-rw-r--r--pc-bios/vgabios-ramfb.binbin28160 -> 28160 bytes
-rw-r--r--pc-bios/vgabios-stdvga.binbin38912 -> 38912 bytes
-rw-r--r--pc-bios/vgabios-virtio.binbin38912 -> 38912 bytes
-rw-r--r--pc-bios/vgabios-vmware.binbin38912 -> 38912 bytes
-rw-r--r--pc-bios/vgabios.binbin38400 -> 38400 bytes
-rw-r--r--po/Makefile2
-rw-r--r--qapi/block-core.json96
-rw-r--r--qapi/block.json30
-rw-r--r--qapi/char.json151
-rw-r--r--qapi/common.json42
-rw-r--r--qapi/crypto.json6
-rw-r--r--qapi/migration.json95
-rw-r--r--qapi/misc.json92
-rw-r--r--qapi/net.json8
-rw-r--r--qapi/qapi-schema.json1
-rw-r--r--qapi/qobject-input-visitor.c9
-rw-r--r--qapi/rdma.json38
-rw-r--r--qapi/run-state.json44
-rw-r--r--qapi/string-input-visitor.c413
-rw-r--r--qapi/tpm.json5
-rw-r--r--qapi/transaction.json10
-rw-r--r--qapi/ui.json33
-rw-r--r--qdev-monitor.c13
-rw-r--r--qemu-deprecated.texi43
-rw-r--r--qemu-doc.texi13
-rw-r--r--qemu-img.c8
-rw-r--r--qemu-io-cmds.c33
-rw-r--r--qemu-io.c8
-rw-r--r--qemu-nbd.c282
-rw-r--r--qemu-nbd.texi123
-rw-r--r--qemu-options.hx74
-rw-r--r--qemu-seccomp.c21
-rw-r--r--qga/Makefile.objs1
-rw-r--r--qga/channel-win32.c3
-rw-r--r--qga/commands-posix.c161
-rw-r--r--qga/commands-win32.c410
-rw-r--r--qga/guest-agent-core.h5
-rw-r--r--qga/installer/qemu-ga.wxs2
-rw-r--r--qga/main.c258
-rw-r--r--qga/qapi-schema.json21
-rw-r--r--qga/service-win32.h4
-rw-r--r--qga/vss-win32.c5
-rw-r--r--qga/vss-win32.h3
-rw-r--r--qga/vss-win32/requester.cpp92
-rw-r--r--qga/vss-win32/requester.h13
-rw-r--r--qmp.c12
-rw-r--r--qobject/block-qdict.c2
-rw-r--r--qobject/json-parser.c5
-rw-r--r--qom/cpu.c3
-rw-r--r--qom/object.c52
-rw-r--r--qom/object_interfaces.c18
-rw-r--r--qtest.c47
-rw-r--r--replay/replay-events.c1
-rw-r--r--replay/replay-internal.c41
-rw-r--r--replay/replay-internal.h2
-rw-r--r--replay/replay-time.c8
-rw-r--r--replay/replay.c9
-rw-r--r--roms/Makefile6
m---------roms/ipxe0
m---------roms/qemu-palcode0
m---------roms/seabios0
-rw-r--r--rules.mak4
-rwxr-xr-xscripts/analyse-locks-simpletrace.py1
-rwxr-xr-xscripts/analyze-migration.py1
-rwxr-xr-xscripts/check-qerror.sh22
-rwxr-xr-xscripts/checkpatch.pl151
-rw-r--r--scripts/cocci-macro-file.h25
-rw-r--r--scripts/coccinelle/tcg_gen_extract.cocci2
-rw-r--r--scripts/coccinelle/use-error_fatal.cocci20
-rwxr-xr-xscripts/decodetree.py68
-rwxr-xr-xscripts/device-crash-test34
-rw-r--r--scripts/dump-guest-memory.py4
-rwxr-xr-xscripts/fix-multiline-comments.sh62
-rwxr-xr-xscripts/get_maintainer.pl2
-rwxr-xr-xscripts/gtester-cat26
-rwxr-xr-xscripts/make-release1
-rw-r--r--scripts/qapi/common.py208
-rwxr-xr-xscripts/qapi/doc.py31
-rw-r--r--scripts/qapi/events.py13
-rw-r--r--scripts/qapi/introspect.py17
-rw-r--r--scripts/qapi/types.py10
-rw-r--r--scripts/qapi/visit.py8
-rw-r--r--scripts/qemu.py109
-rw-r--r--scripts/qtest.py2
-rwxr-xr-xscripts/replay-dump.py2
-rwxr-xr-xscripts/simpletrace.py1
-rwxr-xr-xscripts/tap-driver.pl378
-rwxr-xr-xscripts/tap-merge.pl110
-rwxr-xr-xscripts/texi2pod.pl2
-rwxr-xr-xscripts/tracetool.py2
-rw-r--r--scripts/tracetool/backend/log.py2
-rw-r--r--scripts/tracetool/format/simpletrace_stap.py2
-rw-r--r--scsi/pr-manager.c21
-rw-r--r--scsi/qemu-pr-helper.c2
-rw-r--r--scsi/trace-events2
-rw-r--r--slirp/Makefile.objs37
-rw-r--r--slirp/arp_table.c12
-rw-r--r--slirp/bootp.c55
-rw-r--r--slirp/bootp.h1
-rw-r--r--slirp/cksum.c8
-rw-r--r--slirp/debug.h47
-rw-r--r--slirp/dhcpv6.c17
-rw-r--r--slirp/if.c4
-rw-r--r--slirp/ip.h10
-rw-r--r--slirp/ip6.h3
-rw-r--r--slirp/ip6_icmp.c32
-rw-r--r--slirp/ip6_icmp.h6
-rw-r--r--slirp/ip6_input.c2
-rw-r--r--slirp/ip6_output.c4
-rw-r--r--slirp/ip_icmp.c33
-rw-r--r--slirp/ip_input.c202
-rw-r--r--slirp/libslirp.h28
-rw-r--r--slirp/main.h33
-rw-r--r--slirp/mbuf.c2
-rw-r--r--slirp/mbuf.h1
-rw-r--r--slirp/misc.c273
-rw-r--r--slirp/misc.h13
-rw-r--r--slirp/ncsi.c4
-rw-r--r--slirp/ndp_table.c32
-rw-r--r--slirp/sbuf.h1
-rw-r--r--slirp/slirp.c195
-rw-r--r--slirp/slirp.h46
-rw-r--r--slirp/slirp_config.h86
-rw-r--r--slirp/socket.c70
-rw-r--r--slirp/socket.h2
-rw-r--r--slirp/tcp.h4
-rw-r--r--slirp/tcp_input.c99
-rw-r--r--slirp/tcp_output.c6
-rw-r--r--slirp/tcp_subr.c29
-rw-r--r--slirp/tcp_timer.c4
-rw-r--r--slirp/tftp.c7
-rw-r--r--slirp/trace-events5
-rw-r--r--slirp/udp.c13
-rw-r--r--slirp/udp6.c14
-rw-r--r--stubs/cpu-get-icount.c5
-rw-r--r--stubs/replay.c2
-rw-r--r--stubs/slirp.c2
-rw-r--r--stubs/tpm.c8
-rw-r--r--target/alpha/cpu.c7
-rw-r--r--target/alpha/machine.c5
-rw-r--r--target/alpha/translate.c2
-rw-r--r--target/arm/Makefile.objs1
-rw-r--r--target/arm/cpu-qom.h3
-rw-r--r--target/arm/cpu.c402
-rw-r--r--target/arm/cpu.h755
-rw-r--r--target/arm/cpu64.c251
-rw-r--r--target/arm/helper-a64.c408
-rw-r--r--target/arm/helper-a64.h14
-rw-r--r--target/arm/helper.c1861
-rw-r--r--target/arm/helper.h1
-rw-r--r--target/arm/idau.h4
-rw-r--r--target/arm/internals.h159
-rw-r--r--target/arm/kvm.c63
-rw-r--r--target/arm/kvm32.c94
-rw-r--r--target/arm/kvm64.c129
-rw-r--r--target/arm/kvm_arm.h25
-rw-r--r--target/arm/machine.c112
-rw-r--r--target/arm/op_helper.c244
-rw-r--r--target/arm/pauth_helper.c497
-rw-r--r--target/arm/sve.decode5
-rw-r--r--target/arm/sve_helper.c20
-rw-r--r--target/arm/translate-a64.c1332
-rw-r--r--target/arm/translate-sve.c507
-rw-r--r--target/arm/translate.c1518
-rw-r--r--target/arm/translate.h26
-rw-r--r--target/cris/helper.c2
-rw-r--r--target/cris/mmu.h10
-rw-r--r--target/cris/translate_v10.inc.c2
-rw-r--r--target/hppa/machine.c10
-rw-r--r--target/i386/Makefile.objs21
-rw-r--r--target/i386/cpu.c374
-rw-r--r--target/i386/cpu.h18
-rw-r--r--target/i386/hax-all.c17
-rw-r--r--target/i386/hax-i386.h6
-rw-r--r--target/i386/hax-mem.c2
-rw-r--r--target/i386/hax-posix.c (renamed from target/i386/hax-darwin.c)0
-rw-r--r--target/i386/hax-posix.h (renamed from target/i386/hax-darwin.h)0
-rw-r--r--target/i386/hvf/hvf.c9
-rw-r--r--target/i386/hvf/x86_decode.c75
-rw-r--r--target/i386/hvf/x86_decode.h6
-rw-r--r--target/i386/hyperv-proto.h118
-rw-r--r--target/i386/hyperv-stub.c48
-rw-r--r--target/i386/hyperv.c130
-rw-r--r--target/i386/hyperv.h28
-rw-r--r--target/i386/kvm.c250
-rw-r--r--target/i386/machine.c9
-rw-r--r--target/i386/mem_helper.c9
-rw-r--r--target/i386/seg_helper.c4
-rw-r--r--target/i386/sev.c3
-rw-r--r--target/i386/translate.c53
-rw-r--r--target/i386/whp-dispatch.h1
-rw-r--r--target/m68k/cpu.h1
-rw-r--r--target/m68k/translate.c6
-rw-r--r--target/microblaze/cpu.c14
-rw-r--r--target/microblaze/cpu.h9
-rw-r--r--target/microblaze/op_helper.c22
-rw-r--r--target/mips/cpu.c13
-rw-r--r--target/mips/cpu.h448
-rw-r--r--target/mips/helper.c365
-rw-r--r--target/mips/helper.h9
-rw-r--r--target/mips/internal.h35
-rw-r--r--target/mips/machine.c25
-rw-r--r--target/mips/mips-defs.h83
-rw-r--r--target/mips/op_helper.c152
-rw-r--r--target/mips/translate.c5624
-rw-r--r--target/mips/translate_init.inc.c9
-rw-r--r--target/openrisc/disas.c23
-rw-r--r--target/openrisc/machine.c5
-rw-r--r--target/openrisc/translate.c200
-rw-r--r--target/ppc/arch_dump.c15
-rw-r--r--target/ppc/cpu.h90
-rw-r--r--target/ppc/fpu_helper.c661
-rw-r--r--target/ppc/gdbstub.c8
-rw-r--r--target/ppc/helper.h6
-rw-r--r--target/ppc/int_helper.c86
-rw-r--r--target/ppc/internal.h39
-rw-r--r--target/ppc/kvm.c36
-rw-r--r--target/ppc/kvm_ppc.h12
-rw-r--r--target/ppc/machine.c86
-rw-r--r--target/ppc/mem_helper.c67
-rw-r--r--target/ppc/mmu_helper.c172
-rw-r--r--target/ppc/monitor.c4
-rw-r--r--target/ppc/translate.c413
-rw-r--r--target/ppc/translate/dfp-impl.inc.c2
-rw-r--r--target/ppc/translate/fp-impl.inc.c512
-rw-r--r--target/ppc/translate/fp-ops.inc.c2
-rw-r--r--target/ppc/translate/vmx-impl.inc.c154
-rw-r--r--target/ppc/translate/vmx-ops.inc.c2
-rw-r--r--target/ppc/translate/vsx-impl.inc.c862
-rw-r--r--target/ppc/translate_init.inc.c67
-rw-r--r--target/riscv/Makefile.objs2
-rw-r--r--target/riscv/cpu.c16
-rw-r--r--target/riscv/cpu.h61
-rw-r--r--target/riscv/cpu_bits.h683
-rw-r--r--target/riscv/cpu_helper.c (renamed from target/riscv/helper.c)60
-rw-r--r--target/riscv/csr.c863
-rw-r--r--target/riscv/fpu_helper.c1
-rw-r--r--target/riscv/gdbstub.c10
-rw-r--r--target/riscv/op_helper.c641
-rw-r--r--target/riscv/pmp.c4
-rw-r--r--target/riscv/translate.c24
-rw-r--r--target/s390x/diag.c2
-rw-r--r--target/s390x/mem_helper.c196
-rw-r--r--target/s390x/translate.c45
-rw-r--r--target/sparc/cpu.c1
-rw-r--r--target/sparc/machine.c7
-rw-r--r--target/tilegx/translate.c2
-rw-r--r--target/tricore/fpu_helper.c9
-rw-r--r--target/unicore32/cpu.c2
-rw-r--r--target/xtensa/Makefile.objs5
-rw-r--r--target/xtensa/core-dc232b.c2
-rw-r--r--target/xtensa/core-dc232b/gdb-config.inc.c1
-rw-r--r--target/xtensa/core-dc233c.c2
-rw-r--r--target/xtensa/core-dc233c/gdb-config.inc.c1
-rw-r--r--target/xtensa/cpu.h32
-rw-r--r--target/xtensa/dbg_helper.c129
-rw-r--r--target/xtensa/exc_helper.c258
-rw-r--r--target/xtensa/fpu_helper.c166
-rw-r--r--target/xtensa/gdbstub.c11
-rw-r--r--target/xtensa/helper.c635
-rw-r--r--target/xtensa/helper.h3
-rw-r--r--target/xtensa/mmu_helper.c818
-rw-r--r--target/xtensa/op_helper.c894
-rw-r--r--target/xtensa/overlay_tool.h1
-rw-r--r--target/xtensa/translate.c53
-rw-r--r--target/xtensa/win_helper.c222
-rw-r--r--tcg/aarch64/tcg-target.h1
-rw-r--r--tcg/aarch64/tcg-target.inc.c71
-rw-r--r--tcg/arm/tcg-target.h1
-rw-r--r--tcg/arm/tcg-target.inc.c55
-rw-r--r--tcg/i386/tcg-target.h17
-rw-r--r--tcg/i386/tcg-target.inc.c212
-rw-r--r--tcg/mips/tcg-target.h1
-rw-r--r--tcg/mips/tcg-target.inc.c12
-rw-r--r--tcg/optimize.c16
-rw-r--r--tcg/ppc/tcg-target.h1
-rw-r--r--tcg/ppc/tcg-target.inc.c60
-rw-r--r--tcg/riscv/tcg-target.h177
-rw-r--r--tcg/riscv/tcg-target.inc.c1949
-rw-r--r--tcg/s390/tcg-target.h1
-rw-r--r--tcg/s390/tcg-target.inc.c45
-rw-r--r--tcg/sparc/tcg-target.h1
-rw-r--r--tcg/sparc/tcg-target.inc.c58
-rw-r--r--tcg/tcg-op.c230
-rw-r--r--tcg/tcg-op.h6
-rw-r--r--tcg/tcg-opc.h7
-rw-r--r--tcg/tcg.c665
-rw-r--r--tcg/tcg.h65
-rw-r--r--tcg/tci/tcg-target.h2
-rw-r--r--tcg/tci/tcg-target.inc.c3
-rw-r--r--tests/Makefile.include193
-rw-r--r--tests/acceptance/linux_initrd.py48
-rw-r--r--tests/acceptance/virtio_version.py176
-rw-r--r--tests/acpi-utils.c72
-rw-r--r--tests/acpi-utils.h56
-rw-r--r--tests/atomic64-bench.c6
-rw-r--r--tests/atomic_add-bench.c6
-rw-r--r--tests/benchmark-crypto-cipher.c149
-rw-r--r--tests/bios-tables-test.c332
-rw-r--r--tests/boot-order-test.c59
-rw-r--r--tests/boot-serial-test.c52
-rw-r--r--tests/cdrom-test.c2
-rwxr-xr-xtests/check-block.sh6
-rw-r--r--tests/check-qom-interface.c4
-rw-r--r--tests/cpu-plug-test.c22
-rw-r--r--tests/crypto-tls-x509-helpers.h3
-rw-r--r--tests/data/acpi/pc/APIC (renamed from tests/acpi-test-data/pc/APIC)bin120 -> 120 bytes
-rw-r--r--tests/data/acpi/pc/APIC.cphp (renamed from tests/acpi-test-data/pc/APIC.cphp)bin160 -> 160 bytes
-rw-r--r--tests/data/acpi/pc/APIC.dimmpxm (renamed from tests/acpi-test-data/pc/APIC.dimmpxm)bin144 -> 144 bytes
-rw-r--r--tests/data/acpi/pc/DSDT (renamed from tests/acpi-test-data/pc/DSDT)bin5131 -> 5131 bytes
-rw-r--r--tests/data/acpi/pc/DSDT.bridge (renamed from tests/acpi-test-data/pc/DSDT.bridge)bin6990 -> 6990 bytes
-rw-r--r--tests/data/acpi/pc/DSDT.cphp (renamed from tests/acpi-test-data/pc/DSDT.cphp)bin5594 -> 5594 bytes
-rw-r--r--tests/data/acpi/pc/DSDT.dimmpxm (renamed from tests/acpi-test-data/pc/DSDT.dimmpxm)bin6790 -> 6784 bytes
-rw-r--r--tests/data/acpi/pc/DSDT.ipmikcs (renamed from tests/acpi-test-data/pc/DSDT.ipmikcs)bin5203 -> 5203 bytes
-rw-r--r--tests/data/acpi/pc/DSDT.memhp (renamed from tests/acpi-test-data/pc/DSDT.memhp)bin6496 -> 6490 bytes
-rw-r--r--tests/data/acpi/pc/DSDT.numamem (renamed from tests/acpi-test-data/pc/DSDT.numamem)bin5137 -> 5137 bytes
-rw-r--r--tests/data/acpi/pc/FACP (renamed from tests/acpi-test-data/pc/FACP)bin116 -> 116 bytes
-rw-r--r--tests/data/acpi/pc/FACS (renamed from tests/acpi-test-data/pc/FACS)bin64 -> 64 bytes
-rw-r--r--tests/data/acpi/pc/HPET (renamed from tests/acpi-test-data/pc/HPET)bin56 -> 56 bytes
-rw-r--r--tests/data/acpi/pc/NFIT.dimmpxm (renamed from tests/acpi-test-data/pc/NFIT.dimmpxm)bin240 -> 240 bytes
-rw-r--r--tests/data/acpi/pc/SLIT.cphp (renamed from tests/acpi-test-data/pc/SLIT.cphp)bin48 -> 48 bytes
-rw-r--r--tests/data/acpi/pc/SLIT.memhp (renamed from tests/acpi-test-data/pc/SLIT.memhp)bin48 -> 48 bytes
-rw-r--r--tests/data/acpi/pc/SRAT.cphp (renamed from tests/acpi-test-data/pc/SRAT.cphp)bin304 -> 304 bytes
-rw-r--r--tests/data/acpi/pc/SRAT.dimmpxm (renamed from tests/acpi-test-data/pc/SRAT.dimmpxm)bin392 -> 392 bytes
-rw-r--r--tests/data/acpi/pc/SRAT.memhp (renamed from tests/acpi-test-data/pc/SRAT.memhp)bin264 -> 264 bytes
-rw-r--r--tests/data/acpi/pc/SRAT.numamem (renamed from tests/acpi-test-data/pc/SRAT.numamem)bin224 -> 224 bytes
-rw-r--r--tests/data/acpi/pc/SSDT.dimmpxm (renamed from tests/acpi-test-data/pc/SSDT.dimmpxm)bin685 -> 685 bytes
-rw-r--r--tests/data/acpi/q35/APIC (renamed from tests/acpi-test-data/q35/APIC)bin120 -> 120 bytes
-rw-r--r--tests/data/acpi/q35/APIC.cphp (renamed from tests/acpi-test-data/q35/APIC.cphp)bin160 -> 160 bytes
-rw-r--r--tests/data/acpi/q35/APIC.dimmpxm (renamed from tests/acpi-test-data/q35/APIC.dimmpxm)bin144 -> 144 bytes
-rw-r--r--tests/data/acpi/q35/DSDT (renamed from tests/acpi-test-data/q35/DSDT)bin7815 -> 7815 bytes
-rw-r--r--tests/data/acpi/q35/DSDT.bridge (renamed from tests/acpi-test-data/q35/DSDT.bridge)bin7832 -> 7832 bytes
-rw-r--r--tests/data/acpi/q35/DSDT.cphp (renamed from tests/acpi-test-data/q35/DSDT.cphp)bin8278 -> 8278 bytes
-rw-r--r--tests/data/acpi/q35/DSDT.dimmpxm (renamed from tests/acpi-test-data/q35/DSDT.dimmpxm)bin9474 -> 9468 bytes
-rw-r--r--tests/data/acpi/q35/DSDT.ipmibt (renamed from tests/acpi-test-data/q35/DSDT.ipmibt)bin7890 -> 7890 bytes
-rw-r--r--tests/data/acpi/q35/DSDT.memhp (renamed from tests/acpi-test-data/q35/DSDT.memhp)bin9180 -> 9174 bytes
-rw-r--r--tests/data/acpi/q35/DSDT.mmio64bin0 -> 8945 bytes
-rw-r--r--tests/data/acpi/q35/DSDT.numamem (renamed from tests/acpi-test-data/q35/DSDT.numamem)bin7821 -> 7821 bytes
-rw-r--r--tests/data/acpi/q35/FACP (renamed from tests/acpi-test-data/q35/FACP)bin244 -> 244 bytes
-rw-r--r--tests/data/acpi/q35/FACS (renamed from tests/acpi-test-data/q35/FACS)bin64 -> 64 bytes
-rw-r--r--tests/data/acpi/q35/HPET (renamed from tests/acpi-test-data/q35/HPET)bin56 -> 56 bytes
-rw-r--r--tests/data/acpi/q35/MCFG (renamed from tests/acpi-test-data/q35/MCFG)bin60 -> 60 bytes
-rw-r--r--tests/data/acpi/q35/NFIT.dimmpxm (renamed from tests/acpi-test-data/q35/NFIT.dimmpxm)bin240 -> 240 bytes
-rw-r--r--tests/data/acpi/q35/SLIT.cphp (renamed from tests/acpi-test-data/q35/SLIT.cphp)bin48 -> 48 bytes
-rw-r--r--tests/data/acpi/q35/SLIT.memhp (renamed from tests/acpi-test-data/q35/SLIT.memhp)bin48 -> 48 bytes
-rw-r--r--tests/data/acpi/q35/SRAT.cphp (renamed from tests/acpi-test-data/q35/SRAT.cphp)bin304 -> 304 bytes
-rw-r--r--tests/data/acpi/q35/SRAT.dimmpxm (renamed from tests/acpi-test-data/q35/SRAT.dimmpxm)bin392 -> 392 bytes
-rw-r--r--tests/data/acpi/q35/SRAT.memhp (renamed from tests/acpi-test-data/q35/SRAT.memhp)bin264 -> 264 bytes
-rw-r--r--tests/data/acpi/q35/SRAT.mmio64bin0 -> 224 bytes
-rw-r--r--tests/data/acpi/q35/SRAT.numamem (renamed from tests/acpi-test-data/q35/SRAT.numamem)bin224 -> 224 bytes
-rw-r--r--tests/data/acpi/q35/SSDT.dimmpxm (renamed from tests/acpi-test-data/q35/SSDT.dimmpxm)bin685 -> 685 bytes
-rwxr-xr-xtests/data/acpi/rebuild-expected-aml.sh (renamed from tests/acpi-test-data/rebuild-expected-aml.sh)2
-rw-r--r--tests/data/hex-loader/test.hex (renamed from tests/hex-loader-check-data/test.hex)0
-rw-r--r--tests/display-vga-test.c10
-rw-r--r--tests/docker/Makefile.include15
-rwxr-xr-xtests/docker/docker.py4
-rw-r--r--tests/docker/dockerfiles/centos7.docker1
-rw-r--r--tests/docker/dockerfiles/debian-amd64.docker5
-rwxr-xr-xtests/docker/dockerfiles/debian-bootstrap.pre4
-rw-r--r--tests/docker/dockerfiles/debian-sid.docker11
-rw-r--r--tests/docker/dockerfiles/debian.docker13
-rw-r--r--tests/docker/dockerfiles/fedora-i386-cross.docker2
-rw-r--r--tests/docker/dockerfiles/fedora.docker5
-rw-r--r--tests/docker/dockerfiles/travis.docker4
-rwxr-xr-xtests/docker/test-mingw3
-rw-r--r--tests/endianness-test.c329
-rw-r--r--tests/fp/.gitignore1
-rw-r--r--tests/fp/Makefile8
-rw-r--r--tests/fp/fp-bench.c630
-rw-r--r--tests/fp/platform.h1
-rw-r--r--tests/guest-debug/test-gdbstub.py3
-rw-r--r--tests/hexloader-test.c2
-rw-r--r--tests/ide-test.c4
-rw-r--r--tests/ivshmem-test.c90
-rw-r--r--tests/libqos/malloc.c2
-rw-r--r--tests/libqos/pci-pc.c47
-rw-r--r--tests/libqos/pci-spapr.c20
-rw-r--r--tests/libqtest.c113
-rw-r--r--tests/libqtest.h25
-rw-r--r--tests/machine-none-test.c7
-rw-r--r--tests/microbit-test.c255
-rw-r--r--tests/migration-test.c20
-rw-r--r--tests/nvme-test.c68
-rw-r--r--tests/pnv-xscom-test.c29
-rw-r--r--tests/prom-env-test.c17
-rw-r--r--tests/ptimer-test-stubs.c13
-rw-r--r--tests/pvpanic-test.c14
-rw-r--r--tests/pxe-test.c7
-rw-r--r--tests/qapi-schema/alternate-base.err1
-rw-r--r--tests/qapi-schema/alternate-invalid-dict.err1
-rw-r--r--tests/qapi-schema/alternate-invalid-dict.exit (renamed from tests/qapi-schema/enum-dict-member.exit)0
-rw-r--r--tests/qapi-schema/alternate-invalid-dict.json4
-rw-r--r--tests/qapi-schema/alternate-invalid-dict.out (renamed from tests/qapi-schema/enum-dict-member.out)0
-rw-r--r--tests/qapi-schema/comments.out14
-rw-r--r--tests/qapi-schema/doc-bad-section.out13
-rw-r--r--tests/qapi-schema/doc-good.json11
-rw-r--r--tests/qapi-schema/doc-good.out22
-rw-r--r--tests/qapi-schema/doc-good.texi7
-rw-r--r--tests/qapi-schema/double-type.err1
-rw-r--r--tests/qapi-schema/empty.out9
-rw-r--r--tests/qapi-schema/enum-bad-member.err1
-rw-r--r--tests/qapi-schema/enum-bad-member.exit1
-rw-r--r--tests/qapi-schema/enum-bad-member.json2
-rw-r--r--tests/qapi-schema/enum-bad-member.out0
-rw-r--r--tests/qapi-schema/enum-dict-member-unknown.err2
-rw-r--r--tests/qapi-schema/enum-dict-member-unknown.exit1
-rw-r--r--tests/qapi-schema/enum-dict-member-unknown.json2
-rw-r--r--tests/qapi-schema/enum-dict-member-unknown.out0
-rw-r--r--tests/qapi-schema/enum-dict-member.err1
-rw-r--r--tests/qapi-schema/enum-dict-member.json2
-rw-r--r--tests/qapi-schema/enum-if-invalid.err1
-rw-r--r--tests/qapi-schema/enum-if-invalid.exit1
-rw-r--r--tests/qapi-schema/enum-if-invalid.json3
-rw-r--r--tests/qapi-schema/enum-if-invalid.out0
-rw-r--r--tests/qapi-schema/event-case.out9
-rw-r--r--tests/qapi-schema/event-member-invalid-dict.err1
-rw-r--r--tests/qapi-schema/event-member-invalid-dict.exit1
-rw-r--r--tests/qapi-schema/event-member-invalid-dict.json2
-rw-r--r--tests/qapi-schema/event-member-invalid-dict.out0
-rw-r--r--tests/qapi-schema/event-nest-struct.json2
-rw-r--r--tests/qapi-schema/flat-union-inline-invalid-dict.err1
-rw-r--r--tests/qapi-schema/flat-union-inline-invalid-dict.exit1
-rw-r--r--tests/qapi-schema/flat-union-inline-invalid-dict.json11
-rw-r--r--tests/qapi-schema/flat-union-inline-invalid-dict.out0
-rw-r--r--tests/qapi-schema/flat-union-inline.json2
-rw-r--r--tests/qapi-schema/flat-union-invalid-if-discriminator.err1
-rw-r--r--tests/qapi-schema/flat-union-invalid-if-discriminator.exit1
-rw-r--r--tests/qapi-schema/flat-union-invalid-if-discriminator.json17
-rw-r--r--tests/qapi-schema/flat-union-invalid-if-discriminator.out0
-rw-r--r--tests/qapi-schema/ident-with-escape.out9
-rw-r--r--tests/qapi-schema/include-relpath.out14
-rw-r--r--tests/qapi-schema/include-repetition.out14
-rw-r--r--tests/qapi-schema/include-simple.out14
-rw-r--r--tests/qapi-schema/indented-expr.out9
-rw-r--r--tests/qapi-schema/nested-struct-data-invalid-dict.err1
-rw-r--r--tests/qapi-schema/nested-struct-data-invalid-dict.exit1
-rw-r--r--tests/qapi-schema/nested-struct-data-invalid-dict.json3
-rw-r--r--tests/qapi-schema/nested-struct-data-invalid-dict.out0
-rw-r--r--tests/qapi-schema/nested-struct-data.json2
-rw-r--r--tests/qapi-schema/qapi-schema-test.json39
-rw-r--r--tests/qapi-schema/qapi-schema-test.out74
-rw-r--r--tests/qapi-schema/struct-member-invalid-dict.err1
-rw-r--r--tests/qapi-schema/struct-member-invalid-dict.exit1
-rw-r--r--tests/qapi-schema/struct-member-invalid-dict.json3
-rw-r--r--tests/qapi-schema/struct-member-invalid-dict.out0
-rw-r--r--tests/qapi-schema/test-qapi.py9
-rw-r--r--tests/qapi-schema/union-branch-invalid-dict.err1
-rw-r--r--tests/qapi-schema/union-branch-invalid-dict.exit1
-rw-r--r--tests/qapi-schema/union-branch-invalid-dict.json4
-rw-r--r--tests/qapi-schema/union-branch-invalid-dict.out0
-rw-r--r--tests/qapi-schema/unknown-expr-key.err3
-rw-r--r--tests/qapi-schema/unknown-expr-key.json2
-rwxr-xr-xtests/qemu-iotests/0011
-rwxr-xr-xtests/qemu-iotests/0021
-rwxr-xr-xtests/qemu-iotests/0031
-rwxr-xr-xtests/qemu-iotests/0041
-rwxr-xr-xtests/qemu-iotests/0051
-rwxr-xr-xtests/qemu-iotests/0071
-rwxr-xr-xtests/qemu-iotests/0081
-rwxr-xr-xtests/qemu-iotests/0091
-rwxr-xr-xtests/qemu-iotests/0101
-rwxr-xr-xtests/qemu-iotests/0111
-rwxr-xr-xtests/qemu-iotests/0121
-rwxr-xr-xtests/qemu-iotests/0131
-rwxr-xr-xtests/qemu-iotests/0141
-rwxr-xr-xtests/qemu-iotests/0151
-rwxr-xr-xtests/qemu-iotests/0171
-rwxr-xr-xtests/qemu-iotests/0181
-rwxr-xr-xtests/qemu-iotests/0191
-rwxr-xr-xtests/qemu-iotests/0201
-rwxr-xr-xtests/qemu-iotests/0211
-rwxr-xr-xtests/qemu-iotests/0221
-rwxr-xr-xtests/qemu-iotests/0231
-rwxr-xr-xtests/qemu-iotests/0241
-rwxr-xr-xtests/qemu-iotests/0251
-rwxr-xr-xtests/qemu-iotests/0261
-rwxr-xr-xtests/qemu-iotests/0271
-rwxr-xr-xtests/qemu-iotests/0281
-rwxr-xr-xtests/qemu-iotests/0291
-rwxr-xr-xtests/qemu-iotests/0302
-rwxr-xr-xtests/qemu-iotests/0311
-rwxr-xr-xtests/qemu-iotests/0321
-rwxr-xr-xtests/qemu-iotests/0331
-rwxr-xr-xtests/qemu-iotests/0341
-rwxr-xr-xtests/qemu-iotests/0353
-rwxr-xr-xtests/qemu-iotests/0361
-rwxr-xr-xtests/qemu-iotests/0373
-rwxr-xr-xtests/qemu-iotests/0387
-rwxr-xr-xtests/qemu-iotests/0391
-rwxr-xr-xtests/qemu-iotests/0404
-rwxr-xr-xtests/qemu-iotests/04110
-rwxr-xr-xtests/qemu-iotests/0421
-rwxr-xr-xtests/qemu-iotests/0431
-rwxr-xr-xtests/qemu-iotests/04424
-rwxr-xr-xtests/qemu-iotests/0452
-rwxr-xr-xtests/qemu-iotests/0467
-rwxr-xr-xtests/qemu-iotests/0473
-rwxr-xr-xtests/qemu-iotests/0495
-rw-r--r--tests/qemu-iotests/049.out12
-rwxr-xr-xtests/qemu-iotests/0501
-rwxr-xr-xtests/qemu-iotests/0515
-rwxr-xr-xtests/qemu-iotests/0521
-rwxr-xr-xtests/qemu-iotests/0531
-rwxr-xr-xtests/qemu-iotests/0541
-rwxr-xr-xtests/qemu-iotests/0562
-rwxr-xr-xtests/qemu-iotests/05848
-rwxr-xr-xtests/qemu-iotests/0591
-rwxr-xr-xtests/qemu-iotests/0601
-rw-r--r--tests/qemu-iotests/060.out4
-rwxr-xr-xtests/qemu-iotests/0611
-rwxr-xr-xtests/qemu-iotests/0621
-rwxr-xr-xtests/qemu-iotests/0631
-rwxr-xr-xtests/qemu-iotests/0641
-rwxr-xr-xtests/qemu-iotests/0654
-rwxr-xr-xtests/qemu-iotests/0661
-rwxr-xr-xtests/qemu-iotests/0675
-rwxr-xr-xtests/qemu-iotests/0681
-rwxr-xr-xtests/qemu-iotests/0691
-rwxr-xr-xtests/qemu-iotests/0701
-rwxr-xr-xtests/qemu-iotests/0715
-rw-r--r--tests/qemu-iotests/071.out4
-rwxr-xr-xtests/qemu-iotests/0721
-rwxr-xr-xtests/qemu-iotests/0731
-rwxr-xr-xtests/qemu-iotests/0751
-rwxr-xr-xtests/qemu-iotests/0761
-rwxr-xr-xtests/qemu-iotests/0775
-rwxr-xr-xtests/qemu-iotests/0781
-rwxr-xr-xtests/qemu-iotests/0791
-rwxr-xr-xtests/qemu-iotests/0801
-rwxr-xr-xtests/qemu-iotests/081121
-rw-r--r--tests/qemu-iotests/081.out72
-rwxr-xr-xtests/qemu-iotests/0823
-rw-r--r--tests/qemu-iotests/082.out956
-rwxr-xr-xtests/qemu-iotests/0833
-rw-r--r--tests/qemu-iotests/083.out19
-rwxr-xr-xtests/qemu-iotests/0841
-rwxr-xr-xtests/qemu-iotests/08511
-rwxr-xr-xtests/qemu-iotests/0863
-rwxr-xr-xtests/qemu-iotests/0877
-rw-r--r--tests/qemu-iotests/087.out12
-rwxr-xr-xtests/qemu-iotests/0881
-rwxr-xr-xtests/qemu-iotests/0891
-rwxr-xr-xtests/qemu-iotests/0901
-rwxr-xr-xtests/qemu-iotests/0911
-rwxr-xr-xtests/qemu-iotests/0921
-rwxr-xr-xtests/qemu-iotests/09318
-rwxr-xr-xtests/qemu-iotests/0941
-rw-r--r--tests/qemu-iotests/094.out2
-rwxr-xr-xtests/qemu-iotests/0951
-rwxr-xr-xtests/qemu-iotests/0971
-rwxr-xr-xtests/qemu-iotests/0981
-rwxr-xr-xtests/qemu-iotests/0997
-rwxr-xr-xtests/qemu-iotests/1011
-rwxr-xr-xtests/qemu-iotests/1021
-rwxr-xr-xtests/qemu-iotests/1031
-rwxr-xr-xtests/qemu-iotests/1041
-rwxr-xr-xtests/qemu-iotests/1051
-rwxr-xr-xtests/qemu-iotests/1061
-rwxr-xr-xtests/qemu-iotests/1071
-rwxr-xr-xtests/qemu-iotests/1081
-rwxr-xr-xtests/qemu-iotests/1093
-rw-r--r--tests/qemu-iotests/109.out44
-rwxr-xr-xtests/qemu-iotests/1101
-rwxr-xr-xtests/qemu-iotests/1111
-rwxr-xr-xtests/qemu-iotests/1123
-rwxr-xr-xtests/qemu-iotests/1131
-rwxr-xr-xtests/qemu-iotests/1141
-rwxr-xr-xtests/qemu-iotests/1151
-rwxr-xr-xtests/qemu-iotests/1161
-rwxr-xr-xtests/qemu-iotests/1171
-rw-r--r--tests/qemu-iotests/117.out2
-rwxr-xr-xtests/qemu-iotests/11820
-rwxr-xr-xtests/qemu-iotests/1191
-rw-r--r--tests/qemu-iotests/119.out2
-rwxr-xr-xtests/qemu-iotests/1201
-rw-r--r--tests/qemu-iotests/120.out2
-rwxr-xr-xtests/qemu-iotests/1211
-rwxr-xr-xtests/qemu-iotests/1221
-rwxr-xr-xtests/qemu-iotests/1231
-rwxr-xr-xtests/qemu-iotests/1244
-rwxr-xr-xtests/qemu-iotests/1251
-rwxr-xr-xtests/qemu-iotests/1261
-rwxr-xr-xtests/qemu-iotests/1271
-rw-r--r--tests/qemu-iotests/127.out2
-rwxr-xr-xtests/qemu-iotests/1281
-rwxr-xr-xtests/qemu-iotests/1301
-rwxr-xr-xtests/qemu-iotests/1311
-rwxr-xr-xtests/qemu-iotests/13319
-rw-r--r--tests/qemu-iotests/133.out15
-rwxr-xr-xtests/qemu-iotests/1341
-rwxr-xr-xtests/qemu-iotests/1351
-rwxr-xr-xtests/qemu-iotests/1362
-rwxr-xr-xtests/qemu-iotests/1371
-rwxr-xr-xtests/qemu-iotests/1381
-rwxr-xr-xtests/qemu-iotests/1392
-rwxr-xr-xtests/qemu-iotests/1401
-rw-r--r--tests/qemu-iotests/140.out2
-rwxr-xr-xtests/qemu-iotests/1411
-rwxr-xr-xtests/qemu-iotests/1429
-rwxr-xr-xtests/qemu-iotests/1431
-rw-r--r--tests/qemu-iotests/143.out2
-rwxr-xr-xtests/qemu-iotests/1441
-rwxr-xr-xtests/qemu-iotests/1451
-rwxr-xr-xtests/qemu-iotests/1461
-rwxr-xr-xtests/qemu-iotests/1472
-rwxr-xr-xtests/qemu-iotests/14914
-rwxr-xr-xtests/qemu-iotests/1501
-rwxr-xr-xtests/qemu-iotests/15112
-rwxr-xr-xtests/qemu-iotests/1535
-rwxr-xr-xtests/qemu-iotests/1541
-rwxr-xr-xtests/qemu-iotests/1561
-rw-r--r--tests/qemu-iotests/156.out2
-rwxr-xr-xtests/qemu-iotests/1575
-rwxr-xr-xtests/qemu-iotests/1581
-rwxr-xr-xtests/qemu-iotests/1591
-rwxr-xr-xtests/qemu-iotests/1601
-rwxr-xr-xtests/qemu-iotests/161137
-rw-r--r--tests/qemu-iotests/161.out39
-rwxr-xr-xtests/qemu-iotests/1621
-rwxr-xr-xtests/qemu-iotests/16313
-rwxr-xr-xtests/qemu-iotests/16971
-rw-r--r--tests/qemu-iotests/169.out4
-rwxr-xr-xtests/qemu-iotests/1701
-rwxr-xr-xtests/qemu-iotests/1711
-rwxr-xr-xtests/qemu-iotests/1727
-rwxr-xr-xtests/qemu-iotests/1731
-rwxr-xr-xtests/qemu-iotests/1741
-rwxr-xr-xtests/qemu-iotests/1751
-rwxr-xr-xtests/qemu-iotests/1763
-rw-r--r--tests/qemu-iotests/176.out16
-rwxr-xr-xtests/qemu-iotests/1773
-rwxr-xr-xtests/qemu-iotests/1781
-rwxr-xr-xtests/qemu-iotests/1791
-rwxr-xr-xtests/qemu-iotests/1811
-rwxr-xr-xtests/qemu-iotests/18272
-rw-r--r--tests/qemu-iotests/182.out9
-rwxr-xr-xtests/qemu-iotests/1831
-rw-r--r--tests/qemu-iotests/183.out4
-rwxr-xr-xtests/qemu-iotests/1845
-rw-r--r--tests/qemu-iotests/184.out12
-rwxr-xr-xtests/qemu-iotests/1851
-rw-r--r--tests/qemu-iotests/185.out10
-rwxr-xr-xtests/qemu-iotests/1865
-rwxr-xr-xtests/qemu-iotests/1871
-rwxr-xr-xtests/qemu-iotests/1881
-rwxr-xr-xtests/qemu-iotests/1891
-rwxr-xr-xtests/qemu-iotests/1901
-rwxr-xr-xtests/qemu-iotests/1911
-rw-r--r--tests/qemu-iotests/191.out6
-rwxr-xr-xtests/qemu-iotests/1921
-rw-r--r--tests/qemu-iotests/194.out22
-rwxr-xr-xtests/qemu-iotests/1955
-rw-r--r--tests/qemu-iotests/195.out6
-rwxr-xr-xtests/qemu-iotests/1971
-rwxr-xr-xtests/qemu-iotests/1981
-rwxr-xr-xtests/qemu-iotests/2001
-rw-r--r--tests/qemu-iotests/202.out12
-rw-r--r--tests/qemu-iotests/203.out14
-rwxr-xr-xtests/qemu-iotests/2043
-rwxr-xr-xtests/qemu-iotests/2068
-rw-r--r--tests/qemu-iotests/206.out218
-rwxr-xr-xtests/qemu-iotests/2076
-rw-r--r--tests/qemu-iotests/207.out72
-rw-r--r--tests/qemu-iotests/208.out8
-rw-r--r--tests/qemu-iotests/210.out94
-rw-r--r--tests/qemu-iotests/211.out102
-rw-r--r--tests/qemu-iotests/212.out174
-rw-r--r--tests/qemu-iotests/213.out182
-rwxr-xr-xtests/qemu-iotests/2141
-rwxr-xr-xtests/qemu-iotests/2151
-rw-r--r--tests/qemu-iotests/216.out4
-rwxr-xr-x[-rw-r--r--]tests/qemu-iotests/2180
-rw-r--r--tests/qemu-iotests/218.out20
-rw-r--r--tests/qemu-iotests/219.out526
-rwxr-xr-xtests/qemu-iotests/22096
-rw-r--r--tests/qemu-iotests/220.out54
-rwxr-xr-xtests/qemu-iotests/2211
-rw-r--r--tests/qemu-iotests/222.out24
-rwxr-xr-xtests/qemu-iotests/22392
-rw-r--r--tests/qemu-iotests/223.out71
-rwxr-xr-xtests/qemu-iotests/2251
-rwxr-xr-xtests/qemu-iotests/2261
-rwxr-xr-xtests/qemu-iotests/2275
-rw-r--r--tests/qemu-iotests/227.out12
-rwxr-xr-xtests/qemu-iotests/2292
-rwxr-xr-xtests/qemu-iotests/2311
-rwxr-xr-xtests/qemu-iotests/232146
-rw-r--r--tests/qemu-iotests/232.out59
-rwxr-xr-xtests/qemu-iotests/233127
-rw-r--r--tests/qemu-iotests/233.out57
-rwxr-xr-xtests/qemu-iotests/234121
-rw-r--r--tests/qemu-iotests/234.out30
-rwxr-xr-xtests/qemu-iotests/23578
-rw-r--r--tests/qemu-iotests/235.out3
-rwxr-xr-xtests/qemu-iotests/236161
-rw-r--r--tests/qemu-iotests/236.out351
-rwxr-xr-xtests/qemu-iotests/check62
-rw-r--r--tests/qemu-iotests/common.config6
-rw-r--r--tests/qemu-iotests/common.nbd109
-rw-r--r--tests/qemu-iotests/common.pattern16
-rw-r--r--tests/qemu-iotests/common.qemu10
-rw-r--r--tests/qemu-iotests/common.rc6
-rw-r--r--tests/qemu-iotests/common.tls140
-rw-r--r--tests/qemu-iotests/group7
-rw-r--r--tests/qemu-iotests/iotests.py93
-rwxr-xr-xtests/qemu-iotests/nbd-fault-injector.py12
-rwxr-xr-xtests/qemu-iotests/qcow2.py10
-rwxr-xr-xtests/qemu-iotests/qed.py6
-rw-r--r--tests/qht-bench.c11
-rw-r--r--tests/qmp-test.c20
-rw-r--r--tests/requirements.txt4
-rw-r--r--tests/tcg/Makefile.include2
-rw-r--r--tests/tcg/Makefile.probe2
-rw-r--r--tests/tcg/README2
-rw-r--r--tests/tcg/alpha/test-cond.c4
-rw-r--r--tests/tcg/arm/hello-arm.c20
-rw-r--r--tests/tcg/cris/check_glibc_kernelversion.c8
-rw-r--r--tests/tcg/cris/check_mmap3.c2
-rw-r--r--tests/tcg/cris/check_openpf1.c2
-rw-r--r--tests/tcg/cris/check_settls1.c2
-rw-r--r--tests/tcg/i386/hello-i386.c14
-rw-r--r--tests/tcg/i386/test-i386.c2
-rw-r--r--tests/tcg/mips/hello-mips.c10
-rw-r--r--tests/tcg/mips/mips64-dsp/subq_s_pw.c2
-rw-r--r--tests/tcg/mips/mipsr5900/Makefile32
-rw-r--r--tests/tcg/mips/mipsr5900/div1.c73
-rw-r--r--tests/tcg/mips/mipsr5900/divu1.c48
-rw-r--r--tests/tcg/mips/mipsr5900/madd.c78
-rw-r--r--tests/tcg/mips/mipsr5900/maddu.c70
-rw-r--r--tests/tcg/mips/mipsr5900/mflohi1.c35
-rw-r--r--tests/tcg/mips/mipsr5900/mtlohi1.c40
-rw-r--r--tests/tcg/mips/mipsr5900/mult.c76
-rw-r--r--tests/tcg/mips/mipsr5900/multu.c68
-rw-r--r--tests/tcg/multiarch/linux-test.c4
-rw-r--r--tests/tcg/multiarch/sha1.c12
-rw-r--r--tests/test-arm-mptimer.c153
-rw-r--r--tests/test-char.c125
-rw-r--r--tests/test-crypto-block.c5
-rw-r--r--tests/test-crypto-pbkdf.c3
-rw-r--r--tests/test-crypto-tlscredsx509.c8
-rw-r--r--tests/test-crypto-xts.c226
-rw-r--r--tests/test-cutils.c24
-rw-r--r--tests/test-filter-mirror.c9
-rw-r--r--tests/test-filter-redirector.c16
-rw-r--r--tests/test-hbitmap.c177
-rw-r--r--tests/test-image-locking.c157
-rw-r--r--tests/test-qdev-global-props.c79
-rw-r--r--tests/test-qmp-cmds.c16
-rw-r--r--tests/test-rcu-list.c2
-rw-r--r--tests/test-string-input-visitor.c223
-rw-r--r--tests/test-vmstate.c8
-rw-r--r--tests/tpm-tests.c33
-rw-r--r--tests/tpm-util.c52
-rw-r--r--tests/tpm-util.h3
-rw-r--r--tests/vhost-user-bridge.c4
-rw-r--r--tests/vhost-user-test.c6
-rw-r--r--tests/virtio-net-test.c64
-rwxr-xr-xtests/vm/basevm.py30
-rwxr-xr-xtests/vm/centos1
-rwxr-xr-xtests/vm/freebsd1
-rwxr-xr-xtests/vm/netbsd1
-rwxr-xr-xtests/vm/openbsd1
-rwxr-xr-xtests/vm/ubuntu.i3861
-rw-r--r--tests/vmgenid-test.c101
-rw-r--r--tpm.c22
-rw-r--r--trace/simple.c4
-rw-r--r--ui/cocoa.m3
-rw-r--r--ui/console.c40
-rw-r--r--ui/curses.c6
-rw-r--r--ui/egl-headless.c12
-rw-r--r--ui/egl-helpers.c4
-rw-r--r--ui/gtk-egl.c20
-rw-r--r--ui/gtk.c18
-rw-r--r--ui/icons/Makefile13
-rw-r--r--ui/icons/qemu.svg (renamed from pc-bios/qemu_logo_no_text.svg)0
-rw-r--r--ui/icons/qemu_128x128.pngbin0 -> 8286 bytes
-rw-r--r--ui/icons/qemu_16x16.pngbin0 -> 765 bytes
-rw-r--r--ui/icons/qemu_24x24.pngbin0 -> 1201 bytes
-rw-r--r--ui/icons/qemu_256x256.pngbin0 -> 17572 bytes
-rw-r--r--ui/icons/qemu_32x32.bmpbin0 -> 4234 bytes
-rw-r--r--ui/icons/qemu_32x32.pngbin0 -> 1696 bytes
-rw-r--r--ui/icons/qemu_48x48.pngbin0 -> 2694 bytes
-rw-r--r--ui/icons/qemu_512x512.pngbin0 -> 38007 bytes
-rw-r--r--ui/icons/qemu_64x64.pngbin0 -> 3807 bytes
-rw-r--r--ui/input.c91
-rw-r--r--ui/keymaps.c39
-rw-r--r--ui/keymaps.h6
-rw-r--r--ui/qemu-pixman.c2
-rw-r--r--ui/qemu.desktop8
-rw-r--r--ui/sdl.c6
-rw-r--r--ui/sdl2.c25
-rw-r--r--ui/spice-core.c22
-rw-r--r--ui/spice-display.c26
-rw-r--r--ui/vnc-enc-zywrle-template.c4
-rw-r--r--ui/vnc.c48
-rw-r--r--util/aio-posix.c92
-rw-r--r--util/aio-win32.c67
-rw-r--r--util/bitops.c4
-rw-r--r--util/cutils.c91
-rw-r--r--util/error.c13
-rw-r--r--util/hbitmap.c90
-rw-r--r--util/osdep.c4
-rw-r--r--util/oslib-posix.c23
-rw-r--r--util/qemu-error.c5
-rw-r--r--util/qemu-option.c36
-rw-r--r--util/qemu-sockets.c4
-rw-r--r--util/qemu-thread-common.h1
-rw-r--r--util/qemu-thread-posix.c55
-rw-r--r--util/qemu-thread-win32.c4
-rw-r--r--util/qemu-timer.c65
-rw-r--r--util/qsp.c14
-rw-r--r--util/vfio-helpers.c4
-rw-r--r--vl.c374
1653 files changed, 90027 insertions, 27101 deletions
diff --git a/.editorconfig b/.editorconfig
index b2022e391a..1582883393 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,4 +1,10 @@
-# http://editorconfig.org
+# EditorConfig is a file format and collection of text editor plugins
+# for maintaining consistent coding styles between different editors
+# and IDEs. Most popular editors support this either natively or via
+# plugin.
+#
+# Check https://editorconfig.org for details.
+
root = true
[*]
@@ -6,10 +12,23 @@ end_of_line = lf
insert_final_newline = true
charset = utf-8
+[*.mak]
+indent_style = tab
+indent_size = 8
+file_type_emacs = makefile
+
[Makefile*]
indent_style = tab
indent_size = 8
+file_type_emacs = makefile
[*.{c,h}]
indent_style = space
indent_size = 4
+
+[*.{vert,frag}]
+file_type_emacs = glsl
+
+[*.json]
+indent_style = space
+file_type_emacs = python
diff --git a/.gitignore b/.gitignore
index 64efdfd929..0430257313 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,78 +30,14 @@
/qapi-gen-timestamp
/qapi/qapi-builtin-types.[ch]
/qapi/qapi-builtin-visit.[ch]
-/qapi/qapi-commands-block-core.[ch]
-/qapi/qapi-commands-block.[ch]
-/qapi/qapi-commands-char.[ch]
-/qapi/qapi-commands-common.[ch]
-/qapi/qapi-commands-crypto.[ch]
-/qapi/qapi-commands-introspect.[ch]
-/qapi/qapi-commands-job.[ch]
-/qapi/qapi-commands-migration.[ch]
-/qapi/qapi-commands-misc.[ch]
-/qapi/qapi-commands-net.[ch]
-/qapi/qapi-commands-rocker.[ch]
-/qapi/qapi-commands-run-state.[ch]
-/qapi/qapi-commands-sockets.[ch]
-/qapi/qapi-commands-tpm.[ch]
-/qapi/qapi-commands-trace.[ch]
-/qapi/qapi-commands-transaction.[ch]
-/qapi/qapi-commands-ui.[ch]
+/qapi/qapi-commands-*.[ch]
/qapi/qapi-commands.[ch]
-/qapi/qapi-events-block-core.[ch]
-/qapi/qapi-events-block.[ch]
-/qapi/qapi-events-char.[ch]
-/qapi/qapi-events-common.[ch]
-/qapi/qapi-events-crypto.[ch]
-/qapi/qapi-events-introspect.[ch]
-/qapi/qapi-events-job.[ch]
-/qapi/qapi-events-migration.[ch]
-/qapi/qapi-events-misc.[ch]
-/qapi/qapi-events-net.[ch]
-/qapi/qapi-events-rocker.[ch]
-/qapi/qapi-events-run-state.[ch]
-/qapi/qapi-events-sockets.[ch]
-/qapi/qapi-events-tpm.[ch]
-/qapi/qapi-events-trace.[ch]
-/qapi/qapi-events-transaction.[ch]
-/qapi/qapi-events-ui.[ch]
+/qapi/qapi-events-*.[ch]
/qapi/qapi-events.[ch]
/qapi/qapi-introspect.[ch]
-/qapi/qapi-types-block-core.[ch]
-/qapi/qapi-types-block.[ch]
-/qapi/qapi-types-char.[ch]
-/qapi/qapi-types-common.[ch]
-/qapi/qapi-types-crypto.[ch]
-/qapi/qapi-types-introspect.[ch]
-/qapi/qapi-types-job.[ch]
-/qapi/qapi-types-migration.[ch]
-/qapi/qapi-types-misc.[ch]
-/qapi/qapi-types-net.[ch]
-/qapi/qapi-types-rocker.[ch]
-/qapi/qapi-types-run-state.[ch]
-/qapi/qapi-types-sockets.[ch]
-/qapi/qapi-types-tpm.[ch]
-/qapi/qapi-types-trace.[ch]
-/qapi/qapi-types-transaction.[ch]
-/qapi/qapi-types-ui.[ch]
+/qapi/qapi-types-*.[ch]
/qapi/qapi-types.[ch]
-/qapi/qapi-visit-block-core.[ch]
-/qapi/qapi-visit-block.[ch]
-/qapi/qapi-visit-char.[ch]
-/qapi/qapi-visit-common.[ch]
-/qapi/qapi-visit-crypto.[ch]
-/qapi/qapi-visit-introspect.[ch]
-/qapi/qapi-visit-job.[ch]
-/qapi/qapi-visit-migration.[ch]
-/qapi/qapi-visit-misc.[ch]
-/qapi/qapi-visit-net.[ch]
-/qapi/qapi-visit-rocker.[ch]
-/qapi/qapi-visit-run-state.[ch]
-/qapi/qapi-visit-sockets.[ch]
-/qapi/qapi-visit-tpm.[ch]
-/qapi/qapi-visit-trace.[ch]
-/qapi/qapi-visit-transaction.[ch]
-/qapi/qapi-visit-ui.[ch]
+/qapi/qapi-visit-*.[ch]
/qapi/qapi-visit.[ch]
/qapi/qapi-doc.texi
/qemu-doc.html
diff --git a/.gitmodules b/.gitmodules
index a48d2a764c..6b91176098 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,51 +1,51 @@
[submodule "roms/seabios"]
path = roms/seabios
- url = git://git.qemu-project.org/seabios.git/
+ url = https://git.qemu.org/git/seabios.git/
[submodule "roms/SLOF"]
path = roms/SLOF
- url = git://git.qemu-project.org/SLOF.git
+ url = https://git.qemu.org/git/SLOF.git
[submodule "roms/ipxe"]
path = roms/ipxe
- url = git://git.qemu-project.org/ipxe.git
+ url = https://git.qemu.org/git/ipxe.git
[submodule "roms/openbios"]
path = roms/openbios
- url = git://git.qemu-project.org/openbios.git
+ url = https://git.qemu.org/git/openbios.git
[submodule "roms/openhackware"]
path = roms/openhackware
- url = git://git.qemu-project.org/openhackware.git
+ url = https://git.qemu.org/git/openhackware.git
[submodule "roms/qemu-palcode"]
path = roms/qemu-palcode
- url = git://git.qemu.org/qemu-palcode.git
+ url = https://git.qemu.org/git/qemu-palcode.git
[submodule "roms/sgabios"]
path = roms/sgabios
- url = git://git.qemu-project.org/sgabios.git
+ url = https://git.qemu.org/git/sgabios.git
[submodule "dtc"]
path = dtc
- url = git://git.qemu-project.org/dtc.git
+ url = https://git.qemu.org/git/dtc.git
[submodule "roms/u-boot"]
path = roms/u-boot
- url = git://git.qemu-project.org/u-boot.git
+ url = https://git.qemu.org/git/u-boot.git
[submodule "roms/skiboot"]
path = roms/skiboot
- url = git://git.qemu.org/skiboot.git
+ url = https://git.qemu.org/git/skiboot.git
[submodule "roms/QemuMacDrivers"]
path = roms/QemuMacDrivers
- url = git://git.qemu.org/QemuMacDrivers.git
+ url = https://git.qemu.org/git/QemuMacDrivers.git
[submodule "ui/keycodemapdb"]
path = ui/keycodemapdb
- url = git://git.qemu.org/keycodemapdb.git
+ url = https://git.qemu.org/git/keycodemapdb.git
[submodule "capstone"]
path = capstone
- url = git://git.qemu.org/capstone.git
+ url = https://git.qemu.org/git/capstone.git
[submodule "roms/seabios-hppa"]
path = roms/seabios-hppa
- url = git://github.com/hdeller/seabios-hppa.git
+ url = https://github.com/hdeller/seabios-hppa.git
[submodule "roms/u-boot-sam460ex"]
path = roms/u-boot-sam460ex
- url = git://git.qemu.org/u-boot-sam460ex.git
+ url = https://git.qemu.org/git/u-boot-sam460ex.git
[submodule "tests/fp/berkeley-testfloat-3"]
path = tests/fp/berkeley-testfloat-3
- url = git://github.com/cota/berkeley-testfloat-3
+ url = https://github.com/cota/berkeley-testfloat-3
[submodule "tests/fp/berkeley-softfloat-3"]
path = tests/fp/berkeley-softfloat-3
- url = git://github.com/cota/berkeley-softfloat-3
+ url = https://github.com/cota/berkeley-softfloat-3
diff --git a/.mailmap b/.mailmap
index 6f2ff22a45..b8e08297c9 100644
--- a/.mailmap
+++ b/.mailmap
@@ -12,6 +12,7 @@ Fabrice Bellard <fabrice@bellard.org> bellard <bellard@c046a42c-6fe2-441c-8c8c-7
James Hogan <jhogan@kernel.org> <james.hogan@imgtec.com>
Jocelyn Mayer <l_indien@magic.fr> j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>
Paul Brook <paul@codesourcery.com> pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
+Yongbok Kim <yongbok.kim@mips.com> <yongbok.kim@imgtec.com>
Aleksandar Markovic <amarkovic@wavecomp.com> <aleksandar.markovic@mips.com>
Aleksandar Markovic <amarkovic@wavecomp.com> <aleksandar.markovic@imgtec.com>
Paul Burton <pburton@wavecomp.com> <paul.burton@mips.com>
@@ -33,6 +34,6 @@ Justin Terry (VM) <juterry@microsoft.com> Justin Terry (VM) via Qemu-devel <qemu
# Also list preferred name forms where people have changed their
-# git author config, or having utf8/latin1 encoding issues.
+# git author config, or had utf8/latin1 encoding issues.
Daniel P. Berrangé <berrange@redhat.com>
Reimar Döffinger <Reimar.Doeffinger@gmx.de>
diff --git a/.shippable.yml b/.shippable.yml
index f74a3de3ff..f2ffef21d1 100644
--- a/.shippable.yml
+++ b/.shippable.yml
@@ -7,10 +7,11 @@ env:
matrix:
- IMAGE=debian-amd64
TARGET_LIST=x86_64-softmmu,x86_64-linux-user
- - IMAGE=debian-win32-cross
- TARGET_LIST=arm-softmmu,i386-softmmu,lm32-softmmu
- - IMAGE=debian-win64-cross
- TARGET_LIST=aarch64-softmmu,sparc64-softmmu,x86_64-softmmu
+ # currently disabled as the mxe.cc repos are down
+ # - IMAGE=debian-win32-cross
+ # TARGET_LIST=arm-softmmu,i386-softmmu,lm32-softmmu
+ # - IMAGE=debian-win64-cross
+ # TARGET_LIST=aarch64-softmmu,sparc64-softmmu,x86_64-softmmu
- IMAGE=debian-armel-cross
TARGET_LIST=arm-softmmu,arm-linux-user,armeb-linux-user
- IMAGE=debian-armhf-cross
diff --git a/.travis.yml b/.travis.yml
index 95be6ec59f..87d9fa971c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,14 +1,13 @@
-# The current Travis default is a container based 14.04 Trust on EC2
+# The current Travis default is a VM based 16.04 Xenial on GCE
# Additional builds with specific requirements for a full VM need to
# be added as additional matrix: entries later on
-sudo: false
-dist: trusty
+dist: xenial
language: c
-python:
- - "2.6"
compiler:
- gcc
cache: ccache
+
+
addons:
apt:
packages:
@@ -35,10 +34,17 @@ addons:
- libssh2-1-dev
- liburcu-dev
- libusb-1.0-0-dev
- - libvte-2.90-dev
+ - libvte-2.91-dev
- sparse
- uuid-dev
- gcovr
+ homebrew:
+ packages:
+ - libffi
+ - gettext
+ - glib
+ - pixman
+
# The channel name "irc.oftc.net#qemu" is encrypted against qemu/qemu
# to prevent IRC notifications from forks. This was created using:
@@ -49,74 +55,147 @@ notifications:
- secure: "F7GDRgjuOo5IUyRLqSkmDL7kvdU4UcH3Lm/W2db2JnDHTGCqgEdaYEYKciyCLZ57vOTsTsOgesN8iUT7hNHBd1KWKjZe9KDTZWppWRYVwAwQMzVeSOsbbU4tRoJ6Pp+3qhH1Z0eGYR9ZgKYAoTumDFgSAYRp4IscKS8jkoedOqM="
on_success: change
on_failure: always
+
+
env:
global:
- SRC_DIR="."
- BUILD_DIR="."
- - TEST_CMD="make check"
- - MAKEFLAGS="-j3"
- matrix:
- - CONFIG="--disable-system"
- - CONFIG="--disable-user"
- - CONFIG="--enable-debug --enable-debug-tcg"
- - CONFIG="--disable-linux-aio --disable-cap-ng --disable-attr --disable-brlapi --disable-uuid --disable-libusb --disable-user"
- - CONFIG="--enable-modules --disable-linux-user"
- - CONFIG="--with-coroutine=ucontext --disable-linux-user"
- - CONFIG="--with-coroutine=sigaltstack --disable-linux-user"
+ - TEST_CMD="make check -j3 V=1"
+
+
git:
# we want to do this ourselves
submodules: false
-before_install:
- - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update ; fi
- - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install libffi gettext glib pixman ; fi
- - git submodule update --init --recursive capstone dtc ui/keycodemapdb
+
+
before_script:
- mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR}
- ${SRC_DIR}/configure ${CONFIG} || { cat config.log && exit 1; }
script:
- - make ${MAKEFLAGS} && ${TEST_CMD}
+ - make -j3 && ${TEST_CMD}
+
+
matrix:
include:
+ - env:
+ - CONFIG="--disable-system"
+
+
+ - env:
+ - CONFIG="--disable-user"
+
+
+ - env:
+ - CONFIG="--enable-debug --enable-debug-tcg"
+
+
+ - env:
+ - CONFIG="--disable-linux-aio --disable-cap-ng --disable-attr --disable-brlapi --disable-uuid --disable-libusb --disable-user"
+
+
+ - env:
+ - CONFIG="--enable-modules --disable-linux-user"
+
+
+ - env:
+ - CONFIG="--with-coroutine=ucontext --disable-linux-user"
+
+
+ - env:
+ - CONFIG="--with-coroutine=sigaltstack --disable-linux-user"
+
+
# Test out-of-tree builds
- - env: CONFIG="--enable-debug --enable-debug-tcg"
- BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.."
+ - env:
+ - CONFIG="--enable-debug --enable-debug-tcg"
+ - BUILD_DIR="out-of-tree/build/dir" SRC_DIR="../../.."
+
+
# Test with Clang for compile portability (Travis uses clang-5.0)
- - env: CONFIG="--disable-system"
+ - env:
+ - CONFIG="--disable-system"
compiler: clang
- - env: CONFIG="--disable-user"
+
+
+ - env:
+ - CONFIG="--disable-user"
compiler: clang
+
+
# gprof/gcov are GCC features
- - env: CONFIG="--enable-gprof --enable-gcov --disable-pie --target-list=aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
+ - env:
+ - CONFIG="--enable-gprof --enable-gcov --disable-pie --target-list=aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
after_success:
- ${SRC_DIR}/scripts/travis/coverage-summary.sh
- compiler: gcc
+
+
# We manually include builds which we disable "make check" for
- - env: CONFIG="--enable-debug --enable-tcg-interpreter"
- TEST_CMD=""
- compiler: gcc
+ - env:
+ - CONFIG="--enable-debug --enable-tcg-interpreter"
+ - TEST_CMD=""
+
+
# We don't need to exercise every backend with every front-end
- - env: CONFIG="--enable-trace-backends=log,simple,syslog --disable-system"
- TEST_CMD=""
- compiler: gcc
- - env: CONFIG="--enable-trace-backends=ftrace --target-list=x86_64-softmmu"
- TEST_CMD=""
- compiler: gcc
- - env: CONFIG="--enable-trace-backends=ust --target-list=x86_64-softmmu"
- TEST_CMD=""
- compiler: gcc
- - env: CONFIG="--disable-tcg"
- TEST_CMD=""
- compiler: gcc
- - env: CONFIG=""
+ - env:
+ - CONFIG="--enable-trace-backends=log,simple,syslog --disable-system"
+ - TEST_CMD=""
+
+
+ - env:
+ - CONFIG="--enable-trace-backends=ftrace --target-list=x86_64-softmmu"
+ - TEST_CMD=""
+
+
+ - env:
+ - CONFIG="--enable-trace-backends=ust --target-list=x86_64-softmmu"
+ - TEST_CMD=""
+
+
+ - env:
+ - CONFIG="--disable-tcg"
+ - TEST_CMD=""
+
+
+ # MacOSX builds
+ - env:
+ - CONFIG="--target-list=aarch64-softmmu,arm-softmmu,i386-softmmu,mips-softmmu,mips64-softmmu,ppc64-softmmu,riscv64-softmmu,s390x-softmmu,x86_64-softmmu"
os: osx
+ osx_image: xcode9.4
compiler: clang
+
+
+ - env:
+ - CONFIG="--target-list=i386-softmmu,ppc-softmmu,ppc64-softmmu,m68k-softmmu,x86_64-softmmu"
+ os: osx
+ osx_image: xcode10
+ compiler: clang
+
+
# Python builds
- - env: CONFIG="--target-list=x86_64-softmmu"
+ - env:
+ - CONFIG="--target-list=x86_64-softmmu"
+ language: python
python:
- - "3.0"
- - env: CONFIG="--target-list=x86_64-softmmu"
+ - "3.4"
+
+
+ - env:
+ - CONFIG="--target-list=x86_64-softmmu"
+ language: python
python:
- "3.6"
+
+
+ # Acceptance (Functional) tests
+ - env:
+ - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu"
+ - TEST_CMD="make AVOCADO_SHOW=app check-acceptance"
+ addons:
+ apt:
+ packages:
+ - python3-pip
+ - python3.5-venv
# Using newer GCC with sanitizers
- addons:
apt:
@@ -150,7 +229,7 @@ matrix:
- libssh2-1-dev
- liburcu-dev
- libusb-1.0-0-dev
- - libvte-2.90-dev
+ - libvte-2.91-dev
- sparse
- uuid-dev
language: generic
@@ -161,11 +240,8 @@ matrix:
- TEST_CMD=""
before_script:
- ./configure ${CONFIG} --extra-cflags="-g3 -O0 -fsanitize=thread -fuse-ld=gold" || { cat config.log && exit 1; }
+
+
- env:
- CONFIG="--disable-system --disable-docs"
- - TEST_CMD="make check-tcg"
- script:
- - make ${MAKEFLAGS} && ${TEST_CMD} ${MAKEFLAGS}
- sudo: required
- dist: trusty
- compiler: gcc
+ - TEST_CMD="make -j3 check-tcg V=1"
diff --git a/MAINTAINERS b/MAINTAINERS
index 40672c4eba..af339b86db 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -12,9 +12,14 @@ consult qemu-devel and not any specific individual privately.
Descriptions of section entries:
M: Mail patches to: FullName <address@domain>
+ Maintainers are looking after a certain area and must be CCed on
+ patches. They are considered the main contact point.
R: Designated reviewer: FullName <address@domain>
These reviewers should be CCed on patches.
+ Reviewers are familiar with the subject matter and provide feedback
+ even though they are not maintainers.
L: Mailing list that is relevant to this area
+ These lists should be CCed on patches.
W: Web-page with status/info
Q: Patchwork web based patch tracking system site
T: SCM tree type and location. Type is one of: git, hg, quilt, stgit.
@@ -74,7 +79,7 @@ S: Maintained
L: qemu-trivial@nongnu.org
K: ^Subject:.*(?i)trivial
T: git git://git.corpit.ru/qemu.git trivial-patches
-T: git git://github.com/vivier/qemu.git trivial-patches
+T: git https://github.com/vivier/qemu.git trivial-patches
Architecture support
--------------------
@@ -98,20 +103,21 @@ F: pc-bios/s390-ccw.img
F: target/s390x/
F: docs/vfio-ap.txt
K: ^Subject:.*(?i)s390x?
-T: git git://github.com/cohuck/qemu.git s390-next
+T: git https://github.com/cohuck/qemu.git s390-next
L: qemu-s390x@nongnu.org
Guest CPU cores (TCG):
----------------------
Overall
L: qemu-devel@nongnu.org
-M: Paolo Bonzini <pbonzini@redhat.com>
M: Peter Crosthwaite <crosthwaite.peter@gmail.com>
M: Richard Henderson <rth@twiddle.net>
+R: Paolo Bonzini <pbonzini@redhat.com>
S: Maintained
F: cpus.c
F: exec.c
F: accel/tcg/
+F: accel/stubs/tcg-stub.c
F: include/exec/cpu*.h
F: include/exec/exec-all.h
F: include/exec/helper*.h
@@ -121,9 +127,11 @@ F: include/sysemu/cpus.h
FPU emulation
M: Aurelien Jarno <aurelien@aurel32.net>
M: Peter Maydell <peter.maydell@linaro.org>
-S: Odd Fixes
+M: Alex Bennée <alex.bennee@linaro.org>
+S: Maintained
F: fpu/
F: include/fpu/
+F: tests/fp/
Alpha
M: Richard Henderson <rth@twiddle.net>
@@ -146,6 +154,13 @@ F: disas/arm.c
F: disas/arm-a64.cc
F: disas/libvixl/
+ARM SMMU
+M: Eric Auger <eric.auger@redhat.com>
+L: qemu-arm@nongnu.org
+S: Maintained
+F: hw/arm/smmu*
+F: include/hw/arm/smmu*
+
CRIS
M: Edgar E. Iglesias <edgar.iglesias@gmail.com>
S: Maintained
@@ -190,18 +205,24 @@ F: disas/microblaze.c
MIPS
M: Aurelien Jarno <aurelien@aurel32.net>
M: Aleksandar Markovic <amarkovic@wavecomp.com>
+R: Aleksandar Rikalo <arikalo@wavecomp.com>
+R: Stefan Markovic <smarkovic@wavecomp.com>
S: Maintained
F: target/mips/
+F: default-configs/*mips*
+F: disas/mips.c
+F: disas/nanomips.cpp
+F: disas/nanomips.h
+F: hw/intc/mips_gic.c
F: hw/mips/
F: hw/misc/mips_*
-F: hw/intc/mips_gic.c
F: hw/timer/mips_gictimer.c
+F: include/hw/intc/mips_gic.h
F: include/hw/mips/
F: include/hw/misc/mips_*
-F: include/hw/intc/mips_gic.h
F: include/hw/timer/mips_gictimer.h
F: tests/tcg/mips/
-F: disas/mips.c
+K: ^Subject:.*(?i)mips
Moxie
M: Anthony Green <green@moxielogic.com>
@@ -217,7 +238,9 @@ M: Marek Vasut <marex@denx.de>
S: Maintained
F: target/nios2/
F: hw/nios2/
+F: hw/intc/nios2_iic.c
F: disas/nios2.c
+F: default-configs/nios2-softmmu.mak
OpenRISC
M: Stafford Horne <shorne@gmail.com>
@@ -228,7 +251,6 @@ F: tests/tcg/openrisc/
PowerPC
M: David Gibson <david@gibson.dropbear.id.au>
-M: Alexander Graf <agraf@suse.de>
L: qemu-ppc@nongnu.org
S: Maintained
F: target/ppc/
@@ -239,17 +261,19 @@ F: disas/ppc.c
RISC-V
M: Michael Clark <mjc@sifive.com>
M: Palmer Dabbelt <palmer@sifive.com>
+M: Alistair Francis <Alistair.Francis@wdc.com>
M: Sagar Karandikar <sagark@eecs.berkeley.edu>
M: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
-S: Maintained
+L: qemu-riscv@nongnu.org
+S: Supported
F: target/riscv/
F: hw/riscv/
F: include/hw/riscv/
-F: disas/riscv.c
+F: linux-user/host/riscv32/
+F: linux-user/host/riscv64/
S390
M: Richard Henderson <rth@twiddle.net>
-M: Alexander Graf <agraf@suse.de>
M: David Hildenbrand <david@redhat.com>
S: Maintained
F: target/s390x/
@@ -273,6 +297,7 @@ S: Maintained
F: target/sparc/
F: hw/sparc/
F: hw/sparc64/
+F: include/hw/sparc/sparc64.h
F: disas/sparc.c
UniCore32
@@ -293,7 +318,7 @@ F: tests/tcg/x86_64/
F: hw/i386/
F: disas/i386.c
F: docs/qemu-cpu-models.texi
-T: git git://github.com/ehabkost/qemu.git x86-next
+T: git https://github.com/ehabkost/qemu.git x86-next
Xtensa
M: Max Filippov <jcmvbkbc@gmail.com>
@@ -303,6 +328,8 @@ F: target/xtensa/
F: hw/xtensa/
F: tests/tcg/xtensa/
F: disas/xtensa.c
+F: include/hw/xtensa/xtensa-isa.h
+F: default-configs/xtensa*.mak
TriCore
M: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
@@ -324,7 +351,10 @@ L: kvm@vger.kernel.org
S: Supported
F: */kvm.*
F: accel/kvm/
+F: accel/stubs/kvm-stub.c
+F: include/hw/kvm/
F: include/sysemu/kvm*.h
+F: scripts/kvm/kvm_flightrecorder
ARM
M: Peter Maydell <peter.maydell@linaro.org>
@@ -334,18 +364,20 @@ F: target/arm/kvm.c
MIPS
M: James Hogan <jhogan@kernel.org>
+R: Aleksandar Rikalo <arikalo@wavecomp.com>
+R: Stefan Markovic <smarkovic@wavecomp.com>
S: Maintained
F: target/mips/kvm.c
PPC
-M: Alexander Graf <agraf@suse.de>
+M: David Gibson <david@gibson.dropbear.id.au>
S: Maintained
F: target/ppc/kvm.c
S390
-M: Christian Borntraeger <borntraeger@de.ibm.com>
+M: Halil Pasic <pasic@linux.ibm.com>
M: Cornelia Huck <cohuck@redhat.com>
-M: Alexander Graf <agraf@suse.de>
+M: Christian Borntraeger <borntraeger@de.ibm.com>
S: Maintained
F: target/s390x/kvm.c
F: target/s390x/kvm_s390x.h
@@ -357,8 +389,8 @@ F: hw/intc/s390_flic.c
F: hw/intc/s390_flic_kvm.c
F: include/hw/s390x/s390_flic.h
F: gdb-xml/s390*.xml
-T: git git://github.com/cohuck/qemu.git s390-next
-T: git git://github.com/borntraeger/qemu.git s390-next
+T: git https://github.com/cohuck/qemu.git s390-next
+T: git https://github.com/borntraeger/qemu.git s390-next
L: qemu-s390x@nongnu.org
X86
@@ -367,6 +399,7 @@ M: Marcelo Tosatti <mtosatti@redhat.com>
L: kvm@vger.kernel.org
S: Supported
F: target/i386/kvm.c
+F: scripts/kvm/vmxcap
Guest CPU Cores (Xen):
----------------------
@@ -374,6 +407,7 @@ Guest CPU Cores (Xen):
X86
M: Stefano Stabellini <sstabellini@kernel.org>
M: Anthony Perard <anthony.perard@citrix.com>
+M: Paul Durrant <paul.durrant@citrix.com>
L: xen-devel@lists.xenproject.org
S: Supported
F: */xen*
@@ -381,10 +415,12 @@ F: hw/9pfs/xen-9p-backend.c
F: hw/char/xen_console.c
F: hw/display/xenfb.c
F: hw/net/xen_nic.c
-F: hw/block/xen_*
+F: hw/block/xen*
+F: hw/block/dataplane/xen*
F: hw/xen/
F: hw/xenpv/
F: hw/i386/xen/
+F: include/hw/block/dataplane/xen*
F: include/hw/xen/
F: include/sysemu/xen-mapcache.h
@@ -434,8 +470,9 @@ ARM Machines
------------
Allwinner-a10
M: Beniamino Galvani <b.galvani@gmail.com>
+M: Peter Maydell <peter.maydell@linaro.org>
L: qemu-arm@nongnu.org
-S: Maintained
+S: Odd Fixes
F: hw/*/allwinner*
F: include/hw/*/allwinner*
F: hw/arm/cubieboard.c
@@ -481,6 +518,7 @@ F: hw/intc/arm*
F: hw/intc/gic_internal.h
F: hw/misc/a9scu.c
F: hw/misc/arm11scu.c
+F: hw/misc/arm_l2x0.c
F: hw/timer/a9gtimer*
F: hw/timer/arm*
F: include/hw/arm/arm*.h
@@ -494,40 +532,58 @@ F: tests/test-arm-mptimer.c
Exynos
M: Igor Mitsyanko <i.mitsyanko@gmail.com>
+M: Peter Maydell <peter.maydell@linaro.org>
L: qemu-arm@nongnu.org
-S: Maintained
+S: Odd Fixes
F: hw/*/exynos*
F: include/hw/arm/exynos4210.h
Calxeda Highbank
M: Rob Herring <robh@kernel.org>
+M: Peter Maydell <peter.maydell@linaro.org>
L: qemu-arm@nongnu.org
-S: Maintained
+S: Odd Fixes
F: hw/arm/highbank.c
F: hw/net/xgmac.c
Canon DIGIC
M: Antony Pavlov <antonynpavlov@gmail.com>
+M: Peter Maydell <peter.maydell@linaro.org>
L: qemu-arm@nongnu.org
-S: Maintained
+S: Odd Fixes
F: include/hw/arm/digic.h
F: hw/*/digic*
+F: include/hw/*/digic*
Gumstix
-M: Philippe Mathieu-Daudé <f4bug@amsat.org>
+M: Peter Maydell <peter.maydell@linaro.org>
+R: Philippe Mathieu-Daudé <f4bug@amsat.org>
L: qemu-devel@nongnu.org
L: qemu-arm@nongnu.org
S: Odd Fixes
F: hw/arm/gumstix.c
-i.MX31
+i.MX25 PDK
+M: Peter Maydell <peter.maydell@linaro.org>
+R: Jean-Christophe Dubois <jcd@tribudubois.net>
+L: qemu-arm@nongnu.org
+S: Odd Fixes
+F: hw/arm/fsl-imx25.c
+F: hw/arm/imx25_pdk.c
+F: hw/misc/imx25_ccm.c
+F: include/hw/arm/fsl-imx25.h
+F: include/hw/misc/imx25_ccm.h
+
+i.MX31 (kzm)
M: Peter Chubb <peter.chubb@nicta.com.au>
+M: Peter Maydell <peter.maydell@linaro.org>
L: qemu-arm@nongnu.org
-S: Odd fixes
-F: hw/*/imx*
-F: include/hw/*/imx*
+S: Odd Fixes
F: hw/arm/kzm.c
-F: include/hw/arm/fsl-imx31.h
+F: hw/*/imx_*
+F: hw/*/*imx31*
+F: include/hw/*/imx_*
+F: include/hw/*/*imx31*
Integrator CP
M: Peter Maydell <peter.maydell@linaro.org>
@@ -535,6 +591,31 @@ L: qemu-arm@nongnu.org
S: Maintained
F: hw/arm/integratorcp.c
F: hw/misc/arm_integrator_debug.c
+F: include/hw/misc/arm_integrator_debug.h
+
+MCIMX6UL EVK / i.MX6ul
+M: Peter Maydell <peter.maydell@linaro.org>
+R: Jean-Christophe Dubois <jcd@tribudubois.net>
+L: qemu-arm@nongnu.org
+S: Odd Fixes
+F: hw/arm/mcimx6ul-evk.c
+F: hw/arm/fsl-imx6ul.c
+F: hw/misc/imx6ul_ccm.c
+F: include/hw/arm/fsl-imx6ul.h
+F: include/hw/misc/imx6ul_ccm.h
+
+MCIMX7D SABRE / i.MX7
+M: Peter Maydell <peter.maydell@linaro.org>
+R: Andrey Smirnov <andrew.smirnov@gmail.com>
+L: qemu-arm@nongnu.org
+S: Odd Fixes
+F: hw/arm/mcimx7d-sabre.c
+F: hw/arm/fsl-imx7.c
+F: hw/misc/imx7_*.c
+F: include/hw/arm/fsl-imx7.h
+F: include/hw/misc/imx7_*.h
+F: hw/pci-host/designware.c
+F: include/hw/pci-host/designware.h
MPS2
M: Peter Maydell <peter.maydell@linaro.org>
@@ -546,6 +627,8 @@ F: hw/misc/mps2-*.c
F: include/hw/misc/mps2-*.h
F: hw/arm/iotkit.c
F: include/hw/arm/iotkit.h
+F: hw/misc/iotkit-secctl.c
+F: include/hw/misc/iotkit-secctl.h
F: hw/misc/iotkit-sysctl.c
F: include/hw/misc/iotkit-sysctl.h
F: hw/misc/iotkit-sysinfo.c
@@ -553,21 +636,41 @@ F: include/hw/misc/iotkit-sysinfo.h
Musicpal
M: Jan Kiszka <jan.kiszka@web.de>
+M: Peter Maydell <peter.maydell@linaro.org>
L: qemu-arm@nongnu.org
-S: Maintained
+S: Odd Fixes
F: hw/arm/musicpal.c
nSeries
M: Andrzej Zaborowski <balrogg@gmail.com>
+M: Peter Maydell <peter.maydell@linaro.org>
L: qemu-arm@nongnu.org
-S: Maintained
+S: Odd Fixes
F: hw/arm/nseries.c
+F: hw/input/lm832x.c
+F: hw/input/tsc2005.c
+F: hw/misc/cbus.c
+F: hw/timer/twl92230.c
Palm
M: Andrzej Zaborowski <balrogg@gmail.com>
+M: Peter Maydell <peter.maydell@linaro.org>
L: qemu-arm@nongnu.org
-S: Maintained
+S: Odd Fixes
F: hw/arm/palm.c
+F: hw/input/tsc210x.c
+
+Raspberry Pi
+M: Peter Maydell <peter.maydell@linaro.org>
+R: Andrew Baumann <Andrew.Baumann@microsoft.com>
+R: Philippe Mathieu-Daudé <f4bug@amsat.org>
+L: qemu-arm@nongnu.org
+S: Odd Fixes
+F: hw/arm/raspi.c
+F: hw/arm/raspi_platform.h
+F: hw/*/bcm283*
+F: include/hw/arm/raspi*
+F: include/hw/*/bcm283*
Real View
M: Peter Maydell <peter.maydell@linaro.org>
@@ -580,15 +683,41 @@ F: include/hw/intc/realview_gic.h
PXA2XX
M: Andrzej Zaborowski <balrogg@gmail.com>
+M: Peter Maydell <peter.maydell@linaro.org>
L: qemu-arm@nongnu.org
-S: Maintained
+S: Odd Fixes
F: hw/arm/mainstone.c
F: hw/arm/spitz.c
F: hw/arm/tosa.c
F: hw/arm/z2.c
F: hw/*/pxa2xx*
+F: hw/display/tc6393xb.c
+F: hw/gpio/max7310.c
+F: hw/gpio/zaurus.c
F: hw/misc/mst_fpga.c
+F: hw/misc/max111x.c
F: include/hw/arm/pxa.h
+F: include/hw/arm/sharpsl.h
+
+SABRELITE / i.MX6
+M: Peter Maydell <peter.maydell@linaro.org>
+R: Jean-Christophe Dubois <jcd@tribudubois.net>
+L: qemu-arm@nongnu.org
+S: Odd Fixes
+F: hw/arm/sabrelite.c
+F: hw/arm/fsl-imx6.c
+F: hw/misc/imx6_*.c
+F: hw/ssi/imx_spi.c
+F: include/hw/arm/fsl-imx6.h
+F: include/hw/misc/imx6_*.h
+F: include/hw/ssi/imx_spi.h
+
+Sharp SL-5500 (Collie) PDA
+M: Peter Maydell <peter.maydell@linaro.org>
+L: qemu-arm@nongnu.org
+S: Odd Fixes
+F: hw/arm/collie.c
+F: hw/arm/strongarm*
Stellaris
M: Peter Maydell <peter.maydell@linaro.org>
@@ -596,6 +725,12 @@ L: qemu-arm@nongnu.org
S: Maintained
F: hw/*/stellaris*
+Versatile Express
+M: Peter Maydell <peter.maydell@linaro.org>
+L: qemu-arm@nongnu.org
+S: Maintained
+F: hw/arm/vexpress.c
+
Versatile PB
M: Peter Maydell <peter.maydell@linaro.org>
L: qemu-arm@nongnu.org
@@ -603,9 +738,17 @@ S: Maintained
F: hw/*/versatile*
F: hw/misc/arm_sysctl.c
+Virt
+M: Peter Maydell <peter.maydell@linaro.org>
+L: qemu-arm@nongnu.org
+S: Maintained
+F: hw/arm/virt*
+F: include/hw/arm/virt.h
+
Xilinx Zynq
M: Edgar E. Iglesias <edgar.iglesias@gmail.com>
M: Alistair Francis <alistair@alistair23.me>
+M: Peter Maydell <peter.maydell@linaro.org>
L: qemu-arm@nongnu.org
S: Maintained
F: hw/*/xilinx_*
@@ -617,13 +760,16 @@ X: hw/ssi/xilinx_*
Xilinx ZynqMP
M: Alistair Francis <alistair@alistair23.me>
M: Edgar E. Iglesias <edgar.iglesias@gmail.com>
+M: Peter Maydell <peter.maydell@linaro.org>
L: qemu-arm@nongnu.org
S: Maintained
F: hw/*/xlnx*.c
F: include/hw/*/xlnx*.h
+F: include/hw/ssi/xilinx_spips.h
+F: hw/display/dpcd.c
+F: include/hw/display/dpcd.h
ARM ACPI Subsystem
-M: Shannon Zhao <zhaoshenglong@huawei.com>
M: Shannon Zhao <shannon.zhaosl@gmail.com>
L: qemu-arm@nongnu.org
S: Maintained
@@ -631,6 +777,7 @@ F: hw/arm/virt-acpi-build.c
STM32F205
M: Alistair Francis <alistair@alistair23.me>
+M: Peter Maydell <peter.maydell@linaro.org>
S: Maintained
F: hw/arm/stm32f205_soc.c
F: hw/misc/stm32f2xx_syscfg.c
@@ -642,11 +789,13 @@ F: include/hw/*/stm32*.h
Netduino 2
M: Alistair Francis <alistair@alistair23.me>
+M: Peter Maydell <peter.maydell@linaro.org>
S: Maintained
F: hw/arm/netduino2.c
SmartFusion2
M: Subbaraya Sundeep <sundeep.lkml@gmail.com>
+M: Peter Maydell <peter.maydell@linaro.org>
S: Maintained
F: hw/arm/msf2-soc.c
F: hw/misc/msf2-sysreg.c
@@ -659,22 +808,27 @@ F: include/hw/ssi/mss-spi.h
Emcraft M2S-FG484
M: Subbaraya Sundeep <sundeep.lkml@gmail.com>
+M: Peter Maydell <peter.maydell@linaro.org>
S: Maintained
F: hw/arm/msf2-som.c
ASPEED BMCs
M: Cédric Le Goater <clg@kaod.org>
+M: Peter Maydell <peter.maydell@linaro.org>
R: Andrew Jeffery <andrew@aj.id.au>
R: Joel Stanley <joel@jms.id.au>
L: qemu-arm@nongnu.org
S: Maintained
F: hw/*/*aspeed*
+F: hw/misc/pca9552.c
F: include/hw/*/*aspeed*
+F: include/hw/misc/pca9552*.h
F: hw/net/ftgmac100.c
F: include/hw/net/ftgmac100.h
NRF51
M: Joel Stanley <joel@jms.id.au>
+M: Peter Maydell <peter.maydell@linaro.org>
L: qemu-arm@nongnu.org
S: Maintained
F: hw/arm/nrf51_soc.c
@@ -724,6 +878,7 @@ petalogix_s3adsp1800
M: Edgar E. Iglesias <edgar.iglesias@gmail.com>
S: Maintained
F: hw/microblaze/petalogix_s3adsp1800_mmu.c
+F: include/hw/char/xilinx_uartlite.h
petalogix_ml605
M: Edgar E. Iglesias <edgar.iglesias@gmail.com>
@@ -734,39 +889,54 @@ MIPS Machines
-------------
Jazz
M: Hervé Poussineau <hpoussin@reactos.org>
+R: Aleksandar Rikalo <arikalo@wavecomp.com>
+R: Stefan Markovic <smarkovic@wavecomp.com>
S: Maintained
F: hw/mips/mips_jazz.c
+F: hw/display/jazz_led.c
+F: hw/dma/rc4030.c
Malta
M: Aurelien Jarno <aurelien@aurel32.net>
+R: Aleksandar Rikalo <arikalo@wavecomp.com>
+R: Stefan Markovic <smarkovic@wavecomp.com>
S: Maintained
F: hw/mips/mips_malta.c
Mipssim
M: Aleksandar Markovic <amarkovic@wavecomp.com>
+R: Aleksandar Rikalo <arikalo@wavecomp.com>
+R: Stefan Markovic <smarkovic@wavecomp.com>
S: Odd Fixes
F: hw/mips/mips_mipssim.c
F: hw/net/mipsnet.c
R4000
M: Aurelien Jarno <aurelien@aurel32.net>
+R: Aleksandar Rikalo <arikalo@wavecomp.com>
+R: Stefan Markovic <smarkovic@wavecomp.com>
S: Maintained
F: hw/mips/mips_r4k.c
Fulong 2E
M: Aleksandar Markovic <amarkovic@wavecomp.com>
+R: Aleksandar Rikalo <arikalo@wavecomp.com>
+R: Stefan Markovic <smarkovic@wavecomp.com>
S: Odd Fixes
F: hw/mips/mips_fulong2e.c
F: hw/isa/vt82c686.c
-
+F: hw/pci-host/bonito.c
F: include/hw/isa/vt82c686.h
Boston
M: Paul Burton <pburton@wavecomp.com>
+R: Aleksandar Rikalo <arikalo@wavecomp.com>
+R: Stefan Markovic <smarkovic@wavecomp.com>
S: Maintained
F: hw/core/loader-fit.c
F: hw/mips/boston.c
F: hw/pci-host/xilinx-pcie.c
+F: include/hw/pci-host/xilinx-pcie.h
OpenRISC Machines
-----------------
@@ -778,56 +948,65 @@ F: hw/openrisc/openrisc_sim.c
PowerPC Machines
----------------
405
-M: Alexander Graf <agraf@suse.de>
+M: David Gibson <david@gibson.dropbear.id.au>
L: qemu-ppc@nongnu.org
S: Odd Fixes
F: hw/ppc/ppc405_boards.c
Bamboo
-M: Alexander Graf <agraf@suse.de>
+M: David Gibson <david@gibson.dropbear.id.au>
L: qemu-ppc@nongnu.org
S: Odd Fixes
F: hw/ppc/ppc440_bamboo.c
e500
-M: Alexander Graf <agraf@suse.de>
+M: David Gibson <david@gibson.dropbear.id.au>
L: qemu-ppc@nongnu.org
-S: Supported
+S: Odd Fixes
F: hw/ppc/e500.[hc]
F: hw/ppc/e500plat.c
+F: hw/gpio/mpc8xxx.c
F: include/hw/ppc/ppc_e500.h
F: include/hw/pci-host/ppce500.h
F: pc-bios/u-boot.e500
mpc8544ds
-M: Alexander Graf <agraf@suse.de>
+M: David Gibson <david@gibson.dropbear.id.au>
L: qemu-ppc@nongnu.org
-S: Supported
+S: Odd Fixes
F: hw/ppc/mpc8544ds.c
F: hw/ppc/mpc8544_guts.c
-New World
-M: Alexander Graf <agraf@suse.de>
+New World (mac99)
+M: David Gibson <david@gibson.dropbear.id.au>
L: qemu-ppc@nongnu.org
-S: Maintained
+S: Odd Fixes
F: hw/ppc/mac_newworld.c
F: hw/pci-host/uninorth.c
F: hw/pci-bridge/dec.[hc]
F: hw/misc/macio/
F: hw/misc/mos6522.c
F: hw/nvram/mac_nvram.c
+F: hw/input/adb*
F: include/hw/misc/macio/
F: include/hw/misc/mos6522.h
F: include/hw/ppc/mac_dbdma.h
+F: include/hw/pci-host/uninorth.h
+F: include/hw/input/adb*
+F: pc-bios/qemu_vga.ndrv
-Old World
-M: Alexander Graf <agraf@suse.de>
+Old World (g3beige)
+M: David Gibson <david@gibson.dropbear.id.au>
L: qemu-ppc@nongnu.org
-S: Maintained
+S: Odd Fixes
F: hw/ppc/mac_oldworld.c
F: hw/pci-host/grackle.c
F: hw/misc/macio/
F: hw/intc/heathrow_pic.c
+F: hw/input/adb*
+F: include/hw/intc/heathrow_pic.h
+F: include/hw/input/adb*
+F: pc-bios/qemu_vga.ndrv
PReP
M: Hervé Poussineau <hpoussin@reactos.org>
@@ -848,7 +1027,6 @@ F: pc-bios/ppc_rom.bin
sPAPR
M: David Gibson <david@gibson.dropbear.id.au>
-M: Alexander Graf <agraf@suse.de>
L: qemu-ppc@nongnu.org
S: Supported
F: hw/*/spapr*
@@ -866,6 +1044,14 @@ F: tests/libqos/*spapr*
F: tests/rtas*
F: tests/libqos/rtas*
+XIVE
+M: David Gibson <david@gibson.dropbear.id.au>
+M: Cédric Le Goater <clg@kaod.org>
+L: qemu-ppc@nongnu.org
+S: Supported
+F: hw/*/*xive*
+F: include/hw/*/*xive*
+
virtex_ml507
M: Edgar E. Iglesias <edgar.iglesias@gmail.com>
L: qemu-ppc@nongnu.org
@@ -876,8 +1062,14 @@ sam460ex
M: BALATON Zoltan <balaton@eik.bme.hu>
L: qemu-ppc@nongnu.org
S: Maintained
+F: hw/ppc/sam460ex.c
+F: hw/ppc/ppc440_pcix.c
+F: hw/display/sm501*
F: hw/ide/sii3112.c
F: hw/timer/m41t80.c
+F: pc-bios/canyonlands.dt[sb]
+F: pc-bios/u-boot-sam460ex-20100605.bin
+F: roms/u-boot-sam460ex
SH4 Machines
------------
@@ -905,12 +1097,15 @@ F: hw/misc/eccmemctl.c
F: hw/misc/slavio_misc.c
F: include/hw/sparc/sparc32_dma.h
F: pc-bios/openbios-sparc32
+F: include/hw/sparc/sun4m_iommu.h
Sun4u
M: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
S: Maintained
F: hw/sparc64/sun4u.c
F: pc-bios/openbios-sparc64
+F: hw/pci-host/sabre.c
+F: include/hw/pci-host/sabre.h
Sun4v
M: Artyom Tarasenko <atar4qemu@gmail.com>
@@ -930,8 +1125,8 @@ S390 Machines
-------------
S390 Virtio-ccw
M: Cornelia Huck <cohuck@redhat.com>
+M: Halil Pasic <pasic@linux.ibm.com>
M: Christian Borntraeger <borntraeger@de.ibm.com>
-M: Alexander Graf <agraf@suse.de>
S: Supported
F: hw/char/sclp*.[hc]
F: hw/char/terminal3270.c
@@ -940,17 +1135,24 @@ F: include/hw/s390x/
F: hw/watchdog/wdt_diag288.c
F: include/hw/watchdog/wdt_diag288.h
F: default-configs/s390x-softmmu.mak
-T: git git://github.com/cohuck/qemu.git s390-next
-T: git git://github.com/borntraeger/qemu.git s390-next
+T: git https://github.com/cohuck/qemu.git s390-next
+T: git https://github.com/borntraeger/qemu.git s390-next
L: qemu-s390x@nongnu.org
-S390-ccw Bios
+S390-ccw boot
M: Christian Borntraeger <borntraeger@de.ibm.com>
M: Thomas Huth <thuth@redhat.com>
S: Supported
+F: hw/s390x/ipl.*
F: pc-bios/s390-ccw/
F: pc-bios/s390-ccw.img
-T: git git://github.com/borntraeger/qemu.git s390-next
+T: git https://github.com/borntraeger/qemu.git s390-next
+L: qemu-s390x@nongnu.org
+
+S390 PCI
+M: Collin Walling <walling@linux.ibm.com>
+S: Supported
+F: hw/s390x/s390-pci*
L: qemu-s390x@nongnu.org
UniCore32 Machines
@@ -1003,11 +1205,13 @@ F: hw/timer/hpet*
F: hw/timer/i8254*
F: hw/timer/mc146818rtc*
F: hw/watchdog/wdt_ib700.c
+F: hw/watchdog/wdt_i6300esb.c
F: include/hw/display/vga.h
F: include/hw/char/parallel.h
F: include/hw/dma/i8257.h
F: include/hw/i2c/pm_smbus.h
F: include/hw/input/i8042.h
+F: include/hw/isa/i8259_internal.h
F: include/hw/isa/superio.h
F: include/hw/timer/hpet.h
F: include/hw/timer/i8254*
@@ -1019,8 +1223,10 @@ M: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
S: Supported
F: hw/core/machine.c
F: hw/core/null-machine.c
+F: hw/cpu/cluster.c
F: include/hw/boards.h
-T: git git://github.com/ehabkost/qemu.git machine-next
+F: include/hw/cpu/cluster.h
+T: git https://github.com/ehabkost/qemu.git machine-next
Xtensa Machines
---------------
@@ -1056,7 +1262,7 @@ F: tests/ide-test.c
F: tests/ahci-test.c
F: tests/cdrom-test.c
F: tests/libqos/ahci*
-T: git git://github.com/jnsnow/qemu.git ide
+T: git https://github.com/jnsnow/qemu.git ide
IPMI
M: Corey Minyard <minyard@acm.org>
@@ -1065,7 +1271,7 @@ F: include/hw/ipmi/*
F: hw/ipmi/*
F: hw/smbios/smbios_type_38.c
F: tests/ipmi*
-T: git git://github.com/cminyard/qemu.git master-ipmi-rebase
+T: git https://github.com/cminyard/qemu.git master-ipmi-rebase
Floppy
M: John Snow <jsnow@redhat.com>
@@ -1074,7 +1280,7 @@ S: Supported
F: hw/block/fdc.c
F: include/hw/block/fdc.h
F: tests/fdc-test.c
-T: git git://github.com/jnsnow/qemu.git ide
+T: git https://github.com/jnsnow/qemu.git ide
OMAP
M: Peter Maydell <peter.maydell@linaro.org>
@@ -1105,7 +1311,7 @@ M: Michael S. Tsirkin <mst@redhat.com>
M: Igor Mammedov <imammedo@redhat.com>
S: Supported
F: include/hw/acpi/*
-F: include/hw/smbios/*
+F: include/hw/firmware/smbios.h
F: hw/mem/*
F: hw/acpi/*
F: hw/smbios/*
@@ -1113,9 +1319,10 @@ F: hw/i386/acpi-build.[hc]
F: hw/arm/virt-acpi-build.c
F: tests/bios-tables-test.c
F: tests/acpi-utils.[hc]
+F: tests/data/acpi/
ppc4xx
-M: Alexander Graf <agraf@suse.de>
+M: David Gibson <david@gibson.dropbear.id.au>
L: qemu-ppc@nongnu.org
S: Odd Fixes
F: hw/ppc/ppc4*.c
@@ -1124,15 +1331,16 @@ F: include/hw/ppc/ppc4xx.h
F: include/hw/i2c/ppc4xx_i2c.h
ppce500
-M: Alexander Graf <agraf@suse.de>
+M: David Gibson <david@gibson.dropbear.id.au>
L: qemu-ppc@nongnu.org
-S: Supported
+S: Odd Fixes
F: hw/ppc/e500*
F: hw/pci-host/ppce500.c
F: hw/net/fsl_etsec/
Character devices
-M: Paolo Bonzini <pbonzini@redhat.com>
+M: Marc-André Lureau <marcandre.lureau@redhat.com>
+R: Paolo Bonzini <pbonzini@redhat.com>
S: Odd Fixes
F: hw/char/
@@ -1142,16 +1350,16 @@ S: Odd Fixes
F: hw/net/
F: include/hw/net/
F: tests/virtio-net-test.c
-T: git git://github.com/jasowang/qemu.git net
+T: git https://github.com/jasowang/qemu.git net
SCSI
M: Paolo Bonzini <pbonzini@redhat.com>
-R: Fam Zheng <famz@redhat.com>
+R: Fam Zheng <fam@euphon.net>
S: Supported
F: include/hw/scsi/*
F: hw/scsi/*
F: tests/virtio-scsi-test.c
-T: git git://github.com/bonzini/qemu.git scsi-next
+T: git https://github.com/bonzini/qemu.git scsi-next
SSI
M: Peter Crosthwaite <crosthwaite.peter@gmail.com>
@@ -1202,11 +1410,13 @@ F: include/hw/vfio/
vfio-ccw
M: Cornelia Huck <cohuck@redhat.com>
+M: Eric Farman <farman@linux.ibm.com>
+M: Farhan Ali <alifm@linux.ibm.com>
S: Supported
F: hw/vfio/ccw.c
F: hw/s390x/s390-ccw.c
F: include/hw/s390x/s390-ccw.h
-T: git git://github.com/cohuck/qemu.git s390-next
+T: git https://github.com/cohuck/qemu.git s390-next
L: qemu-s390x@nongnu.org
vfio-ap
@@ -1228,6 +1438,7 @@ M: Michael S. Tsirkin <mst@redhat.com>
S: Supported
F: hw/*/*vhost*
F: docs/interop/vhost-user.txt
+F: contrib/vhost-user-*/
virtio
M: Michael S. Tsirkin <mst@redhat.com>
@@ -1245,7 +1456,7 @@ S: Supported
F: hw/9pfs/
F: fsdev/
F: tests/virtio-9p-test.c
-T: git git://github.com/gkurz/qemu.git 9p-next
+T: git https://github.com/gkurz/qemu.git 9p-next
virtio-blk
M: Stefan Hajnoczi <stefanha@redhat.com>
@@ -1254,16 +1465,16 @@ S: Supported
F: hw/block/virtio-blk.c
F: hw/block/dataplane/*
F: tests/virtio-blk-test.c
-T: git git://github.com/stefanha/qemu.git block
+T: git https://github.com/stefanha/qemu.git block
virtio-ccw
M: Cornelia Huck <cohuck@redhat.com>
-M: Christian Borntraeger <borntraeger@de.ibm.com>
+M: Halil Pasic <pasic@linux.ibm.com>
S: Supported
F: hw/s390x/virtio-ccw*.[hc]
F: hw/s390x/vhost-vsock-ccw.c
-T: git git://github.com/cohuck/qemu.git s390-next
-T: git git://github.com/borntraeger/qemu.git s390-next
+T: git https://github.com/cohuck/qemu.git s390-next
+T: git https://github.com/borntraeger/qemu.git s390-next
L: qemu-s390x@nongnu.org
virtio-input
@@ -1340,6 +1551,7 @@ S: Maintained
F: hw/acpi/nvdimm.c
F: hw/mem/nvdimm.c
F: include/hw/mem/nvdimm.h
+F: docs/nvdimm.txt
e1000x
M: Dmitry Fleytman <dmitry.fleytman@gmail.com>
@@ -1367,7 +1579,7 @@ Intel Hexadecimal Object File Loader
M: Su Hang <suhang16@mails.ucas.ac.cn>
S: Maintained
F: tests/hexloader-test.c
-F: tests/hex-loader-check-data/test.hex
+F: tests/data/hex-loader/test.hex
CHRP NVRAM
M: Thomas Huth <thuth@redhat.com>
@@ -1426,6 +1638,19 @@ F: hw/display/edid*
F: include/hw/display/edid.h
F: qemu-edid.c
+Firmware configuration (fw_cfg)
+M: Philippe Mathieu-Daudé <philmd@redhat.com>
+R: Laszlo Ersek <lersek@redhat.com>
+R: Gerd Hoffmann <kraxel@redhat.com>
+S: Supported
+F: docs/specs/fw_cfg.txt
+F: hw/nvram/fw_cfg.c
+F: include/hw/nvram/fw_cfg.h
+F: include/standard-headers/linux/qemu_fw_cfg.h
+F: tests/libqos/fw_cfg.c
+F: tests/fw_cfg-test.c
+T: git https://github.com/philmd/qemu.git fw_cfg-next
+
Subsystems
----------
Audio
@@ -1453,11 +1678,11 @@ F: tests/qemu-iotests/
F: util/qemu-progress.c
F: qobject/block-qdict.c
F: tests/check-block-qdict.c
-T: git git://repo.or.cz/qemu/kevin.git block
+T: git https://repo.or.cz/qemu/kevin.git block
Block I/O path
M: Stefan Hajnoczi <stefanha@redhat.com>
-M: Fam Zheng <famz@redhat.com>
+M: Fam Zheng <fam@euphon.net>
L: qemu-block@nongnu.org
S: Supported
F: util/async.c
@@ -1467,11 +1692,11 @@ F: migration/block*
F: include/block/aio.h
F: include/block/aio-wait.h
F: scripts/qemugdb/aio.py
-T: git git://github.com/stefanha/qemu.git block
+T: git https://github.com/stefanha/qemu.git block
Block SCSI subsystem
M: Paolo Bonzini <pbonzini@redhat.com>
-R: Fam Zheng <famz@redhat.com>
+R: Fam Zheng <fam@euphon.net>
L: qemu-block@nongnu.org
S: Supported
F: include/scsi/*
@@ -1491,7 +1716,7 @@ F: block/commit.c
F: block/stream.c
F: block/mirror.c
F: qapi/job.json
-T: git git://github.com/codyprime/qemu-kvm-jtc.git block
+T: git https://github.com/codyprime/qemu-kvm-jtc.git block
Block QAPI, monitor, command line
M: Markus Armbruster <armbru@redhat.com>
@@ -1500,10 +1725,10 @@ F: blockdev.c
F: block/qapi.c
F: qapi/block*.json
F: qapi/transaction.json
-T: git git://repo.or.cz/qemu/armbru.git block-next
+T: git https://repo.or.cz/qemu/armbru.git block-next
Dirty Bitmaps
-M: Fam Zheng <famz@redhat.com>
+M: Fam Zheng <fam@euphon.net>
M: John Snow <jsnow@redhat.com>
L: qemu-block@nongnu.org
S: Supported
@@ -1513,12 +1738,12 @@ F: include/qemu/hbitmap.h
F: include/block/dirty-bitmap.h
F: tests/test-hbitmap.c
F: docs/interop/bitmaps.rst
-T: git git://github.com/famz/qemu.git bitmaps
-T: git git://github.com/jnsnow/qemu.git bitmaps
+T: git https://github.com/famz/qemu.git bitmaps
+T: git https://github.com/jnsnow/qemu.git bitmaps
Character device backends
-M: Paolo Bonzini <pbonzini@redhat.com>
M: Marc-André Lureau <marcandre.lureau@redhat.com>
+R: Paolo Bonzini <pbonzini@redhat.com>
S: Maintained
F: chardev/
F: include/chardev/
@@ -1601,6 +1826,7 @@ F: ui/spice-*.c
F: audio/spiceaudio.c
F: hw/display/qxl*
F: qapi/ui.json
+F: docs/spice-port-fqdn.txt
Graphics
M: Gerd Hoffmann <kraxel@redhat.com>
@@ -1638,7 +1864,7 @@ M: Jason Wang <jasowang@redhat.com>
S: Maintained
F: net/
F: include/net/
-T: git git://github.com/jasowang/qemu.git net
+T: git https://github.com/jasowang/qemu.git net
F: qapi/net.json
Netmap network backend
@@ -1654,7 +1880,7 @@ M: Eduardo Habkost <ehabkost@redhat.com>
S: Maintained
F: numa.c
F: include/sysemu/numa.h
-T: git git://github.com/ehabkost/qemu.git machine-next
+T: git https://github.com/ehabkost/qemu.git machine-next
Host Memory Backends
M: Eduardo Habkost <ehabkost@redhat.com>
@@ -1662,7 +1888,7 @@ M: Igor Mammedov <imammedo@redhat.com>
S: Maintained
F: backends/hostmem*.c
F: include/sysemu/hostmem.h
-T: git git://github.com/ehabkost/qemu.git machine-next
+T: git https://github.com/ehabkost/qemu.git machine-next
Cryptodev Backends
M: Gonglei <arei.gonglei@huawei.com>
@@ -1695,14 +1921,14 @@ F: tests/test-visitor-serialization.c
F: scripts/qapi-gen.py
F: scripts/qapi/*
F: docs/devel/qapi*
-T: git git://repo.or.cz/qemu/armbru.git qapi-next
+T: git https://repo.or.cz/qemu/armbru.git qapi-next
QAPI Schema
M: Eric Blake <eblake@redhat.com>
M: Markus Armbruster <armbru@redhat.com>
S: Supported
F: qapi/*.json
-T: git git://repo.or.cz/qemu/armbru.git qapi-next
+T: git https://repo.or.cz/qemu/armbru.git qapi-next
QObject
M: Markus Armbruster <armbru@redhat.com>
@@ -1716,7 +1942,7 @@ F: tests/check-qnum.c
F: tests/check-qjson.c
F: tests/check-qlist.c
F: tests/check-qstring.c
-T: git git://repo.or.cz/qemu/armbru.git qapi-next
+T: git https://repo.or.cz/qemu/armbru.git qapi-next
QEMU Guest Agent
M: Michael Roth <mdroth@linux.vnet.ibm.com>
@@ -1726,12 +1952,12 @@ F: qemu-ga.texi
F: scripts/qemu-guest-agent/
F: tests/test-qga.c
F: docs/interop/qemu-ga-ref.texi
-T: git git://github.com/mdroth/qemu.git qga
+T: git https://github.com/mdroth/qemu.git qga
QOM
M: Andreas Färber <afaerber@suse.de>
S: Supported
-T: git git://github.com/afaerber/qemu-cpu.git qom-next
+T: git https://github.com/afaerber/qemu-cpu.git qom-next
F: include/qom/
X: include/qom/cpu.h
F: qom/
@@ -1745,15 +1971,16 @@ S: Supported
F: qmp.c
F: monitor.c
F: docs/devel/*qmp-*
+F: docs/interop/*qmp-*
F: scripts/qmp/
F: tests/qmp-test.c
F: tests/qmp-cmd-test.c
-T: git git://repo.or.cz/qemu/armbru.git qapi-next
+T: git https://repo.or.cz/qemu/armbru.git qapi-next
qtest
-M: Paolo Bonzini <pbonzini@redhat.com>
M: Thomas Huth <thuth@redhat.com>
M: Laurent Vivier <lvivier@redhat.com>
+R: Paolo Bonzini <pbonzini@redhat.com>
S: Maintained
F: qtest.c
F: tests/libqtest.*
@@ -1791,10 +2018,10 @@ F: qemu-option-trace.texi
F: scripts/tracetool.py
F: scripts/tracetool/
F: docs/devel/tracing.txt
-T: git git://github.com/stefanha/qemu.git tracing
+T: git https://github.com/stefanha/qemu.git tracing
TPM
-M: Stefan Berger <stefanb@linux.vnet.ibm.com>
+M: Stefan Berger <stefanb@linux.ibm.com>
S: Maintained
F: tpm.c
F: stubs/tpm.c
@@ -1804,7 +2031,7 @@ F: include/sysemu/tpm*
F: qapi/tpm.json
F: backends/tpm.c
F: tests/*tpm*
-T: git git://github.com/stefanberger/qemu-tpm.git tpm-next
+T: git https://github.com/stefanberger/qemu-tpm.git tpm-next
Checkpatch
S: Odd Fixes
@@ -1860,7 +2087,6 @@ F: tests/test-io-*
Sockets
M: Daniel P. Berrange <berrange@redhat.com>
M: Gerd Hoffmann <kraxel@redhat.com>
-M: Paolo Bonzini <pbonzini@redhat.com>
S: Maintained
F: include/qemu/sockets.h
F: util/qemu-sockets.c
@@ -1878,7 +2104,7 @@ F: tests/test-throttle.c
L: qemu-block@nongnu.org
UUID
-M: Fam Zheng <famz@redhat.com>
+M: Fam Zheng <fam@euphon.net>
S: Supported
F: util/uuid.c
F: include/qemu/uuid.h
@@ -1976,6 +2202,8 @@ F: disas/i386.c
MIPS target
M: Aurelien Jarno <aurelien@aurel32.net>
+R: Aleksandar Rikalo <arikalo@wavecomp.com>
+R: Stefan Markovic <smarkovic@wavecomp.com>
S: Maintained
F: tcg/mips/
F: disas/mips.c
@@ -1986,8 +2214,16 @@ S: Odd Fixes
F: tcg/ppc/
F: disas/ppc.c
+RISC-V
+M: Michael Clark <mjc@sifive.com>
+M: Palmer Dabbelt <palmer@sifive.com>
+M: Alistair Francis <Alistair.Francis@wdc.com>
+L: qemu-riscv@nongnu.org
+S: Maintained
+F: tcg/riscv/
+F: disas/riscv.c
+
S390 target
-M: Alexander Graf <agraf@suse.de>
M: Richard Henderson <rth@twiddle.net>
S: Maintained
F: tcg/s390/
@@ -2009,7 +2245,7 @@ F: disas/tci.c
Block drivers
-------------
VMDK
-M: Fam Zheng <famz@redhat.com>
+M: Fam Zheng <fam@euphon.net>
L: qemu-block@nongnu.org
S: Supported
F: block/vmdk.c
@@ -2020,23 +2256,22 @@ M: Jeff Cody <jcody@redhat.com>
L: qemu-block@nongnu.org
S: Supported
F: block/rbd.c
-T: git git://github.com/codyprime/qemu-kvm-jtc.git block
+T: git https://github.com/codyprime/qemu-kvm-jtc.git block
Sheepdog
M: Liu Yuan <namei.unix@gmail.com>
M: Jeff Cody <jcody@redhat.com>
L: qemu-block@nongnu.org
-L: sheepdog@lists.wpkg.org
S: Supported
F: block/sheepdog.c
-T: git git://github.com/codyprime/qemu-kvm-jtc.git block
+T: git https://github.com/codyprime/qemu-kvm-jtc.git block
VHDX
M: Jeff Cody <jcody@redhat.com>
L: qemu-block@nongnu.org
S: Supported
F: block/vhdx*
-T: git git://github.com/codyprime/qemu-kvm-jtc.git block
+T: git https://github.com/codyprime/qemu-kvm-jtc.git block
VDI
M: Stefan Weil <sw@weilnetz.de>
@@ -2049,13 +2284,12 @@ M: Ronnie Sahlberg <ronniesahlberg@gmail.com>
M: Paolo Bonzini <pbonzini@redhat.com>
M: Peter Lieven <pl@kamp.de>
L: qemu-block@nongnu.org
-S: Supported
+S: Odd Fixes
F: block/iscsi.c
F: block/iscsi-opts.c
Network Block Device (NBD)
M: Eric Blake <eblake@redhat.com>
-M: Paolo Bonzini <pbonzini@redhat.com>
L: qemu-block@nongnu.org
S: Maintained
F: block/nbd*
@@ -2064,7 +2298,7 @@ F: include/block/nbd*
F: qemu-nbd.*
F: blockdev-nbd.c
F: docs/interop/nbd.txt
-T: git git://repo.or.cz/qemu/ericb.git nbd
+T: git https://repo.or.cz/qemu/ericb.git nbd
NFS
M: Jeff Cody <jcody@redhat.com>
@@ -2072,7 +2306,7 @@ M: Peter Lieven <pl@kamp.de>
L: qemu-block@nongnu.org
S: Maintained
F: block/nfs.c
-T: git git://github.com/codyprime/qemu-kvm-jtc.git block
+T: git https://github.com/codyprime/qemu-kvm-jtc.git block
SSH
M: Richard W.M. Jones <rjones@redhat.com>
@@ -2080,30 +2314,30 @@ M: Jeff Cody <jcody@redhat.com>
L: qemu-block@nongnu.org
S: Supported
F: block/ssh.c
-T: git git://github.com/codyprime/qemu-kvm-jtc.git block
+T: git https://github.com/codyprime/qemu-kvm-jtc.git block
CURL
M: Jeff Cody <jcody@redhat.com>
L: qemu-block@nongnu.org
S: Supported
F: block/curl.c
-T: git git://github.com/codyprime/qemu-kvm-jtc.git block
+T: git https://github.com/codyprime/qemu-kvm-jtc.git block
GLUSTER
M: Jeff Cody <jcody@redhat.com>
L: qemu-block@nongnu.org
S: Supported
F: block/gluster.c
-T: git git://github.com/codyprime/qemu-kvm-jtc.git block
+T: git https://github.com/codyprime/qemu-kvm-jtc.git block
Null Block Driver
-M: Fam Zheng <famz@redhat.com>
+M: Fam Zheng <fam@euphon.net>
L: qemu-block@nongnu.org
S: Supported
F: block/null.c
NVMe Block Driver
-M: Fam Zheng <famz@redhat.com>
+M: Fam Zheng <fam@euphon.net>
L: qemu-block@nongnu.org
S: Supported
F: block/nvme*
@@ -2229,13 +2463,15 @@ S: Maintained
F: hw/rdma/*
F: hw/rdma/vmw/*
F: docs/pvrdma.txt
+F: contrib/rdmacm-mux/*
+F: qapi/rdma.json
Build and test automation
-------------------------
Build and test automation
M: Alex Bennée <alex.bennee@linaro.org>
-M: Fam Zheng <famz@redhat.com>
-R: Philippe Mathieu-Daudé <f4bug@amsat.org>
+M: Fam Zheng <fam@euphon.net>
+R: Philippe Mathieu-Daudé <philmd@redhat.com>
L: qemu-devel@nongnu.org
S: Maintained
F: .travis.yml
@@ -2261,6 +2497,12 @@ M: Daniel P. Berrange <berrange@redhat.com>
S: Odd Fixes
F: docs/devel/build-system.txt
+GIT Data Mining Config
+M: Alex Bennée <alex.bennee@linaro.org>
+S: Odd Fixes
+F: gitdm.config
+F: contrib/gitdm/*
+
Incompatible changes
R: libvir-list@redhat.com
F: qemu-deprecated.texi
diff --git a/Makefile b/Makefile
index f2947186a4..de898eab62 100644
--- a/Makefile
+++ b/Makefile
@@ -67,7 +67,7 @@ CONFIG_ALL=y
-include config-all-devices.mak
-include config-all-disas.mak
-config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios
+config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION
@echo $@ is out-of-date, running configure
@# TODO: The next lines include code which supports a smooth
@# transition from old configurations without config.status.
@@ -88,82 +88,26 @@ endif
include $(SRC_PATH)/rules.mak
GENERATED_FILES = qemu-version.h config-host.h qemu-options.def
-GENERATED_FILES += qapi/qapi-builtin-types.h qapi/qapi-builtin-types.c
-GENERATED_FILES += qapi/qapi-types.h qapi/qapi-types.c
-GENERATED_FILES += qapi/qapi-types-block-core.h qapi/qapi-types-block-core.c
-GENERATED_FILES += qapi/qapi-types-block.h qapi/qapi-types-block.c
-GENERATED_FILES += qapi/qapi-types-char.h qapi/qapi-types-char.c
-GENERATED_FILES += qapi/qapi-types-common.h qapi/qapi-types-common.c
-GENERATED_FILES += qapi/qapi-types-crypto.h qapi/qapi-types-crypto.c
-GENERATED_FILES += qapi/qapi-types-introspect.h qapi/qapi-types-introspect.c
-GENERATED_FILES += qapi/qapi-types-job.h qapi/qapi-types-job.c
-GENERATED_FILES += qapi/qapi-types-migration.h qapi/qapi-types-migration.c
-GENERATED_FILES += qapi/qapi-types-misc.h qapi/qapi-types-misc.c
-GENERATED_FILES += qapi/qapi-types-net.h qapi/qapi-types-net.c
-GENERATED_FILES += qapi/qapi-types-rocker.h qapi/qapi-types-rocker.c
-GENERATED_FILES += qapi/qapi-types-run-state.h qapi/qapi-types-run-state.c
-GENERATED_FILES += qapi/qapi-types-sockets.h qapi/qapi-types-sockets.c
-GENERATED_FILES += qapi/qapi-types-tpm.h qapi/qapi-types-tpm.c
-GENERATED_FILES += qapi/qapi-types-trace.h qapi/qapi-types-trace.c
-GENERATED_FILES += qapi/qapi-types-transaction.h qapi/qapi-types-transaction.c
-GENERATED_FILES += qapi/qapi-types-ui.h qapi/qapi-types-ui.c
-GENERATED_FILES += qapi/qapi-builtin-visit.h qapi/qapi-builtin-visit.c
-GENERATED_FILES += qapi/qapi-visit.h qapi/qapi-visit.c
-GENERATED_FILES += qapi/qapi-visit-block-core.h qapi/qapi-visit-block-core.c
-GENERATED_FILES += qapi/qapi-visit-block.h qapi/qapi-visit-block.c
-GENERATED_FILES += qapi/qapi-visit-char.h qapi/qapi-visit-char.c
-GENERATED_FILES += qapi/qapi-visit-common.h qapi/qapi-visit-common.c
-GENERATED_FILES += qapi/qapi-visit-crypto.h qapi/qapi-visit-crypto.c
-GENERATED_FILES += qapi/qapi-visit-introspect.h qapi/qapi-visit-introspect.c
-GENERATED_FILES += qapi/qapi-visit-job.h qapi/qapi-visit-job.c
-GENERATED_FILES += qapi/qapi-visit-migration.h qapi/qapi-visit-migration.c
-GENERATED_FILES += qapi/qapi-visit-misc.h qapi/qapi-visit-misc.c
-GENERATED_FILES += qapi/qapi-visit-net.h qapi/qapi-visit-net.c
-GENERATED_FILES += qapi/qapi-visit-rocker.h qapi/qapi-visit-rocker.c
-GENERATED_FILES += qapi/qapi-visit-run-state.h qapi/qapi-visit-run-state.c
-GENERATED_FILES += qapi/qapi-visit-sockets.h qapi/qapi-visit-sockets.c
-GENERATED_FILES += qapi/qapi-visit-tpm.h qapi/qapi-visit-tpm.c
-GENERATED_FILES += qapi/qapi-visit-trace.h qapi/qapi-visit-trace.c
-GENERATED_FILES += qapi/qapi-visit-transaction.h qapi/qapi-visit-transaction.c
-GENERATED_FILES += qapi/qapi-visit-ui.h qapi/qapi-visit-ui.c
-GENERATED_FILES += qapi/qapi-commands.h qapi/qapi-commands.c
-GENERATED_FILES += qapi/qapi-commands-block-core.h qapi/qapi-commands-block-core.c
-GENERATED_FILES += qapi/qapi-commands-block.h qapi/qapi-commands-block.c
-GENERATED_FILES += qapi/qapi-commands-char.h qapi/qapi-commands-char.c
-GENERATED_FILES += qapi/qapi-commands-common.h qapi/qapi-commands-common.c
-GENERATED_FILES += qapi/qapi-commands-crypto.h qapi/qapi-commands-crypto.c
-GENERATED_FILES += qapi/qapi-commands-introspect.h qapi/qapi-commands-introspect.c
-GENERATED_FILES += qapi/qapi-commands-job.h qapi/qapi-commands-job.c
-GENERATED_FILES += qapi/qapi-commands-migration.h qapi/qapi-commands-migration.c
-GENERATED_FILES += qapi/qapi-commands-misc.h qapi/qapi-commands-misc.c
-GENERATED_FILES += qapi/qapi-commands-net.h qapi/qapi-commands-net.c
-GENERATED_FILES += qapi/qapi-commands-rocker.h qapi/qapi-commands-rocker.c
-GENERATED_FILES += qapi/qapi-commands-run-state.h qapi/qapi-commands-run-state.c
-GENERATED_FILES += qapi/qapi-commands-sockets.h qapi/qapi-commands-sockets.c
-GENERATED_FILES += qapi/qapi-commands-tpm.h qapi/qapi-commands-tpm.c
-GENERATED_FILES += qapi/qapi-commands-trace.h qapi/qapi-commands-trace.c
-GENERATED_FILES += qapi/qapi-commands-transaction.h qapi/qapi-commands-transaction.c
-GENERATED_FILES += qapi/qapi-commands-ui.h qapi/qapi-commands-ui.c
-GENERATED_FILES += qapi/qapi-events.h qapi/qapi-events.c
-GENERATED_FILES += qapi/qapi-events-block-core.h qapi/qapi-events-block-core.c
-GENERATED_FILES += qapi/qapi-events-block.h qapi/qapi-events-block.c
-GENERATED_FILES += qapi/qapi-events-char.h qapi/qapi-events-char.c
-GENERATED_FILES += qapi/qapi-events-common.h qapi/qapi-events-common.c
-GENERATED_FILES += qapi/qapi-events-crypto.h qapi/qapi-events-crypto.c
-GENERATED_FILES += qapi/qapi-events-introspect.h qapi/qapi-events-introspect.c
-GENERATED_FILES += qapi/qapi-events-job.h qapi/qapi-events-job.c
-GENERATED_FILES += qapi/qapi-events-migration.h qapi/qapi-events-migration.c
-GENERATED_FILES += qapi/qapi-events-misc.h qapi/qapi-events-misc.c
-GENERATED_FILES += qapi/qapi-events-net.h qapi/qapi-events-net.c
-GENERATED_FILES += qapi/qapi-events-rocker.h qapi/qapi-events-rocker.c
-GENERATED_FILES += qapi/qapi-events-run-state.h qapi/qapi-events-run-state.c
-GENERATED_FILES += qapi/qapi-events-sockets.h qapi/qapi-events-sockets.c
-GENERATED_FILES += qapi/qapi-events-tpm.h qapi/qapi-events-tpm.c
-GENERATED_FILES += qapi/qapi-events-trace.h qapi/qapi-events-trace.c
-GENERATED_FILES += qapi/qapi-events-transaction.h qapi/qapi-events-transaction.c
-GENERATED_FILES += qapi/qapi-events-ui.h qapi/qapi-events-ui.c
-GENERATED_FILES += qapi/qapi-introspect.c qapi/qapi-introspect.h
-GENERATED_FILES += qapi/qapi-doc.texi
+
+#see Makefile.objs for the definition of QAPI_MODULES
+GENERATED_QAPI_FILES = qapi/qapi-builtin-types.h qapi/qapi-builtin-types.c
+GENERATED_QAPI_FILES += qapi/qapi-types.h qapi/qapi-types.c
+GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-types-%.h)
+GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-types-%.c)
+GENERATED_QAPI_FILES += qapi/qapi-builtin-visit.h qapi/qapi-builtin-visit.c
+GENERATED_QAPI_FILES += qapi/qapi-visit.h qapi/qapi-visit.c
+GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-visit-%.h)
+GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-visit-%.c)
+GENERATED_QAPI_FILES += qapi/qapi-commands.h qapi/qapi-commands.c
+GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-commands-%.h)
+GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-commands-%.c)
+GENERATED_QAPI_FILES += qapi/qapi-events.h qapi/qapi-events.c
+GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-events-%.h)
+GENERATED_QAPI_FILES += $(QAPI_MODULES:%=qapi/qapi-events-%.c)
+GENERATED_QAPI_FILES += qapi/qapi-introspect.c qapi/qapi-introspect.h
+GENERATED_QAPI_FILES += qapi/qapi-doc.texi
+
+GENERATED_FILES += $(GENERATED_QAPI_FILES)
GENERATED_FILES += trace/generated-tcg-tracers.h
@@ -418,6 +362,7 @@ dummy := $(call unnest-vars,, \
elf2dmp-obj-y \
ivshmem-client-obj-y \
ivshmem-server-obj-y \
+ rdmacm-mux-obj-y \
libvhost-user-obj-y \
vhost-user-scsi-obj-y \
vhost-user-blk-obj-y \
@@ -434,7 +379,8 @@ dummy := $(call unnest-vars,, \
ui-obj-m \
audio-obj-y \
audio-obj-m \
- trace-obj-y)
+ trace-obj-y \
+ slirp-obj-y)
include $(SRC_PATH)/tests/Makefile.include
@@ -507,7 +453,7 @@ CAP_CFLAGS += -DCAPSTONE_HAS_X86
subdir-capstone: .git-submodule-status
$(call quiet-command,$(MAKE) -C $(SRC_PATH)/capstone CAPSTONE_SHARED=no BUILDDIR="$(BUILD_DIR)/capstone" CC="$(CC)" AR="$(AR)" LD="$(LD)" RANLIB="$(RANLIB)" CFLAGS="$(CAP_CFLAGS)" $(SUBDIR_MAKEFLAGS) $(BUILD_DIR)/capstone/$(LIBCAPSTONE))
-$(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) \
+$(SUBDIR_RULES): libqemuutil.a $(common-obj-y) $(chardev-obj-y) $(slirp-obj-y) \
$(qom-obj-y) $(crypto-aes-obj-$(CONFIG_USER_ONLY))
ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
@@ -583,100 +529,10 @@ qga/qapi-generated/qapi-gen-timestamp: $(SRC_PATH)/qga/qapi-schema.json $(qapi-p
"GEN","$(@:%-timestamp=%)")
@>$@
-qapi-modules = $(SRC_PATH)/qapi/qapi-schema.json $(SRC_PATH)/qapi/common.json \
- $(SRC_PATH)/qapi/block.json $(SRC_PATH)/qapi/block-core.json \
- $(SRC_PATH)/qapi/char.json \
- $(SRC_PATH)/qapi/crypto.json \
- $(SRC_PATH)/qapi/introspect.json \
- $(SRC_PATH)/qapi/job.json \
- $(SRC_PATH)/qapi/migration.json \
- $(SRC_PATH)/qapi/misc.json \
- $(SRC_PATH)/qapi/net.json \
- $(SRC_PATH)/qapi/rocker.json \
- $(SRC_PATH)/qapi/run-state.json \
- $(SRC_PATH)/qapi/sockets.json \
- $(SRC_PATH)/qapi/tpm.json \
- $(SRC_PATH)/qapi/trace.json \
- $(SRC_PATH)/qapi/transaction.json \
- $(SRC_PATH)/qapi/ui.json
-
-qapi/qapi-builtin-types.c qapi/qapi-builtin-types.h \
-qapi/qapi-types.c qapi/qapi-types.h \
-qapi/qapi-types-block-core.c qapi/qapi-types-block-core.h \
-qapi/qapi-types-block.c qapi/qapi-types-block.h \
-qapi/qapi-types-char.c qapi/qapi-types-char.h \
-qapi/qapi-types-common.c qapi/qapi-types-common.h \
-qapi/qapi-types-crypto.c qapi/qapi-types-crypto.h \
-qapi/qapi-types-introspect.c qapi/qapi-types-introspect.h \
-qapi/qapi-types-job.c qapi/qapi-types-job.h \
-qapi/qapi-types-migration.c qapi/qapi-types-migration.h \
-qapi/qapi-types-misc.c qapi/qapi-types-misc.h \
-qapi/qapi-types-net.c qapi/qapi-types-net.h \
-qapi/qapi-types-rocker.c qapi/qapi-types-rocker.h \
-qapi/qapi-types-run-state.c qapi/qapi-types-run-state.h \
-qapi/qapi-types-sockets.c qapi/qapi-types-sockets.h \
-qapi/qapi-types-tpm.c qapi/qapi-types-tpm.h \
-qapi/qapi-types-trace.c qapi/qapi-types-trace.h \
-qapi/qapi-types-transaction.c qapi/qapi-types-transaction.h \
-qapi/qapi-types-ui.c qapi/qapi-types-ui.h \
-qapi/qapi-builtin-visit.c qapi/qapi-builtin-visit.h \
-qapi/qapi-visit.c qapi/qapi-visit.h \
-qapi/qapi-visit-block-core.c qapi/qapi-visit-block-core.h \
-qapi/qapi-visit-block.c qapi/qapi-visit-block.h \
-qapi/qapi-visit-char.c qapi/qapi-visit-char.h \
-qapi/qapi-visit-common.c qapi/qapi-visit-common.h \
-qapi/qapi-visit-crypto.c qapi/qapi-visit-crypto.h \
-qapi/qapi-visit-introspect.c qapi/qapi-visit-introspect.h \
-qapi/qapi-visit-job.c qapi/qapi-visit-job.h \
-qapi/qapi-visit-migration.c qapi/qapi-visit-migration.h \
-qapi/qapi-visit-misc.c qapi/qapi-visit-misc.h \
-qapi/qapi-visit-net.c qapi/qapi-visit-net.h \
-qapi/qapi-visit-rocker.c qapi/qapi-visit-rocker.h \
-qapi/qapi-visit-run-state.c qapi/qapi-visit-run-state.h \
-qapi/qapi-visit-sockets.c qapi/qapi-visit-sockets.h \
-qapi/qapi-visit-tpm.c qapi/qapi-visit-tpm.h \
-qapi/qapi-visit-trace.c qapi/qapi-visit-trace.h \
-qapi/qapi-visit-transaction.c qapi/qapi-visit-transaction.h \
-qapi/qapi-visit-ui.c qapi/qapi-visit-ui.h \
-qapi/qapi-commands.h qapi/qapi-commands.c \
-qapi/qapi-commands-block-core.c qapi/qapi-commands-block-core.h \
-qapi/qapi-commands-block.c qapi/qapi-commands-block.h \
-qapi/qapi-commands-char.c qapi/qapi-commands-char.h \
-qapi/qapi-commands-common.c qapi/qapi-commands-common.h \
-qapi/qapi-commands-crypto.c qapi/qapi-commands-crypto.h \
-qapi/qapi-commands-introspect.c qapi/qapi-commands-introspect.h \
-qapi/qapi-commands-job.c qapi/qapi-commands-job.h \
-qapi/qapi-commands-migration.c qapi/qapi-commands-migration.h \
-qapi/qapi-commands-misc.c qapi/qapi-commands-misc.h \
-qapi/qapi-commands-net.c qapi/qapi-commands-net.h \
-qapi/qapi-commands-rocker.c qapi/qapi-commands-rocker.h \
-qapi/qapi-commands-run-state.c qapi/qapi-commands-run-state.h \
-qapi/qapi-commands-sockets.c qapi/qapi-commands-sockets.h \
-qapi/qapi-commands-tpm.c qapi/qapi-commands-tpm.h \
-qapi/qapi-commands-trace.c qapi/qapi-commands-trace.h \
-qapi/qapi-commands-transaction.c qapi/qapi-commands-transaction.h \
-qapi/qapi-commands-ui.c qapi/qapi-commands-ui.h \
-qapi/qapi-events.c qapi/qapi-events.h \
-qapi/qapi-events-block-core.c qapi/qapi-events-block-core.h \
-qapi/qapi-events-block.c qapi/qapi-events-block.h \
-qapi/qapi-events-char.c qapi/qapi-events-char.h \
-qapi/qapi-events-common.c qapi/qapi-events-common.h \
-qapi/qapi-events-crypto.c qapi/qapi-events-crypto.h \
-qapi/qapi-events-introspect.c qapi/qapi-events-introspect.h \
-qapi/qapi-events-job.c qapi/qapi-events-job.h \
-qapi/qapi-events-migration.c qapi/qapi-events-migration.h \
-qapi/qapi-events-misc.c qapi/qapi-events-misc.h \
-qapi/qapi-events-net.c qapi/qapi-events-net.h \
-qapi/qapi-events-rocker.c qapi/qapi-events-rocker.h \
-qapi/qapi-events-run-state.c qapi/qapi-events-run-state.h \
-qapi/qapi-events-sockets.c qapi/qapi-events-sockets.h \
-qapi/qapi-events-tpm.c qapi/qapi-events-tpm.h \
-qapi/qapi-events-trace.c qapi/qapi-events-trace.h \
-qapi/qapi-events-transaction.c qapi/qapi-events-transaction.h \
-qapi/qapi-events-ui.c qapi/qapi-events-ui.h \
-qapi/qapi-introspect.h qapi/qapi-introspect.c \
-qapi/qapi-doc.texi: \
-qapi-gen-timestamp ;
+qapi-modules = $(SRC_PATH)/qapi/qapi-schema.json \
+ $(QAPI_MODULES:%=$(SRC_PATH)/qapi/%.json)
+
+$(GENERATED_QAPI_FILES): qapi-gen-timestamp ;
qapi-gen-timestamp: $(qapi-modules) $(qapi-py)
$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \
-o "qapi" -b $<, \
@@ -726,6 +582,10 @@ vhost-user-scsi$(EXESUF): $(vhost-user-scsi-obj-y) libvhost-user.a
vhost-user-blk$(EXESUF): $(vhost-user-blk-obj-y) libvhost-user.a
$(call LINK, $^)
+rdmacm-mux$(EXESUF): LIBS += "-libumad"
+rdmacm-mux$(EXESUF): $(rdmacm-mux-obj-y) $(COMMON_LDADDS)
+ $(call LINK, $^)
+
module_block.h: $(SRC_PATH)/scripts/modules/module_block.py config-host.mak
$(call quiet-command,$(PYTHON) $< $@ \
$(addprefix $(SRC_PATH)/,$(patsubst %.mo,%.c,$(block-obj-m))), \
@@ -794,9 +654,9 @@ distclean: clean
rm -Rf .sdk
if test -f dtc/version_gen.h; then $(MAKE) $(DTC_MAKE_ARGS) clean; fi
-KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
+KEYMAPS=da en-gb et fr fr-ch is lt no pt-br sv \
ar de en-us fi fr-be hr it lv nl pl ru th \
-common de-ch es fo fr-ca hu ja mk nl-be pt sl tr \
+de-ch es fo fr-ca hu ja mk pt sl tr \
bepo cz
ifdef INSTALL_BLOBS
@@ -809,7 +669,6 @@ pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \
efi-e1000.rom efi-eepro100.rom efi-ne2k_pci.rom \
efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom \
efi-e1000e.rom efi-vmxnet3.rom \
-qemu-icon.bmp qemu_logo_no_text.svg \
bamboo.dtb canyonlands.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \
multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin \
s390-ccw.img s390-netboot.img \
@@ -862,6 +721,7 @@ ifneq (,$(findstring qemu-ga,$(TOOLS)))
endif
endif
+ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512
install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-localstatedir
ifneq ($(TOOLS),)
@@ -883,6 +743,20 @@ ifneq ($(BLOBS),)
$(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \
done
endif
+ for s in $(ICON_SIZES); do \
+ mkdir -p "$(DESTDIR)/$(qemu_icondir)/hicolor/$${s}/apps"; \
+ $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu_$${s}.png \
+ "$(DESTDIR)/$(qemu_icondir)/hicolor/$${s}/apps/qemu.png"; \
+ done; \
+ mkdir -p "$(DESTDIR)/$(qemu_icondir)/hicolor/32x32/apps"; \
+ $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu_32x32.bmp \
+ "$(DESTDIR)/$(qemu_icondir)/hicolor/32x32/apps/qemu.bmp"; \
+ mkdir -p "$(DESTDIR)/$(qemu_icondir)/hicolor/scalable/apps"; \
+ $(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu.svg \
+ "$(DESTDIR)/$(qemu_icondir)/hicolor/scalable/apps/qemu.svg"
+ mkdir -p "$(DESTDIR)/$(qemu_desktopdir)"
+ $(INSTALL_DATA) $(SRC_PATH)/ui/qemu.desktop \
+ "$(DESTDIR)/$(qemu_desktopdir)/qemu.desktop"
ifdef CONFIG_GTK
$(MAKE) -C po $@
endif
@@ -1000,6 +874,8 @@ docs/interop/qemu-qmp-ref.dvi docs/interop/qemu-qmp-ref.html \
docs/interop/qemu-qmp-ref.txt docs/interop/qemu-qmp-ref.7: \
docs/interop/qemu-qmp-ref.texi docs/interop/qemu-qmp-qapi.texi
+$(filter %.1 %.7 %.8,$(DOCS)): scripts/texi2pod.pl
+
# Reports/Analysis
%/coverage-report.html:
diff --git a/Makefile.objs b/Makefile.objs
index 1e1ff387d7..67a054b08a 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -1,66 +1,23 @@
+QAPI_MODULES = block-core block char common crypto introspect job migration
+QAPI_MODULES += misc net rdma rocker run-state sockets tpm trace transaction
+QAPI_MODULES += ui
+
#######################################################################
# Common libraries for tools and emulators
stub-obj-y = stubs/ crypto/
util-obj-y = util/ qobject/ qapi/
util-obj-y += qapi/qapi-builtin-types.o
util-obj-y += qapi/qapi-types.o
-util-obj-y += qapi/qapi-types-block-core.o
-util-obj-y += qapi/qapi-types-block.o
-util-obj-y += qapi/qapi-types-char.o
-util-obj-y += qapi/qapi-types-common.o
-util-obj-y += qapi/qapi-types-crypto.o
-util-obj-y += qapi/qapi-types-introspect.o
-util-obj-y += qapi/qapi-types-job.o
-util-obj-y += qapi/qapi-types-migration.o
-util-obj-y += qapi/qapi-types-misc.o
-util-obj-y += qapi/qapi-types-net.o
-util-obj-y += qapi/qapi-types-rocker.o
-util-obj-y += qapi/qapi-types-run-state.o
-util-obj-y += qapi/qapi-types-sockets.o
-util-obj-y += qapi/qapi-types-tpm.o
-util-obj-y += qapi/qapi-types-trace.o
-util-obj-y += qapi/qapi-types-transaction.o
-util-obj-y += qapi/qapi-types-ui.o
+util-obj-y += $(QAPI_MODULES:%=qapi/qapi-types-%.o)
util-obj-y += qapi/qapi-builtin-visit.o
util-obj-y += qapi/qapi-visit.o
-util-obj-y += qapi/qapi-visit-block-core.o
-util-obj-y += qapi/qapi-visit-block.o
-util-obj-y += qapi/qapi-visit-char.o
-util-obj-y += qapi/qapi-visit-common.o
-util-obj-y += qapi/qapi-visit-crypto.o
-util-obj-y += qapi/qapi-visit-introspect.o
-util-obj-y += qapi/qapi-visit-job.o
-util-obj-y += qapi/qapi-visit-migration.o
-util-obj-y += qapi/qapi-visit-misc.o
-util-obj-y += qapi/qapi-visit-net.o
-util-obj-y += qapi/qapi-visit-rocker.o
-util-obj-y += qapi/qapi-visit-run-state.o
-util-obj-y += qapi/qapi-visit-sockets.o
-util-obj-y += qapi/qapi-visit-tpm.o
-util-obj-y += qapi/qapi-visit-trace.o
-util-obj-y += qapi/qapi-visit-transaction.o
-util-obj-y += qapi/qapi-visit-ui.o
+util-obj-y += $(QAPI_MODULES:%=qapi/qapi-visit-%.o)
util-obj-y += qapi/qapi-events.o
-util-obj-y += qapi/qapi-events-block-core.o
-util-obj-y += qapi/qapi-events-block.o
-util-obj-y += qapi/qapi-events-char.o
-util-obj-y += qapi/qapi-events-common.o
-util-obj-y += qapi/qapi-events-crypto.o
-util-obj-y += qapi/qapi-events-introspect.o
-util-obj-y += qapi/qapi-events-job.o
-util-obj-y += qapi/qapi-events-migration.o
-util-obj-y += qapi/qapi-events-misc.o
-util-obj-y += qapi/qapi-events-net.o
-util-obj-y += qapi/qapi-events-rocker.o
-util-obj-y += qapi/qapi-events-run-state.o
-util-obj-y += qapi/qapi-events-sockets.o
-util-obj-y += qapi/qapi-events-tpm.o
-util-obj-y += qapi/qapi-events-trace.o
-util-obj-y += qapi/qapi-events-transaction.o
-util-obj-y += qapi/qapi-events-ui.o
+util-obj-y += $(QAPI_MODULES:%=qapi/qapi-events-%.o)
util-obj-y += qapi/qapi-introspect.o
chardev-obj-y = chardev/
+slirp-obj-$(CONFIG_SLIRP) = slirp/
#######################################################################
# block-obj-y is code used by both qemu system emulation and qemu-img
@@ -123,8 +80,6 @@ common-obj-y += vl.o
vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS)
common-obj-$(CONFIG_TPM) += tpm.o
-common-obj-$(CONFIG_SLIRP) += slirp/
-
common-obj-y += backends/
common-obj-y += chardev/
@@ -138,23 +93,7 @@ common-obj-$(CONFIG_FDT) += device_tree.o
# qapi
common-obj-y += qapi/qapi-commands.o
-common-obj-y += qapi/qapi-commands-block-core.o
-common-obj-y += qapi/qapi-commands-block.o
-common-obj-y += qapi/qapi-commands-char.o
-common-obj-y += qapi/qapi-commands-common.o
-common-obj-y += qapi/qapi-commands-crypto.o
-common-obj-y += qapi/qapi-commands-introspect.o
-common-obj-y += qapi/qapi-commands-job.o
-common-obj-y += qapi/qapi-commands-migration.o
-common-obj-y += qapi/qapi-commands-misc.o
-common-obj-y += qapi/qapi-commands-net.o
-common-obj-y += qapi/qapi-commands-rocker.o
-common-obj-y += qapi/qapi-commands-run-state.o
-common-obj-y += qapi/qapi-commands-sockets.o
-common-obj-y += qapi/qapi-commands-tpm.o
-common-obj-y += qapi/qapi-commands-trace.o
-common-obj-y += qapi/qapi-commands-transaction.o
-common-obj-y += qapi/qapi-commands-ui.o
+common-obj-y += $(QAPI_MODULES:%=qapi/qapi-commands-%.o)
common-obj-y += qapi/qapi-introspect.o
common-obj-y += qmp.o hmp.o
endif
@@ -194,6 +133,7 @@ vhost-user-scsi.o-cflags := $(LIBISCSI_CFLAGS)
vhost-user-scsi.o-libs := $(LIBISCSI_LIBS)
vhost-user-scsi-obj-y = contrib/vhost-user-scsi/
vhost-user-blk-obj-y = contrib/vhost-user-blk/
+rdmacm-mux-obj-y = contrib/rdmacm-mux/
######################################################################
trace-events-subdirs =
@@ -243,6 +183,7 @@ trace-events-subdirs += hw/vfio
trace-events-subdirs += hw/virtio
trace-events-subdirs += hw/watchdog
trace-events-subdirs += hw/xen
+trace-events-subdirs += hw/gpio
trace-events-subdirs += io
trace-events-subdirs += linux-user
trace-events-subdirs += migration
@@ -251,6 +192,7 @@ trace-events-subdirs += net
trace-events-subdirs += qapi
trace-events-subdirs += qom
trace-events-subdirs += scsi
+trace-events-subdirs += slirp
trace-events-subdirs += target/arm
trace-events-subdirs += target/i386
trace-events-subdirs += target/mips
diff --git a/Makefile.target b/Makefile.target
index 4d56298bbf..39f72e81be 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -158,9 +158,6 @@ GENERATED_FILES += hmp-commands.h hmp-commands-info.h
endif # CONFIG_SOFTMMU
-# Workaround for http://gcc.gnu.org/PR55489, see configure.
-%/translate.o: QEMU_CFLAGS += $(TRANSLATE_OPT_CFLAGS)
-
dummy := $(call unnest-vars,,obj-y)
all-obj-y := $(obj-y)
@@ -168,6 +165,7 @@ target-obj-y :=
block-obj-y :=
common-obj-y :=
chardev-obj-y :=
+slirp-obj-y :=
include $(SRC_PATH)/Makefile.objs
dummy := $(call unnest-vars,,target-obj-y)
target-obj-y-save := $(target-obj-y)
@@ -180,7 +178,8 @@ dummy := $(call unnest-vars,.., \
qom-obj-y \
io-obj-y \
common-obj-y \
- common-obj-m)
+ common-obj-m \
+ slirp-obj-y)
target-obj-y := $(target-obj-y-save)
all-obj-y += $(common-obj-y)
all-obj-y += $(target-obj-y)
@@ -189,6 +188,7 @@ all-obj-$(CONFIG_SOFTMMU) += $(block-obj-y) $(chardev-obj-y)
all-obj-$(CONFIG_USER_ONLY) += $(crypto-aes-obj-y)
all-obj-$(CONFIG_SOFTMMU) += $(crypto-obj-y)
all-obj-$(CONFIG_SOFTMMU) += $(io-obj-y)
+all-obj-$(CONFIG_SOFTMMU) += $(slirp-obj-y)
$(QEMU_PROG_BUILD): config-devices.mak
diff --git a/README b/README
index 49a9fd09cd..441c33eb2f 100644
--- a/README
+++ b/README
@@ -54,7 +54,7 @@ Submitting patches
The QEMU source code is maintained under the GIT version control system.
- git clone git://git.qemu.org/qemu.git
+ git clone https://git.qemu.org/git/qemu.git
When submitting patches, one common approach is to use 'git
format-patch' and/or 'git send-email' to format & send the mail to the
@@ -70,7 +70,7 @@ the QEMU website
The QEMU website is also maintained under source control.
- git clone git://git.qemu.org/qemu-web.git
+ git clone https://git.qemu.org/git/qemu-web.git
https://www.qemu.org/2017/02/04/the-new-qemu-website-is-up/
A 'git-publish' utility was created to make above process less
diff --git a/VERSION b/VERSION
index 929fd9fc83..0bc4611411 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.0.50
+3.1.50
diff --git a/accel/accel.c b/accel/accel.c
index 966b2d8f53..68b6d56323 100644
--- a/accel/accel.c
+++ b/accel/accel.c
@@ -34,6 +34,7 @@
#include "qom/object.h"
#include "qemu/error-report.h"
#include "qemu/option.h"
+#include "qapi/error.h"
static const TypeInfo accel_type = {
.name = TYPE_ACCEL,
@@ -68,7 +69,7 @@ static int accel_init_machine(AccelClass *acc, MachineState *ms)
return ret;
}
-void configure_accelerator(MachineState *ms)
+void configure_accelerator(MachineState *ms, const char *progname)
{
const char *accel;
char **accel_list, **tmp;
@@ -79,8 +80,20 @@ void configure_accelerator(MachineState *ms)
accel = qemu_opt_get(qemu_get_machine_opts(), "accel");
if (accel == NULL) {
- /* Use the default "accelerator", tcg */
- accel = "tcg";
+ /* Select the default accelerator */
+ int pnlen = strlen(progname);
+ if (pnlen >= 3 && g_str_equal(&progname[pnlen - 3], "kvm")) {
+ /* If the program name ends with "kvm", we prefer KVM */
+ accel = "kvm:tcg";
+ } else {
+#if defined(CONFIG_TCG)
+ accel = "tcg";
+#elif defined(CONFIG_KVM)
+ accel = "kvm";
+#else
+#error "No default accelerator available"
+#endif
+ }
}
accel_list = g_strsplit(accel, ":", 0);
@@ -118,12 +131,6 @@ void configure_accelerator(MachineState *ms)
}
}
-void accel_register_compat_props(AccelState *accel)
-{
- AccelClass *class = ACCEL_GET_CLASS(accel);
- register_compat_props_array(class->global_props);
-}
-
void accel_setup_post(MachineState *ms)
{
AccelState *accel = ms->accelerator;
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
index de12f78eb8..4e1de942ce 100644
--- a/accel/kvm/kvm-all.c
+++ b/accel/kvm/kvm-all.c
@@ -79,13 +79,14 @@ struct KVMState
int fd;
int vmfd;
int coalesced_mmio;
+ int coalesced_pio;
struct kvm_coalesced_mmio_ring *coalesced_mmio_ring;
bool coalesced_flush_in_progress;
int vcpu_events;
int robust_singlestep;
int debugregs;
#ifdef KVM_CAP_SET_GUEST_DEBUG
- struct kvm_sw_breakpoint_head kvm_sw_breakpoints;
+ QTAILQ_HEAD(, kvm_sw_breakpoint) kvm_sw_breakpoints;
#endif
int many_ioeventfds;
int intx_set_mask;
@@ -101,7 +102,7 @@ struct KVMState
int nr_allocated_irq_routes;
unsigned long *used_gsi_bitmap;
unsigned int gsi_count;
- QTAILQ_HEAD(msi_hashtab, KVMMSIRoute) msi_hashtab[KVM_MSI_HASHTAB_SIZE];
+ QTAILQ_HEAD(, KVMMSIRoute) msi_hashtab[KVM_MSI_HASHTAB_SIZE];
#endif
KVMMemoryListener memory_listener;
QLIST_HEAD(, KVMParkedVcpu) kvm_parked_vcpus;
@@ -560,6 +561,45 @@ static void kvm_uncoalesce_mmio_region(MemoryListener *listener,
}
}
+static void kvm_coalesce_pio_add(MemoryListener *listener,
+ MemoryRegionSection *section,
+ hwaddr start, hwaddr size)
+{
+ KVMState *s = kvm_state;
+
+ if (s->coalesced_pio) {
+ struct kvm_coalesced_mmio_zone zone;
+
+ zone.addr = start;
+ zone.size = size;
+ zone.pio = 1;
+
+ (void)kvm_vm_ioctl(s, KVM_REGISTER_COALESCED_MMIO, &zone);
+ }
+}
+
+static void kvm_coalesce_pio_del(MemoryListener *listener,
+ MemoryRegionSection *section,
+ hwaddr start, hwaddr size)
+{
+ KVMState *s = kvm_state;
+
+ if (s->coalesced_pio) {
+ struct kvm_coalesced_mmio_zone zone;
+
+ zone.addr = start;
+ zone.size = size;
+ zone.pio = 1;
+
+ (void)kvm_vm_ioctl(s, KVM_UNREGISTER_COALESCED_MMIO, &zone);
+ }
+}
+
+static MemoryListener kvm_coalesced_pio_listener = {
+ .coalesced_io_add = kvm_coalesce_pio_add,
+ .coalesced_io_del = kvm_coalesce_pio_del,
+};
+
int kvm_check_extension(KVMState *s, unsigned int extension)
{
int ret;
@@ -1616,6 +1656,8 @@ static int kvm_init(MachineState *ms)
}
s->coalesced_mmio = kvm_check_extension(s, KVM_CAP_COALESCED_MMIO);
+ s->coalesced_pio = s->coalesced_mmio &&
+ kvm_check_extension(s, KVM_CAP_COALESCED_PIO);
#ifdef KVM_CAP_VCPU_EVENTS
s->vcpu_events = kvm_check_extension(s, KVM_CAP_VCPU_EVENTS);
@@ -1686,13 +1728,15 @@ static int kvm_init(MachineState *ms)
s->memory_listener.listener.eventfd_add = kvm_mem_ioeventfd_add;
s->memory_listener.listener.eventfd_del = kvm_mem_ioeventfd_del;
}
- s->memory_listener.listener.coalesced_mmio_add = kvm_coalesce_mmio_region;
- s->memory_listener.listener.coalesced_mmio_del = kvm_uncoalesce_mmio_region;
+ s->memory_listener.listener.coalesced_io_add = kvm_coalesce_mmio_region;
+ s->memory_listener.listener.coalesced_io_del = kvm_uncoalesce_mmio_region;
kvm_memory_listener_register(s, &s->memory_listener,
&address_space_memory, 0);
memory_listener_register(&kvm_io_listener,
&address_space_io);
+ memory_listener_register(&kvm_coalesced_pio_listener,
+ &address_space_io);
s->many_ioeventfds = kvm_check_many_ioeventfds();
@@ -1778,7 +1822,13 @@ void kvm_flush_coalesced_mmio_buffer(void)
ent = &ring->coalesced_mmio[ring->first];
- cpu_physical_memory_write(ent->phys_addr, ent->data, ent->len);
+ if (ent->pio == 1) {
+ address_space_rw(&address_space_io, ent->phys_addr,
+ MEMTXATTRS_UNSPECIFIED, ent->data,
+ ent->len, true);
+ } else {
+ cpu_physical_memory_write(ent->phys_addr, ent->data, ent->len);
+ }
smp_wmb();
ring->first = (ring->first + 1) % KVM_COALESCED_MMIO_MAX;
}
diff --git a/accel/tcg/atomic_template.h b/accel/tcg/atomic_template.h
index d751bcba48..efde12fdb2 100644
--- a/accel/tcg/atomic_template.h
+++ b/accel/tcg/atomic_template.h
@@ -100,19 +100,24 @@ ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, target_ulong addr,
DATA_TYPE ret;
ATOMIC_TRACE_RMW;
+#if DATA_SIZE == 16
+ ret = atomic16_cmpxchg(haddr, cmpv, newv);
+#else
ret = atomic_cmpxchg__nocheck(haddr, cmpv, newv);
+#endif
ATOMIC_MMU_CLEANUP;
return ret;
}
#if DATA_SIZE >= 16
+#if HAVE_ATOMIC128
ABI_TYPE ATOMIC_NAME(ld)(CPUArchState *env, target_ulong addr EXTRA_ARGS)
{
ATOMIC_MMU_DECLS;
DATA_TYPE val, *haddr = ATOMIC_MMU_LOOKUP;
ATOMIC_TRACE_LD;
- __atomic_load(haddr, &val, __ATOMIC_RELAXED);
+ val = atomic16_read(haddr);
ATOMIC_MMU_CLEANUP;
return val;
}
@@ -124,9 +129,10 @@ void ATOMIC_NAME(st)(CPUArchState *env, target_ulong addr,
DATA_TYPE *haddr = ATOMIC_MMU_LOOKUP;
ATOMIC_TRACE_ST;
- __atomic_store(haddr, &val, __ATOMIC_RELAXED);
+ atomic16_set(haddr, val);
ATOMIC_MMU_CLEANUP;
}
+#endif
#else
ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, target_ulong addr,
ABI_TYPE val EXTRA_ARGS)
@@ -228,19 +234,24 @@ ABI_TYPE ATOMIC_NAME(cmpxchg)(CPUArchState *env, target_ulong addr,
DATA_TYPE ret;
ATOMIC_TRACE_RMW;
+#if DATA_SIZE == 16
+ ret = atomic16_cmpxchg(haddr, BSWAP(cmpv), BSWAP(newv));
+#else
ret = atomic_cmpxchg__nocheck(haddr, BSWAP(cmpv), BSWAP(newv));
+#endif
ATOMIC_MMU_CLEANUP;
return BSWAP(ret);
}
#if DATA_SIZE >= 16
+#if HAVE_ATOMIC128
ABI_TYPE ATOMIC_NAME(ld)(CPUArchState *env, target_ulong addr EXTRA_ARGS)
{
ATOMIC_MMU_DECLS;
DATA_TYPE val, *haddr = ATOMIC_MMU_LOOKUP;
ATOMIC_TRACE_LD;
- __atomic_load(haddr, &val, __ATOMIC_RELAXED);
+ val = atomic16_read(haddr);
ATOMIC_MMU_CLEANUP;
return BSWAP(val);
}
@@ -253,9 +264,10 @@ void ATOMIC_NAME(st)(CPUArchState *env, target_ulong addr,
ATOMIC_TRACE_ST;
val = BSWAP(val);
- __atomic_store(haddr, &val, __ATOMIC_RELAXED);
+ atomic16_set(haddr, val);
ATOMIC_MMU_CLEANUP;
}
+#endif
#else
ABI_TYPE ATOMIC_NAME(xchg)(CPUArchState *env, target_ulong addr,
ABI_TYPE val EXTRA_ARGS)
diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c
index 6bcb6d99bd..870027d435 100644
--- a/accel/tcg/cpu-exec.c
+++ b/accel/tcg/cpu-exec.c
@@ -416,7 +416,7 @@ static inline TranslationBlock *tb_find(CPUState *cpu,
}
#endif
/* See if we can patch the calling TB. */
- if (last_tb && !qemu_loglevel_mask(CPU_LOG_TB_NOCHAIN)) {
+ if (last_tb) {
tb_add_jump(last_tb, tb_exit, tb);
}
return tb;
diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
index f4702ce91f..af6bd8ccf9 100644
--- a/accel/tcg/cputlb.c
+++ b/accel/tcg/cputlb.c
@@ -32,6 +32,7 @@
#include "exec/log.h"
#include "exec/helper-proto.h"
#include "qemu/atomic.h"
+#include "qemu/atomic128.h"
/* DEBUG defines, enable DEBUG_TLB_LOG to log to the CPU_LOG_MMU target */
/* #define DEBUG_TLB */
@@ -58,9 +59,9 @@
} \
} while (0)
-#define assert_cpu_is_self(this_cpu) do { \
+#define assert_cpu_is_self(cpu) do { \
if (DEBUG_TLB_GATE) { \
- g_assert(!cpu->created || qemu_cpu_is_self(cpu)); \
+ g_assert(!(cpu)->created || qemu_cpu_is_self(cpu)); \
} \
} while (0)
@@ -73,6 +74,16 @@ QEMU_BUILD_BUG_ON(sizeof(target_ulong) > sizeof(run_on_cpu_data));
QEMU_BUILD_BUG_ON(NB_MMU_MODES > 16);
#define ALL_MMUIDX_BITS ((1 << NB_MMU_MODES) - 1)
+void tlb_init(CPUState *cpu)
+{
+ CPUArchState *env = cpu->env_ptr;
+
+ qemu_spin_init(&env->tlb_c.lock);
+
+ /* Ensure that cpu_reset performs a full flush. */
+ env->tlb_c.dirty = ALL_MMUIDX_BITS;
+}
+
/* flush_all_helper: run fn across all cpus
*
* If the wait flag is set then the src cpu's helper will be queued as
@@ -92,128 +103,89 @@ static void flush_all_helper(CPUState *src, run_on_cpu_func fn,
}
}
-size_t tlb_flush_count(void)
+void tlb_flush_counts(size_t *pfull, size_t *ppart, size_t *pelide)
{
CPUState *cpu;
- size_t count = 0;
+ size_t full = 0, part = 0, elide = 0;
CPU_FOREACH(cpu) {
CPUArchState *env = cpu->env_ptr;
- count += atomic_read(&env->tlb_flush_count);
- }
- return count;
-}
-
-/* This is OK because CPU architectures generally permit an
- * implementation to drop entries from the TLB at any time, so
- * flushing more entries than required is only an efficiency issue,
- * not a correctness issue.
- */
-static void tlb_flush_nocheck(CPUState *cpu)
-{
- CPUArchState *env = cpu->env_ptr;
-
- /* The QOM tests will trigger tlb_flushes without setting up TCG
- * so we bug out here in that case.
- */
- if (!tcg_enabled()) {
- return;
- }
-
- assert_cpu_is_self(cpu);
- atomic_set(&env->tlb_flush_count, env->tlb_flush_count + 1);
- tlb_debug("(count: %zu)\n", tlb_flush_count());
-
- memset(env->tlb_table, -1, sizeof(env->tlb_table));
- memset(env->tlb_v_table, -1, sizeof(env->tlb_v_table));
- cpu_tb_jmp_cache_clear(cpu);
-
- env->vtlb_index = 0;
- env->tlb_flush_addr = -1;
- env->tlb_flush_mask = 0;
-
- atomic_mb_set(&cpu->pending_tlb_flush, 0);
-}
-
-static void tlb_flush_global_async_work(CPUState *cpu, run_on_cpu_data data)
-{
- tlb_flush_nocheck(cpu);
-}
-
-void tlb_flush(CPUState *cpu)
-{
- if (cpu->created && !qemu_cpu_is_self(cpu)) {
- if (atomic_mb_read(&cpu->pending_tlb_flush) != ALL_MMUIDX_BITS) {
- atomic_mb_set(&cpu->pending_tlb_flush, ALL_MMUIDX_BITS);
- async_run_on_cpu(cpu, tlb_flush_global_async_work,
- RUN_ON_CPU_NULL);
- }
- } else {
- tlb_flush_nocheck(cpu);
+ full += atomic_read(&env->tlb_c.full_flush_count);
+ part += atomic_read(&env->tlb_c.part_flush_count);
+ elide += atomic_read(&env->tlb_c.elide_flush_count);
}
+ *pfull = full;
+ *ppart = part;
+ *pelide = elide;
}
-void tlb_flush_all_cpus(CPUState *src_cpu)
-{
- const run_on_cpu_func fn = tlb_flush_global_async_work;
- flush_all_helper(src_cpu, fn, RUN_ON_CPU_NULL);
- fn(src_cpu, RUN_ON_CPU_NULL);
-}
-
-void tlb_flush_all_cpus_synced(CPUState *src_cpu)
+static void tlb_flush_one_mmuidx_locked(CPUArchState *env, int mmu_idx)
{
- const run_on_cpu_func fn = tlb_flush_global_async_work;
- flush_all_helper(src_cpu, fn, RUN_ON_CPU_NULL);
- async_safe_run_on_cpu(src_cpu, fn, RUN_ON_CPU_NULL);
+ memset(env->tlb_table[mmu_idx], -1, sizeof(env->tlb_table[0]));
+ memset(env->tlb_v_table[mmu_idx], -1, sizeof(env->tlb_v_table[0]));
+ env->tlb_d[mmu_idx].large_page_addr = -1;
+ env->tlb_d[mmu_idx].large_page_mask = -1;
+ env->tlb_d[mmu_idx].vindex = 0;
}
static void tlb_flush_by_mmuidx_async_work(CPUState *cpu, run_on_cpu_data data)
{
CPUArchState *env = cpu->env_ptr;
- unsigned long mmu_idx_bitmask = data.host_int;
- int mmu_idx;
+ uint16_t asked = data.host_int;
+ uint16_t all_dirty, work, to_clean;
assert_cpu_is_self(cpu);
- tlb_debug("start: mmu_idx:0x%04lx\n", mmu_idx_bitmask);
+ tlb_debug("mmu_idx:0x%04" PRIx16 "\n", asked);
- for (mmu_idx = 0; mmu_idx < NB_MMU_MODES; mmu_idx++) {
+ qemu_spin_lock(&env->tlb_c.lock);
- if (test_bit(mmu_idx, &mmu_idx_bitmask)) {
- tlb_debug("%d\n", mmu_idx);
+ all_dirty = env->tlb_c.dirty;
+ to_clean = asked & all_dirty;
+ all_dirty &= ~to_clean;
+ env->tlb_c.dirty = all_dirty;
- memset(env->tlb_table[mmu_idx], -1, sizeof(env->tlb_table[0]));
- memset(env->tlb_v_table[mmu_idx], -1, sizeof(env->tlb_v_table[0]));
- }
+ for (work = to_clean; work != 0; work &= work - 1) {
+ int mmu_idx = ctz32(work);
+ tlb_flush_one_mmuidx_locked(env, mmu_idx);
}
+ qemu_spin_unlock(&env->tlb_c.lock);
+
cpu_tb_jmp_cache_clear(cpu);
- tlb_debug("done\n");
+ if (to_clean == ALL_MMUIDX_BITS) {
+ atomic_set(&env->tlb_c.full_flush_count,
+ env->tlb_c.full_flush_count + 1);
+ } else {
+ atomic_set(&env->tlb_c.part_flush_count,
+ env->tlb_c.part_flush_count + ctpop16(to_clean));
+ if (to_clean != asked) {
+ atomic_set(&env->tlb_c.elide_flush_count,
+ env->tlb_c.elide_flush_count +
+ ctpop16(asked & ~to_clean));
+ }
+ }
}
void tlb_flush_by_mmuidx(CPUState *cpu, uint16_t idxmap)
{
tlb_debug("mmu_idx: 0x%" PRIx16 "\n", idxmap);
- if (!qemu_cpu_is_self(cpu)) {
- uint16_t pending_flushes = idxmap;
- pending_flushes &= ~atomic_mb_read(&cpu->pending_tlb_flush);
-
- if (pending_flushes) {
- tlb_debug("reduced mmu_idx: 0x%" PRIx16 "\n", pending_flushes);
-
- atomic_or(&cpu->pending_tlb_flush, pending_flushes);
- async_run_on_cpu(cpu, tlb_flush_by_mmuidx_async_work,
- RUN_ON_CPU_HOST_INT(pending_flushes));
- }
+ if (cpu->created && !qemu_cpu_is_self(cpu)) {
+ async_run_on_cpu(cpu, tlb_flush_by_mmuidx_async_work,
+ RUN_ON_CPU_HOST_INT(idxmap));
} else {
- tlb_flush_by_mmuidx_async_work(cpu,
- RUN_ON_CPU_HOST_INT(idxmap));
+ tlb_flush_by_mmuidx_async_work(cpu, RUN_ON_CPU_HOST_INT(idxmap));
}
}
+void tlb_flush(CPUState *cpu)
+{
+ tlb_flush_by_mmuidx(cpu, ALL_MMUIDX_BITS);
+}
+
void tlb_flush_by_mmuidx_all_cpus(CPUState *src_cpu, uint16_t idxmap)
{
const run_on_cpu_func fn = tlb_flush_by_mmuidx_async_work;
@@ -224,8 +196,12 @@ void tlb_flush_by_mmuidx_all_cpus(CPUState *src_cpu, uint16_t idxmap)
fn(src_cpu, RUN_ON_CPU_HOST_INT(idxmap));
}
-void tlb_flush_by_mmuidx_all_cpus_synced(CPUState *src_cpu,
- uint16_t idxmap)
+void tlb_flush_all_cpus(CPUState *src_cpu)
+{
+ tlb_flush_by_mmuidx_all_cpus(src_cpu, ALL_MMUIDX_BITS);
+}
+
+void tlb_flush_by_mmuidx_all_cpus_synced(CPUState *src_cpu, uint16_t idxmap)
{
const run_on_cpu_func fn = tlb_flush_by_mmuidx_async_work;
@@ -235,70 +211,55 @@ void tlb_flush_by_mmuidx_all_cpus_synced(CPUState *src_cpu,
async_safe_run_on_cpu(src_cpu, fn, RUN_ON_CPU_HOST_INT(idxmap));
}
+void tlb_flush_all_cpus_synced(CPUState *src_cpu)
+{
+ tlb_flush_by_mmuidx_all_cpus_synced(src_cpu, ALL_MMUIDX_BITS);
+}
+
static inline bool tlb_hit_page_anyprot(CPUTLBEntry *tlb_entry,
target_ulong page)
{
return tlb_hit_page(tlb_entry->addr_read, page) ||
- tlb_hit_page(tlb_entry->addr_write, page) ||
+ tlb_hit_page(tlb_addr_write(tlb_entry), page) ||
tlb_hit_page(tlb_entry->addr_code, page);
}
-static inline void tlb_flush_entry(CPUTLBEntry *tlb_entry, target_ulong page)
+/* Called with tlb_c.lock held */
+static inline void tlb_flush_entry_locked(CPUTLBEntry *tlb_entry,
+ target_ulong page)
{
if (tlb_hit_page_anyprot(tlb_entry, page)) {
memset(tlb_entry, -1, sizeof(*tlb_entry));
}
}
-static inline void tlb_flush_vtlb_page(CPUArchState *env, int mmu_idx,
- target_ulong page)
+/* Called with tlb_c.lock held */
+static inline void tlb_flush_vtlb_page_locked(CPUArchState *env, int mmu_idx,
+ target_ulong page)
{
int k;
+
+ assert_cpu_is_self(ENV_GET_CPU(env));
for (k = 0; k < CPU_VTLB_SIZE; k++) {
- tlb_flush_entry(&env->tlb_v_table[mmu_idx][k], page);
+ tlb_flush_entry_locked(&env->tlb_v_table[mmu_idx][k], page);
}
}
-static void tlb_flush_page_async_work(CPUState *cpu, run_on_cpu_data data)
+static void tlb_flush_page_locked(CPUArchState *env, int midx,
+ target_ulong page)
{
- CPUArchState *env = cpu->env_ptr;
- target_ulong addr = (target_ulong) data.target_ptr;
- int i;
- int mmu_idx;
-
- assert_cpu_is_self(cpu);
-
- tlb_debug("page :" TARGET_FMT_lx "\n", addr);
+ target_ulong lp_addr = env->tlb_d[midx].large_page_addr;
+ target_ulong lp_mask = env->tlb_d[midx].large_page_mask;
/* Check if we need to flush due to large pages. */
- if ((addr & env->tlb_flush_mask) == env->tlb_flush_addr) {
- tlb_debug("forcing full flush ("
+ if ((page & lp_mask) == lp_addr) {
+ tlb_debug("forcing full flush midx %d ("
TARGET_FMT_lx "/" TARGET_FMT_lx ")\n",
- env->tlb_flush_addr, env->tlb_flush_mask);
-
- tlb_flush(cpu);
- return;
- }
-
- addr &= TARGET_PAGE_MASK;
- i = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
- for (mmu_idx = 0; mmu_idx < NB_MMU_MODES; mmu_idx++) {
- tlb_flush_entry(&env->tlb_table[mmu_idx][i], addr);
- tlb_flush_vtlb_page(env, mmu_idx, addr);
- }
-
- tb_flush_jmp_cache(cpu, addr);
-}
-
-void tlb_flush_page(CPUState *cpu, target_ulong addr)
-{
- tlb_debug("page :" TARGET_FMT_lx "\n", addr);
-
- if (!qemu_cpu_is_self(cpu)) {
- async_run_on_cpu(cpu, tlb_flush_page_async_work,
- RUN_ON_CPU_TARGET_PTR(addr));
+ midx, lp_addr, lp_mask);
+ tlb_flush_one_mmuidx_locked(env, midx);
} else {
- tlb_flush_page_async_work(cpu, RUN_ON_CPU_TARGET_PTR(addr));
+ tlb_flush_entry_locked(tlb_entry(env, midx, page), page);
+ tlb_flush_vtlb_page_locked(env, midx, page);
}
}
@@ -314,47 +275,24 @@ static void tlb_flush_page_by_mmuidx_async_work(CPUState *cpu,
target_ulong addr_and_mmuidx = (target_ulong) data.target_ptr;
target_ulong addr = addr_and_mmuidx & TARGET_PAGE_MASK;
unsigned long mmu_idx_bitmap = addr_and_mmuidx & ALL_MMUIDX_BITS;
- int page = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
int mmu_idx;
assert_cpu_is_self(cpu);
- tlb_debug("page:%d addr:"TARGET_FMT_lx" mmu_idx:0x%lx\n",
- page, addr, mmu_idx_bitmap);
+ tlb_debug("page addr:" TARGET_FMT_lx " mmu_map:0x%lx\n",
+ addr, mmu_idx_bitmap);
+ qemu_spin_lock(&env->tlb_c.lock);
for (mmu_idx = 0; mmu_idx < NB_MMU_MODES; mmu_idx++) {
if (test_bit(mmu_idx, &mmu_idx_bitmap)) {
- tlb_flush_entry(&env->tlb_table[mmu_idx][page], addr);
- tlb_flush_vtlb_page(env, mmu_idx, addr);
+ tlb_flush_page_locked(env, mmu_idx, addr);
}
}
+ qemu_spin_unlock(&env->tlb_c.lock);
tb_flush_jmp_cache(cpu, addr);
}
-static void tlb_check_page_and_flush_by_mmuidx_async_work(CPUState *cpu,
- run_on_cpu_data data)
-{
- CPUArchState *env = cpu->env_ptr;
- target_ulong addr_and_mmuidx = (target_ulong) data.target_ptr;
- target_ulong addr = addr_and_mmuidx & TARGET_PAGE_MASK;
- unsigned long mmu_idx_bitmap = addr_and_mmuidx & ALL_MMUIDX_BITS;
-
- tlb_debug("addr:"TARGET_FMT_lx" mmu_idx: %04lx\n", addr, mmu_idx_bitmap);
-
- /* Check if we need to flush due to large pages. */
- if ((addr & env->tlb_flush_mask) == env->tlb_flush_addr) {
- tlb_debug("forced full flush ("
- TARGET_FMT_lx "/" TARGET_FMT_lx ")\n",
- env->tlb_flush_addr, env->tlb_flush_mask);
-
- tlb_flush_by_mmuidx_async_work(cpu,
- RUN_ON_CPU_HOST_INT(mmu_idx_bitmap));
- } else {
- tlb_flush_page_by_mmuidx_async_work(cpu, data);
- }
-}
-
void tlb_flush_page_by_mmuidx(CPUState *cpu, target_ulong addr, uint16_t idxmap)
{
target_ulong addr_and_mmu_idx;
@@ -366,18 +304,23 @@ void tlb_flush_page_by_mmuidx(CPUState *cpu, target_ulong addr, uint16_t idxmap)
addr_and_mmu_idx |= idxmap;
if (!qemu_cpu_is_self(cpu)) {
- async_run_on_cpu(cpu, tlb_check_page_and_flush_by_mmuidx_async_work,
+ async_run_on_cpu(cpu, tlb_flush_page_by_mmuidx_async_work,
RUN_ON_CPU_TARGET_PTR(addr_and_mmu_idx));
} else {
- tlb_check_page_and_flush_by_mmuidx_async_work(
+ tlb_flush_page_by_mmuidx_async_work(
cpu, RUN_ON_CPU_TARGET_PTR(addr_and_mmu_idx));
}
}
+void tlb_flush_page(CPUState *cpu, target_ulong addr)
+{
+ tlb_flush_page_by_mmuidx(cpu, addr, ALL_MMUIDX_BITS);
+}
+
void tlb_flush_page_by_mmuidx_all_cpus(CPUState *src_cpu, target_ulong addr,
uint16_t idxmap)
{
- const run_on_cpu_func fn = tlb_check_page_and_flush_by_mmuidx_async_work;
+ const run_on_cpu_func fn = tlb_flush_page_by_mmuidx_async_work;
target_ulong addr_and_mmu_idx;
tlb_debug("addr: "TARGET_FMT_lx" mmu_idx:%"PRIx16"\n", addr, idxmap);
@@ -390,11 +333,16 @@ void tlb_flush_page_by_mmuidx_all_cpus(CPUState *src_cpu, target_ulong addr,
fn(src_cpu, RUN_ON_CPU_TARGET_PTR(addr_and_mmu_idx));
}
+void tlb_flush_page_all_cpus(CPUState *src, target_ulong addr)
+{
+ tlb_flush_page_by_mmuidx_all_cpus(src, addr, ALL_MMUIDX_BITS);
+}
+
void tlb_flush_page_by_mmuidx_all_cpus_synced(CPUState *src_cpu,
- target_ulong addr,
- uint16_t idxmap)
+ target_ulong addr,
+ uint16_t idxmap)
{
- const run_on_cpu_func fn = tlb_check_page_and_flush_by_mmuidx_async_work;
+ const run_on_cpu_func fn = tlb_flush_page_by_mmuidx_async_work;
target_ulong addr_and_mmu_idx;
tlb_debug("addr: "TARGET_FMT_lx" mmu_idx:%"PRIx16"\n", addr, idxmap);
@@ -407,21 +355,9 @@ void tlb_flush_page_by_mmuidx_all_cpus_synced(CPUState *src_cpu,
async_safe_run_on_cpu(src_cpu, fn, RUN_ON_CPU_TARGET_PTR(addr_and_mmu_idx));
}
-void tlb_flush_page_all_cpus(CPUState *src, target_ulong addr)
+void tlb_flush_page_all_cpus_synced(CPUState *src, target_ulong addr)
{
- const run_on_cpu_func fn = tlb_flush_page_async_work;
-
- flush_all_helper(src, fn, RUN_ON_CPU_TARGET_PTR(addr));
- fn(src, RUN_ON_CPU_TARGET_PTR(addr));
-}
-
-void tlb_flush_page_all_cpus_synced(CPUState *src,
- target_ulong addr)
-{
- const run_on_cpu_func fn = tlb_flush_page_async_work;
-
- flush_all_helper(src, fn, RUN_ON_CPU_TARGET_PTR(addr));
- async_safe_run_on_cpu(src, fn, RUN_ON_CPU_TARGET_PTR(addr));
+ tlb_flush_page_by_mmuidx_all_cpus_synced(src, addr, ALL_MMUIDX_BITS);
}
/* update the TLBs so that writes to code in the virtual page 'addr'
@@ -450,72 +386,44 @@ void tlb_unprotect_code(ram_addr_t ram_addr)
* most usual is detecting writes to code regions which may invalidate
* generated code.
*
- * Because we want other vCPUs to respond to changes straight away we
- * update the te->addr_write field atomically. If the TLB entry has
- * been changed by the vCPU in the mean time we skip the update.
+ * Other vCPUs might be reading their TLBs during guest execution, so we update
+ * te->addr_write with atomic_set. We don't need to worry about this for
+ * oversized guests as MTTCG is disabled for them.
*
- * As this function uses atomic accesses we also need to ensure
- * updates to tlb_entries follow the same access rules. We don't need
- * to worry about this for oversized guests as MTTCG is disabled for
- * them.
+ * Called with tlb_c.lock held.
*/
-
-static void tlb_reset_dirty_range(CPUTLBEntry *tlb_entry, uintptr_t start,
- uintptr_t length)
+static void tlb_reset_dirty_range_locked(CPUTLBEntry *tlb_entry,
+ uintptr_t start, uintptr_t length)
{
-#if TCG_OVERSIZED_GUEST
uintptr_t addr = tlb_entry->addr_write;
if ((addr & (TLB_INVALID_MASK | TLB_MMIO | TLB_NOTDIRTY)) == 0) {
addr &= TARGET_PAGE_MASK;
addr += tlb_entry->addend;
if ((addr - start) < length) {
+#if TCG_OVERSIZED_GUEST
tlb_entry->addr_write |= TLB_NOTDIRTY;
- }
- }
#else
- /* paired with atomic_mb_set in tlb_set_page_with_attrs */
- uintptr_t orig_addr = atomic_mb_read(&tlb_entry->addr_write);
- uintptr_t addr = orig_addr;
-
- if ((addr & (TLB_INVALID_MASK | TLB_MMIO | TLB_NOTDIRTY)) == 0) {
- addr &= TARGET_PAGE_MASK;
- addr += atomic_read(&tlb_entry->addend);
- if ((addr - start) < length) {
- uintptr_t notdirty_addr = orig_addr | TLB_NOTDIRTY;
- atomic_cmpxchg(&tlb_entry->addr_write, orig_addr, notdirty_addr);
+ atomic_set(&tlb_entry->addr_write,
+ tlb_entry->addr_write | TLB_NOTDIRTY);
+#endif
}
}
-#endif
}
-/* For atomic correctness when running MTTCG we need to use the right
- * primitives when copying entries */
-static inline void copy_tlb_helper(CPUTLBEntry *d, CPUTLBEntry *s,
- bool atomic_set)
+/*
+ * Called with tlb_c.lock held.
+ * Called only from the vCPU context, i.e. the TLB's owner thread.
+ */
+static inline void copy_tlb_helper_locked(CPUTLBEntry *d, const CPUTLBEntry *s)
{
-#if TCG_OVERSIZED_GUEST
*d = *s;
-#else
- if (atomic_set) {
- d->addr_read = s->addr_read;
- d->addr_code = s->addr_code;
- atomic_set(&d->addend, atomic_read(&s->addend));
- /* Pairs with flag setting in tlb_reset_dirty_range */
- atomic_mb_set(&d->addr_write, atomic_read(&s->addr_write));
- } else {
- d->addr_read = s->addr_read;
- d->addr_write = atomic_read(&s->addr_write);
- d->addr_code = s->addr_code;
- d->addend = atomic_read(&s->addend);
- }
-#endif
}
/* This is a cross vCPU call (i.e. another vCPU resetting the flags of
- * the target vCPU). As such care needs to be taken that we don't
- * dangerously race with another vCPU update. The only thing actually
- * updated is the target TLB entry ->addr_write flags.
+ * the target vCPU).
+ * We must take tlb_c.lock to avoid racing with another vCPU update. The only
+ * thing actually updated is the target TLB entry ->addr_write flags.
*/
void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length)
{
@@ -524,22 +432,26 @@ void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length)
int mmu_idx;
env = cpu->env_ptr;
+ qemu_spin_lock(&env->tlb_c.lock);
for (mmu_idx = 0; mmu_idx < NB_MMU_MODES; mmu_idx++) {
unsigned int i;
for (i = 0; i < CPU_TLB_SIZE; i++) {
- tlb_reset_dirty_range(&env->tlb_table[mmu_idx][i],
- start1, length);
+ tlb_reset_dirty_range_locked(&env->tlb_table[mmu_idx][i], start1,
+ length);
}
for (i = 0; i < CPU_VTLB_SIZE; i++) {
- tlb_reset_dirty_range(&env->tlb_v_table[mmu_idx][i],
- start1, length);
+ tlb_reset_dirty_range_locked(&env->tlb_v_table[mmu_idx][i], start1,
+ length);
}
}
+ qemu_spin_unlock(&env->tlb_c.lock);
}
-static inline void tlb_set_dirty1(CPUTLBEntry *tlb_entry, target_ulong vaddr)
+/* Called with tlb_c.lock held */
+static inline void tlb_set_dirty1_locked(CPUTLBEntry *tlb_entry,
+ target_ulong vaddr)
{
if (tlb_entry->addr_write == (vaddr | TLB_NOTDIRTY)) {
tlb_entry->addr_write = vaddr;
@@ -551,46 +463,47 @@ static inline void tlb_set_dirty1(CPUTLBEntry *tlb_entry, target_ulong vaddr)
void tlb_set_dirty(CPUState *cpu, target_ulong vaddr)
{
CPUArchState *env = cpu->env_ptr;
- int i;
int mmu_idx;
assert_cpu_is_self(cpu);
vaddr &= TARGET_PAGE_MASK;
- i = (vaddr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
+ qemu_spin_lock(&env->tlb_c.lock);
for (mmu_idx = 0; mmu_idx < NB_MMU_MODES; mmu_idx++) {
- tlb_set_dirty1(&env->tlb_table[mmu_idx][i], vaddr);
+ tlb_set_dirty1_locked(tlb_entry(env, mmu_idx, vaddr), vaddr);
}
for (mmu_idx = 0; mmu_idx < NB_MMU_MODES; mmu_idx++) {
int k;
for (k = 0; k < CPU_VTLB_SIZE; k++) {
- tlb_set_dirty1(&env->tlb_v_table[mmu_idx][k], vaddr);
+ tlb_set_dirty1_locked(&env->tlb_v_table[mmu_idx][k], vaddr);
}
}
+ qemu_spin_unlock(&env->tlb_c.lock);
}
/* Our TLB does not support large pages, so remember the area covered by
large pages and trigger a full TLB flush if these are invalidated. */
-static void tlb_add_large_page(CPUArchState *env, target_ulong vaddr,
- target_ulong size)
+static void tlb_add_large_page(CPUArchState *env, int mmu_idx,
+ target_ulong vaddr, target_ulong size)
{
- target_ulong mask = ~(size - 1);
+ target_ulong lp_addr = env->tlb_d[mmu_idx].large_page_addr;
+ target_ulong lp_mask = ~(size - 1);
- if (env->tlb_flush_addr == (target_ulong)-1) {
- env->tlb_flush_addr = vaddr & mask;
- env->tlb_flush_mask = mask;
- return;
- }
- /* Extend the existing region to include the new page.
- This is a compromise between unnecessary flushes and the cost
- of maintaining a full variable size TLB. */
- mask &= env->tlb_flush_mask;
- while (((env->tlb_flush_addr ^ vaddr) & mask) != 0) {
- mask <<= 1;
+ if (lp_addr == (target_ulong)-1) {
+ /* No previous large page. */
+ lp_addr = vaddr;
+ } else {
+ /* Extend the existing region to include the new page.
+ This is a compromise between unnecessary flushes and
+ the cost of maintaining a full variable size TLB. */
+ lp_mask &= env->tlb_d[mmu_idx].large_page_mask;
+ while (((lp_addr ^ vaddr) & lp_mask) != 0) {
+ lp_mask <<= 1;
+ }
}
- env->tlb_flush_addr &= mask;
- env->tlb_flush_mask = mask;
+ env->tlb_d[mmu_idx].large_page_addr = lp_addr & lp_mask;
+ env->tlb_d[mmu_idx].large_page_mask = lp_mask;
}
/* Add a new TLB entry. At most one entry for a given virtual address
@@ -617,12 +530,10 @@ void tlb_set_page_with_attrs(CPUState *cpu, target_ulong vaddr,
assert_cpu_is_self(cpu);
- if (size < TARGET_PAGE_SIZE) {
+ if (size <= TARGET_PAGE_SIZE) {
sz = TARGET_PAGE_SIZE;
} else {
- if (size > TARGET_PAGE_SIZE) {
- tlb_add_large_page(env, vaddr, size);
- }
+ tlb_add_large_page(env, mmu_idx, vaddr, size);
sz = size;
}
vaddr_page = vaddr & TARGET_PAGE_MASK;
@@ -654,26 +565,38 @@ void tlb_set_page_with_attrs(CPUState *cpu, target_ulong vaddr,
addend = (uintptr_t)memory_region_get_ram_ptr(section->mr) + xlat;
}
- /* Make sure there's no cached translation for the new page. */
- tlb_flush_vtlb_page(env, mmu_idx, vaddr_page);
-
code_address = address;
iotlb = memory_region_section_get_iotlb(cpu, section, vaddr_page,
paddr_page, xlat, prot, &address);
- index = (vaddr_page >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
- te = &env->tlb_table[mmu_idx][index];
+ index = tlb_index(env, mmu_idx, vaddr_page);
+ te = tlb_entry(env, mmu_idx, vaddr_page);
+
+ /*
+ * Hold the TLB lock for the rest of the function. We could acquire/release
+ * the lock several times in the function, but it is faster to amortize the
+ * acquisition cost by acquiring it just once. Note that this leads to
+ * a longer critical section, but this is not a concern since the TLB lock
+ * is unlikely to be contended.
+ */
+ qemu_spin_lock(&env->tlb_c.lock);
+
+ /* Note that the tlb is no longer clean. */
+ env->tlb_c.dirty |= 1 << mmu_idx;
+
+ /* Make sure there's no cached translation for the new page. */
+ tlb_flush_vtlb_page_locked(env, mmu_idx, vaddr_page);
/*
* Only evict the old entry to the victim tlb if it's for a
* different page; otherwise just overwrite the stale data.
*/
if (!tlb_hit_page_anyprot(te, vaddr_page)) {
- unsigned vidx = env->vtlb_index++ % CPU_VTLB_SIZE;
+ unsigned vidx = env->tlb_d[mmu_idx].vindex++ % CPU_VTLB_SIZE;
CPUTLBEntry *tv = &env->tlb_v_table[mmu_idx][vidx];
/* Evict the old entry into the victim tlb. */
- copy_tlb_helper(tv, te, true);
+ copy_tlb_helper_locked(tv, te);
env->iotlb_v[mmu_idx][vidx] = env->iotlb[mmu_idx][index];
}
@@ -725,9 +648,8 @@ void tlb_set_page_with_attrs(CPUState *cpu, target_ulong vaddr,
}
}
- /* Pairs with flag setting in tlb_reset_dirty_range */
- copy_tlb_helper(te, &tn, true);
- /* atomic_mb_set(&te->addr_write, write_address); */
+ copy_tlb_helper_locked(te, &tn);
+ qemu_spin_unlock(&env->tlb_c.lock);
}
/* Add a new TLB entry, but without specifying the memory
@@ -773,16 +695,16 @@ static uint64_t io_readx(CPUArchState *env, CPUIOTLBEntry *iotlbentry,
* repeat the MMU check here. This tlb_fill() call might
* longjump out if this access should cause a guest exception.
*/
- int index;
+ CPUTLBEntry *entry;
target_ulong tlb_addr;
tlb_fill(cpu, addr, size, MMU_DATA_LOAD, mmu_idx, retaddr);
- index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
- tlb_addr = env->tlb_table[mmu_idx][index].addr_read;
+ entry = tlb_entry(env, mmu_idx, addr);
+ tlb_addr = entry->addr_read;
if (!(tlb_addr & ~(TARGET_PAGE_MASK | TLB_RECHECK))) {
/* RAM access */
- uintptr_t haddr = addr + env->tlb_table[mmu_idx][index].addend;
+ uintptr_t haddr = addr + entry->addend;
return ldn_p((void *)haddr, size);
}
@@ -840,16 +762,16 @@ static void io_writex(CPUArchState *env, CPUIOTLBEntry *iotlbentry,
* repeat the MMU check here. This tlb_fill() call might
* longjump out if this access should cause a guest exception.
*/
- int index;
+ CPUTLBEntry *entry;
target_ulong tlb_addr;
tlb_fill(cpu, addr, size, MMU_DATA_STORE, mmu_idx, retaddr);
- index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
- tlb_addr = env->tlb_table[mmu_idx][index].addr_write;
+ entry = tlb_entry(env, mmu_idx, addr);
+ tlb_addr = tlb_addr_write(entry);
if (!(tlb_addr & ~(TARGET_PAGE_MASK | TLB_RECHECK))) {
/* RAM access */
- uintptr_t haddr = addr + env->tlb_table[mmu_idx][index].addend;
+ uintptr_t haddr = addr + entry->addend;
stn_p((void *)haddr, size, val);
return;
@@ -891,17 +813,28 @@ static bool victim_tlb_hit(CPUArchState *env, size_t mmu_idx, size_t index,
size_t elt_ofs, target_ulong page)
{
size_t vidx;
+
+ assert_cpu_is_self(ENV_GET_CPU(env));
for (vidx = 0; vidx < CPU_VTLB_SIZE; ++vidx) {
CPUTLBEntry *vtlb = &env->tlb_v_table[mmu_idx][vidx];
- target_ulong cmp = *(target_ulong *)((uintptr_t)vtlb + elt_ofs);
+ target_ulong cmp;
+
+ /* elt_ofs might correspond to .addr_write, so use atomic_read */
+#if TCG_OVERSIZED_GUEST
+ cmp = *(target_ulong *)((uintptr_t)vtlb + elt_ofs);
+#else
+ cmp = atomic_read((target_ulong *)((uintptr_t)vtlb + elt_ofs));
+#endif
if (cmp == page) {
/* Found entry in victim tlb, swap tlb and iotlb. */
CPUTLBEntry tmptlb, *tlb = &env->tlb_table[mmu_idx][index];
- copy_tlb_helper(&tmptlb, tlb, false);
- copy_tlb_helper(tlb, vtlb, true);
- copy_tlb_helper(vtlb, &tmptlb, true);
+ qemu_spin_lock(&env->tlb_c.lock);
+ copy_tlb_helper_locked(&tmptlb, tlb);
+ copy_tlb_helper_locked(tlb, vtlb);
+ copy_tlb_helper_locked(vtlb, &tmptlb);
+ qemu_spin_unlock(&env->tlb_c.lock);
CPUIOTLBEntry tmpio, *io = &env->iotlb[mmu_idx][index];
CPUIOTLBEntry *vio = &env->iotlb_v[mmu_idx][vidx];
@@ -924,20 +857,19 @@ static bool victim_tlb_hit(CPUArchState *env, size_t mmu_idx, size_t index,
*/
tb_page_addr_t get_page_addr_code(CPUArchState *env, target_ulong addr)
{
- int mmu_idx, index;
+ uintptr_t mmu_idx = cpu_mmu_index(env, true);
+ uintptr_t index = tlb_index(env, mmu_idx, addr);
+ CPUTLBEntry *entry = tlb_entry(env, mmu_idx, addr);
void *p;
- index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
- mmu_idx = cpu_mmu_index(env, true);
- if (unlikely(!tlb_hit(env->tlb_table[mmu_idx][index].addr_code, addr))) {
+ if (unlikely(!tlb_hit(entry->addr_code, addr))) {
if (!VICTIM_TLB_HIT(addr_code, addr)) {
tlb_fill(ENV_GET_CPU(env), addr, 0, MMU_INST_FETCH, mmu_idx, 0);
}
- assert(tlb_hit(env->tlb_table[mmu_idx][index].addr_code, addr));
+ assert(tlb_hit(entry->addr_code, addr));
}
- if (unlikely(env->tlb_table[mmu_idx][index].addr_code &
- (TLB_RECHECK | TLB_MMIO))) {
+ if (unlikely(entry->addr_code & (TLB_RECHECK | TLB_MMIO))) {
/*
* Return -1 if we can't translate and execute from an entire
* page of RAM here, which will cause us to execute by loading
@@ -949,7 +881,7 @@ tb_page_addr_t get_page_addr_code(CPUArchState *env, target_ulong addr)
return -1;
}
- p = (void *)((uintptr_t)addr + env->tlb_table[mmu_idx][index].addend);
+ p = (void *)((uintptr_t)addr + entry->addend);
return qemu_ram_addr_from_host_nofail(p);
}
@@ -962,10 +894,10 @@ tb_page_addr_t get_page_addr_code(CPUArchState *env, target_ulong addr)
void probe_write(CPUArchState *env, target_ulong addr, int size, int mmu_idx,
uintptr_t retaddr)
{
- int index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
- target_ulong tlb_addr = env->tlb_table[mmu_idx][index].addr_write;
+ uintptr_t index = tlb_index(env, mmu_idx, addr);
+ CPUTLBEntry *entry = tlb_entry(env, mmu_idx, addr);
- if (!tlb_hit(tlb_addr, addr)) {
+ if (!tlb_hit(tlb_addr_write(entry), addr)) {
/* TLB entry is for a different page */
if (!VICTIM_TLB_HIT(addr_write, addr)) {
tlb_fill(ENV_GET_CPU(env), addr, size, MMU_DATA_STORE,
@@ -981,9 +913,9 @@ static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr,
NotDirtyInfo *ndi)
{
size_t mmu_idx = get_mmuidx(oi);
- size_t index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
- CPUTLBEntry *tlbe = &env->tlb_table[mmu_idx][index];
- target_ulong tlb_addr = tlbe->addr_write;
+ uintptr_t index = tlb_index(env, mmu_idx, addr);
+ CPUTLBEntry *tlbe = tlb_entry(env, mmu_idx, addr);
+ target_ulong tlb_addr = tlb_addr_write(tlbe);
TCGMemOp mop = get_memop(oi);
int a_bits = get_alignment_bits(mop);
int s_bits = mop & MO_SIZE;
@@ -1014,7 +946,7 @@ static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr,
tlb_fill(ENV_GET_CPU(env), addr, 1 << s_bits, MMU_DATA_STORE,
mmu_idx, retaddr);
}
- tlb_addr = tlbe->addr_write & ~TLB_INVALID_MASK;
+ tlb_addr = tlb_addr_write(tlbe) & ~TLB_INVALID_MASK;
}
/* Notice an IO access or a needs-MMU-lookup access */
@@ -1101,7 +1033,7 @@ static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr,
#include "atomic_template.h"
#endif
-#ifdef CONFIG_ATOMIC128
+#if HAVE_CMPXCHG128 || HAVE_ATOMIC128
#define DATA_SIZE 16
#include "atomic_template.h"
#endif
diff --git a/accel/tcg/softmmu_template.h b/accel/tcg/softmmu_template.h
index f060a693d4..b0adea045e 100644
--- a/accel/tcg/softmmu_template.h
+++ b/accel/tcg/softmmu_template.h
@@ -111,9 +111,10 @@ static inline DATA_TYPE glue(io_read, SUFFIX)(CPUArchState *env,
WORD_TYPE helper_le_ld_name(CPUArchState *env, target_ulong addr,
TCGMemOpIdx oi, uintptr_t retaddr)
{
- unsigned mmu_idx = get_mmuidx(oi);
- int index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
- target_ulong tlb_addr = env->tlb_table[mmu_idx][index].ADDR_READ;
+ uintptr_t mmu_idx = get_mmuidx(oi);
+ uintptr_t index = tlb_index(env, mmu_idx, addr);
+ CPUTLBEntry *entry = tlb_entry(env, mmu_idx, addr);
+ target_ulong tlb_addr = entry->ADDR_READ;
unsigned a_bits = get_alignment_bits(get_memop(oi));
uintptr_t haddr;
DATA_TYPE res;
@@ -129,7 +130,7 @@ WORD_TYPE helper_le_ld_name(CPUArchState *env, target_ulong addr,
tlb_fill(ENV_GET_CPU(env), addr, DATA_SIZE, READ_ACCESS_TYPE,
mmu_idx, retaddr);
}
- tlb_addr = env->tlb_table[mmu_idx][index].ADDR_READ;
+ tlb_addr = entry->ADDR_READ;
}
/* Handle an IO access. */
@@ -166,7 +167,7 @@ WORD_TYPE helper_le_ld_name(CPUArchState *env, target_ulong addr,
return res;
}
- haddr = addr + env->tlb_table[mmu_idx][index].addend;
+ haddr = addr + entry->addend;
#if DATA_SIZE == 1
res = glue(glue(ld, LSUFFIX), _p)((uint8_t *)haddr);
#else
@@ -179,9 +180,10 @@ WORD_TYPE helper_le_ld_name(CPUArchState *env, target_ulong addr,
WORD_TYPE helper_be_ld_name(CPUArchState *env, target_ulong addr,
TCGMemOpIdx oi, uintptr_t retaddr)
{
- unsigned mmu_idx = get_mmuidx(oi);
- int index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
- target_ulong tlb_addr = env->tlb_table[mmu_idx][index].ADDR_READ;
+ uintptr_t mmu_idx = get_mmuidx(oi);
+ uintptr_t index = tlb_index(env, mmu_idx, addr);
+ CPUTLBEntry *entry = tlb_entry(env, mmu_idx, addr);
+ target_ulong tlb_addr = entry->ADDR_READ;
unsigned a_bits = get_alignment_bits(get_memop(oi));
uintptr_t haddr;
DATA_TYPE res;
@@ -197,7 +199,7 @@ WORD_TYPE helper_be_ld_name(CPUArchState *env, target_ulong addr,
tlb_fill(ENV_GET_CPU(env), addr, DATA_SIZE, READ_ACCESS_TYPE,
mmu_idx, retaddr);
}
- tlb_addr = env->tlb_table[mmu_idx][index].ADDR_READ;
+ tlb_addr = entry->ADDR_READ;
}
/* Handle an IO access. */
@@ -234,7 +236,7 @@ WORD_TYPE helper_be_ld_name(CPUArchState *env, target_ulong addr,
return res;
}
- haddr = addr + env->tlb_table[mmu_idx][index].addend;
+ haddr = addr + entry->addend;
res = glue(glue(ld, LSUFFIX), _be_p)((uint8_t *)haddr);
return res;
}
@@ -275,9 +277,10 @@ static inline void glue(io_write, SUFFIX)(CPUArchState *env,
void helper_le_st_name(CPUArchState *env, target_ulong addr, DATA_TYPE val,
TCGMemOpIdx oi, uintptr_t retaddr)
{
- unsigned mmu_idx = get_mmuidx(oi);
- int index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
- target_ulong tlb_addr = env->tlb_table[mmu_idx][index].addr_write;
+ uintptr_t mmu_idx = get_mmuidx(oi);
+ uintptr_t index = tlb_index(env, mmu_idx, addr);
+ CPUTLBEntry *entry = tlb_entry(env, mmu_idx, addr);
+ target_ulong tlb_addr = tlb_addr_write(entry);
unsigned a_bits = get_alignment_bits(get_memop(oi));
uintptr_t haddr;
@@ -292,7 +295,7 @@ void helper_le_st_name(CPUArchState *env, target_ulong addr, DATA_TYPE val,
tlb_fill(ENV_GET_CPU(env), addr, DATA_SIZE, MMU_DATA_STORE,
mmu_idx, retaddr);
}
- tlb_addr = env->tlb_table[mmu_idx][index].addr_write & ~TLB_INVALID_MASK;
+ tlb_addr = tlb_addr_write(entry) & ~TLB_INVALID_MASK;
}
/* Handle an IO access. */
@@ -313,16 +316,16 @@ void helper_le_st_name(CPUArchState *env, target_ulong addr, DATA_TYPE val,
if (DATA_SIZE > 1
&& unlikely((addr & ~TARGET_PAGE_MASK) + DATA_SIZE - 1
>= TARGET_PAGE_SIZE)) {
- int i, index2;
- target_ulong page2, tlb_addr2;
+ int i;
+ target_ulong page2;
+ CPUTLBEntry *entry2;
do_unaligned_access:
/* Ensure the second page is in the TLB. Note that the first page
is already guaranteed to be filled, and that the second page
cannot evict the first. */
page2 = (addr + DATA_SIZE) & TARGET_PAGE_MASK;
- index2 = (page2 >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
- tlb_addr2 = env->tlb_table[mmu_idx][index2].addr_write;
- if (!tlb_hit_page(tlb_addr2, page2)
+ entry2 = tlb_entry(env, mmu_idx, page2);
+ if (!tlb_hit_page(tlb_addr_write(entry2), page2)
&& !VICTIM_TLB_HIT(addr_write, page2)) {
tlb_fill(ENV_GET_CPU(env), page2, DATA_SIZE, MMU_DATA_STORE,
mmu_idx, retaddr);
@@ -340,7 +343,7 @@ void helper_le_st_name(CPUArchState *env, target_ulong addr, DATA_TYPE val,
return;
}
- haddr = addr + env->tlb_table[mmu_idx][index].addend;
+ haddr = addr + entry->addend;
#if DATA_SIZE == 1
glue(glue(st, SUFFIX), _p)((uint8_t *)haddr, val);
#else
@@ -352,9 +355,10 @@ void helper_le_st_name(CPUArchState *env, target_ulong addr, DATA_TYPE val,
void helper_be_st_name(CPUArchState *env, target_ulong addr, DATA_TYPE val,
TCGMemOpIdx oi, uintptr_t retaddr)
{
- unsigned mmu_idx = get_mmuidx(oi);
- int index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
- target_ulong tlb_addr = env->tlb_table[mmu_idx][index].addr_write;
+ uintptr_t mmu_idx = get_mmuidx(oi);
+ uintptr_t index = tlb_index(env, mmu_idx, addr);
+ CPUTLBEntry *entry = tlb_entry(env, mmu_idx, addr);
+ target_ulong tlb_addr = tlb_addr_write(entry);
unsigned a_bits = get_alignment_bits(get_memop(oi));
uintptr_t haddr;
@@ -369,7 +373,7 @@ void helper_be_st_name(CPUArchState *env, target_ulong addr, DATA_TYPE val,
tlb_fill(ENV_GET_CPU(env), addr, DATA_SIZE, MMU_DATA_STORE,
mmu_idx, retaddr);
}
- tlb_addr = env->tlb_table[mmu_idx][index].addr_write & ~TLB_INVALID_MASK;
+ tlb_addr = tlb_addr_write(entry) & ~TLB_INVALID_MASK;
}
/* Handle an IO access. */
@@ -390,16 +394,16 @@ void helper_be_st_name(CPUArchState *env, target_ulong addr, DATA_TYPE val,
if (DATA_SIZE > 1
&& unlikely((addr & ~TARGET_PAGE_MASK) + DATA_SIZE - 1
>= TARGET_PAGE_SIZE)) {
- int i, index2;
- target_ulong page2, tlb_addr2;
+ int i;
+ target_ulong page2;
+ CPUTLBEntry *entry2;
do_unaligned_access:
/* Ensure the second page is in the TLB. Note that the first page
is already guaranteed to be filled, and that the second page
cannot evict the first. */
page2 = (addr + DATA_SIZE) & TARGET_PAGE_MASK;
- index2 = (page2 >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1);
- tlb_addr2 = env->tlb_table[mmu_idx][index2].addr_write;
- if (!tlb_hit_page(tlb_addr2, page2)
+ entry2 = tlb_entry(env, mmu_idx, page2);
+ if (!tlb_hit_page(tlb_addr_write(entry2), page2)
&& !VICTIM_TLB_HIT(addr_write, page2)) {
tlb_fill(ENV_GET_CPU(env), page2, DATA_SIZE, MMU_DATA_STORE,
mmu_idx, retaddr);
@@ -417,7 +421,7 @@ void helper_be_st_name(CPUArchState *env, target_ulong addr, DATA_TYPE val,
return;
}
- haddr = addr + env->tlb_table[mmu_idx][index].addend;
+ haddr = addr + entry->addend;
glue(glue(st, SUFFIX), _be_p)((uint8_t *)haddr, val);
}
#endif /* DATA_SIZE > 1 */
diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c
index 56dbb56a16..3d25bdcc17 100644
--- a/accel/tcg/tcg-all.c
+++ b/accel/tcg/tcg-all.c
@@ -51,7 +51,7 @@ static void tcg_handle_interrupt(CPUState *cpu, int mask)
if (!qemu_cpu_is_self(cpu)) {
qemu_cpu_kick(cpu);
} else {
- cpu->icount_decr.u16.high = -1;
+ atomic_set(&cpu->icount_decr.u16.high, -1);
if (use_icount &&
!cpu->can_do_io
&& (mask & ~old_mask) != 0) {
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index ad5c758246..8cb8c8870e 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -16,12 +16,8 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef _WIN32
-#include <windows.h>
-#endif
#include "qemu/osdep.h"
-
#include "qemu-common.h"
#define NO_CPU_IO_DEFS
#include "cpu.h"
@@ -2290,7 +2286,7 @@ void dump_exec_info(FILE *f, fprintf_function cpu_fprintf)
{
struct tb_tree_stats tst = {};
struct qht_stats hst;
- size_t nb_tbs;
+ size_t nb_tbs, flush_full, flush_part, flush_elide;
tcg_tb_foreach(tb_tree_stats_iter, &tst);
nb_tbs = tst.nb_tbs;
@@ -2326,7 +2322,11 @@ void dump_exec_info(FILE *f, fprintf_function cpu_fprintf)
cpu_fprintf(f, "TB flush count %u\n",
atomic_read(&tb_ctx.tb_flush_count));
cpu_fprintf(f, "TB invalidate count %zu\n", tcg_tb_phys_invalidate_count());
- cpu_fprintf(f, "TLB flush count %zu\n", tlb_flush_count());
+
+ tlb_flush_counts(&flush_full, &flush_part, &flush_elide);
+ cpu_fprintf(f, "TLB full flushes %zu\n", flush_full);
+ cpu_fprintf(f, "TLB partial flushes %zu\n", flush_part);
+ cpu_fprintf(f, "TLB elided flushes %zu\n", flush_elide);
tcg_dump_info(f, cpu_fprintf);
}
@@ -2341,7 +2341,7 @@ void cpu_interrupt(CPUState *cpu, int mask)
{
g_assert(qemu_mutex_iothread_locked());
cpu->interrupt_request |= mask;
- cpu->icount_decr.u16.high = -1;
+ atomic_set(&cpu->icount_decr.u16.high, -1);
}
/*
diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
index 26a3ffbba1..941295ea49 100644
--- a/accel/tcg/user-exec.c
+++ b/accel/tcg/user-exec.c
@@ -25,6 +25,7 @@
#include "exec/cpu_ldst.h"
#include "translate-all.h"
#include "exec/helper-proto.h"
+#include "qemu/atomic128.h"
#undef EAX
#undef ECX
@@ -570,6 +571,81 @@ int cpu_signal_handler(int host_signum, void *pinfo,
return handle_cpu_signal(pc, info, is_write, &uc->uc_sigmask);
}
+#elif defined(__riscv)
+
+int cpu_signal_handler(int host_signum, void *pinfo,
+ void *puc)
+{
+ siginfo_t *info = pinfo;
+ ucontext_t *uc = puc;
+ greg_t pc = uc->uc_mcontext.__gregs[REG_PC];
+ uint32_t insn = *(uint32_t *)pc;
+ int is_write = 0;
+
+ /* Detect store by reading the instruction at the program
+ counter. Note: we currently only generate 32-bit
+ instructions so we thus only detect 32-bit stores */
+ switch (((insn >> 0) & 0b11)) {
+ case 3:
+ switch (((insn >> 2) & 0b11111)) {
+ case 8:
+ switch (((insn >> 12) & 0b111)) {
+ case 0: /* sb */
+ case 1: /* sh */
+ case 2: /* sw */
+ case 3: /* sd */
+ case 4: /* sq */
+ is_write = 1;
+ break;
+ default:
+ break;
+ }
+ break;
+ case 9:
+ switch (((insn >> 12) & 0b111)) {
+ case 2: /* fsw */
+ case 3: /* fsd */
+ case 4: /* fsq */
+ is_write = 1;
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ /* Check for compressed instructions */
+ switch (((insn >> 13) & 0b111)) {
+ case 7:
+ switch (insn & 0b11) {
+ case 0: /*c.sd */
+ case 2: /* c.sdsp */
+ is_write = 1;
+ break;
+ default:
+ break;
+ }
+ break;
+ case 6:
+ switch (insn & 0b11) {
+ case 0: /* c.sw */
+ case 3: /* c.swsp */
+ is_write = 1;
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+
+ return handle_cpu_signal(pc, info, is_write, &uc->uc_sigmask);
+}
+
#else
#error host CPU specific signal handler needed
@@ -615,7 +691,7 @@ static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr,
/* The following is only callable from other helpers, and matches up
with the softmmu version. */
-#ifdef CONFIG_ATOMIC128
+#if HAVE_ATOMIC128 || HAVE_CMPXCHG128
#undef EXTRA_ARGS
#undef ATOMIC_NAME
@@ -628,4 +704,4 @@ static void *atomic_mmu_lookup(CPUArchState *env, target_ulong addr,
#define DATA_SIZE 16
#include "atomic_template.h"
-#endif /* CONFIG_ATOMIC128 */
+#endif
diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c
index 362a2276fd..635be73bf4 100644
--- a/audio/alsaaudio.c
+++ b/audio/alsaaudio.c
@@ -28,9 +28,7 @@
#include "audio.h"
#include "trace.h"
-#if QEMU_GNUC_PREREQ(4, 3)
#pragma GCC diagnostic ignored "-Waddress"
-#endif
#define AUDIO_CAP "alsa"
#include "audio_int.h"
diff --git a/audio/audio_int.h b/audio/audio_int.h
index 244b454012..6c451b995c 100644
--- a/audio/audio_int.h
+++ b/audio/audio_int.h
@@ -191,7 +191,7 @@ struct SWVoiceCap {
QLIST_ENTRY (SWVoiceCap) entries;
};
-struct AudioState {
+typedef struct AudioState {
struct audio_driver *drv;
void *drv_opaque;
@@ -203,7 +203,7 @@ struct AudioState {
int nb_hw_voices_out;
int nb_hw_voices_in;
int vm_running;
-};
+} AudioState;
extern const struct mixeng_volume nominal_volume;
diff --git a/audio/paaudio.c b/audio/paaudio.c
index 949769774d..4c100bc318 100644
--- a/audio/paaudio.c
+++ b/audio/paaudio.c
@@ -227,7 +227,7 @@ static void *qpa_thread_out (void *arg)
}
}
- decr = to_mix = audio_MIN (pa->live, pa->g->conf.samples >> 2);
+ decr = to_mix = audio_MIN(pa->live, pa->g->conf.samples >> 5);
rpos = pa->rpos;
if (audio_pt_unlock(&pa->pt, __func__)) {
@@ -319,7 +319,7 @@ static void *qpa_thread_in (void *arg)
}
}
- incr = to_grab = audio_MIN (pa->dead, pa->g->conf.samples >> 2);
+ incr = to_grab = audio_MIN(pa->dead, pa->g->conf.samples >> 5);
wpos = pa->wpos;
if (audio_pt_unlock(&pa->pt, __func__)) {
diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c
index e64074954f..7a34e25c43 100644
--- a/backends/hostmem-file.c
+++ b/backends/hostmem-file.c
@@ -42,6 +42,9 @@ static void
file_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
{
HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(backend);
+#ifdef CONFIG_POSIX
+ gchar *name;
+#endif
if (!backend->size) {
error_setg(errp, "can't create backend with size 0");
@@ -54,18 +57,15 @@ file_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
#ifndef CONFIG_POSIX
error_setg(errp, "-mem-path not supported on this host");
#else
- if (!host_memory_backend_mr_inited(backend)) {
- gchar *path;
- backend->force_prealloc = mem_prealloc;
- path = object_get_canonical_path(OBJECT(backend));
- memory_region_init_ram_from_file(&backend->mr, OBJECT(backend),
- path,
- backend->size, fb->align,
- (backend->share ? RAM_SHARED : 0) |
- (fb->is_pmem ? RAM_PMEM : 0),
- fb->mem_path, errp);
- g_free(path);
- }
+ backend->force_prealloc = mem_prealloc;
+ name = host_memory_backend_get_name(backend);
+ memory_region_init_ram_from_file(&backend->mr, OBJECT(backend),
+ name,
+ backend->size, fb->align,
+ (backend->share ? RAM_SHARED : 0) |
+ (fb->is_pmem ? RAM_PMEM : 0),
+ fb->mem_path, errp);
+ g_free(name);
#endif
}
@@ -145,20 +145,20 @@ static void file_memory_backend_set_pmem(Object *o, bool value, Error **errp)
HostMemoryBackendFile *fb = MEMORY_BACKEND_FILE(o);
if (host_memory_backend_mr_inited(backend)) {
- error_setg(errp, "cannot change property 'pmem' of %s '%s'",
- object_get_typename(o),
- object_get_canonical_path_component(o));
+
+ error_setg(errp, "cannot change property 'pmem' of %s.",
+ object_get_typename(o));
return;
}
#ifndef CONFIG_LIBPMEM
if (value) {
Error *local_err = NULL;
+
error_setg(&local_err,
"Lack of libpmem support while setting the 'pmem=on'"
- " of %s '%s'. We can't ensure data persistence.",
- object_get_typename(o),
- object_get_canonical_path_component(o));
+ " of %s. We can't ensure data persistence.",
+ object_get_typename(o));
error_propagate(errp, local_err);
return;
}
diff --git a/backends/hostmem-memfd.c b/backends/hostmem-memfd.c
index b6836b28e5..98c9bf3240 100644
--- a/backends/hostmem-memfd.c
+++ b/backends/hostmem-memfd.c
@@ -44,10 +44,6 @@ memfd_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
return;
}
- if (host_memory_backend_mr_inited(backend)) {
- return;
- }
-
backend->force_prealloc = mem_prealloc;
fd = qemu_memfd_create(TYPE_MEMORY_BACKEND_MEMFD, backend->size,
m->hugetlb, m->hugetlbsize, m->seal ?
@@ -57,9 +53,10 @@ memfd_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
return;
}
- name = object_get_canonical_path(OBJECT(backend));
+ name = host_memory_backend_get_name(backend);
memory_region_init_ram_from_fd(&backend->mr, OBJECT(backend),
- name, backend->size, true, fd, errp);
+ name, backend->size,
+ backend->share, fd, errp);
g_free(name);
}
@@ -131,6 +128,7 @@ memfd_backend_instance_init(Object *obj)
/* default to sealed file */
m->seal = true;
+ MEMORY_BACKEND(m)->share = true;
}
static void
diff --git a/backends/hostmem-ram.c b/backends/hostmem-ram.c
index 7ddd08d370..24b65d9ae3 100644
--- a/backends/hostmem-ram.c
+++ b/backends/hostmem-ram.c
@@ -16,21 +16,20 @@
#define TYPE_MEMORY_BACKEND_RAM "memory-backend-ram"
-
static void
ram_backend_memory_alloc(HostMemoryBackend *backend, Error **errp)
{
- char *path;
+ char *name;
if (!backend->size) {
error_setg(errp, "can't create backend with size 0");
return;
}
- path = object_get_canonical_path_component(OBJECT(backend));
- memory_region_init_ram_shared_nomigrate(&backend->mr, OBJECT(backend), path,
+ name = host_memory_backend_get_name(backend);
+ memory_region_init_ram_shared_nomigrate(&backend->mr, OBJECT(backend), name,
backend->size, backend->share, errp);
- g_free(path);
+ g_free(name);
}
static void
diff --git a/backends/hostmem.c b/backends/hostmem.c
index 1a89342039..0c8ef17653 100644
--- a/backends/hostmem.c
+++ b/backends/hostmem.c
@@ -28,6 +28,16 @@ QEMU_BUILD_BUG_ON(HOST_MEM_POLICY_BIND != MPOL_BIND);
QEMU_BUILD_BUG_ON(HOST_MEM_POLICY_INTERLEAVE != MPOL_INTERLEAVE);
#endif
+char *
+host_memory_backend_get_name(HostMemoryBackend *backend)
+{
+ if (!backend->use_canonical_path) {
+ return object_get_canonical_path_component(OBJECT(backend));
+ }
+
+ return object_get_canonical_path(OBJECT(backend));
+}
+
static void
host_memory_backend_get_size(Object *obj, Visitor *v, const char *name,
void *opaque, Error **errp)
@@ -103,14 +113,23 @@ host_memory_backend_set_host_nodes(Object *obj, Visitor *v, const char *name,
{
#ifdef CONFIG_NUMA
HostMemoryBackend *backend = MEMORY_BACKEND(obj);
- uint16List *l = NULL;
+ uint16List *l, *host_nodes = NULL;
+
+ visit_type_uint16List(v, name, &host_nodes, errp);
- visit_type_uint16List(v, name, &l, errp);
+ for (l = host_nodes; l; l = l->next) {
+ if (l->value >= MAX_NODES) {
+ error_setg(errp, "Invalid host-nodes value: %d", l->value);
+ goto out;
+ }
+ }
- while (l) {
+ for (l = host_nodes; l; l = l->next) {
bitmap_set(backend->host_nodes, l->value, 1);
- l = l->next;
}
+
+out:
+ qapi_free_uint16List(host_nodes);
#else
error_setg(errp, "NUMA node binding are not supported by this QEMU");
#endif
@@ -238,6 +257,11 @@ static void host_memory_backend_init(Object *obj)
backend->prealloc = mem_prealloc;
}
+static void host_memory_backend_post_init(Object *obj)
+{
+ object_apply_compat_props(obj);
+}
+
bool host_memory_backend_mr_inited(HostMemoryBackend *backend)
{
/*
@@ -386,6 +410,23 @@ static void host_memory_backend_set_share(Object *o, bool value, Error **errp)
backend->share = value;
}
+static bool
+host_memory_backend_get_use_canonical_path(Object *obj, Error **errp)
+{
+ HostMemoryBackend *backend = MEMORY_BACKEND(obj);
+
+ return backend->use_canonical_path;
+}
+
+static void
+host_memory_backend_set_use_canonical_path(Object *obj, bool value,
+ Error **errp)
+{
+ HostMemoryBackend *backend = MEMORY_BACKEND(obj);
+
+ backend->use_canonical_path = value;
+}
+
static void
host_memory_backend_class_init(ObjectClass *oc, void *data)
{
@@ -432,6 +473,9 @@ host_memory_backend_class_init(ObjectClass *oc, void *data)
&error_abort);
object_class_property_set_description(oc, "share",
"Mark the memory as private to QEMU or shared", &error_abort);
+ object_class_property_add_bool(oc, "x-use-canonical-path-for-ramblock-id",
+ host_memory_backend_get_use_canonical_path,
+ host_memory_backend_set_use_canonical_path, &error_abort);
}
static const TypeInfo host_memory_backend_info = {
@@ -442,6 +486,7 @@ static const TypeInfo host_memory_backend_info = {
.class_init = host_memory_backend_class_init,
.instance_size = sizeof(HostMemoryBackend),
.instance_init = host_memory_backend_init,
+ .instance_post_init = host_memory_backend_post_init,
.interfaces = (InterfaceInfo[]) {
{ TYPE_USER_CREATABLE },
{ }
diff --git a/block.c b/block.c
index 7710b399a3..4f5ff2cc12 100644
--- a/block.c
+++ b/block.c
@@ -266,22 +266,41 @@ int bdrv_can_set_read_only(BlockDriverState *bs, bool read_only,
return 0;
}
-/* TODO Remove (deprecated since 2.11)
- * Block drivers are not supposed to automatically change bs->read_only.
- * Instead, they should just check whether they can provide what the user
- * explicitly requested and error out if read-write is requested, but they can
- * only provide read-only access. */
-int bdrv_set_read_only(BlockDriverState *bs, bool read_only, Error **errp)
+/*
+ * Called by a driver that can only provide a read-only image.
+ *
+ * Returns 0 if the node is already read-only or it could switch the node to
+ * read-only because BDRV_O_AUTO_RDONLY is set.
+ *
+ * Returns -EACCES if the node is read-write and BDRV_O_AUTO_RDONLY is not set
+ * or bdrv_can_set_read_only() forbids making the node read-only. If @errmsg
+ * is not NULL, it is used as the error message for the Error object.
+ */
+int bdrv_apply_auto_read_only(BlockDriverState *bs, const char *errmsg,
+ Error **errp)
{
int ret = 0;
- ret = bdrv_can_set_read_only(bs, read_only, false, errp);
+ if (!(bs->open_flags & BDRV_O_RDWR)) {
+ return 0;
+ }
+ if (!(bs->open_flags & BDRV_O_AUTO_RDONLY)) {
+ goto fail;
+ }
+
+ ret = bdrv_can_set_read_only(bs, true, false, NULL);
if (ret < 0) {
- return ret;
+ goto fail;
}
- bs->read_only = read_only;
+ bs->read_only = true;
+ bs->open_flags &= ~BDRV_O_RDWR;
+
return 0;
+
+fail:
+ error_setg(errp, "%s", errmsg ?: "Image is read-only");
+ return -EACCES;
}
void bdrv_get_full_backing_filename_from_filename(const char *backed,
@@ -923,6 +942,7 @@ static void bdrv_inherited_options(int *child_flags, QDict *child_options,
/* Inherit the read-only option from the parent if it's not set */
qdict_copy_default(child_options, parent_options, BDRV_OPT_READ_ONLY);
+ qdict_copy_default(child_options, parent_options, BDRV_OPT_AUTO_READ_ONLY);
/* Our block drivers take care to send flushes and respect unmap policy,
* so we can default to enable both on lower layers regardless of the
@@ -1046,6 +1066,7 @@ static void bdrv_backing_options(int *child_flags, QDict *child_options,
/* backing files always opened read-only */
qdict_set_default_str(child_options, BDRV_OPT_READ_ONLY, "on");
+ qdict_set_default_str(child_options, BDRV_OPT_AUTO_READ_ONLY, "off");
flags &= ~BDRV_O_COPY_ON_READ;
/* snapshot=on is handled on the top layer */
@@ -1058,11 +1079,11 @@ static int bdrv_backing_update_filename(BdrvChild *c, BlockDriverState *base,
const char *filename, Error **errp)
{
BlockDriverState *parent = c->opaque;
- int orig_flags = bdrv_get_flags(parent);
+ bool read_only = bdrv_is_read_only(parent);
int ret;
- if (!(orig_flags & BDRV_O_RDWR)) {
- ret = bdrv_reopen(parent, orig_flags | BDRV_O_RDWR, errp);
+ if (read_only) {
+ ret = bdrv_reopen_set_read_only(parent, false, errp);
if (ret < 0) {
return ret;
}
@@ -1074,8 +1095,8 @@ static int bdrv_backing_update_filename(BdrvChild *c, BlockDriverState *base,
error_setg_errno(errp, -ret, "Could not update backing file link");
}
- if (!(orig_flags & BDRV_O_RDWR)) {
- bdrv_reopen(parent, orig_flags, NULL);
+ if (read_only) {
+ bdrv_reopen_set_read_only(parent, true, NULL);
}
return ret;
@@ -1116,25 +1137,23 @@ static int bdrv_open_flags(BlockDriverState *bs, int flags)
static void update_flags_from_options(int *flags, QemuOpts *opts)
{
- *flags &= ~BDRV_O_CACHE_MASK;
+ *flags &= ~(BDRV_O_CACHE_MASK | BDRV_O_RDWR | BDRV_O_AUTO_RDONLY);
- assert(qemu_opt_find(opts, BDRV_OPT_CACHE_NO_FLUSH));
if (qemu_opt_get_bool_del(opts, BDRV_OPT_CACHE_NO_FLUSH, false)) {
*flags |= BDRV_O_NO_FLUSH;
}
- assert(qemu_opt_find(opts, BDRV_OPT_CACHE_DIRECT));
if (qemu_opt_get_bool_del(opts, BDRV_OPT_CACHE_DIRECT, false)) {
*flags |= BDRV_O_NOCACHE;
}
- *flags &= ~BDRV_O_RDWR;
-
- assert(qemu_opt_find(opts, BDRV_OPT_READ_ONLY));
if (!qemu_opt_get_bool_del(opts, BDRV_OPT_READ_ONLY, false)) {
*flags |= BDRV_O_RDWR;
}
+ if (qemu_opt_get_bool_del(opts, BDRV_OPT_AUTO_READ_ONLY, false)) {
+ *flags |= BDRV_O_AUTO_RDONLY;
+ }
}
static void update_options_from_flags(QDict *options, int flags)
@@ -1149,6 +1168,10 @@ static void update_options_from_flags(QDict *options, int flags)
if (!qdict_haskey(options, BDRV_OPT_READ_ONLY)) {
qdict_put_bool(options, BDRV_OPT_READ_ONLY, !(flags & BDRV_O_RDWR));
}
+ if (!qdict_haskey(options, BDRV_OPT_AUTO_READ_ONLY)) {
+ qdict_put_bool(options, BDRV_OPT_AUTO_READ_ONLY,
+ flags & BDRV_O_AUTO_RDONLY);
+ }
}
static void bdrv_assign_node_name(BlockDriverState *bs,
@@ -1322,12 +1345,17 @@ QemuOptsList bdrv_runtime_opts = {
.help = "Node is opened in read-only mode",
},
{
+ .name = BDRV_OPT_AUTO_READ_ONLY,
+ .type = QEMU_OPT_BOOL,
+ .help = "Node can become read-only if opening read-write fails",
+ },
+ {
.name = "detect-zeroes",
.type = QEMU_OPT_STRING,
.help = "try to optimize zero writes (off, on, unmap)",
},
{
- .name = "discard",
+ .name = BDRV_OPT_DISCARD,
.type = QEMU_OPT_STRING,
.help = "discard operation (ignore/off, unmap/on)",
},
@@ -1432,7 +1460,7 @@ static int bdrv_open_common(BlockDriverState *bs, BlockBackend *file,
}
}
- discard = qemu_opt_get(opts, "discard");
+ discard = qemu_opt_get(opts, BDRV_OPT_DISCARD);
if (discard != NULL) {
if (bdrv_parse_discard_flags(discard, &bs->open_flags) != 0) {
error_setg(errp, "Invalid discard option");
@@ -2228,6 +2256,18 @@ static void bdrv_parent_cb_change_media(BlockDriverState *bs, bool load)
}
}
+/* Return true if you can reach parent going through child->inherits_from
+ * recursively. If parent or child are NULL, return false */
+static bool bdrv_inherits_from_recursive(BlockDriverState *child,
+ BlockDriverState *parent)
+{
+ while (child && child != parent) {
+ child = child->inherits_from;
+ }
+
+ return child != NULL;
+}
+
/*
* Sets the backing file link of a BDS. A new reference is created; callers
* which don't need their own reference any more must call bdrv_unref().
@@ -2235,6 +2275,9 @@ static void bdrv_parent_cb_change_media(BlockDriverState *bs, bool load)
void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd,
Error **errp)
{
+ bool update_inherits_from = bdrv_chain_contains(bs, backing_hd) &&
+ bdrv_inherits_from_recursive(backing_hd, bs);
+
if (backing_hd) {
bdrv_ref(backing_hd);
}
@@ -2250,6 +2293,12 @@ void bdrv_set_backing_hd(BlockDriverState *bs, BlockDriverState *backing_hd,
bs->backing = bdrv_attach_child(bs, backing_hd, "backing", &child_backing,
errp);
+ /* If backing_hd was already part of bs's backing chain, and
+ * inherits_from pointed recursively to bs then let's update it to
+ * point directly to bs (else it will become NULL). */
+ if (update_inherits_from) {
+ backing_hd->inherits_from = bs;
+ }
if (!bs->backing) {
bdrv_unref(backing_hd);
}
@@ -2479,6 +2528,8 @@ BlockDriverState *bdrv_open_blockdev_ref(BlockdevRef *ref, Error **errp)
qdict_set_default_str(qdict, BDRV_OPT_CACHE_DIRECT, "off");
qdict_set_default_str(qdict, BDRV_OPT_CACHE_NO_FLUSH, "off");
qdict_set_default_str(qdict, BDRV_OPT_READ_ONLY, "off");
+ qdict_set_default_str(qdict, BDRV_OPT_AUTO_READ_ONLY, "off");
+
}
bs = bdrv_open_inherit(NULL, reference, qdict, 0, NULL, NULL, errp);
@@ -2876,7 +2927,6 @@ BlockDriverState *bdrv_open(const char *filename, const char *reference,
static BlockReopenQueue *bdrv_reopen_queue_child(BlockReopenQueue *bs_queue,
BlockDriverState *bs,
QDict *options,
- int flags,
const BdrvChildRole *role,
QDict *parent_options,
int parent_flags)
@@ -2885,7 +2935,9 @@ static BlockReopenQueue *bdrv_reopen_queue_child(BlockReopenQueue *bs_queue,
BlockReopenQueueEntry *bs_entry;
BdrvChild *child;
- QDict *old_options, *explicit_options;
+ QDict *old_options, *explicit_options, *options_copy;
+ int flags;
+ QemuOpts *opts;
/* Make sure that the caller remembered to use a drained section. This is
* important to avoid graph changes between the recursive queuing here and
@@ -2911,22 +2963,11 @@ static BlockReopenQueue *bdrv_reopen_queue_child(BlockReopenQueue *bs_queue,
/*
* Precedence of options:
* 1. Explicitly passed in options (highest)
- * 2. Set in flags (only for top level)
- * 3. Retained from explicitly set options of bs
- * 4. Inherited from parent node
- * 5. Retained from effective options of bs
+ * 2. Retained from explicitly set options of bs
+ * 3. Inherited from parent node
+ * 4. Retained from effective options of bs
*/
- if (!parent_options) {
- /*
- * Any setting represented by flags is always updated. If the
- * corresponding QDict option is set, it takes precedence. Otherwise
- * the flag is translated into a QDict option. The old setting of bs is
- * not considered.
- */
- update_options_from_flags(options, flags);
- }
-
/* Old explicitly set values (don't overwrite by inherited value) */
if (bs_entry) {
old_options = qdict_clone_shallow(bs_entry->state.explicit_options);
@@ -2940,16 +2981,10 @@ static BlockReopenQueue *bdrv_reopen_queue_child(BlockReopenQueue *bs_queue,
/* Inherit from parent node */
if (parent_options) {
- QemuOpts *opts;
- QDict *options_copy;
- assert(!flags);
+ flags = 0;
role->inherit_options(&flags, options, parent_flags, parent_options);
- options_copy = qdict_clone_shallow(options);
- opts = qemu_opts_create(&bdrv_runtime_opts, NULL, 0, &error_abort);
- qemu_opts_absorb_qdict(opts, options_copy, NULL);
- update_flags_from_options(&flags, opts);
- qemu_opts_del(opts);
- qobject_unref(options_copy);
+ } else {
+ flags = bdrv_get_flags(bs);
}
/* Old values are used for options that aren't set yet */
@@ -2957,6 +2992,14 @@ static BlockReopenQueue *bdrv_reopen_queue_child(BlockReopenQueue *bs_queue,
bdrv_join_options(bs, options, old_options);
qobject_unref(old_options);
+ /* We have the final set of options so let's update the flags */
+ options_copy = qdict_clone_shallow(options);
+ opts = qemu_opts_create(&bdrv_runtime_opts, NULL, 0, &error_abort);
+ qemu_opts_absorb_qdict(opts, options_copy, NULL);
+ update_flags_from_options(&flags, opts);
+ qemu_opts_del(opts);
+ qobject_unref(options_copy);
+
/* bdrv_open_inherit() sets and clears some additional flags internally */
flags &= ~BDRV_O_PROTOCOL;
if (flags & BDRV_O_RDWR) {
@@ -2996,7 +3039,7 @@ static BlockReopenQueue *bdrv_reopen_queue_child(BlockReopenQueue *bs_queue,
qdict_extract_subqdict(options, &new_child_options, child_key_dot);
g_free(child_key_dot);
- bdrv_reopen_queue_child(bs_queue, child->bs, new_child_options, 0,
+ bdrv_reopen_queue_child(bs_queue, child->bs, new_child_options,
child->role, options, flags);
}
@@ -3005,10 +3048,9 @@ static BlockReopenQueue *bdrv_reopen_queue_child(BlockReopenQueue *bs_queue,
BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue *bs_queue,
BlockDriverState *bs,
- QDict *options, int flags)
+ QDict *options)
{
- return bdrv_reopen_queue_child(bs_queue, bs, options, flags,
- NULL, NULL, 0);
+ return bdrv_reopen_queue_child(bs_queue, bs, options, NULL, NULL, 0);
}
/*
@@ -3070,22 +3112,18 @@ cleanup:
return ret;
}
-
-/* Reopen a single BlockDriverState with the specified flags. */
-int bdrv_reopen(BlockDriverState *bs, int bdrv_flags, Error **errp)
+int bdrv_reopen_set_read_only(BlockDriverState *bs, bool read_only,
+ Error **errp)
{
- int ret = -1;
- Error *local_err = NULL;
+ int ret;
BlockReopenQueue *queue;
+ QDict *opts = qdict_new();
- bdrv_subtree_drained_begin(bs);
-
- queue = bdrv_reopen_queue(NULL, bs, NULL, bdrv_flags);
- ret = bdrv_reopen_multiple(bdrv_get_aio_context(bs), queue, &local_err);
- if (local_err != NULL) {
- error_propagate(errp, local_err);
- }
+ qdict_put_bool(opts, BDRV_OPT_READ_ONLY, read_only);
+ bdrv_subtree_drained_begin(bs);
+ queue = bdrv_reopen_queue(NULL, bs, opts);
+ ret = bdrv_reopen_multiple(bdrv_get_aio_context(bs), queue, errp);
bdrv_subtree_drained_end(bs);
return ret;
@@ -3159,12 +3197,14 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue,
Error **errp)
{
int ret = -1;
+ int old_flags;
Error *local_err = NULL;
BlockDriver *drv;
QemuOpts *opts;
QDict *orig_reopen_opts;
char *discard = NULL;
bool read_only;
+ bool drv_prepared = false;
assert(reopen_state != NULL);
assert(reopen_state->bs->drv != NULL);
@@ -3184,9 +3224,14 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue,
goto error;
}
+ /* This was already called in bdrv_reopen_queue_child() so the flags
+ * are up-to-date. This time we simply want to remove the options from
+ * QemuOpts in order to indicate that they have been processed. */
+ old_flags = reopen_state->flags;
update_flags_from_options(&reopen_state->flags, opts);
+ assert(old_flags == reopen_state->flags);
- discard = qemu_opt_get_del(opts, "discard");
+ discard = qemu_opt_get_del(opts, BDRV_OPT_DISCARD);
if (discard != NULL) {
if (bdrv_parse_discard_flags(discard, &reopen_state->flags) != 0) {
error_setg(errp, "Invalid discard option");
@@ -3249,6 +3294,8 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue,
goto error;
}
+ drv_prepared = true;
+
/* Options that are not handled are only okay if they are unchanged
* compared to the old state. It is expected that some options are only
* used for the initial open, but not reopen (e.g. filename) */
@@ -3314,6 +3361,15 @@ int bdrv_reopen_prepare(BDRVReopenState *reopen_state, BlockReopenQueue *queue,
reopen_state->options = qobject_ref(orig_reopen_opts);
error:
+ if (ret < 0 && drv_prepared) {
+ /* drv->bdrv_reopen_prepare() has succeeded, so we need to
+ * call drv->bdrv_reopen_abort() before signaling an error
+ * (bdrv_reopen_multiple() will not call bdrv_reopen_abort()
+ * when the respective bdrv_reopen_prepare() has failed) */
+ if (drv->bdrv_reopen_abort) {
+ drv->bdrv_reopen_abort(reopen_state);
+ }
+ }
qemu_opts_del(opts);
qobject_unref(orig_reopen_opts);
g_free(discard);
@@ -3788,6 +3844,8 @@ BlockDriverState *bdrv_find_base(BlockDriverState *bs)
int bdrv_drop_intermediate(BlockDriverState *top, BlockDriverState *base,
const char *backing_file_str)
{
+ BlockDriverState *explicit_top = top;
+ bool update_inherits_from;
BdrvChild *c, *next;
Error *local_err = NULL;
int ret = -EIO;
@@ -3803,6 +3861,16 @@ int bdrv_drop_intermediate(BlockDriverState *top, BlockDriverState *base,
goto exit;
}
+ /* If 'base' recursively inherits from 'top' then we should set
+ * base->inherits_from to top->inherits_from after 'top' and all
+ * other intermediate nodes have been dropped.
+ * If 'top' is an implicit node (e.g. "commit_top") we should skip
+ * it because no one inherits from it. We use explicit_top for that. */
+ while (explicit_top && explicit_top->implicit) {
+ explicit_top = backing_bs(explicit_top);
+ }
+ update_inherits_from = bdrv_inherits_from_recursive(base, explicit_top);
+
/* success - we can delete the intermediate states, and link top->base */
/* TODO Check graph modification op blockers (BLK_PERM_GRAPH_MOD) once
* we've figured out how they should work. */
@@ -3838,6 +3906,10 @@ int bdrv_drop_intermediate(BlockDriverState *top, BlockDriverState *base,
bdrv_unref(top);
}
+ if (update_inherits_from) {
+ base->inherits_from = explicit_top->inherits_from;
+ }
+
ret = 0;
exit:
bdrv_unref(top);
@@ -4403,6 +4475,7 @@ static void coroutine_fn bdrv_co_invalidate_cache(BlockDriverState *bs,
uint64_t perm, shared_perm;
Error *local_err = NULL;
int ret;
+ BdrvDirtyBitmap *bm;
if (!bs->drv) {
return;
@@ -4452,6 +4525,12 @@ static void coroutine_fn bdrv_co_invalidate_cache(BlockDriverState *bs,
}
}
+ for (bm = bdrv_dirty_bitmap_next(bs, NULL); bm;
+ bm = bdrv_dirty_bitmap_next(bs, bm))
+ {
+ bdrv_dirty_bitmap_set_migration(bm, false);
+ }
+
ret = refresh_total_sectors(bs, bs->total_sectors);
if (ret < 0) {
bs->open_flags |= BDRV_O_INACTIVE;
@@ -4522,54 +4601,73 @@ void bdrv_invalidate_cache_all(Error **errp)
}
}
-static int bdrv_inactivate_recurse(BlockDriverState *bs,
- bool setting_flag)
+static bool bdrv_has_bds_parent(BlockDriverState *bs, bool only_active)
+{
+ BdrvChild *parent;
+
+ QLIST_FOREACH(parent, &bs->parents, next_parent) {
+ if (parent->role->parent_is_bds) {
+ BlockDriverState *parent_bs = parent->opaque;
+ if (!only_active || !(parent_bs->open_flags & BDRV_O_INACTIVE)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
+
+static int bdrv_inactivate_recurse(BlockDriverState *bs)
{
BdrvChild *child, *parent;
+ uint64_t perm, shared_perm;
int ret;
if (!bs->drv) {
return -ENOMEDIUM;
}
- if (!setting_flag && bs->drv->bdrv_inactivate) {
+ /* Make sure that we don't inactivate a child before its parent.
+ * It will be covered by recursion from the yet active parent. */
+ if (bdrv_has_bds_parent(bs, true)) {
+ return 0;
+ }
+
+ assert(!(bs->open_flags & BDRV_O_INACTIVE));
+
+ /* Inactivate this node */
+ if (bs->drv->bdrv_inactivate) {
ret = bs->drv->bdrv_inactivate(bs);
if (ret < 0) {
return ret;
}
}
- if (setting_flag && !(bs->open_flags & BDRV_O_INACTIVE)) {
- uint64_t perm, shared_perm;
-
- QLIST_FOREACH(parent, &bs->parents, next_parent) {
- if (parent->role->inactivate) {
- ret = parent->role->inactivate(parent);
- if (ret < 0) {
- return ret;
- }
+ QLIST_FOREACH(parent, &bs->parents, next_parent) {
+ if (parent->role->inactivate) {
+ ret = parent->role->inactivate(parent);
+ if (ret < 0) {
+ return ret;
}
}
+ }
- bs->open_flags |= BDRV_O_INACTIVE;
+ bs->open_flags |= BDRV_O_INACTIVE;
+
+ /* Update permissions, they may differ for inactive nodes */
+ bdrv_get_cumulative_perm(bs, &perm, &shared_perm);
+ bdrv_check_perm(bs, NULL, perm, shared_perm, NULL, &error_abort);
+ bdrv_set_perm(bs, perm, shared_perm);
- /* Update permissions, they may differ for inactive nodes */
- bdrv_get_cumulative_perm(bs, &perm, &shared_perm);
- bdrv_check_perm(bs, NULL, perm, shared_perm, NULL, &error_abort);
- bdrv_set_perm(bs, perm, shared_perm);
- }
+ /* Recursively inactivate children */
QLIST_FOREACH(child, &bs->children, next) {
- ret = bdrv_inactivate_recurse(child->bs, setting_flag);
+ ret = bdrv_inactivate_recurse(child->bs);
if (ret < 0) {
return ret;
}
}
- /* At this point persistent bitmaps should be already stored by the format
- * driver */
- bdrv_release_persistent_dirty_bitmaps(bs);
-
return 0;
}
@@ -4578,7 +4676,6 @@ int bdrv_inactivate_all(void)
BlockDriverState *bs = NULL;
BdrvNextIterator it;
int ret = 0;
- int pass;
GSList *aio_ctxs = NULL, *ctx;
for (bs = bdrv_first(&it); bs; bs = bdrv_next(&it)) {
@@ -4590,17 +4687,17 @@ int bdrv_inactivate_all(void)
}
}
- /* We do two passes of inactivation. The first pass calls to drivers'
- * .bdrv_inactivate callbacks recursively so all cache is flushed to disk;
- * the second pass sets the BDRV_O_INACTIVE flag so that no further write
- * is allowed. */
- for (pass = 0; pass < 2; pass++) {
- for (bs = bdrv_first(&it); bs; bs = bdrv_next(&it)) {
- ret = bdrv_inactivate_recurse(bs, pass);
- if (ret < 0) {
- bdrv_next_cleanup(&it);
- goto out;
- }
+ for (bs = bdrv_first(&it); bs; bs = bdrv_next(&it)) {
+ /* Nodes with BDS parents are covered by recursion from the last
+ * parent that gets inactivated. Don't inactivate them a second
+ * time if that has already happened. */
+ if (bdrv_has_bds_parent(bs, false)) {
+ continue;
+ }
+ ret = bdrv_inactivate_recurse(bs);
+ if (ret < 0) {
+ bdrv_next_cleanup(&it);
+ goto out;
}
}
@@ -4697,9 +4794,9 @@ bool bdrv_op_is_blocked(BlockDriverState *bs, BlockOpType op, Error **errp)
assert((int) op >= 0 && op < BLOCK_OP_TYPE_MAX);
if (!QLIST_EMPTY(&bs->op_blockers[op])) {
blocker = QLIST_FIRST(&bs->op_blockers[op]);
- error_propagate(errp, error_copy(blocker->reason));
- error_prepend(errp, "Node '%s' is busy: ",
- bdrv_get_device_or_node_name(bs));
+ error_propagate_prepend(errp, error_copy(blocker->reason),
+ "Node '%s' is busy: ",
+ bdrv_get_device_or_node_name(bs));
return true;
}
return false;
@@ -4803,9 +4900,6 @@ void bdrv_img_create(const char *filename, const char *fmt,
if (options) {
qemu_opts_do_parse(opts, options, NULL, &local_err);
if (local_err) {
- error_report_err(local_err);
- local_err = NULL;
- error_setg(errp, "Invalid options for file format '%s'", fmt);
goto out;
}
}
diff --git a/block/Makefile.objs b/block/Makefile.objs
index c8337bf186..7a81892a52 100644
--- a/block/Makefile.objs
+++ b/block/Makefile.objs
@@ -1,10 +1,18 @@
-block-obj-y += raw-format.o qcow.o vdi.o vmdk.o cloop.o bochs.o vpc.o vvfat.o dmg.o
+block-obj-y += raw-format.o vmdk.o vpc.o
+block-obj-$(CONFIG_QCOW1) += qcow.o
+block-obj-$(CONFIG_VDI) += vdi.o
+block-obj-$(CONFIG_CLOOP) += cloop.o
+block-obj-$(CONFIG_BOCHS) += bochs.o
+block-obj-$(CONFIG_VVFAT) += vvfat.o
+block-obj-$(CONFIG_DMG) += dmg.o
+
block-obj-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o qcow2-cache.o qcow2-bitmap.o
-block-obj-y += qed.o qed-l2-cache.o qed-table.o qed-cluster.o
-block-obj-y += qed-check.o
+block-obj-$(CONFIG_QED) += qed.o qed-l2-cache.o qed-table.o qed-cluster.o
+block-obj-$(CONFIG_QED) += qed-check.o
block-obj-y += vhdx.o vhdx-endian.o vhdx-log.o
block-obj-y += quorum.o
-block-obj-y += parallels.o blkdebug.o blkverify.o blkreplay.o
+block-obj-y += blkdebug.o blkverify.o blkreplay.o
+block-obj-$(CONFIG_PARALLELS) += parallels.o
block-obj-y += blklogwrites.o
block-obj-y += block-backend.o snapshot.o qapi.o
block-obj-$(CONFIG_WIN32) += file-win32.o win32-aio.o
@@ -14,7 +22,8 @@ block-obj-y += null.o mirror.o commit.o io.o create.o
block-obj-y += throttle-groups.o
block-obj-$(CONFIG_LINUX) += nvme.o
-block-obj-y += nbd.o nbd-client.o sheepdog.o
+block-obj-y += nbd.o nbd-client.o
+block-obj-$(CONFIG_SHEEPDOG) += sheepdog.o
block-obj-$(CONFIG_LIBISCSI) += iscsi.o
block-obj-$(if $(CONFIG_LIBISCSI),y,n) += iscsi-opts.o
block-obj-$(CONFIG_LIBNFS) += nfs.o
@@ -45,8 +54,11 @@ gluster.o-libs := $(GLUSTERFS_LIBS)
vxhs.o-libs := $(VXHS_LIBS)
ssh.o-cflags := $(LIBSSH2_CFLAGS)
ssh.o-libs := $(LIBSSH2_LIBS)
-block-obj-$(if $(CONFIG_BZIP2),m,n) += dmg-bz2.o
+block-obj-dmg-bz2-$(CONFIG_BZIP2) += dmg-bz2.o
+block-obj-$(if $(CONFIG_DMG),m,n) += $(block-obj-dmg-bz2-y)
dmg-bz2.o-libs := $(BZIP2_LIBS)
+block-obj-$(if $(CONFIG_LZFSE),m,n) += dmg-lzfse.o
+dmg-lzfse.o-libs := $(LZFSE_LIBS)
qcow.o-libs := -lz
linux-aio.o-libs := -laio
parallels.o-cflags := $(LIBXML2_CFLAGS)
diff --git a/block/backup.c b/block/backup.c
index 4d084f6ca6..435414e964 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -28,6 +28,13 @@
#define BACKUP_CLUSTER_SIZE_DEFAULT (1 << 16)
+typedef struct CowRequest {
+ int64_t start_byte;
+ int64_t end_byte;
+ QLIST_ENTRY(CowRequest) list;
+ CoQueue wait_queue; /* coroutines blocked on this request */
+} CowRequest;
+
typedef struct BackupBlockJob {
BlockJob common;
BlockBackend *target;
@@ -322,37 +329,6 @@ void backup_do_checkpoint(BlockJob *job, Error **errp)
hbitmap_set(backup_job->copy_bitmap, 0, len);
}
-void backup_wait_for_overlapping_requests(BlockJob *job, int64_t offset,
- uint64_t bytes)
-{
- BackupBlockJob *backup_job = container_of(job, BackupBlockJob, common);
- int64_t start, end;
-
- assert(block_job_driver(job) == &backup_job_driver);
-
- start = QEMU_ALIGN_DOWN(offset, backup_job->cluster_size);
- end = QEMU_ALIGN_UP(offset + bytes, backup_job->cluster_size);
- wait_for_overlapping_requests(backup_job, start, end);
-}
-
-void backup_cow_request_begin(CowRequest *req, BlockJob *job,
- int64_t offset, uint64_t bytes)
-{
- BackupBlockJob *backup_job = container_of(job, BackupBlockJob, common);
- int64_t start, end;
-
- assert(block_job_driver(job) == &backup_job_driver);
-
- start = QEMU_ALIGN_DOWN(offset, backup_job->cluster_size);
- end = QEMU_ALIGN_UP(offset + bytes, backup_job->cluster_size);
- cow_request_begin(req, backup_job, start, end);
-}
-
-void backup_cow_request_end(CowRequest *req)
-{
- cow_request_end(req);
-}
-
static void backup_drain(BlockJob *job)
{
BackupBlockJob *s = container_of(job, BackupBlockJob, common);
@@ -409,7 +385,7 @@ static int coroutine_fn backup_run_incremental(BackupBlockJob *job)
HBitmapIter hbi;
hbitmap_iter_init(&hbi, job->copy_bitmap, 0);
- while ((cluster = hbitmap_iter_next(&hbi, true)) != -1) {
+ while ((cluster = hbitmap_iter_next(&hbi)) != -1) {
do {
if (yield_and_check(job)) {
return 0;
@@ -446,7 +422,8 @@ static void backup_incremental_init_copy_bitmap(BackupBlockJob *job)
break;
}
- offset = bdrv_dirty_bitmap_next_zero(job->sync_bitmap, offset);
+ offset = bdrv_dirty_bitmap_next_zero(job->sync_bitmap, offset,
+ UINT64_MAX);
if (offset == -1) {
hbitmap_set(job->copy_bitmap, cluster, end - cluster);
break;
diff --git a/block/block-backend.c b/block/block-backend.c
index dc0cd57724..60d37a0c3d 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -918,7 +918,8 @@ char *blk_get_attached_dev_id(BlockBackend *blk)
} else if (dev->id) {
return g_strdup(dev->id);
}
- return object_get_canonical_path(OBJECT(dev));
+
+ return object_get_canonical_path(OBJECT(dev)) ?: g_strdup("");
}
/*
@@ -1708,7 +1709,7 @@ void blk_error_action(BlockBackend *blk, BlockErrorAction action,
}
}
-int blk_is_read_only(BlockBackend *blk)
+bool blk_is_read_only(BlockBackend *blk)
{
BlockDriverState *bs = blk_bs(blk);
@@ -1719,18 +1720,18 @@ int blk_is_read_only(BlockBackend *blk)
}
}
-int blk_is_sg(BlockBackend *blk)
+bool blk_is_sg(BlockBackend *blk)
{
BlockDriverState *bs = blk_bs(blk);
if (!bs) {
- return 0;
+ return false;
}
return bdrv_is_sg(bs);
}
-int blk_enable_write_cache(BlockBackend *blk)
+bool blk_enable_write_cache(BlockBackend *blk)
{
return blk->enable_write_cache;
}
diff --git a/block/bochs.c b/block/bochs.c
index 50c630047b..79f95d3b50 100644
--- a/block/bochs.c
+++ b/block/bochs.c
@@ -85,14 +85,14 @@ static int bochs_probe(const uint8_t *buf, int buf_size, const char *filename)
const struct bochs_header *bochs = (const void *)buf;
if (buf_size < HEADER_SIZE)
- return 0;
+ return 0;
if (!strcmp(bochs->magic, HEADER_MAGIC) &&
- !strcmp(bochs->type, REDOLOG_TYPE) &&
- !strcmp(bochs->subtype, GROWING_TYPE) &&
- ((le32_to_cpu(bochs->version) == HEADER_VERSION) ||
- (le32_to_cpu(bochs->version) == HEADER_V1)))
- return 100;
+ !strcmp(bochs->type, REDOLOG_TYPE) &&
+ !strcmp(bochs->subtype, GROWING_TYPE) &&
+ ((le32_to_cpu(bochs->version) == HEADER_VERSION) ||
+ (le32_to_cpu(bochs->version) == HEADER_V1)))
+ return 100;
return 0;
}
@@ -105,23 +105,18 @@ static int bochs_open(BlockDriverState *bs, QDict *options, int flags,
struct bochs_header bochs;
int ret;
+ /* No write support yet */
+ ret = bdrv_apply_auto_read_only(bs, NULL, errp);
+ if (ret < 0) {
+ return ret;
+ }
+
bs->file = bdrv_open_child(NULL, options, "file", bs, &child_file,
false, errp);
if (!bs->file) {
return -EINVAL;
}
- if (!bdrv_is_read_only(bs)) {
- error_report("Opening bochs images without an explicit read-only=on "
- "option is deprecated. Future versions will refuse to "
- "open the image instead of automatically marking the "
- "image read-only.");
- ret = bdrv_set_read_only(bs, true, errp); /* no write support yet */
- if (ret < 0) {
- return ret;
- }
- }
-
ret = bdrv_pread(bs->file, 0, &bochs, sizeof(bochs));
if (ret < 0) {
return ret;
@@ -130,8 +125,8 @@ static int bochs_open(BlockDriverState *bs, QDict *options, int flags,
if (strcmp(bochs.magic, HEADER_MAGIC) ||
strcmp(bochs.type, REDOLOG_TYPE) ||
strcmp(bochs.subtype, GROWING_TYPE) ||
- ((le32_to_cpu(bochs.version) != HEADER_VERSION) &&
- (le32_to_cpu(bochs.version) != HEADER_V1))) {
+ ((le32_to_cpu(bochs.version) != HEADER_VERSION) &&
+ (le32_to_cpu(bochs.version) != HEADER_V1))) {
error_setg(errp, "Image not in Bochs format");
return -EINVAL;
}
@@ -163,7 +158,7 @@ static int bochs_open(BlockDriverState *bs, QDict *options, int flags,
}
for (i = 0; i < s->catalog_size; i++)
- le32_to_cpus(&s->catalog_bitmap[i]);
+ le32_to_cpus(&s->catalog_bitmap[i]);
s->data_offset = le32_to_cpu(bochs.header) + (s->catalog_size * 4);
@@ -222,7 +217,7 @@ static int64_t seek_to_sector(BlockDriverState *bs, int64_t sector_num)
extent_offset = (offset % s->extent_size) / 512;
if (s->catalog_bitmap[extent_index] == 0xffffffff) {
- return 0; /* not allocated */
+ return 0; /* not allocated */
}
bitmap_offset = s->data_offset +
@@ -237,7 +232,7 @@ static int64_t seek_to_sector(BlockDriverState *bs, int64_t sector_num)
}
if (!((bitmap_entry >> (extent_offset % 8)) & 1)) {
- return 0; /* not allocated */
+ return 0; /* not allocated */
}
return bitmap_offset + (512 * (s->bitmap_blocks + extent_offset));
diff --git a/block/cloop.c b/block/cloop.c
index 2be68987bd..df2b85f723 100644
--- a/block/cloop.c
+++ b/block/cloop.c
@@ -67,23 +67,17 @@ static int cloop_open(BlockDriverState *bs, QDict *options, int flags,
uint32_t offsets_size, max_compressed_block_size = 1, i;
int ret;
+ ret = bdrv_apply_auto_read_only(bs, NULL, errp);
+ if (ret < 0) {
+ return ret;
+ }
+
bs->file = bdrv_open_child(NULL, options, "file", bs, &child_file,
false, errp);
if (!bs->file) {
return -EINVAL;
}
- if (!bdrv_is_read_only(bs)) {
- error_report("Opening cloop images without an explicit read-only=on "
- "option is deprecated. Future versions will refuse to "
- "open the image instead of automatically marking the "
- "image read-only.");
- ret = bdrv_set_read_only(bs, true, errp);
- if (ret < 0) {
- return ret;
- }
- }
-
/* read header */
ret = bdrv_pread(bs->file, 128, &s->block_size, 4);
if (ret < 0) {
diff --git a/block/commit.c b/block/commit.c
index a2da5740b0..53148e610b 100644
--- a/block/commit.c
+++ b/block/commit.c
@@ -38,7 +38,7 @@ typedef struct CommitBlockJob {
BlockBackend *base;
BlockDriverState *base_bs;
BlockdevOnError on_error;
- int base_flags;
+ bool base_read_only;
char *backing_file_str;
} CommitBlockJob;
@@ -124,8 +124,8 @@ static void commit_clean(Job *job)
/* restore base open flags here if appropriate (e.g., change the base back
* to r/o). These reopens do not need to be atomic, since we won't abort
* even on failure here */
- if (s->base_flags != bdrv_get_flags(s->base_bs)) {
- bdrv_reopen(s->base_bs, s->base_flags, NULL);
+ if (s->base_read_only) {
+ bdrv_reopen_set_read_only(s->base_bs, true, NULL);
}
g_free(s->backing_file_str);
@@ -264,7 +264,6 @@ void commit_start(const char *job_id, BlockDriverState *bs,
const char *filter_node_name, Error **errp)
{
CommitBlockJob *s;
- int orig_base_flags;
BlockDriverState *iter;
BlockDriverState *commit_top_bs = NULL;
Error *local_err = NULL;
@@ -283,11 +282,9 @@ void commit_start(const char *job_id, BlockDriverState *bs,
}
/* convert base to r/w, if necessary */
- orig_base_flags = bdrv_get_flags(base);
- if (!(orig_base_flags & BDRV_O_RDWR)) {
- bdrv_reopen(base, orig_base_flags | BDRV_O_RDWR, &local_err);
- if (local_err != NULL) {
- error_propagate(errp, local_err);
+ s->base_read_only = bdrv_is_read_only(base);
+ if (s->base_read_only) {
+ if (bdrv_reopen_set_read_only(base, false, errp) != 0) {
goto fail;
}
}
@@ -363,7 +360,6 @@ void commit_start(const char *job_id, BlockDriverState *bs,
goto fail;
}
- s->base_flags = orig_base_flags;
s->backing_file_str = g_strdup(backing_file_str);
s->on_error = on_error;
@@ -395,7 +391,7 @@ int bdrv_commit(BlockDriverState *bs)
BlockDriverState *commit_top_bs = NULL;
BlockDriver *drv = bs->drv;
int64_t offset, length, backing_length;
- int ro, open_flags;
+ int ro;
int64_t n;
int ret = 0;
uint8_t *buf = NULL;
@@ -414,10 +410,9 @@ int bdrv_commit(BlockDriverState *bs)
}
ro = bs->backing->bs->read_only;
- open_flags = bs->backing->bs->open_flags;
if (ro) {
- if (bdrv_reopen(bs->backing->bs, open_flags | BDRV_O_RDWR, NULL)) {
+ if (bdrv_reopen_set_read_only(bs->backing->bs, false, NULL)) {
return -EACCES;
}
}
@@ -527,7 +522,7 @@ ro_cleanup:
if (ro) {
/* ignoring error return here */
- bdrv_reopen(bs->backing->bs, open_flags & ~BDRV_O_RDWR, NULL);
+ bdrv_reopen_set_read_only(bs->backing->bs, true, NULL);
}
return ret;
diff --git a/block/crypto.c b/block/crypto.c
index 33ee01bebd..f0a5f6b987 100644
--- a/block/crypto.c
+++ b/block/crypto.c
@@ -229,6 +229,7 @@ static int block_crypto_open_generic(QCryptoBlockFormat format,
block_crypto_read_func,
bs,
cflags,
+ 1,
errp);
if (!crypto->block) {
diff --git a/block/curl.c b/block/curl.c
index fabb2b4da7..db5d2bd8ef 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -684,10 +684,10 @@ static int curl_open