Merge lp:~fboudra/qemu-linaro/new-upstream-release-1.2.0-2012.09-0ubuntu1 into lp:ubuntu/quantal/qemu-linaro

Proposed by Fathi Boudra
Status: Merged
Merge reported by: Stéphane Graber
Merged at revision: not available
Proposed branch: lp:~fboudra/qemu-linaro/new-upstream-release-1.2.0-2012.09-0ubuntu1
Merge into: lp:ubuntu/quantal/qemu-linaro
Diff against target: 298331 lines (+142449/-83986)
1268 files modified
.gitignore (+12/-0)
.pc/.version (+0/-1)
.pc/applied-patches (+0/-2)
.pc/define_AT_EMPTY_PATH.patch/hw/9pfs/virtio-9p-handle.c (+0/-699)
.pc/powerpc-missing-include.patch/cache-utils.h (+0/-41)
CODING_STYLE (+1/-1)
Changelog (+1/-1)
Changelog.LINARO (+34/-0)
MAINTAINERS (+89/-19)
Makefile (+86/-74)
Makefile.dis (+0/-3)
Makefile.hw (+3/-5)
Makefile.objs (+86/-277)
Makefile.target (+68/-317)
Makefile.user (+2/-3)
QMP/qmp-events.txt (+207/-156)
QMP/qmp-spec.txt (+20/-10)
QMP/qom-fuse (+138/-0)
VERSION (+1/-1)
VERSION.LINARO (+1/-1)
aio.c (+82/-120)
arch_init.c (+449/-88)
arch_init.h (+5/-1)
arm-semi.c (+0/-509)
async.c (+4/-4)
audio/Makefile.objs (+14/-0)
audio/audio.c (+28/-6)
audio/audio_int.h (+6/-0)
audio/audio_template.h (+2/-0)
audio/mixeng.c (+24/-12)
audio/mixeng_template.h (+3/-1)
audio/paaudio.c (+460/-43)
audio/spiceaudio.c (+41/-0)
audio/winwaveaudio.c (+4/-10)
balloon.c (+15/-1)
balloon.h (+2/-0)
bitops.h (+103/-13)
block-migration.c (+158/-117)
block.c (+517/-411)
block.h (+34/-77)
block/Makefile.objs (+11/-0)
block/blkdebug.c (+67/-59)
block/cow.c (+1/-7)
block/curl.c (+8/-10)
block/iscsi.c (+506/-130)
block/nbd.c (+49/-28)
block/qcow.c (+2/-8)
block/qcow2-cache.c (+20/-23)
block/qcow2-cluster.c (+409/-165)
block/qcow2-refcount.c (+168/-100)
block/qcow2-snapshot.c (+20/-4)
block/qcow2.c (+387/-65)
block/qcow2.h (+85/-6)
block/qed-check.c (+37/-0)
block/qed-l2-cache.c (+18/-4)
block/qed.c (+46/-39)
block/qed.h (+5/-2)
block/raw-posix.c (+133/-26)
block/raw-win32.c (+3/-3)
block/raw.c (+7/-3)
block/rbd.c (+96/-21)
block/sheepdog.c (+311/-151)
block/stream.c (+60/-120)
block/vdi.c (+152/-359)
block/vmdk.c (+71/-18)
block/vpc.c (+5/-8)
block/vvfat.c (+53/-35)
block_int.h (+163/-41)
blockdev.c (+130/-155)
blockdev.h (+2/-3)
bsd-user/Makefile.objs (+2/-0)
bsd-user/main.c (+12/-9)
bsd-user/qemu.h (+6/-6)
bsd-user/signal.c (+1/-1)
cache-utils.h (+2/-1)
check-qdict.c (+0/-378)
check-qfloat.c (+0/-53)
check-qint.c (+0/-87)
check-qjson.c (+0/-728)
check-qlist.c (+0/-127)
check-qstring.c (+0/-107)
cmd.c (+29/-23)
compiler.h (+7/-0)
configure (+494/-246)
console.c (+53/-30)
console.h (+3/-0)
coroutine-sigaltstack.c (+334/-0)
coroutine-ucontext.c (+32/-0)
cpu-all.h (+75/-69)
cpu-common.h (+2/-2)
cpu-defs.h (+8/-19)
cpu-exec.c (+67/-31)
cpus.c (+178/-87)
cpus.h (+2/-0)
cputlb.c (+366/-0)
cputlb.h (+45/-0)
cursor.c (+2/-1)
cutils.c (+88/-208)
darwin-user/commpage.c (+0/-357)
darwin-user/ioctls.h (+0/-4)
darwin-user/ioctls_types.h (+0/-1)
darwin-user/machload.c (+0/-902)
darwin-user/main.c (+0/-1024)
darwin-user/mmap.c (+0/-409)
darwin-user/qemu.h (+0/-178)
darwin-user/signal.c (+0/-452)
darwin-user/syscall.c (+0/-1566)
darwin-user/syscalls.h (+0/-384)
debian/changelog (+31/-0)
debian/control (+28/-20)
debian/patches/define_AT_EMPTY_PATH.patch (+7/-5)
debian/patches/powerpc-missing-include.patch (+0/-18)
debian/patches/series (+0/-1)
debian/qemu-keymaps.install (+1/-1)
debian/qemu-kvm-spice.install (+2/-2)
debian/qemu-user-static.install (+7/-7)
debian/qemu-user.install (+6/-6)
debian/rules (+15/-8)
def-helper.h (+34/-1)
default-configs/arm-softmmu.mak (+18/-0)
default-configs/i386-darwin-user.mak (+0/-1)
default-configs/microblaze-softmmu.mak (+2/-0)
default-configs/microblazeel-softmmu.mak (+2/-0)
default-configs/or32-linux-user.mak (+1/-0)
default-configs/or32-softmmu.mak (+4/-0)
default-configs/pci.mak (+3/-1)
default-configs/ppc-darwin-user.mak (+0/-3)
default-configs/ppc-softmmu.mak (+1/-0)
default-configs/ppc64-softmmu.mak (+1/-0)
default-configs/ppcemb-softmmu.mak (+1/-0)
default-configs/s390x-softmmu.mak (+0/-1)
default-configs/unicore32-softmmu.mak (+4/-0)
device_tree.c (+136/-2)
device_tree.h (+25/-1)
dis-asm.h (+3/-0)
disas.c (+45/-12)
disas.h (+1/-1)
dma-helpers.c (+210/-18)
dma.h (+222/-11)
docs/bootindex.txt (+1/-1)
docs/ccid.txt (+1/-1)
docs/libcacard.txt (+13/-13)
docs/qapi-code-gen.txt (+4/-2)
docs/specs/acpi_pci_hotplug.txt (+13/-5)
docs/specs/ivshmem_device_spec.txt (+1/-1)
docs/specs/ppc-spapr-hcalls.txt (+78/-0)
docs/specs/qcow2.txt (+111/-25)
docs/tracing.txt (+41/-7)
docs/usb-storage.txt (+38/-0)
docs/usb2.txt (+15/-0)
docs/writing-qmp-commands.txt (+30/-23)
docs/xbzrle.txt (+128/-0)
docs/xen-save-devices-state.txt (+34/-0)
dump-stub.c (+64/-0)
dump.c (+873/-0)
dump.h (+35/-0)
dyngen-exec.h (+2/-2)
elf.h (+44/-0)
error.c (+23/-82)
error.h (+18/-23)
error_int.h (+0/-29)
event_notifier.c (+21/-15)
event_notifier.h (+6/-2)
exec-all.h (+57/-42)
exec-obsolete.h (+32/-25)
exec.c (+340/-821)
fpu/softfloat-macros.h (+9/-9)
fpu/softfloat-specialize.h (+4/-4)
fpu/softfloat.c (+69/-69)
fpu/softfloat.h (+7/-8)
fsdev/Makefile.objs (+9/-0)
fsdev/virtfs-proxy-helper.texi (+1/-1)
gdbstub.c (+149/-81)
gdbstub.h (+17/-8)
gen-icount.h (+4/-4)
hmp-commands.hx (+85/-22)
hmp.c (+296/-50)
hmp.h (+12/-0)
hw/9pfs/Makefile.objs (+9/-0)
hw/9pfs/virtio-9p-handle.c (+0/-10)
hw/9pfs/virtio-9p.c (+14/-9)
hw/Makefile.objs (+205/-0)
hw/a15mpcore.c (+34/-20)
hw/a9mpcore.c (+36/-40)
hw/ac97.c (+105/-116)
hw/acpi.c (+6/-1)
hw/acpi.h (+1/-1)
hw/acpi_piix4.c (+112/-75)
hw/alpha/Makefile.objs (+4/-0)
hw/alpha_dp264.c (+1/-1)
hw/alpha_pci.c (+1/-0)
hw/alpha_sys.h (+1/-2)
hw/alpha_typhoon.c (+23/-17)
hw/an5206.c (+1/-1)
hw/apb_pci.c (+53/-14)
hw/apb_pci.h (+2/-1)
hw/apic-msidef.h (+30/-0)
hw/apic.c (+26/-15)
hw/apic.h (+5/-1)
hw/apic_common.c (+16/-4)
hw/apic_internal.h (+0/-1)
hw/arm-misc.h (+7/-7)
hw/arm/Makefile.objs (+37/-0)
hw/arm11mpcore.c (+33/-29)
hw/arm_boot.c (+60/-17)
hw/arm_gic.c (+153/-295)
hw/arm_gic_common.c (+194/-0)
hw/arm_gic_internal.h (+138/-0)
hw/arm_l2x0.c (+1/-1)
hw/arm_mptimer.c (+3/-2)
hw/arm_pic.c (+35/-9)
hw/armv7m.c (+17/-7)
hw/armv7m_nvic.c (+148/-29)
hw/axis_dev88.c (+5/-3)
hw/blizzard.c (+1/-3)
hw/block-common.c (+64/-0)
hw/block-common.h (+79/-0)
hw/boards.h (+4/-0)
hw/bonito.c (+93/-59)
hw/bt-l2cap.c (+7/-4)
hw/bt-sdp.c (+3/-3)
hw/cadence_gem.c (+1233/-0)
hw/cadence_ttc.c (+489/-0)
hw/cadence_uart.c (+513/-0)
hw/cirrus_vga.c (+7/-7)
hw/collie.c (+1/-1)
hw/cris-boot.c (+6/-4)
hw/cris-boot.h (+1/-1)
hw/cris/Makefile.objs (+13/-0)
hw/cris_pic_cpu.c (+2/-2)
hw/cuda.c (+1/-1)
hw/dec_pci.c (+18/-17)
hw/dec_pci.h (+2/-0)
hw/dp8393x.c (+4/-5)
hw/ds1338.c (+1/-0)
hw/dsi.c (+16/-10)
hw/dummy_m68k.c (+1/-1)
hw/e1000.c (+125/-59)
hw/e1000_hw.h (+12/-0)
hw/eepro100.c (+21/-16)
hw/es1370.c (+7/-7)
hw/escc.c (+0/-1)
hw/esp-pci.c (+518/-0)
hw/esp.c (+147/-204)
hw/esp.h (+119/-0)
hw/etraxfs.h (+1/-1)
hw/etraxfs_eth.c (+5/-5)
hw/etraxfs_ser.c (+2/-2)
hw/exynos4210.c (+87/-19)
hw/exynos4210.h (+8/-2)
hw/exynos4210_combiner.c (+0/-10)
hw/exynos4210_gic.c (+70/-62)
hw/exynos4210_i2c.c (+334/-0)
hw/exynos4210_mct.c (+1/-5)
hw/exynos4210_pwm.c (+1/-1)
hw/exynos4210_rtc.c (+592/-0)
hw/exynos4210_uart.c (+3/-3)
hw/exynos4_boards.c (+4/-3)
hw/fdc.c (+252/-114)
hw/fdc.h (+11/-23)
hw/framebuffer.c (+1/-1)
hw/grackle_pci.c (+35/-36)
hw/grlib.h (+1/-1)
hw/gt64xxx.c (+39/-28)
hw/hd-geometry.c (+157/-0)
hw/hda-audio.c (+198/-57)
hw/highbank.c (+14/-16)
hw/i2c.c (+19/-11)
hw/i386/Makefile.objs (+15/-0)
hw/i82374.c (+4/-1)
hw/i82378.c (+3/-3)
hw/i8254.c (+46/-241)
hw/i8254.h (+11/-0)
hw/i8254_common.c (+311/-0)
hw/i8254_internal.h (+85/-0)
hw/ide.h (+3/-1)
hw/ide/Makefile.objs (+10/-0)
hw/ide/ahci.c (+75/-33)
hw/ide/ahci.h (+3/-2)
hw/ide/atapi.c (+31/-0)
hw/ide/cmd646.c (+7/-9)
hw/ide/core.c (+199/-76)
hw/ide/ich.c (+10/-15)
hw/ide/internal.h (+18/-2)
hw/ide/macio.c (+5/-4)
hw/ide/piix.c (+6/-6)
hw/ide/qdev.c (+54/-26)
hw/ide/via.c (+4/-5)
hw/imx.h (+34/-0)
hw/imx_avic.c (+408/-0)
hw/imx_ccm.c (+321/-0)
hw/imx_serial.c (+467/-0)
hw/imx_timer.c (+689/-0)
hw/integratorcp.c (+9/-7)
hw/intel-hda.c (+23/-29)
hw/intel-hda.h (+3/-0)
hw/ioapic.c (+1/-1)
hw/ioh3420.c (+4/-7)
hw/irq.c (+17/-0)
hw/irq.h (+5/-0)
hw/isa-bus.c (+16/-7)
hw/isa.h (+8/-2)
hw/ivshmem.c (+81/-69)
hw/kvm/Makefile.objs (+1/-0)
hw/kvm/apic.c (+34/-4)
hw/kvm/arm_gic.c (+153/-0)
hw/kvm/clock.c (+16/-2)
hw/kvm/i8254.c (+317/-0)
hw/kvm/i8259.c (+1/-1)
hw/kvm/ioapic.c (+1/-1)
hw/kvmvapic.c (+14/-12)
hw/kzm.c (+154/-0)
hw/lan9118.c (+9/-7)
hw/lance.c (+2/-2)
hw/leon3.c (+10/-8)
hw/lm32/Makefile.objs (+23/-0)
hw/lm32_boards.c (+14/-10)
hw/loader.c (+3/-3)
hw/loader.h (+2/-1)
hw/lsi53c895a.c (+26/-35)
hw/m48t59.c (+25/-21)
hw/m68k/Makefile.objs (+4/-0)
hw/mainstone.c (+8/-8)
hw/mc146818rtc.c (+0/-42)
hw/mc146818rtc.h (+1/-2)
hw/mc146818rtc_regs.h (+62/-0)
hw/mcf.h (+2/-2)
hw/mcf5206.c (+2/-2)
hw/mcf5208.c (+2/-2)
hw/mcf_fec.c (+4/-5)
hw/mcf_intc.c (+2/-2)
hw/megasas.c (+2214/-0)
hw/mfi.h (+1249/-0)
hw/microblaze/Makefile.objs (+9/-0)
hw/microblaze_boot.c (+177/-0)
hw/microblaze_boot.h (+10/-0)
hw/microblaze_pic_cpu.c (+2/-2)
hw/microblaze_pic_cpu.h (+1/-1)
hw/milkymist-minimac2.c (+4/-4)
hw/milkymist-sysctl.c (+17/-9)
hw/milkymist-vgafb.c (+4/-1)
hw/milkymist.c (+9/-7)
hw/mips/Makefile.objs (+6/-0)
hw/mips_cpudevs.h (+2/-2)
hw/mips_fulong2e.c (+16/-13)
hw/mips_int.c (+3/-3)
hw/mips_jazz.c (+11/-8)
hw/mips_malta.c (+53/-60)
hw/mips_mipssim.c (+11/-8)
hw/mips_r4k.c (+11/-8)
hw/mips_timer.c (+10/-10)
hw/mipsnet.c (+5/-5)
hw/mpc8544_guts.c (+1/-1)
hw/msi.c (+25/-3)
hw/msi.h (+6/-0)
hw/msix.c (+297/-150)
hw/msix.h (+19/-10)
hw/multiboot.c (+9/-3)
hw/musicpal.c (+9/-9)
hw/ne2000-isa.c (+2/-2)
hw/ne2000.c (+10/-35)
hw/ne2000.h (+2/-2)
hw/nseries.c (+38/-38)
hw/null-machine.c (+40/-0)
hw/omap.h (+2/-103)
hw/omap1.c (+16/-14)
hw/omap2.c (+4/-4)
hw/omap3.c (+10/-4)
hw/omap3_boot.c (+15/-3)
hw/omap_i2c.c (+28/-1)
hw/omap_lcdc.c (+2/-3)
hw/omap_sx1.c (+3/-3)
hw/omap_tap.c (+42/-6)
hw/omap_uart.c (+13/-1)
hw/opencores_eth.c (+7/-32)
hw/openpic.c (+19/-10)
hw/openrisc/Makefile.objs (+3/-0)
hw/openrisc_pic.c (+60/-0)
hw/openrisc_sim.c (+150/-0)
hw/openrisc_timer.c (+101/-0)
hw/overo.c (+1/-1)
hw/palm.c (+8/-8)
hw/pc.c (+98/-104)
hw/pc.h (+5/-6)
hw/pc_piix.c (+159/-250)
hw/pc_sysfw.c (+12/-0)
hw/pci-hotplug.c (+19/-9)
hw/pci.c (+120/-49)
hw/pci.h (+66/-22)
hw/pci_bridge.c (+20/-17)
hw/pci_bridge.h (+1/-1)
hw/pci_bridge_dev.c (+171/-0)
hw/pci_host.c (+16/-1)
hw/pci_host.h (+5/-0)
hw/pci_ids.h (+4/-0)
hw/pci_internals.h (+5/-1)
hw/pci_regs.h (+2/-1)
hw/pcie_port.c (+1/-11)
hw/pcnet-pci.c (+4/-5)
hw/pcnet.c (+15/-4)
hw/pcnet.h (+4/-3)
hw/petalogix_ml605_mmu.c (+40/-150)
hw/petalogix_s3adsp1800_mmu.c (+27/-133)
hw/pflash_cfi01.c (+0/-1)
hw/piix_pci.c (+34/-13)
hw/pl011.c (+3/-1)
hw/pl031.c (+52/-29)
hw/ppc.c (+57/-66)
hw/ppc.h (+14/-14)
hw/ppc/Makefile.objs (+30/-0)
hw/ppc/e500.c (+589/-0)
hw/ppc/e500.h (+21/-0)
hw/ppc/e500plat.c (+60/-0)
hw/ppc/mpc8544ds.c (+61/-0)
hw/ppc405.h (+4/-4)
hw/ppc405_uc.c (+21/-31)
hw/ppc440_bamboo.c (+13/-9)
hw/ppc4xx.h (+6/-4)
hw/ppc4xx_devs.c (+17/-7)
hw/ppc4xx_pci.c (+16/-11)
hw/ppc_booke.c (+10/-10)
hw/ppc_mac.h (+1/-0)
hw/ppc_newworld.c (+16/-7)
hw/ppc_oldworld.c (+16/-7)
hw/ppc_prep.c (+23/-47)
hw/ppce500_mpc8544ds.c (+0/-410)
hw/ppce500_pci.c (+15/-9)
hw/ppce500_spin.c (+8/-7)
hw/prep_pci.c (+38/-12)
hw/ps2.c (+1/-1)
hw/ps2.h (+29/-0)
hw/ptimer.c (+13/-0)
hw/puv3.c (+131/-0)
hw/puv3.h (+49/-0)
hw/puv3_dma.c (+109/-0)
hw/puv3_gpio.c (+141/-0)
hw/puv3_intc.c (+135/-0)
hw/puv3_ost.c (+151/-0)
hw/puv3_pm.c (+149/-0)
hw/pxa.h (+3/-3)
hw/pxa2xx.c (+162/-212)
hw/pxa2xx_dma.c (+6/-6)
hw/pxa2xx_gpio.c (+6/-5)
hw/pxa2xx_lcd.c (+6/-6)
hw/pxa2xx_pic.c (+54/-42)
hw/qdev-addr.c (+2/-2)
hw/qdev-dma.h (+10/-0)
hw/qdev-monitor.c (+96/-74)
hw/qdev-properties.c (+376/-254)
hw/qdev.c (+246/-121)
hw/qdev.h (+59/-44)
hw/qxl-logger.c (+38/-13)
hw/qxl-render.c (+16/-12)
hw/qxl.c (+275/-170)
hw/qxl.h (+10/-4)
hw/r2d.c (+12/-8)
hw/realview.c (+10/-88)
hw/realview_gic.c (+26/-20)
hw/rtl8139.c (+65/-52)
hw/s390-virtio-bus.c (+56/-26)
hw/s390-virtio-bus.h (+10/-2)
hw/s390-virtio.c (+44/-21)
hw/s390x/Makefile.objs (+3/-0)
hw/scsi-bus.c (+385/-87)
hw/scsi-defs.h (+18/-3)
hw/scsi-disk.c (+906/-349)
hw/scsi-generic.c (+7/-9)
hw/scsi.h (+18/-0)
hw/sd.c (+39/-35)
hw/sd.h (+4/-4)
hw/serial.c (+16/-1)
hw/sh.h (+1/-1)
hw/sh4/Makefile.objs (+5/-0)
hw/sh7750.c (+1/-1)
hw/sh_intc.c (+1/-1)
hw/sh_serial.c (+4/-2)
hw/shix.c (+1/-1)
hw/shpc.c (+681/-0)
hw/shpc.h (+48/-0)
hw/slotid_cap.c (+44/-0)
hw/slotid_cap.h (+11/-0)
hw/smc91c111.c (+4/-4)
hw/spapr.c (+154/-46)
hw/spapr.h (+38/-5)
hw/spapr_hcall.c (+89/-21)
hw/spapr_iommu.c (+262/-0)
hw/spapr_llan.c (+59/-51)
hw/spapr_pci.c (+522/-205)
hw/spapr_pci.h (+40/-15)
hw/spapr_rtas.c (+17/-4)
hw/spapr_vio.c (+125/-333)
hw/spapr_vio.h (+52/-46)
hw/spapr_vscsi.c (+25/-23)
hw/spapr_vty.c (+10/-11)
hw/sparc/Makefile.objs (+8/-0)
hw/sparc64/Makefile.objs (+4/-0)
hw/spi.c (+16/-9)
hw/spitz.c (+14/-14)
hw/ssd0323.c (+3/-1)
hw/ssi.c (+18/-11)
hw/stellaris_enet.c (+4/-4)
hw/stream.c (+23/-0)
hw/stream.h (+31/-0)
hw/strongarm.c (+8/-8)
hw/strongarm.h (+1/-1)
hw/sun4m.c (+35/-23)
hw/sun4u.c (+105/-60)
hw/sysbus.c (+39/-6)
hw/sysbus.h (+3/-0)
hw/tosa.c (+9/-9)
hw/twl92230.c (+5/-4)
hw/unicore32/Makefile.objs (+6/-0)
hw/unin_pci.c (+95/-86)
hw/usb-audio.c (+0/-714)
hw/usb-bt.c (+0/-557)
hw/usb-bus.c (+0/-584)
hw/usb-ccid.c (+0/-1365)
hw/usb-desc.c (+0/-601)
hw/usb-desc.h (+0/-117)
hw/usb-ehci.c (+0/-2379)
hw/usb-hid.c (+0/-638)
hw/usb-hub.c (+0/-549)
hw/usb-libhw.c (+0/-63)
hw/usb-msd.c (+0/-677)
hw/usb-musb.c (+0/-1562)
hw/usb-net.c (+0/-1423)
hw/usb-ohci.c (+0/-1896)
hw/usb-ohci.h (+0/-9)
hw/usb-serial.c (+0/-637)
hw/usb-uhci.c (+0/-1408)
hw/usb-uhci.h (+0/-10)
hw/usb-wacom.c (+0/-381)
hw/usb-xhci.c (+0/-2928)
hw/usb.c (+0/-592)
hw/usb.h (+25/-8)
hw/usb/Makefile.objs (+14/-0)
hw/usb/bus.c (+623/-0)
hw/usb/core.c (+726/-0)
hw/usb/desc.c (+642/-0)
hw/usb/desc.h (+181/-0)
hw/usb/dev-audio.c (+715/-0)
hw/usb/dev-bluetooth.c (+558/-0)
hw/usb/dev-hid.c (+638/-0)
hw/usb/dev-hub.c (+589/-0)
hw/usb/dev-network.c (+1427/-0)
hw/usb/dev-serial.c (+638/-0)
hw/usb/dev-smartcard-reader.c (+1373/-0)
hw/usb/dev-storage.c (+703/-0)
hw/usb/dev-uas.c (+778/-0)
hw/usb/dev-wacom.c (+382/-0)
hw/usb/hcd-ehci.c (+2677/-0)
hw/usb/hcd-musb.c (+1563/-0)
hw/usb/hcd-ohci.c (+1914/-0)
hw/usb/hcd-uhci.c (+1441/-0)
hw/usb/hcd-xhci.c (+2944/-0)
hw/usb/host-bsd.c (+647/-0)
hw/usb/host-linux.c (+2002/-0)
hw/usb/host-stub.c (+52/-0)
hw/usb/libhw.c (+64/-0)
hw/usb/redirect.c (+1501/-0)
hw/versatile_i2c.c (+105/-0)
hw/versatilepb.c (+31/-9)
hw/vexpress.c (+20/-13)
hw/vga-isa-mm.c (+4/-1)
hw/vga-isa.c (+7/-1)
hw/vga-pci.c (+8/-2)
hw/vga-pci.h (+12/-0)
hw/vga.c (+35/-7)
hw/vga_int.h (+7/-4)
hw/vhost.c (+9/-7)
hw/vhost_net.c (+13/-13)
hw/vhost_net.h (+1/-1)
hw/virtex_ml507.c (+20/-15)
hw/virtio-balloon.c (+12/-3)
hw/virtio-blk.c (+94/-57)
hw/virtio-blk.h (+14/-8)
hw/virtio-net.c (+18/-14)
hw/virtio-net.h (+1/-0)
hw/virtio-pci.c (+166/-84)
hw/virtio-pci.h (+8/-3)
hw/virtio-scsi.c (+141/-18)
hw/virtio-scsi.h (+8/-1)
hw/virtio-serial-bus.c (+84/-25)
hw/virtio.c (+67/-0)
hw/virtio.h (+7/-3)
hw/vmport.c (+6/-6)
hw/vmware_vga.c (+16/-6)
hw/vt82c686.c (+1/-1)
hw/watchdog.c (+2/-2)
hw/wdt_i6300esb.c (+1/-3)
hw/xen-host-pci-device.c (+396/-0)
hw/xen-host-pci-device.h (+55/-0)
hw/xen.h (+1/-0)
hw/xen_apic.c (+95/-0)
hw/xen_backend.c (+11/-12)
hw/xen_backend.h (+1/-0)
hw/xen_common.h (+24/-2)
hw/xen_console.c (+5/-3)
hw/xen_devconfig.c (+12/-11)
hw/xen_disk.c (+52/-26)
hw/xen_machine_pv.c (+4/-2)
hw/xen_nic.c (+6/-10)
hw/xen_platform.c (+6/-6)
hw/xen_pt.c (+849/-0)
hw/xen_pt.h (+301/-0)
hw/xen_pt_config_init.c (+1869/-0)
hw/xen_pt_msi.c (+620/-0)
hw/xenfb.c (+5/-8)
hw/xgmac.c (+4/-4)
hw/xics.c (+116/-49)
hw/xics.h (+8/-1)
hw/xilinx.h (+23/-27)
hw/xilinx_axidma.c (+44/-36)
hw/xilinx_axidma.h (+0/-39)
hw/xilinx_axienet.c (+27/-20)
hw/xilinx_ethlite.c (+9/-8)
hw/xilinx_intc.c (+2/-2)
hw/xilinx_timer.c (+15/-11)
hw/xilinx_uartlite.c (+3/-2)
hw/xilinx_zynq.c (+157/-0)
hw/xio3130_downstream.c (+4/-7)
hw/xio3130_upstream.c (+4/-7)
hw/xtensa/Makefile.objs (+5/-0)
hw/xtensa_lx60.c (+17/-11)
hw/xtensa_pic.c (+8/-8)
hw/xtensa_sim.c (+15/-9)
hw/z2.c (+13/-13)
hw/zynq_slcr.c (+535/-0)
include/qemu/cpu.h (+82/-0)
include/qemu/object.h (+119/-26)
include/qemu/page_cache.h (+79/-0)
include/qemu/ratelimit.h (+48/-0)
input.c (+2/-2)
iohandler.c (+3/-2)
ioport-user.c (+0/-60)
ioport.c (+16/-1)
ioport.h (+1/-0)
iorange.h (+1/-0)
iov.c (+149/-51)
iov.h (+71/-6)
json-parser.c (+149/-95)
kvm-all.c (+389/-82)
kvm-stub.c (+70/-39)
kvm.h (+113/-51)
libcacard/Makefile (+11/-15)
libcacard/vcard_emul_nss.c (+26/-10)
libcacard/vscclient.c (+11/-11)
linux-aio.c (+3/-4)
linux-headers/asm-arm/kvm.h (+57/-16)
linux-headers/asm-arm/kvm_para.h (+1/-9)
linux-headers/asm-generic/kvm_para.h (+5/-0)
linux-headers/asm-powerpc/kvm.h (+1/-0)
linux-headers/asm-s390/kvm.h (+8/-1)
linux-headers/asm-s390/kvm_para.h (+1/-1)
linux-headers/asm-x86/kvm.h (+1/-0)
linux-headers/asm-x86/kvm_para.h (+7/-0)
linux-headers/linux/kvm.h (+54/-0)
linux-user/Makefile.objs (+7/-0)
linux-user/alpha/syscall_nr.h (+1/-1)
linux-user/arm/nwfpe/Makefile.objs (+2/-0)
linux-user/arm/syscall_nr.h (+1/-1)
linux-user/cpu-uname.c (+1/-4)
linux-user/elfload.c (+212/-62)
linux-user/flatload.c (+1/-1)
linux-user/ioctls.h (+36/-2)
linux-user/m68k/syscall.h (+1/-1)
linux-user/main.c (+198/-95)
linux-user/mmap.c (+24/-12)
linux-user/openrisc/syscall.h (+24/-0)
linux-user/openrisc/syscall_nr.h (+506/-0)
linux-user/openrisc/target_signal.h (+26/-0)
linux-user/openrisc/termbits.h (+294/-0)
linux-user/qemu.h (+19/-11)
linux-user/signal.c (+354/-124)
linux-user/strace.c (+11/-1)
linux-user/strace.list (+3/-0)
linux-user/syscall.c (+416/-68)
linux-user/syscall_defs.h (+198/-115)
linux-user/syscall_types.h (+41/-2)
lm32-dis.c (+361/-0)
m68k-semi.c (+0/-408)
main-loop.c (+104/-71)
main-loop.h (+2/-5)
memory.c (+46/-30)
memory.h (+42/-5)
memory_mapping-stub.c (+33/-0)
memory_mapping.c (+246/-0)
memory_mapping.h (+64/-0)
migration-fd.c (+1/-1)
migration-tcp.c (+20/-59)
migration.c (+157/-58)
migration.h (+34/-10)
module.c (+0/-1)
monitor.c (+846/-488)
monitor.h (+11/-0)
nbd.c (+157/-124)
nbd.h (+3/-3)
net.c (+437/-861)
net.h (+52/-61)
net/Makefile.objs (+12/-0)
net/dump.c (+37/-16)
net/dump.h (+3/-3)
net/hub.c (+339/-0)
net/hub.h (+29/-0)
net/queue.c (+17/-21)
net/queue.h (+6/-19)
net/slirp.c (+108/-124)
net/slirp.h (+3/-4)
net/socket.c (+133/-147)
net/socket.h (+3/-3)
net/tap-aix.c (+1/-1)
net/tap-bsd.c (+1/-7)
net/tap-haiku.c (+1/-1)
net/tap-linux.c (+6/-3)
net/tap-solaris.c (+1/-1)
net/tap-win32.c (+21/-19)
net/tap.c (+99/-99)
net/tap.h (+14/-13)
net/vde.c (+17/-19)
net/vde.h (+3/-2)
os-posix.c (+9/-0)
os-win32.c (+7/-1)
osdep.c (+162/-0)
osdep.h (+25/-9)
oslib-posix.c (+6/-0)
oslib-win32.c (+3/-0)
page_cache.c (+218/-0)
pc-bios/README (+2/-2)
pc-bios/keymaps/fi (+0/-2)
pc-bios/mpc8544ds.dts (+0/-119)
pc-bios/optionrom/Makefile (+1/-1)
poison.h (+2/-1)
posix-aio-compat.c (+19/-34)
ppc-dis.c (+1/-1)
qapi-schema-guest.json (+236/-16)
qapi-schema-test.json (+11/-1)
qapi-schema.json (+981/-119)
qapi/Makefile.objs (+3/-0)
qapi/opts-visitor.c (+427/-0)
qapi/opts-visitor.h (+31/-0)
qapi/qapi-types-core.h (+1/-3)
qapi/qapi-visit-core.c (+151/-7)
qapi/qapi-visit-core.h (+19/-0)
qapi/qmp-core.h (+11/-1)
qapi/qmp-dispatch.c (+15/-4)
qapi/qmp-input-visitor.c (+98/-46)
qapi/qmp-input-visitor.h (+2/-0)
qapi/qmp-output-visitor.c (+5/-3)
qapi/qmp-registry.c (+20/-8)
qapi/string-output-visitor.c (+1/-1)
qemu-aio.h (+25/-15)
qemu-barrier.h (+31/-4)
qemu-bridge-helper.c (+21/-3)
qemu-char.c (+34/-16)
qemu-common.h (+95/-44)
qemu-config.c (+63/-10)
qemu-config.h (+8/-0)
qemu-coroutine-io.c (+37/-68)
qemu-coroutine-sleep.c (+2/-1)
qemu-doc.texi (+57/-139)
qemu-file.h (+1/-1)
qemu-ga.c (+347/-69)
qemu-img-cmds.hx (+2/-2)
qemu-img.c (+77/-29)
qemu-img.texi (+57/-1)
qemu-io.c (+45/-6)
qemu-log.c (+164/-0)
qemu-log.h (+112/-46)
qemu-nbd.c (+86/-36)
qemu-nbd.texi (+1/-1)
qemu-option-internal.h (+53/-0)
qemu-option.c (+135/-82)
qemu-option.h (+20/-3)
qemu-options.hx (+203/-91)
qemu-os-win32.h (+35/-0)
qemu-queue.h (+1/-1)
qemu-seccomp.c (+141/-0)
qemu-seccomp.h (+22/-0)
qemu-sockets.c (+63/-13)
qemu-tech.texi (+2/-3)
qemu-thread-posix.c (+1/-1)
qemu-thread-win32.c (+1/-1)
qemu-thread.h (+2/-1)
qemu-timer.c (+68/-121)
qemu-timer.h (+6/-9)
qemu-tool.c (+30/-4)
qemu-user.c (+57/-0)
qemu_socket.h (+6/-8)
qerror.c (+15/-466)
qerror.h (+90/-82)
qga/Makefile.objs (+5/-0)
qga/channel-posix.c (+17/-1)
qga/channel-win32.c (+4/-0)
qga/commands-posix.c (+603/-128)
qga/commands-win32.c (+167/-11)
qga/commands.c (+7/-1)
qga/guest-agent-core.h (+9/-1)
qjson.h (+1/-0)
qlist.c (+13/-0)
qlist.h (+1/-0)
qmp-commands.hx (+468/-63)
qmp.c (+64/-0)
qom/Makefile (+0/-1)
qom/Makefile.objs (+4/-0)
qom/container.c (+25/-0)
qom/cpu.c (+58/-0)
qom/object.c (+264/-215)
qtest.c (+444/-0)
qtest.h (+53/-0)
readline.c (+3/-0)
roms/Makefile (+27/-0)
roms/config.seabios (+1/-0)
roms/config.vga.cirrus (+3/-0)
roms/config.vga.isavga (+3/-0)
roms/config.vga.qxl (+6/-0)
roms/config.vga.stdvga (+3/-0)
roms/config.vga.vmware (+6/-0)
roms/configure-seabios.sh (+5/-0)
rules.mak (+47/-2)
savevm.c (+316/-62)
scripts/checkpatch.pl (+5/-0)
scripts/create_config (+9/-5)
scripts/gtester-cat (+26/-0)
scripts/kvm/kvm_flightrecorder (+126/-0)
scripts/kvm/kvm_stat (+25/-1)
scripts/kvm/vmxcap (+13/-0)
scripts/make-release (+24/-0)
scripts/qapi-commands.py (+20/-9)
scripts/qapi-types.py (+21/-4)
scripts/qapi-visit.py (+114/-27)
scripts/qapi.py (+47/-11)
scripts/qemu-binfmt-conf.sh (+1/-0)
scripts/qemu-gdb.py (+89/-0)
scripts/qtest (+5/-0)
scripts/signrom.py (+40/-0)
scripts/signrom.sh (+0/-45)
scripts/simpletrace.py (+80/-46)
scripts/texi2pod.pl (+9/-0)
scripts/tracetool (+0/-643)
scripts/tracetool.py (+138/-0)
scripts/tracetool/__init__.py (+274/-0)
scripts/tracetool/backend/__init__.py (+115/-0)
scripts/tracetool/backend/dtrace.py (+97/-0)
scripts/tracetool/backend/simple.py (+107/-0)
scripts/tracetool/backend/stderr.py (+56/-0)
scripts/tracetool/backend/ust.py (+90/-0)
scripts/tracetool/format/__init__.py (+103/-0)
scripts/tracetool/format/c.py (+20/-0)
scripts/tracetool/format/d.py (+20/-0)
scripts/tracetool/format/h.py (+45/-0)
scripts/tracetool/format/stap.py (+20/-0)
scripts/update-linux-headers.sh (+20/-1)
slirp/Makefile.objs (+3/-0)
slirp/cksum.c (+1/-1)
slirp/if.c (+53/-34)
slirp/ip.h (+8/-12)
slirp/ip_icmp.c (+7/-0)
slirp/ip_icmp.h (+1/-0)
slirp/ip_input.c (+7/-0)
slirp/libslirp.h (+1/-1)
slirp/main.h (+1/-0)
slirp/mbuf.c (+21/-0)
slirp/mbuf.h (+1/-0)
slirp/misc.c (+1/-45)
slirp/sbuf.c (+6/-0)
slirp/slirp.c (+14/-6)
slirp/slirp.h (+4/-14)
slirp/tcp.h (+25/-13)
slirp/tcp_output.c (+1/-0)
slirp/tcp_subr.c (+14/-4)
slirp/udp.c (+8/-0)
slirp/udp.h (+1/-0)
softmmu-semi.h (+10/-7)
softmmu_defs.h (+45/-17)
softmmu_header.h (+52/-23)
softmmu_template.h (+98/-68)
spice-qemu-char.c (+1/-1)
sysconfigs/target/cpus-x86_64.conf (+128/-0)
sysconfigs/target/target-x86_64.conf (+0/-100)
sysemu.h (+9/-7)
target-alpha/Makefile.objs (+3/-0)
target-alpha/STATUS (+1/-1)
target-alpha/cpu-qom.h (+71/-0)
target-alpha/cpu.c (+58/-0)
target-alpha/cpu.h (+31/-17)
target-alpha/fpu_helper.c (+822/-0)
target-alpha/helper.c (+61/-15)
target-alpha/helper.h (+70/-71)
target-alpha/int_helper.c (+319/-0)
target-alpha/machine.c (+26/-26)
target-alpha/mem_helper.c (+151/-0)
target-alpha/op_helper.c (+0/-1379)
target-alpha/sys_helper.c (+87/-0)
target-alpha/translate.c (+159/-127)
target-arm/Makefile.objs (+7/-0)
target-arm/arm-semi.c (+510/-0)
target-arm/cpu-qom.h (+113/-0)
target-arm/cpu.c (+850/-0)
target-arm/cpu.h (+274/-65)
target-arm/helper.c (+1679/-1518)
target-arm/helper.h (+4/-7)
target-arm/iwmmxt_helper.c (+33/-33)
target-arm/kvm.c (+150/-68)
target-arm/machine.c (+8/-4)
target-arm/neon_helper.c (+58/-58)
target-arm/op_helper.c (+46/-52)
target-arm/translate.c (+264/-413)
target-cris/Makefile.objs (+4/-0)
target-cris/cpu-qom.h (+70/-0)
target-cris/cpu.c (+90/-0)
target-cris/cpu.h (+22/-10)
target-cris/helper.c (+11/-11)
target-cris/mmu.c (+7/-7)
target-cris/mmu.h (+3/-3)
target-cris/op_helper.c (+10/-12)
target-cris/translate.c (+79/-99)
target-cris/translate_v10.c (+14/-13)
target-i386/Makefile.objs (+8/-0)
target-i386/arch_dump.c (+449/-0)
target-i386/arch_memory_mapping.c (+272/-0)
target-i386/cc_helper.c (+380/-0)
target-i386/cc_helper_template.h (+277/-0)
target-i386/cpu-qom.h (+79/-0)
target-i386/cpu.c (+1849/-0)
target-i386/cpu.h (+93/-28)
target-i386/cpuid.c (+0/-1369)
target-i386/excp_helper.c (+129/-0)
target-i386/fpu_helper.c (+1289/-0)
target-i386/helper.c (+41/-148)
target-i386/helper.h (+190/-190)
target-i386/helper_template.h (+0/-334)
target-i386/int_helper.c (+500/-0)
target-i386/ioport-user.c (+60/-0)
target-i386/kvm-stub.c (+18/-0)
target-i386/kvm.c (+86/-41)
target-i386/kvm_i386.h (+16/-0)
target-i386/machine.c (+111/-90)
target-i386/mem_helper.c (+155/-0)
target-i386/misc_helper.c (+602/-0)
target-i386/op_helper.c (+0/-5924)
target-i386/ops_sse.h (+708/-585)
target-i386/ops_sse_header.h (+177/-177)
target-i386/seg_helper.c (+2471/-0)
target-i386/shift_helper_template.h (+112/-0)
target-i386/smm_helper.c (+301/-0)
target-i386/svm_helper.c (+715/-0)
target-i386/translate.c (+645/-495)
target-lm32/Makefile.objs (+4/-0)
target-lm32/cpu-qom.h (+71/-0)
target-lm32/cpu.c (+81/-0)
target-lm32/cpu.h (+30/-20)
target-lm32/helper.c (+11/-26)
target-lm32/machine.c (+11/-11)
target-lm32/op_helper.c (+5/-7)
target-lm32/translate.c (+19/-19)
target-m68k/Makefile.objs (+5/-0)
target-m68k/cpu-qom.h (+70/-0)
target-m68k/cpu.c (+170/-0)
target-m68k/cpu.h (+11/-10)
target-m68k/helper.c (+92/-154)
target-m68k/m68k-semi.c (+408/-0)
target-m68k/op_helper.c (+13/-15)
target-m68k/translate.c (+8/-8)
target-microblaze/Makefile.objs (+4/-0)
target-microblaze/cpu-qom.h (+70/-0)
target-microblaze/cpu.c (+120/-0)
target-microblaze/cpu.h (+35/-20)
target-microblaze/helper.c (+8/-5)
target-microblaze/mmu.c (+5/-4)
target-microblaze/mmu.h (+3/-3)
target-microblaze/op_helper.c (+8/-9)
target-microblaze/translate.c (+112/-98)
target-mips/Makefile.objs (+4/-0)
target-mips/TODO (+2/-2)
target-mips/cpu-qom.h (+74/-0)
target-mips/cpu.c (+69/-0)
target-mips/cpu.h (+37/-32)
target-mips/helper.c (+14/-13)
target-mips/helper.h (+2/-2)
target-mips/machine.c (+2/-2)
target-mips/op_helper.c (+103/-127)
target-mips/translate.c (+219/-196)
target-openrisc/Makefile.objs (+4/-0)
target-openrisc/cpu.c (+220/-0)
target-openrisc/cpu.h (+458/-0)
target-openrisc/exception.c (+27/-0)
target-openrisc/exception.h (+28/-0)
target-openrisc/exception_helper.c (+29/-0)
target-openrisc/fpu_helper.c (+300/-0)
target-openrisc/helper.h (+70/-0)
target-openrisc/int_helper.c (+79/-0)
target-openrisc/interrupt.c (+74/-0)
target-openrisc/interrupt_helper.c (+57/-0)
target-openrisc/machine.c (+47/-0)
target-openrisc/mmu.c (+243/-0)
target-openrisc/mmu_helper.c (+63/-0)
target-openrisc/sys_helper.c (+287/-0)
target-openrisc/translate.c (+1835/-0)
target-ppc/Makefile.objs (+12/-0)
target-ppc/cpu-qom.h (+77/-0)
target-ppc/cpu.h (+105/-51)
target-ppc/excp_helper.c (+969/-0)
target-ppc/fpu_helper.c (+1740/-0)
target-ppc/helper.c (+11/-3183)
target-ppc/helper.h (+291/-290)
target-ppc/int_helper.c (+1564/-0)
target-ppc/kvm.c (+258/-28)
target-ppc/kvm_ppc.c (+1/-1)
target-ppc/kvm_ppc.h (+24/-14)
target-ppc/machine.c (+2/-10)
target-ppc/mem_helper.c (+295/-0)
target-ppc/misc_helper.c (+124/-0)
target-ppc/mmu_helper.c (+3326/-0)
target-ppc/mpic_helper.c (+35/-0)
target-ppc/op_helper.c (+0/-4570)
target-ppc/timebase_helper.c (+159/-0)
target-ppc/translate.c (+378/-248)
target-ppc/translate_init.c (+401/-121)
target-s390x/Makefile.objs (+5/-0)
target-s390x/cpu-qom.h (+71/-0)
target-s390x/cpu.c (+96/-0)
target-s390x/cpu.h (+34/-26)
target-s390x/helper.c (+31/-57)
target-s390x/helper.h (+152/-0)
target-s390x/helpers.h (+0/-152)
target-s390x/interrupt.c (+29/-0)
target-s390x/kvm.c (+93/-41)
target-s390x/op_helper.c (+57/-64)
target-s390x/translate.c (+31/-31)
target-sh4/Makefile.objs (+4/-0)
target-sh4/cpu-qom.h (+70/-0)
target-sh4/cpu.c (+90/-0)
target-sh4/cpu.h (+18/-8)
target-sh4/helper.c (+14/-14)
target-sh4/op_helper.c (+8/-10)
target-sh4/translate.c (+29/-52)
target-sparc/Makefile.objs (+8/-0)
target-sparc/cc_helper.c (+33/-33)
target-sparc/cpu-qom.h (+75/-0)
target-sparc/cpu.c (+896/-0)
target-sparc/cpu.h (+56/-36)
target-sparc/cpu_init.c (+0/-848)
target-sparc/fop_helper.c (+34/-34)
target-sparc/helper.c (+8/-8)
target-sparc/helper.h (+11/-11)
target-sparc/int32_helper.c (+3/-3)
target-sparc/int64_helper.c (+6/-6)
target-sparc/ldst_helper.c (+297/-232)
target-sparc/machine.c (+2/-2)
target-sparc/mmu_helper.c (+22/-25)
target-sparc/op_helper.c (+0/-74)
target-sparc/translate.c (+97/-70)
target-sparc/win_helper.c (+29/-29)
target-unicore32/Makefile.objs (+6/-0)
target-unicore32/cpu-qom.h (+59/-0)
target-unicore32/cpu.c (+113/-0)
target-unicore32/cpu.h (+27/-27)
target-unicore32/helper.c (+215/-441)
target-unicore32/helper.h (+9/-11)
target-unicore32/machine.c (+23/-0)
target-unicore32/op_helper.c (+49/-6)
target-unicore32/softmmu.c (+267/-0)
target-unicore32/translate.c (+160/-58)
target-unicore32/ucf64_helper.c (+345/-0)
target-xtensa/Makefile.objs (+6/-0)
target-xtensa/core-dc232b.c (+27/-0)
target-xtensa/core-dc233c.c (+55/-0)
target-xtensa/core-dc233c/core-isa.h (+474/-0)
target-xtensa/core-dc233c/gdb-config.c (+145/-0)
target-xtensa/core-fsf.c (+27/-0)
target-xtensa/cpu-qom.h (+80/-0)
target-xtensa/cpu.c (+88/-0)
target-xtensa/cpu.h (+47/-26)
target-xtensa/helper.c (+56/-68)
target-xtensa/helper.h (+39/-0)
target-xtensa/helpers.h (+0/-39)
target-xtensa/op_helper.c (+151/-142)
target-xtensa/translate.c (+66/-46)
target-xtensa/xtensa-semi.c (+225/-0)
targphys.h (+16/-0)
tcg/arm/tcg-target.c (+192/-88)
tcg/hppa/tcg-target.c (+140/-23)
tcg/i386/tcg-target.c (+253/-79)
tcg/ia64/tcg-target.c (+69/-15)
tcg/mips/tcg-target.c (+130/-46)
tcg/ppc/tcg-target.c (+90/-26)
tcg/ppc/tcg-target.h (+1/-1)
tcg/ppc64/tcg-target.c (+52/-15)
tcg/s390/tcg-target.c (+48/-4)
tcg/sparc/tcg-target.c (+126/-8)
tcg/tcg.c (+344/-65)
tcg/tcg.h (+5/-8)
tcg/tci/tcg-target.c (+9/-3)
tcg/tci/tcg-target.h (+1/-1)
tci.c (+29/-19)
test-coroutine.c (+0/-192)
test-qmp-commands.c (+0/-142)
test-qmp-input-visitor.c (+0/-271)
test-qmp-output-visitor.c (+0/-423)
test-string-input-visitor.c (+0/-195)
test-string-output-visitor.c (+0/-188)
tests/.gitignore (+13/-0)
tests/Makefile (+148/-44)
tests/check-block.sh (+21/-0)
tests/check-qdict.c (+378/-0)
tests/check-qfloat.c (+53/-0)
tests/check-qint.c (+87/-0)
tests/check-qjson.c (+781/-0)
tests/check-qlist.c (+127/-0)
tests/check-qstring.c (+107/-0)
tests/fdc-test.c (+381/-0)
tests/hd-geo-test.c (+428/-0)
tests/libqtest.c (+466/-0)
tests/libqtest.h (+352/-0)
tests/m48t59-test.c (+259/-0)
tests/qemu-iotests-quick.sh (+17/-0)
tests/qemu-iotests/002.out (+2/-2)
tests/qemu-iotests/005 (+1/-1)
tests/qemu-iotests/005.out (+1/-1)
tests/qemu-iotests/009 (+2/-2)
tests/qemu-iotests/010 (+3/-3)
tests/qemu-iotests/011 (+1/-1)
tests/qemu-iotests/012.out (+1/-1)
tests/qemu-iotests/013.out (+1/-1)
tests/qemu-iotests/014.out (+1/-1)
tests/qemu-iotests/015.out (+1/-1)
tests/qemu-iotests/016.out (+6/-6)
tests/qemu-iotests/017.out (+512/-512)
tests/qemu-iotests/018.out (+512/-512)
tests/qemu-iotests/019.out (+770/-770)
tests/qemu-iotests/020.out (+512/-512)
tests/qemu-iotests/022.out (+1/-1)
tests/qemu-iotests/023.out (+1448/-1448)
tests/qemu-iotests/024.out (+3/-3)
tests/qemu-iotests/026.out (+104/-104)
tests/qemu-iotests/027.out (+1/-1)
tests/qemu-iotests/028.out (+224/-224)
tests/qemu-iotests/029.out (+2/-2)
tests/qemu-iotests/030 (+163/-40)
tests/qemu-iotests/030.out (+2/-2)
tests/qemu-iotests/031 (+80/-0)
tests/qemu-iotests/031.out (+204/-0)
tests/qemu-iotests/032 (+69/-0)
tests/qemu-iotests/032.out (+78/-0)
tests/qemu-iotests/033 (+73/-0)
tests/qemu-iotests/033.out (+29/-0)
tests/qemu-iotests/034 (+113/-0)
tests/qemu-iotests/034.out (+81/-0)
tests/qemu-iotests/035 (+72/-0)
tests/qemu-iotests/035.out (+392/-0)
tests/qemu-iotests/036 (+68/-0)
tests/qemu-iotests/036.out (+52/-0)
tests/qemu-iotests/037 (+119/-0)
tests/qemu-iotests/037.out (+645/-0)
tests/qemu-iotests/038 (+133/-0)
tests/qemu-iotests/038.out (+909/-0)
tests/qemu-iotests/039 (+137/-0)
tests/qemu-iotests/039.out (+59/-0)
tests/qemu-iotests/check (+3/-3)
tests/qemu-iotests/common (+28/-0)
tests/qemu-iotests/common.config (+1/-1)
tests/qemu-iotests/common.rc (+74/-15)
tests/qemu-iotests/group (+21/-12)
tests/qemu-iotests/iotests.py (+12/-8)
tests/qemu-iotests/qcow2.py (+240/-0)
tests/qemu-iotests/qed.py (+235/-0)
tests/rtc-test.c (+280/-0)
tests/tcg/lm32/Makefile (+8/-5)
tests/tcg/openrisc/Makefile (+71/-0)
tests/tcg/openrisc/test_add.c (+43/-0)
tests/tcg/openrisc/test_addc.c (+38/-0)
tests/tcg/openrisc/test_addi.c (+33/-0)
tests/tcg/openrisc/test_addic.c (+33/-0)
tests/tcg/openrisc/test_and_or.c (+65/-0)
tests/tcg/openrisc/test_bf.c (+47/-0)
tests/tcg/openrisc/test_bnf.c (+51/-0)
tests/tcg/openrisc/test_div.c (+54/-0)
tests/tcg/openrisc/test_divu.c (+34/-0)
tests/tcg/openrisc/test_extx.c (+78/-0)
tests/tcg/openrisc/test_fx.c (+57/-0)
tests/tcg/openrisc/test_j.c (+26/-0)
tests/tcg/openrisc/test_jal.c (+26/-0)
tests/tcg/openrisc/test_lf_add.c (+39/-0)
tests/tcg/openrisc/test_lf_div.c (+37/-0)
tests/tcg/openrisc/test_lf_eqs.c (+88/-0)
tests/tcg/openrisc/test_lf_ges.c (+88/-0)
tests/tcg/openrisc/test_lf_gts.c (+86/-0)
tests/tcg/openrisc/test_lf_les.c (+88/-0)
tests/tcg/openrisc/test_lf_lts.c (+92/-0)
tests/tcg/openrisc/test_lf_mul.c (+22/-0)
tests/tcg/openrisc/test_lf_nes.c (+89/-0)
tests/tcg/openrisc/test_lf_rem.c (+32/-0)
tests/tcg/openrisc/test_lf_sub.c (+35/-0)
tests/tcg/openrisc/test_logic.c (+105/-0)
tests/tcg/openrisc/test_lx.c (+84/-0)
tests/tcg/openrisc/test_movhi.c (+31/-0)
tests/tcg/openrisc/test_mul.c (+61/-0)
tests/tcg/openrisc/test_muli.c (+48/-0)
tests/tcg/openrisc/test_mulu.c (+48/-0)
tests/tcg/openrisc/test_sfeq.c (+43/-0)
tests/tcg/openrisc/test_sfeqi.c (+39/-0)
tests/tcg/openrisc/test_sfges.c (+44/-0)
tests/tcg/openrisc/test_sfgesi.c (+40/-0)
tests/tcg/openrisc/test_sfgeu.c (+44/-0)
tests/tcg/openrisc/test_sfgeui.c (+41/-0)
tests/tcg/openrisc/test_sfgts.c (+45/-0)
tests/tcg/openrisc/test_sfgtsi.c (+41/-0)
tests/tcg/openrisc/test_sfgtu.c (+43/-0)
tests/tcg/openrisc/test_sfgtui.c (+42/-0)
tests/tcg/openrisc/test_sfles.c (+26/-0)
tests/tcg/openrisc/test_sflesi.c (+39/-0)
tests/tcg/openrisc/test_sfleu.c (+43/-0)
tests/tcg/openrisc/test_sfleui.c (+39/-0)
tests/tcg/openrisc/test_sflts.c (+43/-0)
tests/tcg/openrisc/test_sfltsi.c (+39/-0)
tests/tcg/openrisc/test_sfltu.c (+43/-0)
tests/tcg/openrisc/test_sfltui.c (+39/-0)
tests/tcg/openrisc/test_sfne.c (+43/-0)
tests/tcg/openrisc/test_sfnei.c (+39/-0)
tests/tcg/openrisc/test_sub.c (+35/-0)
tests/tcg/test-mmap.c (+1/-1)
tests/tcg/xtensa/Makefile (+3/-0)
tests/tcg/xtensa/macros.inc (+17/-0)
tests/tcg/xtensa/test_break.S (+34/-0)
tests/tcg/xtensa/test_loop.S (+86/-0)
tests/tcg/xtensa/test_mmu.S (+209/-16)
tests/test-coroutine.c (+219/-0)
tests/test-iov.c (+260/-0)
tests/test-qmp-commands.c (+181/-0)
tests/test-qmp-input-strict.c (+234/-0)
tests/test-qmp-input-visitor.c (+316/-0)
tests/test-qmp-output-visitor.c (+477/-0)
tests/test-string-input-visitor.c (+195/-0)
tests/test-string-output-visitor.c (+188/-0)
tests/test-visitor-serialization.c (+784/-0)
thunk.c (+28/-0)
thunk.h (+28/-0)
trace-events (+336/-16)
trace/control.c (+3/-0)
trace/simple.c (+178/-137)
trace/simple.h (+31/-8)
translate-all.c (+4/-4)
ui/Makefile.objs (+14/-0)
ui/cocoa.m (+3/-2)
ui/spice-core.c (+14/-8)
ui/spice-display.c (+20/-8)
ui/vnc-auth-sasl.c (+3/-1)
ui/vnc-auth-sasl.h (+2/-2)
ui/vnc-auth-vencrypt.c (+2/-1)
ui/vnc-enc-hextile-template.h (+1/-0)
ui/vnc-jobs-async.c (+0/-341)
ui/vnc-jobs-sync.c (+0/-73)
ui/vnc-jobs.c (+351/-0)
ui/vnc-jobs.h (+1/-16)
ui/vnc.c (+35/-23)
ui/vnc.h (+2/-17)
usb-bsd.c (+0/-647)
usb-linux.c (+0/-1904)
usb-redir.c (+0/-1474)
usb-stub.c (+0/-52)
user-exec.c (+19/-11)
vl.c (+235/-102)
vmstate.h (+12/-7)
xen-all.c (+195/-27)
xen-mapcache.c (+34/-12)
xen-mapcache.h (+7/-2)
xen-stub.c (+4/-0)
xtensa-semi.c (+0/-224)
To merge this branch: bzr merge lp:~fboudra/qemu-linaro/new-upstream-release-1.2.0-2012.09-0ubuntu1
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+124547@code.launchpad.net

Description of the change

qemu-linaro (1.2.0-2012.09-0ubuntu1)

  * New upstream release.

qemu-linaro (1.1.50-2012.08-0ubuntu1)

  * New upstream release.
    - support emulated systems with more than 2G of memory. (LP: #1030588)
  * Drop powerpc-missing-include.patch - merged upstream.
  * Update debian/control:
    - drop perl build dependency.
    - add libfdt-dev build dependency.
  * Update debian/qemu-keymaps.install file.
  * Update debian/rules:
    - update QEMU_CPU for ARM architecture: armv4l -> armv7l.
    - update conf_audio_drv: default to PulseAudio since PA is the default on
      Ubuntu.
    - enable KVM on ARM architecture.
    - enable flat device tree support (--enable-fdt). (LP: #1030594)

To post a comment you must log in.
12926. By Fathi Boudra

Remove arm-make-smc-calls-behave-as-nops.patch

patch isn't acceptable upstream and looks pretty suspect.
SMC shouldn't be a NOP in user-mode.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.gitignore'
--- .gitignore 2012-03-15 16:18:18 +0000
+++ .gitignore 2012-09-17 14:09:22 +0000
@@ -39,13 +39,16 @@
39qemu-img-cmds.h39qemu-img-cmds.h
40qemu-io40qemu-io
41qemu-ga41qemu-ga
42qemu-bridge-helper
42qemu-monitor.texi43qemu-monitor.texi
44vscclient
43QMP/qmp-commands.txt45QMP/qmp-commands.txt
44test-coroutine46test-coroutine
45test-qmp-input-visitor47test-qmp-input-visitor
46test-qmp-output-visitor48test-qmp-output-visitor
47test-string-input-visitor49test-string-input-visitor
48test-string-output-visitor50test-string-output-visitor
51test-visitor-serialization
49fsdev/virtfs-proxy-helper.152fsdev/virtfs-proxy-helper.1
50fsdev/virtfs-proxy-helper.pod53fsdev/virtfs-proxy-helper.pod
51.gdbinit54.gdbinit
@@ -68,6 +71,10 @@
68*.vr71*.vr
69*.d72*.d
70*.o73*.o
74*.lo
75*.la
76*.pc
77.libs
71*.swp78*.swp
72*.orig79*.orig
73.pc80.pc
@@ -75,9 +82,14 @@
75pc-bios/bios-pq/status82pc-bios/bios-pq/status
76pc-bios/vgabios-pq/status83pc-bios/vgabios-pq/status
77pc-bios/optionrom/linuxboot.bin84pc-bios/optionrom/linuxboot.bin
85pc-bios/optionrom/linuxboot.raw
86pc-bios/optionrom/linuxboot.img
78pc-bios/optionrom/multiboot.bin87pc-bios/optionrom/multiboot.bin
79pc-bios/optionrom/multiboot.raw88pc-bios/optionrom/multiboot.raw
89pc-bios/optionrom/multiboot.img
80pc-bios/optionrom/kvmvapic.bin90pc-bios/optionrom/kvmvapic.bin
91pc-bios/optionrom/kvmvapic.raw
92pc-bios/optionrom/kvmvapic.img
81.stgit-*93.stgit-*
82cscope.*94cscope.*
83tags95tags
8496
=== removed directory '.pc'
=== removed file '.pc/.version'
--- .pc/.version 2012-02-17 11:27:00 +0000
+++ .pc/.version 1970-01-01 00:00:00 +0000
@@ -1,1 +0,0 @@
12
20
=== removed file '.pc/applied-patches'
--- .pc/applied-patches 2012-04-22 13:53:58 +0000
+++ .pc/applied-patches 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
1define_AT_EMPTY_PATH.patch
2powerpc-missing-include.patch
30
=== removed directory '.pc/define_AT_EMPTY_PATH.patch'
=== removed directory '.pc/define_AT_EMPTY_PATH.patch/hw'
=== removed directory '.pc/define_AT_EMPTY_PATH.patch/hw/9pfs'
=== removed file '.pc/define_AT_EMPTY_PATH.patch/hw/9pfs/virtio-9p-handle.c'
--- .pc/define_AT_EMPTY_PATH.patch/hw/9pfs/virtio-9p-handle.c 2012-03-15 16:18:18 +0000
+++ .pc/define_AT_EMPTY_PATH.patch/hw/9pfs/virtio-9p-handle.c 1970-01-01 00:00:00 +0000
@@ -1,699 +0,0 @@
1/*
2 * Virtio 9p handle callback
3 *
4 * Copyright IBM, Corp. 2011
5 *
6 * Authors:
7 * Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
8 *
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
11 *
12 */
13
14#include "hw/virtio.h"
15#include "virtio-9p.h"
16#include "virtio-9p-xattr.h"
17#include <arpa/inet.h>
18#include <pwd.h>
19#include <grp.h>
20#include <sys/socket.h>
21#include <sys/un.h>
22#include "qemu-xattr.h"
23#include <unistd.h>
24#include <linux/fs.h>
25#ifdef CONFIG_LINUX_MAGIC_H
26#include <linux/magic.h>
27#endif
28#include <sys/ioctl.h>
29
30#ifndef XFS_SUPER_MAGIC
31#define XFS_SUPER_MAGIC 0x58465342
32#endif
33#ifndef EXT2_SUPER_MAGIC
34#define EXT2_SUPER_MAGIC 0xEF53
35#endif
36#ifndef REISERFS_SUPER_MAGIC
37#define REISERFS_SUPER_MAGIC 0x52654973
38#endif
39#ifndef BTRFS_SUPER_MAGIC
40#define BTRFS_SUPER_MAGIC 0x9123683E
41#endif
42
43struct handle_data {
44 int mountfd;
45 int handle_bytes;
46};
47
48static inline int name_to_handle(int dirfd, const char *name,
49 struct file_handle *fh, int *mnt_id, int flags)
50{
51 return name_to_handle_at(dirfd, name, fh, mnt_id, flags);
52}
53
54static inline int open_by_handle(int mountfd, const char *fh, int flags)
55{
56 return open_by_handle_at(mountfd, (struct file_handle *)fh, flags);
57}
58
59static int handle_update_file_cred(int dirfd, const char *name, FsCred *credp)
60{
61 int fd, ret;
62 fd = openat(dirfd, name, O_NONBLOCK | O_NOFOLLOW);
63 if (fd < 0) {
64 return fd;
65 }
66 ret = fchownat(fd, "", credp->fc_uid, credp->fc_gid, AT_EMPTY_PATH);
67 if (ret < 0) {
68 goto err_out;
69 }
70 ret = fchmod(fd, credp->fc_mode & 07777);
71err_out:
72 close(fd);
73 return ret;
74}
75
76
77static int handle_lstat(FsContext *fs_ctx, V9fsPath *fs_path,
78 struct stat *stbuf)
79{
80 int fd, ret;
81 struct handle_data *data = (struct handle_data *)fs_ctx->private;
82
83 fd = open_by_handle(data->mountfd, fs_path->data, O_PATH);
84 if (fd < 0) {
85 return fd;
86 }
87 ret = fstatat(fd, "", stbuf, AT_EMPTY_PATH);
88 close(fd);
89 return ret;
90}
91
92static ssize_t handle_readlink(FsContext *fs_ctx, V9fsPath *fs_path,
93 char *buf, size_t bufsz)
94{
95 int fd, ret;
96 struct handle_data *data = (struct handle_data *)fs_ctx->private;
97
98 fd = open_by_handle(data->mountfd, fs_path->data, O_PATH);
99 if (fd < 0) {
100 return fd;
101 }
102 ret = readlinkat(fd, "", buf, bufsz);
103 close(fd);
104 return ret;
105}
106
107static int handle_close(FsContext *ctx, V9fsFidOpenState *fs)
108{
109 return close(fs->fd);
110}
111
112static int handle_closedir(FsContext *ctx, V9fsFidOpenState *fs)
113{
114 return closedir(fs->dir);
115}
116
117static int handle_open(FsContext *ctx, V9fsPath *fs_path,
118 int flags, V9fsFidOpenState *fs)
119{
120 struct handle_data *data = (struct handle_data *)ctx->private;
121
122 fs->fd = open_by_handle(data->mountfd, fs_path->data, flags);
123 return fs->fd;
124}
125
126static int handle_opendir(FsContext *ctx,
127 V9fsPath *fs_path, V9fsFidOpenState *fs)
128{
129 int ret;
130 ret = handle_open(ctx, fs_path, O_DIRECTORY, fs);
131 if (ret < 0) {
132 return -1;
133 }
134 fs->dir = fdopendir(ret);
135 if (!fs->dir) {
136 return -1;
137 }
138 return 0;
139}
140
141static void handle_rewinddir(FsContext *ctx, V9fsFidOpenState *fs)
142{
143 return rewinddir(fs->dir);
144}
145
146static off_t handle_telldir(FsContext *ctx, V9fsFidOpenState *fs)
147{
148 return telldir(fs->dir);
149}
150
151static int handle_readdir_r(FsContext *ctx, V9fsFidOpenState *fs,
152 struct dirent *entry,
153 struct dirent **result)
154{
155 return readdir_r(fs->dir, entry, result);
156}
157
158static void handle_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
159{
160 return seekdir(fs->dir, off);
161}
162
163static ssize_t handle_preadv(FsContext *ctx, V9fsFidOpenState *fs,
164 const struct iovec *iov,
165 int iovcnt, off_t offset)
166{
167#ifdef CONFIG_PREADV
168 return preadv(fs->fd, iov, iovcnt, offset);
169#else
170 int err = lseek(fs->fd, offset, SEEK_SET);
171 if (err == -1) {
172 return err;
173 } else {
174 return readv(fs->fd, iov, iovcnt);
175 }
176#endif
177}
178
179static ssize_t handle_pwritev(FsContext *ctx, V9fsFidOpenState *fs,
180 const struct iovec *iov,
181 int iovcnt, off_t offset)
182{
183 ssize_t ret;
184#ifdef CONFIG_PREADV
185 ret = pwritev(fs->fd, iov, iovcnt, offset);
186#else
187 int err = lseek(fs->fd, offset, SEEK_SET);
188 if (err == -1) {
189 return err;
190 } else {
191 ret = writev(fs->fd, iov, iovcnt);
192 }
193#endif
194#ifdef CONFIG_SYNC_FILE_RANGE
195 if (ret > 0 && ctx->export_flags & V9FS_IMMEDIATE_WRITEOUT) {
196 /*
197 * Initiate a writeback. This is not a data integrity sync.
198 * We want to ensure that we don't leave dirty pages in the cache
199 * after write when writeout=immediate is sepcified.
200 */
201 sync_file_range(fs->fd, offset, ret,
202 SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE);
203 }
204#endif
205 return ret;
206}
207
208static int handle_chmod(FsContext *fs_ctx, V9fsPath *fs_path, FsCred *credp)
209{
210 int fd, ret;
211 struct handle_data *data = (struct handle_data *)fs_ctx->private;
212
213 fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK);
214 if (fd < 0) {
215 return fd;
216 }
217 ret = fchmod(fd, credp->fc_mode);
218 close(fd);
219 return ret;
220}
221
222static int handle_mknod(FsContext *fs_ctx, V9fsPath *dir_path,
223 const char *name, FsCred *credp)
224{
225 int dirfd, ret;
226 struct handle_data *data = (struct handle_data *)fs_ctx->private;
227
228 dirfd = open_by_handle(data->mountfd, dir_path->data, O_PATH);
229 if (dirfd < 0) {
230 return dirfd;
231 }
232 ret = mknodat(dirfd, name, credp->fc_mode, credp->fc_rdev);
233 if (!ret) {
234 ret = handle_update_file_cred(dirfd, name, credp);
235 }
236 close(dirfd);
237 return ret;
238}
239
240static int handle_mkdir(FsContext *fs_ctx, V9fsPath *dir_path,
241 const char *name, FsCred *credp)
242{
243 int dirfd, ret;
244 struct handle_data *data = (struct handle_data *)fs_ctx->private;
245
246 dirfd = open_by_handle(data->mountfd, dir_path->data, O_PATH);
247 if (dirfd < 0) {
248 return dirfd;
249 }
250 ret = mkdirat(dirfd, name, credp->fc_mode);
251 if (!ret) {
252 ret = handle_update_file_cred(dirfd, name, credp);
253 }
254 close(dirfd);
255 return ret;
256}
257
258static int handle_fstat(FsContext *fs_ctx, int fid_type,
259 V9fsFidOpenState *fs, struct stat *stbuf)
260{
261 int fd;
262
263 if (fid_type == P9_FID_DIR) {
264 fd = dirfd(fs->dir);
265 } else {
266 fd = fs->fd;
267 }
268 return fstat(fd, stbuf);
269}
270
271static int handle_open2(FsContext *fs_ctx, V9fsPath *dir_path, const char *name,
272 int flags, FsCred *credp, V9fsFidOpenState *fs)
273{
274 int ret;
275 int dirfd, fd;
276 struct handle_data *data = (struct handle_data *)fs_ctx->private;
277
278 dirfd = open_by_handle(data->mountfd, dir_path->data, O_PATH);
279 if (dirfd < 0) {
280 return dirfd;
281 }
282 fd = openat(dirfd, name, flags | O_NOFOLLOW, credp->fc_mode);
283 if (fd >= 0) {
284 ret = handle_update_file_cred(dirfd, name, credp);
285 if (ret < 0) {
286 close(fd);
287 fd = ret;
288 } else {
289 fs->fd = fd;
290 }
291 }
292 close(dirfd);
293 return fd;
294}
295
296
297static int handle_symlink(FsContext *fs_ctx, const char *oldpath,
298 V9fsPath *dir_path, const char *name, FsCred *credp)
299{
300 int fd, dirfd, ret;
301 struct handle_data *data = (struct handle_data *)fs_ctx->private;
302
303 dirfd = open_by_handle(data->mountfd, dir_path->data, O_PATH);
304 if (dirfd < 0) {
305 return dirfd;
306 }
307 ret = symlinkat(oldpath, dirfd, name);
308 if (!ret) {
309 fd = openat(dirfd, name, O_PATH | O_NOFOLLOW);
310 if (fd < 0) {
311 ret = fd;
312 goto err_out;
313 }
314 ret = fchownat(fd, "", credp->fc_uid, credp->fc_gid, AT_EMPTY_PATH);
315 close(fd);
316 }
317err_out:
318 close(dirfd);
319 return ret;
320}
321
322static int handle_link(FsContext *ctx, V9fsPath *oldpath,
323 V9fsPath *dirpath, const char *name)
324{
325 int oldfd, newdirfd, ret;
326 struct handle_data *data = (struct handle_data *)ctx->private;
327
328 oldfd = open_by_handle(data->mountfd, oldpath->data, O_PATH);
329 if (oldfd < 0) {
330 return oldfd;
331 }
332 newdirfd = open_by_handle(data->mountfd, dirpath->data, O_PATH);
333 if (newdirfd < 0) {
334 close(oldfd);
335 return newdirfd;
336 }
337 ret = linkat(oldfd, "", newdirfd, name, AT_EMPTY_PATH);
338 close(newdirfd);
339 close(oldfd);
340 return ret;
341}
342
343static int handle_truncate(FsContext *ctx, V9fsPath *fs_path, off_t size)
344{
345 int fd, ret;
346 struct handle_data *data = (struct handle_data *)ctx->private;
347
348 fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK | O_WRONLY);
349 if (fd < 0) {
350 return fd;
351 }
352 ret = ftruncate(fd, size);
353 close(fd);
354 return ret;
355}
356
357static int handle_rename(FsContext *ctx, const char *oldpath,
358 const char *newpath)
359{
360 errno = EOPNOTSUPP;
361 return -1;
362}
363
364static int handle_chown(FsContext *fs_ctx, V9fsPath *fs_path, FsCred *credp)
365{
366 int fd, ret;
367 struct handle_data *data = (struct handle_data *)fs_ctx->private;
368
369 fd = open_by_handle(data->mountfd, fs_path->data, O_PATH);
370 if (fd < 0) {
371 return fd;
372 }
373 ret = fchownat(fd, "", credp->fc_uid, credp->fc_gid, AT_EMPTY_PATH);
374 close(fd);
375 return ret;
376}
377
378static int handle_utimensat(FsContext *ctx, V9fsPath *fs_path,
379 const struct timespec *buf)
380{
381 int ret;
382#ifdef CONFIG_UTIMENSAT
383 int fd;
384 struct handle_data *data = (struct handle_data *)ctx->private;
385
386 fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK);
387 if (fd < 0) {
388 return fd;
389 }
390 ret = futimens(fd, buf);
391 close(fd);
392#else
393 ret = -1;
394 errno = ENOSYS;
395#endif
396 return ret;
397}
398
399static int handle_remove(FsContext *ctx, const char *path)
400{
401 errno = EOPNOTSUPP;
402 return -1;
403}
404
405static int handle_fsync(FsContext *ctx, int fid_type,
406 V9fsFidOpenState *fs, int datasync)
407{
408 int fd;
409
410 if (fid_type == P9_FID_DIR) {
411 fd = dirfd(fs->dir);
412 } else {
413 fd = fs->fd;
414 }
415
416 if (datasync) {
417 return qemu_fdatasync(fd);
418 } else {
419 return fsync(fd);
420 }
421}
422
423static int handle_statfs(FsContext *ctx, V9fsPath *fs_path,
424 struct statfs *stbuf)
425{
426 int fd, ret;
427 struct handle_data *data = (struct handle_data *)ctx->private;
428
429 fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK);
430 if (fd < 0) {
431 return fd;
432 }
433 ret = fstatfs(fd, stbuf);
434 close(fd);
435 return ret;
436}
437
438static ssize_t handle_lgetxattr(FsContext *ctx, V9fsPath *fs_path,
439 const char *name, void *value, size_t size)
440{
441 int fd, ret;
442 struct handle_data *data = (struct handle_data *)ctx->private;
443
444 fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK);
445 if (fd < 0) {
446 return fd;
447 }
448 ret = fgetxattr(fd, name, value, size);
449 close(fd);
450 return ret;
451}
452
453static ssize_t handle_llistxattr(FsContext *ctx, V9fsPath *fs_path,
454 void *value, size_t size)
455{
456 int fd, ret;
457 struct handle_data *data = (struct handle_data *)ctx->private;
458
459 fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK);
460 if (fd < 0) {
461 return fd;
462 }
463 ret = flistxattr(fd, value, size);
464 close(fd);
465 return ret;
466}
467
468static int handle_lsetxattr(FsContext *ctx, V9fsPath *fs_path, const char *name,
469 void *value, size_t size, int flags)
470{
471 int fd, ret;
472 struct handle_data *data = (struct handle_data *)ctx->private;
473
474 fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK);
475 if (fd < 0) {
476 return fd;
477 }
478 ret = fsetxattr(fd, name, value, size, flags);
479 close(fd);
480 return ret;
481}
482
483static int handle_lremovexattr(FsContext *ctx, V9fsPath *fs_path,
484 const char *name)
485{
486 int fd, ret;
487 struct handle_data *data = (struct handle_data *)ctx->private;
488
489 fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK);
490 if (fd < 0) {
491 return fd;
492 }
493 ret = fremovexattr(fd, name);
494 close(fd);
495 return ret;
496}
497
498static int handle_name_to_path(FsContext *ctx, V9fsPath *dir_path,
499 const char *name, V9fsPath *target)
500{
501 char buffer[PATH_MAX];
502 struct file_handle *fh;
503 int dirfd, ret, mnt_id;
504 struct handle_data *data = (struct handle_data *)ctx->private;
505
506 /* "." and ".." are not allowed */
507 if (!strcmp(name, ".") || !strcmp(name, "..")) {
508 errno = EINVAL;
509 return -1;
510
511 }
512 if (dir_path) {
513 dirfd = open_by_handle(data->mountfd, dir_path->data, O_PATH);
514 } else {
515 /* relative to export root */
516 dirfd = open(rpath(ctx, ".", buffer), O_DIRECTORY);
517 }
518 if (dirfd < 0) {
519 return dirfd;
520 }
521 fh = g_malloc(sizeof(struct file_handle) + data->handle_bytes);
522 fh->handle_bytes = data->handle_bytes;
523 /* add a "./" at the beginning of the path */
524 snprintf(buffer, PATH_MAX, "./%s", name);
525 /* flag = 0 imply don't follow symlink */
526 ret = name_to_handle(dirfd, buffer, fh, &mnt_id, 0);
527 if (!ret) {
528 target->data = (char *)fh;
529 target->size = sizeof(struct file_handle) + data->handle_bytes;
530 } else {
531 g_free(fh);
532 }
533 close(dirfd);
534 return ret;
535}
536
537static int handle_renameat(FsContext *ctx, V9fsPath *olddir,
538 const char *old_name, V9fsPath *newdir,
539 const char *new_name)
540{
541 int olddirfd, newdirfd, ret;
542 struct handle_data *data = (struct handle_data *)ctx->private;
543
544 olddirfd = open_by_handle(data->mountfd, olddir->data, O_PATH);
545 if (olddirfd < 0) {
546 return olddirfd;
547 }
548 newdirfd = open_by_handle(data->mountfd, newdir->data, O_PATH);
549 if (newdirfd < 0) {
550 close(olddirfd);
551 return newdirfd;
552 }
553 ret = renameat(olddirfd, old_name, newdirfd, new_name);
554 close(newdirfd);
555 close(olddirfd);
556 return ret;
557}
558
559static int handle_unlinkat(FsContext *ctx, V9fsPath *dir,
560 const char *name, int flags)
561{
562 int dirfd, ret;
563 struct handle_data *data = (struct handle_data *)ctx->private;
564 int rflags;
565
566 dirfd = open_by_handle(data->mountfd, dir->data, O_PATH);
567 if (dirfd < 0) {
568 return dirfd;
569 }
570
571 rflags = 0;
572 if (flags & P9_DOTL_AT_REMOVEDIR) {
573 rflags |= AT_REMOVEDIR;
574 }
575
576 ret = unlinkat(dirfd, name, rflags);
577
578 close(dirfd);
579 return ret;
580}
581
582static int handle_ioc_getversion(FsContext *ctx, V9fsPath *path,
583 mode_t st_mode, uint64_t *st_gen)
584{
585 int err;
586 V9fsFidOpenState fid_open;
587
588 /*
589 * Do not try to open special files like device nodes, fifos etc
590 * We can get fd for regular files and directories only
591 */
592 if (!S_ISREG(st_mode) && !S_ISDIR(st_mode)) {
593 return 0;
594 }
595 err = handle_open(ctx, path, O_RDONLY, &fid_open);
596 if (err < 0) {
597 return err;
598 }
599 err = ioctl(fid_open.fd, FS_IOC_GETVERSION, st_gen);
600 handle_close(ctx, &fid_open);
601 return err;
602}
603
604static int handle_init(FsContext *ctx)
605{
606 int ret, mnt_id;
607 struct statfs stbuf;
608 struct file_handle fh;
609 struct handle_data *data = g_malloc(sizeof(struct handle_data));
610
611 data->mountfd = open(ctx->fs_root, O_DIRECTORY);
612 if (data->mountfd < 0) {
613 ret = data->mountfd;
614 goto err_out;
615 }
616 ret = statfs(ctx->fs_root, &stbuf);
617 if (!ret) {
618 switch (stbuf.f_type) {
619 case EXT2_SUPER_MAGIC:
620 case BTRFS_SUPER_MAGIC:
621 case REISERFS_SUPER_MAGIC:
622 case XFS_SUPER_MAGIC:
623 ctx->exops.get_st_gen = handle_ioc_getversion;
624 break;
625 }
626 }
627 memset(&fh, 0, sizeof(struct file_handle));
628 ret = name_to_handle(data->mountfd, ".", &fh, &mnt_id, 0);
629 if (ret && errno == EOVERFLOW) {
630 data->handle_bytes = fh.handle_bytes;
631 ctx->private = data;
632 ret = 0;
633 goto out;
634 }
635 /* we got 0 byte handle ? */
636 ret = -1;
637 close(data->mountfd);
638err_out:
639 g_free(data);
640out:
641 return ret;
642}
643
644static int handle_parse_opts(QemuOpts *opts, struct FsDriverEntry *fse)
645{
646 const char *sec_model = qemu_opt_get(opts, "security_model");
647 const char *path = qemu_opt_get(opts, "path");
648
649 if (sec_model) {
650 fprintf(stderr, "Invalid argument security_model specified with handle fsdriver\n");
651 return -1;
652 }
653
654 if (!path) {
655 fprintf(stderr, "fsdev: No path specified.\n");
656 return -1;
657 }
658 fse->path = g_strdup(path);
659 return 0;
660
661}
662
663FileOperations handle_ops = {
664 .parse_opts = handle_parse_opts,
665 .init = handle_init,
666 .lstat = handle_lstat,
667 .readlink = handle_readlink,
668 .close = handle_close,
669 .closedir = handle_closedir,
670 .open = handle_open,
671 .opendir = handle_opendir,
672 .rewinddir = handle_rewinddir,
673 .telldir = handle_telldir,
674 .readdir_r = handle_readdir_r,
675 .seekdir = handle_seekdir,
676 .preadv = handle_preadv,
677 .pwritev = handle_pwritev,
678 .chmod = handle_chmod,
679 .mknod = handle_mknod,
680 .mkdir = handle_mkdir,
681 .fstat = handle_fstat,
682 .open2 = handle_open2,
683 .symlink = handle_symlink,
684 .link = handle_link,
685 .truncate = handle_truncate,
686 .rename = handle_rename,
687 .chown = handle_chown,
688 .utimensat = handle_utimensat,
689 .remove = handle_remove,
690 .fsync = handle_fsync,
691 .statfs = handle_statfs,
692 .lgetxattr = handle_lgetxattr,
693 .llistxattr = handle_llistxattr,
694 .lsetxattr = handle_lsetxattr,
695 .lremovexattr = handle_lremovexattr,
696 .name_to_path = handle_name_to_path,
697 .renameat = handle_renameat,
698 .unlinkat = handle_unlinkat,
699};
7000
=== removed directory '.pc/powerpc-missing-include.patch'
=== removed file '.pc/powerpc-missing-include.patch/cache-utils.h'
--- .pc/powerpc-missing-include.patch/cache-utils.h 2012-04-22 13:53:58 +0000
+++ .pc/powerpc-missing-include.patch/cache-utils.h 1970-01-01 00:00:00 +0000
@@ -1,41 +0,0 @@
1#ifndef QEMU_CACHE_UTILS_H
2#define QEMU_CACHE_UTILS_H
3
4#if defined(_ARCH_PPC)
5struct qemu_cache_conf {
6 unsigned long dcache_bsize;
7 unsigned long icache_bsize;
8};
9
10extern struct qemu_cache_conf qemu_cache_conf;
11
12void qemu_cache_utils_init(char **envp);
13
14/* mildly adjusted code from tcg-dyngen.c */
15static inline void flush_icache_range(uintptr_t start, uintptr_t stop)
16{
17 unsigned long p, start1, stop1;
18 unsigned long dsize = qemu_cache_conf.dcache_bsize;
19 unsigned long isize = qemu_cache_conf.icache_bsize;
20
21 start1 = start & ~(dsize - 1);
22 stop1 = (stop + dsize - 1) & ~(dsize - 1);
23 for (p = start1; p < stop1; p += dsize) {
24 asm volatile ("dcbst 0,%0" : : "r"(p) : "memory");
25 }
26 asm volatile ("sync" : : : "memory");
27
28 start &= start & ~(isize - 1);
29 stop1 = (stop + isize - 1) & ~(isize - 1);
30 for (p = start1; p < stop1; p += isize) {
31 asm volatile ("icbi 0,%0" : : "r"(p) : "memory");
32 }
33 asm volatile ("sync" : : : "memory");
34 asm volatile ("isync" : : : "memory");
35}
36
37#else
38#define qemu_cache_utils_init(envp) do { (void) (envp); } while (0)
39#endif
40
41#endif /* QEMU_CACHE_UTILS_H */
420
=== modified file 'CODING_STYLE'
--- CODING_STYLE 2012-03-15 16:18:18 +0000
+++ CODING_STYLE 2012-09-17 14:09:22 +0000
@@ -1,4 +1,4 @@
1Qemu Coding Style1QEMU Coding Style
2=================2=================
33
4Please use the script checkpatch.pl in the scripts directory to check4Please use the script checkpatch.pl in the scripts directory to check
55
=== modified file 'Changelog'
--- Changelog 2012-02-02 14:25:28 +0000
+++ Changelog 2012-09-17 14:09:22 +0000
@@ -447,7 +447,7 @@
447 - multi-target build447 - multi-target build
448 - fixed: no error code in hardware interrupts448 - fixed: no error code in hardware interrupts
449 - fixed: pop ss, mov ss, x and sti disable hardware irqs for the next insn449 - fixed: pop ss, mov ss, x and sti disable hardware irqs for the next insn
450 - correct single stepping thru string operations450 - correct single stepping through string operations
451 - preliminary SPARC target support (Thomas M. Ogrisegg)451 - preliminary SPARC target support (Thomas M. Ogrisegg)
452 - tun-fd option (Rusty Russell)452 - tun-fd option (Rusty Russell)
453 - automatic IDE geometry detection453 - automatic IDE geometry detection
454454
=== modified file 'Changelog.LINARO'
--- Changelog.LINARO 2012-03-15 16:18:18 +0000
+++ Changelog.LINARO 2012-09-17 14:09:22 +0000
@@ -12,6 +12,40 @@
12Bug numbers refer to Launchpad qemu-linaro bugs, eg:12Bug numbers refer to Launchpad qemu-linaro bugs, eg:
13https://bugs.launchpad.net/qemu-linaro/+bug/70309413https://bugs.launchpad.net/qemu-linaro/+bug/703094
1414
15version 2012.09:
16 - No significant changes, rebased onto upstream v1.2.0.
17
18version 2012.08:
19 - Fixes #1004205: the -dtb option now accepts a filename
20 with no directory as being in the current directory
21 (in line with -kernel and -initrd).
22
23version 2012.07:
24 - Fixes #1008338: QEMU built to use the 'Tiny Code
25 Interpreter' rather than JITting to native code now
26 works correctly (previously it would hang booting a
27 Linux guest).
28
29version 2012.06:
30 - No significant changes, rebased onto upstream v1.1.0.
31
32version 2012.05:
33 - Fixes #978694: Beagle bootrom emulation now correctly handles
34 FAT12/FAT16 images (thanks to Peter Chubb for the bug report
35 and patch).
36 - We now support running ARM BE8 userspace binaries (ie
37 byte-invariant big-endian data and little-endian code).
38
39version 2012.04:
40 - Fixes #928432: compiling spice support for i386 should
41 no longer give compile warnings/errors.
42 - Fixes #953544: 'SETEND' in Thumb mode should now UNDEF,
43 in line with the behaviour for the ARM encoding.
44 - Fixes #956799: add support for the ppoll syscall for
45 ARM linux-user emulation.
46 - Fixes #970252: add the OMAP36xx UART FIFO status registers
47 (thanks to Jan Vesely for the bug report and patch).
48
15version 2012.03:49version 2012.03:
16 - Fixes #932856: the OMAP3 boot rom emulation now tries50 - Fixes #932856: the OMAP3 boot rom emulation now tries
17 sector 256 in raw mode as well as sector 0.51 sector 256 in raw mode as well as sector 0.
1852
=== modified file 'MAINTAINERS'
--- MAINTAINERS 2012-03-15 16:18:18 +0000
+++ MAINTAINERS 2012-09-17 14:09:22 +0000
@@ -78,7 +78,7 @@
7878
79M68K79M68K
80M: Paul Brook <paul@codesourcery.com>80M: Paul Brook <paul@codesourcery.com>
81S: Maintained81S: Odd Fixes
82F: target-m68k/82F: target-m68k/
8383
84MicroBlaze84MicroBlaze
@@ -88,7 +88,7 @@
8888
89MIPS89MIPS
90M: Aurelien Jarno <aurelien@aurel32.net>90M: Aurelien Jarno <aurelien@aurel32.net>
91S: Maintained91S: Odd Fixes
92F: target-mips/92F: target-mips/
9393
94PowerPC94PowerPC
@@ -104,7 +104,7 @@
104104
105SH4105SH4
106M: Aurelien Jarno <aurelien@aurel32.net>106M: Aurelien Jarno <aurelien@aurel32.net>
107S: Maintained107S: Odd Fixes
108F: target-sh4/108F: target-sh4/
109109
110SPARC110SPARC
@@ -112,6 +112,11 @@
112S: Maintained112S: Maintained
113F: target-sparc/113F: target-sparc/
114114
115UniCore32
116M: Guan Xuetao <gxt@mprc.pku.edu.cn>
117S: Maintained
118F: target-unicore32/
119
115X86120X86
116M: qemu-devel@nongnu.org121M: qemu-devel@nongnu.org
117S: Odd Fixes122S: Odd Fixes
@@ -202,6 +207,12 @@
202S: Orphan207S: Orphan
203F: hw/gumstix.c208F: hw/gumstix.c
204209
210i.MX31
211M: Peter Chubb <peter.chubb@nicta.com.au>
212S: Odd fixes
213F: hw/imx*
214F: hw/kzm.c
215
205Integrator CP216Integrator CP
206M: Paul Brook <paul@codesourcery.com>217M: Paul Brook <paul@codesourcery.com>
207M: Peter Maydell <peter.maydell@linaro.org>218M: Peter Maydell <peter.maydell@linaro.org>
@@ -251,6 +262,13 @@
251S: Maintained262S: Maintained
252F: hw/versatilepb.c263F: hw/versatilepb.c
253264
265Xilinx Zynq
266M: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
267S: Maintained
268F: hw/xilinx_zynq.c
269F: hw/zynq_slcr.c
270F: hw/cadence_*
271
254CRIS Machines272CRIS Machines
255-------------273-------------
256Axis Dev88274Axis Dev88
@@ -299,6 +317,11 @@
299S: Maintained317S: Maintained
300F: hw/petalogix_s3adsp1800.c318F: hw/petalogix_s3adsp1800.c
301319
320petalogix_ml605
321M: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
322S: Maintained
323F: hw/petalogix_ml605_mmu.c
324
302MIPS Machines325MIPS Machines
303-------------326-------------
304Jazz327Jazz
@@ -382,12 +405,21 @@
382S: Maintained405S: Maintained
383F: hw/s390-*.c406F: hw/s390-*.c
384407
408UniCore32 Machines
409-------------
410PKUnity-3 SoC initramfs-with-busybox
411M: Guan Xuetao <gxt@mprc.pku.edu.cn>
412S: Maintained
413F: hw/puv3*
414F: hw/unicore32/
415
385X86 Machines416X86 Machines
386------------417------------
387PC418PC
388M: Anthony Liguori <aliguori@us.ibm.com>419M: Anthony Liguori <aliguori@us.ibm.com>
389S: Supported420S: Supported
390F: hw/pc.[ch] hw/pc_piix.c421F: hw/pc.[ch]
422F: hw/pc_piix.c
391423
392Xtensa Machines424Xtensa Machines
393---------------425---------------
@@ -424,7 +456,7 @@
424S: Supported456S: Supported
425F: hw/virtio-scsi.*457F: hw/virtio-scsi.*
426F: hw/scsi*458F: hw/scsi*
427T: git://github.com/bonzini/qemu.git scsi-next459T: git git://github.com/bonzini/qemu.git scsi-next
428460
429LSI53C895A461LSI53C895A
430M: Paul Brook <paul@codesourcery.com>462M: Paul Brook <paul@codesourcery.com>
@@ -449,9 +481,9 @@
449virtio-9p481virtio-9p
450M: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>482M: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
451S: Supported483S: Supported
452F: hw/9pfs/ fsdev/484F: hw/9pfs/
453T: https://github.com/kvaneesh/QEMU485F: fsdev/
454486T: git git://github.com/kvaneesh/QEMU.git
455487
456virtio-blk488virtio-blk
457M: Kevin Wolf <kwolf@redhat.com>489M: Kevin Wolf <kwolf@redhat.com>
@@ -464,6 +496,17 @@
464F: hw/virtio-serial*496F: hw/virtio-serial*
465F: hw/virtio-console*497F: hw/virtio-console*
466498
499Xilinx EDK
500M: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
501M: Edgar E. Iglesias <edgar.iglesias@gmail.com>
502S: Maintained
503F: hw/xilinx_axi*
504F: hw/xilinx_uartlite.c
505F: hw/xilinx_intc.c
506F: hw/xilinx_ethlite.c
507F: hw/xilinx_timer.c
508F: hw/xilinx.h
509
467Subsystems510Subsystems
468----------511----------
469Audio512Audio
@@ -482,6 +525,12 @@
482S: Maintained525S: Maintained
483F: qemu-char.c526F: qemu-char.c
484527
528Device Tree
529M: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
530M: Alexander Graf <agraf@suse.de>
531S: Maintained
532F: device-tree.[ch]
533
485GDB stub534GDB stub
486M: qemu-devel@nongnu.org535M: qemu-devel@nongnu.org
487S: Odd Fixes536S: Odd Fixes
@@ -519,9 +568,10 @@
519568
520Network device layer569Network device layer
521M: Anthony Liguori <aliguori@us.ibm.com>570M: Anthony Liguori <aliguori@us.ibm.com>
522M: Mark McLoughlin <markmc@redhat.com>571M: Stefan Hajnoczi <stefanha@gmail.com>
523S: Maintained572S: Maintained
524F: net/573F: net/
574T: git git://github.com/stefanha/qemu.git net
525575
526Network Block Device (NBD)576Network Block Device (NBD)
527M: Paolo Bonzini <pbonzini@redhat.com>577M: Paolo Bonzini <pbonzini@redhat.com>
@@ -529,19 +579,22 @@
529F: block/nbd.c579F: block/nbd.c
530F: nbd.*580F: nbd.*
531F: qemu-nbd.c581F: qemu-nbd.c
532T: git://github.com/bonzini/qemu.git nbd-next582T: git git://github.com/bonzini/qemu.git nbd-next
533583
534SLIRP584SLIRP
535M: Jan Kiszka <jan.kiszka@siemens.com>585M: Jan Kiszka <jan.kiszka@siemens.com>
536S: Maintained586S: Maintained
537F: slirp/587F: slirp/
538T: git://git.kiszka.org/qemu.git queues/slirp588T: git git://git.kiszka.org/qemu.git queues/slirp
539589
540Tracing590Tracing
541M: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>591M: Stefan Hajnoczi <stefanha@gmail.com>
542S: Maintained592S: Maintained
543F: trace/593F: trace/
544T: git://github.com/stefanha/qemu.git tracing594F: scripts/tracetool.py
595F: scripts/tracetool/
596F: docs/tracing.txt
597T: git git://github.com/stefanha/qemu.git tracing
545598
546Checkpatch599Checkpatch
547M: Blue Swirl <blauwirbel@gmail.com>600M: Blue Swirl <blauwirbel@gmail.com>
@@ -555,11 +608,6 @@
555S: Maintained608S: Maintained
556F: bsd-user/609F: bsd-user/
557610
558Darwin user
559M: qemu-devel@nongnu.org
560S: Orphan
561F: darwin-user/
562
563Linux user611Linux user
564M: Riku Voipio <riku.voipio@iki.fi>612M: Riku Voipio <riku.voipio@iki.fi>
565S: Maintained613S: Maintained
@@ -621,4 +669,26 @@
621TCI target669TCI target
622M: Stefan Weil <sw@weilnetz.de>670M: Stefan Weil <sw@weilnetz.de>
623S: Maintained671S: Maintained
624F: tcg/tci672F: tcg/tci/
673
674Stable branches
675---------------
676Stable 1.0
677L: qemu-stable@nongnu.org
678T: git git://git.qemu.org/qemu-stable-1.0.git
679S: Orphan
680
681Stable 0.15
682L: qemu-stable@nongnu.org
683T: git git://git.qemu.org/qemu-stable-0.15.git
684S: Orphan
685
686Stable 0.14
687L: qemu-stable@nongnu.org
688T: git git://git.qemu.org/qemu-stable-0.14.git
689S: Orphan
690
691Stable 0.10
692L: qemu-stable@nongnu.org
693T: git git://git.qemu.org/qemu-stable-0.10.git
694S: Orphan
625695
=== modified file 'Makefile'
--- Makefile 2012-03-15 16:18:18 +0000
+++ Makefile 2012-09-17 14:09:22 +0000
@@ -3,16 +3,10 @@
3# Always point to the root of the build tree (needs GNU make).3# Always point to the root of the build tree (needs GNU make).
4BUILD_DIR=$(CURDIR)4BUILD_DIR=$(CURDIR)
55
6GENERATED_HEADERS = config-host.h trace.h qemu-options.def6# All following code might depend on configuration variables
7ifeq ($(TRACE_BACKEND),dtrace)
8GENERATED_HEADERS += trace-dtrace.h
9endif
10GENERATED_HEADERS += qmp-commands.h qapi-types.h qapi-visit.h
11GENERATED_SOURCES += qmp-marshal.c qapi-types.c qapi-visit.c
12
13ifneq ($(wildcard config-host.mak),)7ifneq ($(wildcard config-host.mak),)
14# Put the all: rule here so that config-host.mak can contain dependencies.8# Put the all: rule here so that config-host.mak can contain dependencies.
15all: build-all9all:
16include config-host.mak10include config-host.mak
17include $(SRC_PATH)/rules.mak11include $(SRC_PATH)/rules.mak
18config-host.mak: $(SRC_PATH)/configure12config-host.mak: $(SRC_PATH)/configure
@@ -24,15 +18,22 @@
24 @exit 118 @exit 1
25endif19endif
2620
21GENERATED_HEADERS = config-host.h trace.h qemu-options.def
22ifeq ($(TRACE_BACKEND),dtrace)
23GENERATED_HEADERS += trace-dtrace.h
24endif
25GENERATED_HEADERS += qmp-commands.h qapi-types.h qapi-visit.h
26GENERATED_SOURCES += qmp-marshal.c qapi-types.c qapi-visit.c trace.c
27
27# Don't try to regenerate Makefile or configure28# Don't try to regenerate Makefile or configure
28# We don't generate any of them29# We don't generate any of them
29Makefile: ;30Makefile: ;
30configure: ;31configure: ;
3132
32.PHONY: all clean cscope distclean dvi html info install install-doc \33.PHONY: all clean cscope distclean dvi html info install install-doc \
33 pdf recurse-all speed tar tarbin test build-all34 pdf recurse-all speed test dist
3435
35$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)36$(call set-vpath, $(SRC_PATH))
3637
37LIBS+=-lz $(LIBS_TOOLS)38LIBS+=-lz $(LIBS_TOOLS)
3839
@@ -81,7 +82,7 @@
8182
82-include config-all-devices.mak83-include config-all-devices.mak
8384
84build-all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all85all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all
8586
86config-host.h: config-host.h-timestamp87config-host.h: config-host.h-timestamp
87config-host.h-timestamp: config-host.mak88config-host.h-timestamp: config-host.mak
@@ -90,19 +91,18 @@
9091
91SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))92SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
9293
93subdir-%: $(GENERATED_HEADERS)94subdir-%:
94 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)95 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
9596
96ifneq ($(wildcard config-host.mak),)97ifneq ($(wildcard config-host.mak),)
97include $(SRC_PATH)/Makefile.objs98include $(SRC_PATH)/Makefile.objs
98endif99endif
99100
100$(common-obj-y): $(GENERATED_HEADERS)
101subdir-libcacard: $(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o101subdir-libcacard: $(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o
102102
103$(filter %-softmmu,$(SUBDIR_RULES)): $(trace-obj-y) $(common-obj-y) subdir-libdis103$(filter %-softmmu,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) $(common-obj-y) $(extra-obj-y) subdir-libdis
104104
105$(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) $(trace-obj-y) subdir-libdis-user subdir-libuser105$(filter %-user,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) subdir-libdis-user subdir-libuser
106106
107ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))107ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
108romsubdir-%:108romsubdir-%:
@@ -120,7 +120,7 @@
120120
121ui/cocoa.o: ui/cocoa.m121ui/cocoa.o: ui/cocoa.m
122122
123ui/sdl.o audio/sdlaudio.o ui/sdl_zoom.o baum.o: QEMU_CFLAGS += $(SDL_CFLAGS)123ui/sdl.o audio/sdlaudio.o ui/sdl_zoom.o hw/baum.o: QEMU_CFLAGS += $(SDL_CFLAGS)
124124
125ui/vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS)125ui/vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
126126
@@ -141,19 +141,20 @@
141install-libcacard:141install-libcacard:
142 @echo "libtool is missing, please install and rerun configure"; exit 1142 @echo "libtool is missing, please install and rerun configure"; exit 1
143else143else
144libcacard.la: $(GENERATED_HEADERS) $(oslib-obj-y) qemu-timer-common.o $(addsuffix .lo, $(basename $(trace-obj-y)))144libcacard.la: $(oslib-obj-y) qemu-timer-common.o $(addsuffix .lo, $(basename $(trace-obj-y)))
145 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" libcacard.la,)145 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" libcacard.la,)
146146
147install-libcacard: libcacard.la147install-libcacard: libcacard.la
148 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" install-libcacard,)148 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" install-libcacard,)
149endif149endif
150
150######################################################################151######################################################################
151152
152qemu-img.o: qemu-img-cmds.h153qemu-img.o: qemu-img-cmds.h
153qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o cmd.o qemu-ga.o: $(GENERATED_HEADERS)
154154
155tools-obj-y = $(oslib-obj-y) $(trace-obj-y) qemu-tool.o qemu-timer.o \155tools-obj-y = $(oslib-obj-y) $(trace-obj-y) qemu-tool.o qemu-timer.o \
156 qemu-timer-common.o main-loop.o notify.o iohandler.o cutils.o async.o156 qemu-timer-common.o main-loop.o notify.o \
157 iohandler.o cutils.o iov.o async.o
157tools-obj-$(CONFIG_POSIX) += compatfd.o158tools-obj-$(CONFIG_POSIX) += compatfd.o
158159
159qemu-img$(EXESUF): qemu-img.o $(tools-obj-y) $(block-obj-y)160qemu-img$(EXESUF): qemu-img.o $(tools-obj-y) $(block-obj-y)
@@ -161,7 +162,9 @@
161qemu-io$(EXESUF): qemu-io.o cmd.o $(tools-obj-y) $(block-obj-y)162qemu-io$(EXESUF): qemu-io.o cmd.o $(tools-obj-y) $(block-obj-y)
162163
163qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o164qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o
164qemu-bridge-helper.o: $(GENERATED_HEADERS)165
166vscclient$(EXESUF): $(libcacard-y) $(oslib-obj-y) $(trace-obj-y) $(tools-obj-y) qemu-timer-common.o libcacard/vscclient.o
167 $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(libcacard_libs) $(LIBS)," LINK $@")
165168
166fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o oslib-posix.o $(trace-obj-y)169fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o oslib-posix.o $(trace-obj-y)
167fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap170fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
@@ -169,9 +172,8 @@
169qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx172qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
170 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@")173 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@")
171174
172$(qapi-obj-y): $(GENERATED_HEADERS)
173qapi-dir := $(BUILD_DIR)/qapi-generated
174qemu-ga$(EXESUF): LIBS = $(LIBS_QGA)175qemu-ga$(EXESUF): LIBS = $(LIBS_QGA)
176qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated
175177
176gen-out-type = $(subst .,-,$(suffix $@))178gen-out-type = $(subst .,-,$(suffix $@))
177179
@@ -179,32 +181,32 @@
179include $(SRC_PATH)/tests/Makefile181include $(SRC_PATH)/tests/Makefile
180endif182endif
181183
182$(qapi-dir)/qga-qapi-types.c $(qapi-dir)/qga-qapi-types.h :\184qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py
183$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py185
184 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "$(qapi-dir)" -p "qga-" < $<, " GEN $@")186qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h :\
185$(qapi-dir)/qga-qapi-visit.c $(qapi-dir)/qga-qapi-visit.h :\187$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
186$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-visit.py188 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@")
187 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "$(qapi-dir)" -p "qga-" < $<, " GEN $@")189qga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h :\
188$(qapi-dir)/qga-qmp-commands.h $(qapi-dir)/qga-qmp-marshal.c :\190$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
189$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-commands.py191 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@")
190 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o "$(qapi-dir)" -p "qga-" < $<, " GEN $@")192qga/qapi-generated/qga-qmp-commands.h qga/qapi-generated/qga-qmp-marshal.c :\
193$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
194 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@")
191195
192qapi-types.c qapi-types.h :\196qapi-types.c qapi-types.h :\
193$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py197$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
194 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "." < $<, " GEN $@")198 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "." < $<, " GEN $@")
195qapi-visit.c qapi-visit.h :\199qapi-visit.c qapi-visit.h :\
196$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py200$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
197 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "." < $<, " GEN $@")201 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "." < $<, " GEN $@")
198qmp-commands.h qmp-marshal.c :\202qmp-commands.h qmp-marshal.c :\
199$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py203$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
200 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -m -o "." < $<, " GEN $@")204 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -m -o "." < $<, " GEN $@")
201205
202QGALIB_OBJ=$(addprefix $(qapi-dir)/, qga-qapi-types.o qga-qapi-visit.o qga-qmp-marshal.o)206QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h)
203QGALIB_GEN=$(addprefix $(qapi-dir)/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h)207$(qga-obj-y) qemu-ga.o: $(QGALIB_GEN)
204$(QGALIB_OBJ): $(QGALIB_GEN) $(GENERATED_HEADERS)
205$(qga-obj-y) qemu-ga.o: $(QGALIB_GEN) $(GENERATED_HEADERS)
206208
207qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(tools-obj-y) $(qapi-obj-y) $(qobject-obj-y) $(version-obj-y) $(QGALIB_OBJ)209qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(tools-obj-y) $(qapi-obj-y) $(qobject-obj-y) $(version-obj-y)
208210
209QEMULIBS=libhw32 libhw64 libuser libdis libdis-user211QEMULIBS=libhw32 libhw64 libuser libdis libdis-user
210212
@@ -212,23 +214,30 @@
212# avoid old build problems by removing potentially incorrect old files214# avoid old build problems by removing potentially incorrect old files
213 rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h215 rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
214 rm -f qemu-options.def216 rm -f qemu-options.def
215 rm -f *.o *.d *.a *.lo $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~217 find . -name '*.[od]' -exec rm -f {} +
218 rm -f *.a *.lo $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~
216 rm -Rf .libs219 rm -Rf .libs
217 rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d qapi/*.o qapi/*.d qga/*.o qga/*.d
218 rm -f qemu-img-cmds.h220 rm -f qemu-img-cmds.h
219 rm -f trace/*.o trace/*.d
220 rm -f trace.c trace.h trace.c-timestamp trace.h-timestamp
221 rm -f trace-dtrace.dtrace trace-dtrace.dtrace-timestamp221 rm -f trace-dtrace.dtrace trace-dtrace.dtrace-timestamp
222 @# May not be present in GENERATED_HEADERS
222 rm -f trace-dtrace.h trace-dtrace.h-timestamp223 rm -f trace-dtrace.h trace-dtrace.h-timestamp
223 rm -f $(GENERATED_HEADERS)224 rm -f $(foreach f,$(GENERATED_HEADERS),$(f) $(f)-timestamp)
224 rm -f $(GENERATED_SOURCES)225 rm -f $(foreach f,$(GENERATED_SOURCES),$(f) $(f)-timestamp)
225 rm -rf $(qapi-dir)226 rm -rf qapi-generated
227 rm -rf qga/qapi-generated
226 $(MAKE) -C tests/tcg clean228 $(MAKE) -C tests/tcg clean
227 for d in $(ALL_SUBDIRS) $(QEMULIBS) libcacard; do \229 for d in $(ALL_SUBDIRS) $(QEMULIBS) libcacard; do \
228 if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \230 if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \
229 rm -f $$d/qemu-options.def; \231 rm -f $$d/qemu-options.def; \
230 done232 done
231233
234VERSION ?= $(shell cat VERSION)
235
236dist: qemu-$(VERSION).tar.bz2
237
238qemu-%.tar.bz2:
239 $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)"
240
232distclean: clean241distclean: clean
233 rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi242 rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
234 rm -f config-all-devices.mak243 rm -f config-all-devices.mak
@@ -246,7 +255,8 @@
246255
247KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \256KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
248ar de en-us fi fr-be hr it lv nl pl ru th \257ar de en-us fi fr-be hr it lv nl pl ru th \
249common de-ch es fo fr-ca hu ja mk nl-be pt sl tr258common de-ch es fo fr-ca hu ja mk nl-be pt sl tr \
259bepo
250260
251ifdef INSTALL_BLOBS261ifdef INSTALL_BLOBS
252BLOBS=bios.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \262BLOBS=bios.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \
@@ -254,8 +264,8 @@
254ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc \264ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc \
255pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \265pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \
256pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \266pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \
267qemu-icon.bmp \
257bamboo.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \268bamboo.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \
258mpc8544ds.dtb \
259multiboot.bin linuxboot.bin kvmvapic.bin \269multiboot.bin linuxboot.bin kvmvapic.bin \
260s390-zipl.rom \270s390-zipl.rom \
261spapr-rtas.bin slof.bin \271spapr-rtas.bin slof.bin \
@@ -265,8 +275,9 @@
265endif275endif
266276
267install-doc: $(DOCS)277install-doc: $(DOCS)
268 $(INSTALL_DIR) "$(DESTDIR)$(docdir)"278 $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
269 $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"279 $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(qemu_docdir)"
280 $(INSTALL_DATA) QMP/qmp-commands.txt "$(DESTDIR)$(qemu_docdir)"
270ifdef CONFIG_POSIX281ifdef CONFIG_POSIX
271 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"282 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
272 $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"283 $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
@@ -277,11 +288,18 @@
277 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"288 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
278 $(INSTALL_DATA) fsdev/virtfs-proxy-helper.1 "$(DESTDIR)$(mandir)/man1"289 $(INSTALL_DATA) fsdev/virtfs-proxy-helper.1 "$(DESTDIR)$(mandir)/man1"
279endif290endif
280install-sysconfig:291
281 $(INSTALL_DIR) "$(DESTDIR)$(sysconfdir)/qemu"292install-datadir:
282 $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(sysconfdir)/qemu"293 $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)"
283294
284install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig295install-confdir:
296 $(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)"
297
298install-sysconfig: install-datadir install-confdir
299 $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)"
300 $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/cpus-x86_64.conf "$(DESTDIR)$(qemu_datadir)"
301
302install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig install-datadir
285 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"303 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
286ifneq ($(TOOLS),)304ifneq ($(TOOLS),)
287 $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"305 $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
@@ -291,15 +309,14 @@
291 $(INSTALL_PROG) $(STRIP_OPT) $(HELPERS-y) "$(DESTDIR)$(libexecdir)"309 $(INSTALL_PROG) $(STRIP_OPT) $(HELPERS-y) "$(DESTDIR)$(libexecdir)"
292endif310endif
293ifneq ($(BLOBS),)311ifneq ($(BLOBS),)
294 $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
295 set -e; for x in $(BLOBS); do \312 set -e; for x in $(BLOBS); do \
296 [ -e "$(SRC_PATH)/pc-bios/$$x" ] || continue; \313 [ -e "$(SRC_PATH)/pc-bios/$$x" ] || continue; \
297 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \314 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \
298 done315 done
299endif316endif
300 $(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"317 $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps"
301 set -e; for x in $(KEYMAPS); do \318 set -e; for x in $(KEYMAPS); do \
302 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \319 $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \
303 done320 done
304 for d in $(TARGET_DIRS); do \321 for d in $(TARGET_DIRS); do \
305 $(MAKE) -C $$d $@ || exit 1 ; \322 $(MAKE) -C $$d $@ || exit 1 ; \
@@ -326,7 +343,7 @@
326 $(call quiet-command,texi2dvi $(TEXIFLAG) -I . $<," GEN $@")343 $(call quiet-command,texi2dvi $(TEXIFLAG) -I . $<," GEN $@")
327344
328%.html: %.texi345%.html: %.texi
329 $(call quiet-command,$(MAKEINFO) $(MAKEINFOFLAGS) --html $< -o $@, \346 $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --html $< -o $@, \
330 " GEN $@")347 " GEN $@")
331348
332%.info: %.texi349%.info: %.texi
@@ -350,25 +367,25 @@
350qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi367qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
351 $(call quiet-command, \368 $(call quiet-command, \
352 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu.pod && \369 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu.pod && \
353 pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \370 $(POD2MAN) --section=1 --center=" " --release=" " qemu.pod > $@, \
354 " GEN $@")371 " GEN $@")
355372
356qemu-img.1: qemu-img.texi qemu-img-cmds.texi373qemu-img.1: qemu-img.texi qemu-img-cmds.texi
357 $(call quiet-command, \374 $(call quiet-command, \
358 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-img.pod && \375 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-img.pod && \
359 pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \376 $(POD2MAN) --section=1 --center=" " --release=" " qemu-img.pod > $@, \
360 " GEN $@")377 " GEN $@")
361378
362fsdev/virtfs-proxy-helper.1: fsdev/virtfs-proxy-helper.texi379fsdev/virtfs-proxy-helper.1: fsdev/virtfs-proxy-helper.texi
363 $(call quiet-command, \380 $(call quiet-command, \
364 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< fsdev/virtfs-proxy-helper.pod && \381 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< fsdev/virtfs-proxy-helper.pod && \
365 pod2man --section=1 --center=" " --release=" " fsdev/virtfs-proxy-helper.pod > $@, \382 $(POD2MAN) --section=1 --center=" " --release=" " fsdev/virtfs-proxy-helper.pod > $@, \
366 " GEN $@")383 " GEN $@")
367384
368qemu-nbd.8: qemu-nbd.texi385qemu-nbd.8: qemu-nbd.texi
369 $(call quiet-command, \386 $(call quiet-command, \
370 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-nbd.pod && \387 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-nbd.pod && \
371 pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \388 $(POD2MAN) --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
372 " GEN $@")389 " GEN $@")
373390
374dvi: qemu-doc.dvi qemu-tech.dvi391dvi: qemu-doc.dvi qemu-tech.dvi
@@ -380,15 +397,10 @@
380 qemu-img.texi qemu-nbd.texi qemu-options.texi \397 qemu-img.texi qemu-nbd.texi qemu-options.texi \
381 qemu-monitor.texi qemu-img-cmds.texi398 qemu-monitor.texi qemu-img-cmds.texi
382399
383VERSION ?= $(shell cat VERSION)400# Add a dependency on the generated files, so that they are always
384FILE = qemu-$(VERSION)401# rebuilt before other object files
385402Makefile: $(GENERATED_HEADERS)
386# tar release (use 'make -k tar' on a checkouted tree)
387tar:
388 rm -rf /tmp/$(FILE)
389 cp -r . /tmp/$(FILE)
390 cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn
391 rm -rf /tmp/$(FILE)
392403
393# Include automatically generated dependency files404# Include automatically generated dependency files
394-include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d qapi/*.d qga/*.d)405# Dependencies in Makefile.objs files come from our recursive subdir rules
406-include $(wildcard *.d tests/*.d)
395407
=== modified file 'Makefile.dis'
--- Makefile.dis 2011-02-02 19:58:26 +0000
+++ Makefile.dis 2012-09-17 14:09:22 +0000
@@ -18,6 +18,3 @@
1818
19clean:19clean:
20 rm -f *.o *.d *.a *~20 rm -f *.o *.d *.a *~
21
22# Include automatically generated dependency files
23-include $(wildcard *.d */*.d)
2421
=== modified file 'Makefile.hw'
--- Makefile.hw 2012-03-15 16:18:18 +0000
+++ Makefile.hw 2012-09-17 14:09:22 +0000
@@ -7,7 +7,7 @@
77
8.PHONY: all8.PHONY: all
99
10$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)10$(call set-vpath, $(SRC_PATH))
1111
12QEMU_CFLAGS+=-I..12QEMU_CFLAGS+=-I..
13QEMU_CFLAGS += -I$(SRC_PATH)/include13QEMU_CFLAGS += -I$(SRC_PATH)/include
@@ -19,7 +19,5 @@
19 @true19 @true
2020
21clean:21clean:
22 rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~22 rm -f $(addsuffix *.o, $(sort $(dir $(hw-obj-y))))
2323 rm -f $(addsuffix *.d, $(sort $(dir $(hw-obj-y))))
24# Include automatically generated dependency files
25-include $(wildcard *.d */*.d)
2624
=== modified file 'Makefile.objs'
--- Makefile.objs 2012-03-15 16:18:18 +0000
+++ Makefile.objs 2012-09-17 14:09:22 +0000
@@ -1,9 +1,22 @@
1#######################################################################1#######################################################################
2# Target-independent parts used in system and user emulation
3universal-obj-y =
4universal-obj-y += qemu-log.o
5
6#######################################################################
2# QObject7# QObject
3qobject-obj-y = qint.o qstring.o qdict.o qlist.o qfloat.o qbool.o8qobject-obj-y = qint.o qstring.o qdict.o qlist.o qfloat.o qbool.o
4qobject-obj-y += qjson.o json-lexer.o json-streamer.o json-parser.o9qobject-obj-y += qjson.o json-lexer.o json-streamer.o json-parser.o
5qobject-obj-y += qerror.o error.o qemu-error.o10qobject-obj-y += qerror.o error.o qemu-error.o
611
12universal-obj-y += $(qobject-obj-y)
13
14#######################################################################
15# QOM
16qom-obj-y = qom/
17
18universal-obj-y += $(qom-obj-y)
19
7#######################################################################20#######################################################################
8# oslib-obj-y is code depending on the OS (win32 vs posix)21# oslib-obj-y is code depending on the OS (win32 vs posix)
9oslib-obj-y = osdep.o22oslib-obj-y = osdep.o
@@ -17,57 +30,29 @@
17ifeq ($(CONFIG_UCONTEXT_COROUTINE),y)30ifeq ($(CONFIG_UCONTEXT_COROUTINE),y)
18coroutine-obj-$(CONFIG_POSIX) += coroutine-ucontext.o31coroutine-obj-$(CONFIG_POSIX) += coroutine-ucontext.o
19else32else
33ifeq ($(CONFIG_SIGALTSTACK_COROUTINE),y)
34coroutine-obj-$(CONFIG_POSIX) += coroutine-sigaltstack.o
35else
20coroutine-obj-$(CONFIG_POSIX) += coroutine-gthread.o36coroutine-obj-$(CONFIG_POSIX) += coroutine-gthread.o
21endif37endif
38endif
22coroutine-obj-$(CONFIG_WIN32) += coroutine-win32.o39coroutine-obj-$(CONFIG_WIN32) += coroutine-win32.o
2340
24#######################################################################41#######################################################################
25# block-obj-y is code used by both qemu system emulation and qemu-img42# block-obj-y is code used by both qemu system emulation and qemu-img
2643
27block-obj-y = cutils.o cache-utils.o qemu-option.o module.o async.o44block-obj-y = cutils.o iov.o cache-utils.o qemu-option.o module.o async.o
28block-obj-y += nbd.o block.o aio.o aes.o qemu-config.o qemu-progress.o qemu-sockets.o45block-obj-y += nbd.o block.o aio.o aes.o qemu-config.o qemu-progress.o qemu-sockets.o
29block-obj-y += $(coroutine-obj-y) $(qobject-obj-y) $(version-obj-y)46block-obj-y += $(coroutine-obj-y) $(qobject-obj-y) $(version-obj-y)
30block-obj-$(CONFIG_POSIX) += posix-aio-compat.o47block-obj-$(CONFIG_POSIX) += posix-aio-compat.o
31block-obj-$(CONFIG_LINUX_AIO) += linux-aio.o48block-obj-$(CONFIG_LINUX_AIO) += linux-aio.o
3249block-obj-y += block/
33block-nested-y += raw.o cow.o qcow.o vdi.o vmdk.o cloop.o dmg.o bochs.o vpc.o vvfat.o
34block-nested-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o qcow2-cache.o
35block-nested-y += qed.o qed-gencb.o qed-l2-cache.o qed-table.o qed-cluster.o
36block-nested-y += qed-check.o
37block-nested-y += parallels.o nbd.o blkdebug.o sheepdog.o blkverify.o
38block-nested-y += stream.o
39block-nested-$(CONFIG_WIN32) += raw-win32.o
40block-nested-$(CONFIG_POSIX) += raw-posix.o
41block-nested-$(CONFIG_LIBISCSI) += iscsi.o
42block-nested-$(CONFIG_CURL) += curl.o
43block-nested-$(CONFIG_RBD) += rbd.o
44
45block-obj-y += $(addprefix block/, $(block-nested-y))
46
47net-obj-y = net.o
48net-nested-y = queue.o checksum.o util.o
49net-nested-y += socket.o
50net-nested-y += dump.o
51net-nested-$(CONFIG_POSIX) += tap.o
52net-nested-$(CONFIG_LINUX) += tap-linux.o
53net-nested-$(CONFIG_WIN32) += tap-win32.o
54net-nested-$(CONFIG_BSD) += tap-bsd.o
55net-nested-$(CONFIG_SOLARIS) += tap-solaris.o
56net-nested-$(CONFIG_AIX) += tap-aix.o
57net-nested-$(CONFIG_HAIKU) += tap-haiku.o
58net-nested-$(CONFIG_SLIRP) += slirp.o
59net-nested-$(CONFIG_VDE) += vde.o
60net-obj-y += $(addprefix net/, $(net-nested-y))
6150
62ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)51ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
63# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.52# Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
64# only pull in the actual virtio-9p device if we also enabled virtio.53# only pull in the actual virtio-9p device if we also enabled virtio.
65CONFIG_REALLY_VIRTFS=y54CONFIG_REALLY_VIRTFS=y
66fsdev-nested-y = qemu-fsdev.o virtio-9p-marshal.o
67else
68fsdev-nested-y = qemu-fsdev-dummy.o
69endif55endif
70fsdev-obj-$(CONFIG_VIRTFS) += $(addprefix fsdev/, $(fsdev-nested-y))
7156
72######################################################################57######################################################################
73# Target independent part of system emulation. The long term path is to58# Target independent part of system emulation. The long term path is to
@@ -75,106 +60,47 @@
75# single QEMU executable should support all CPUs and machines.60# single QEMU executable should support all CPUs and machines.
7661
77common-obj-y = $(block-obj-y) blockdev.o62common-obj-y = $(block-obj-y) blockdev.o
78common-obj-y += $(net-obj-y)63common-obj-y += net.o net/
79common-obj-y += $(qobject-obj-y)64common-obj-y += qom/
80common-obj-$(CONFIG_LINUX) += $(fsdev-obj-$(CONFIG_LINUX))
81common-obj-y += readline.o console.o cursor.o65common-obj-y += readline.o console.o cursor.o
82common-obj-y += $(oslib-obj-y)66common-obj-y += $(oslib-obj-y)
83common-obj-$(CONFIG_WIN32) += os-win32.o67common-obj-$(CONFIG_WIN32) += os-win32.o
84common-obj-$(CONFIG_POSIX) += os-posix.o68common-obj-$(CONFIG_POSIX) += os-posix.o
8569
70common-obj-$(CONFIG_LINUX) += fsdev/
71extra-obj-$(CONFIG_LINUX) += fsdev/
72
86common-obj-y += tcg-runtime.o host-utils.o main-loop.o73common-obj-y += tcg-runtime.o host-utils.o main-loop.o
87common-obj-y += irq.o input.o74common-obj-y += input.o
88common-obj-$(CONFIG_PTIMER) += ptimer.o
89common-obj-$(CONFIG_MAX7310) += max7310.o
90common-obj-$(CONFIG_WM8750) += wm8750.o
91common-obj-$(CONFIG_TWL92230) += twl92230.o
92common-obj-$(CONFIG_TSC2005) += tsc2005.o
93common-obj-$(CONFIG_LM832X) += lm832x.o
94common-obj-$(CONFIG_TMP105) += tmp105.o
95common-obj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o
96common-obj-$(CONFIG_SSD0303) += ssd0303.o
97common-obj-$(CONFIG_SSD0323) += ssd0323.o
98common-obj-$(CONFIG_ADS7846) += ads7846.o
99common-obj-$(CONFIG_MAX111X) += max111x.o
100common-obj-$(CONFIG_DS1338) += ds1338.o
101common-obj-y += i2c.o spi.o smbus.o smbus_eeprom.o
102common-obj-y += i2c-ddc.o
103common-obj-y += eeprom93xx.o
104common-obj-y += scsi-disk.o cdrom.o
105common-obj-y += scsi-generic.o scsi-bus.o
106common-obj-y += hid.o
107common-obj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
108common-obj-y += usb-serial.o usb-net.o usb-bus.o usb-desc.o usb-audio.o
109common-obj-$(CONFIG_SSI) += ssi.o
110common-obj-$(CONFIG_SSI_SD) += ssi-sd.o
111common-obj-$(CONFIG_SD) += sd.o
112common-obj-y += bt.o bt-host.o bt-vhci.o bt-l2cap.o bt-sdp.o bt-hci.o bt-hid.o usb-bt.o
113common-obj-y += bt-hci-csr.o
114common-obj-y += buffered_file.o migration.o migration-tcp.o75common-obj-y += buffered_file.o migration.o migration-tcp.o
115common-obj-y += qemu-char.o #aio.o76common-obj-y += qemu-char.o #aio.o
116common-obj-y += msmouse.o ps2.o
117common-obj-y += qdev.o qdev-properties.o qdev-monitor.o
118common-obj-y += block-migration.o iohandler.o77common-obj-y += block-migration.o iohandler.o
119common-obj-y += pflib.o78common-obj-y += pflib.o
120common-obj-y += bitmap.o bitops.o79common-obj-y += bitmap.o bitops.o
80common-obj-y += page_cache.o
12181
122common-obj-$(CONFIG_BRLAPI) += baum.o
123common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o82common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
124common-obj-$(CONFIG_WIN32) += version.o83common-obj-$(CONFIG_WIN32) += version.o
12584
126common-obj-$(CONFIG_SPICE) += ui/spice-core.o ui/spice-input.o ui/spice-display.o spice-qemu-char.o85common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
12786
128include $(SRC_PATH)/qom/Makefile87common-obj-y += audio/
129common-obj-y += $(addprefix qom/, $(qom-y))88common-obj-y += hw/
13089common-obj-y += ui/
131audio-obj-y = audio.o noaudio.o wavaudio.o mixeng.o90common-obj-y += bt-host.o bt-vhci.o
132audio-obj-$(CONFIG_SDL) += sdlaudio.o
133audio-obj-$(CONFIG_OSS) += ossaudio.o
134audio-obj-$(CONFIG_SPICE) += spiceaudio.o
135audio-obj-$(CONFIG_COREAUDIO) += coreaudio.o
136audio-obj-$(CONFIG_ALSA) += alsaaudio.o
137audio-obj-$(CONFIG_DSOUND) += dsoundaudio.o
138audio-obj-$(CONFIG_FMOD) += fmodaudio.o
139audio-obj-$(CONFIG_ESD) += esdaudio.o
140audio-obj-$(CONFIG_PA) += paaudio.o
141audio-obj-$(CONFIG_WINWAVE) += winwaveaudio.o
142audio-obj-$(CONFIG_AUDIO_PT_INT) += audio_pt_int.o
143audio-obj-$(CONFIG_AUDIO_WIN_INT) += audio_win_int.o
144audio-obj-y += wavcapture.o
145common-obj-y += $(addprefix audio/, $(audio-obj-y))
146
147ui-obj-y += keymaps.o
148ui-obj-$(CONFIG_SDL) += sdl.o sdl_zoom.o x_keymap.o
149ui-obj-$(CONFIG_COCOA) += cocoa.o
150ui-obj-$(CONFIG_CURSES) += curses.o
151vnc-obj-y += vnc.o d3des.o
152vnc-obj-y += vnc-enc-zlib.o vnc-enc-hextile.o
153vnc-obj-y += vnc-enc-tight.o vnc-palette.o
154vnc-obj-y += vnc-enc-zrle.o
155vnc-obj-$(CONFIG_VNC_TLS) += vnc-tls.o vnc-auth-vencrypt.o
156vnc-obj-$(CONFIG_VNC_SASL) += vnc-auth-sasl.o
157ifdef CONFIG_VNC_THREAD
158vnc-obj-y += vnc-jobs-async.o
159else
160vnc-obj-y += vnc-jobs-sync.o
161endif
162common-obj-y += $(addprefix ui/, $(ui-obj-y))
163common-obj-$(CONFIG_VNC) += $(addprefix ui/, $(vnc-obj-y))
16491
165common-obj-y += iov.o acl.o92common-obj-y += iov.o acl.o
166common-obj-$(CONFIG_POSIX) += compatfd.o93common-obj-$(CONFIG_POSIX) += compatfd.o
167common-obj-y += notify.o event_notifier.o94common-obj-y += notify.o event_notifier.o
168common-obj-y += qemu-timer.o qemu-timer-common.o95common-obj-y += qemu-timer.o qemu-timer-common.o
16996
170slirp-obj-y = cksum.o if.o ip_icmp.o ip_input.o ip_output.o97common-obj-$(CONFIG_SLIRP) += slirp/
171slirp-obj-y += slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o
172slirp-obj-y += tcp_subr.o tcp_timer.o udp.o bootp.o tftp.o arp_table.o
173common-obj-$(CONFIG_SLIRP) += $(addprefix slirp/, $(slirp-obj-y))
17498
175# xen backend driver support99######################################################################
176common-obj-$(CONFIG_XEN_BACKEND) += xen_backend.o xen_devconfig.o100# libseccomp
177common-obj-$(CONFIG_XEN_BACKEND) += xen_console.o xenfb.o xen_disk.o xen_nic.o101ifeq ($(CONFIG_SECCOMP),y)
102common-obj-y += qemu-seccomp.o
103endif
178104
179######################################################################105######################################################################
180# libuser106# libuser
@@ -182,149 +108,16 @@
182user-obj-y =108user-obj-y =
183user-obj-y += envlist.o path.o109user-obj-y += envlist.o path.o
184user-obj-y += tcg-runtime.o host-utils.o110user-obj-y += tcg-runtime.o host-utils.o
185user-obj-y += cutils.o cache-utils.o111user-obj-y += cutils.o iov.o cache-utils.o
112user-obj-y += module.o
113user-obj-y += qemu-user.o
186user-obj-y += $(trace-obj-y)114user-obj-y += $(trace-obj-y)
115user-obj-y += qom/
187116
188######################################################################117######################################################################
189# libhw118# libhw
190119
191hw-obj-y =120hw-obj-y = vl.o dma-helpers.o qtest.o hw/
192hw-obj-y += vl.o loader.o
193hw-obj-$(CONFIG_VIRTIO) += virtio-console.o
194hw-obj-y += usb-libhw.o
195hw-obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o
196hw-obj-y += fw_cfg.o
197hw-obj-$(CONFIG_PCI) += pci.o pci_bridge.o
198hw-obj-$(CONFIG_PCI) += msix.o msi.o
199hw-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o
200hw-obj-$(CONFIG_PCI) += ioh3420.o xio3130_upstream.o xio3130_downstream.o
201hw-obj-y += watchdog.o
202hw-obj-$(CONFIG_ISA_MMIO) += isa_mmio.o
203hw-obj-$(CONFIG_ECC) += ecc.o
204hw-obj-$(CONFIG_NAND) += nand.o
205hw-obj-$(CONFIG_PFLASH_CFI01) += pflash_cfi01.o
206hw-obj-$(CONFIG_PFLASH_CFI02) += pflash_cfi02.o
207
208hw-obj-$(CONFIG_M48T59) += m48t59.o
209hw-obj-$(CONFIG_ESCC) += escc.o
210hw-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o
211
212hw-obj-$(CONFIG_SERIAL) += serial.o
213hw-obj-$(CONFIG_PARALLEL) += parallel.o
214hw-obj-$(CONFIG_I8254) += i8254.o
215hw-obj-$(CONFIG_PCSPK) += pcspk.o
216hw-obj-$(CONFIG_PCKBD) += pckbd.o
217hw-obj-$(CONFIG_USB_UHCI) += usb-uhci.o
218hw-obj-$(CONFIG_USB_OHCI) += usb-ohci.o
219hw-obj-$(CONFIG_USB_EHCI) += usb-ehci.o
220hw-obj-$(CONFIG_USB_XHCI) += usb-xhci.o
221hw-obj-$(CONFIG_FDC) += fdc.o
222hw-obj-$(CONFIG_ACPI) += acpi.o acpi_piix4.o
223hw-obj-$(CONFIG_APM) += pm_smbus.o apm.o
224hw-obj-$(CONFIG_DMA) += dma.o
225hw-obj-$(CONFIG_I82374) += i82374.o
226hw-obj-$(CONFIG_HPET) += hpet.o
227hw-obj-$(CONFIG_APPLESMC) += applesmc.o
228hw-obj-$(CONFIG_SMARTCARD) += usb-ccid.o ccid-card-passthru.o
229hw-obj-$(CONFIG_SMARTCARD_NSS) += ccid-card-emulated.o
230hw-obj-$(CONFIG_USB_REDIR) += usb-redir.o
231hw-obj-$(CONFIG_I8259) += i8259_common.o i8259.o
232
233# PPC devices
234hw-obj-$(CONFIG_PREP_PCI) += prep_pci.o
235hw-obj-$(CONFIG_I82378) += i82378.o
236# Mac shared devices
237hw-obj-$(CONFIG_MACIO) += macio.o
238hw-obj-$(CONFIG_CUDA) += cuda.o
239hw-obj-$(CONFIG_ADB) += adb.o
240hw-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o
241hw-obj-$(CONFIG_MAC_DBDMA) += mac_dbdma.o
242# OldWorld PowerMac
243hw-obj-$(CONFIG_HEATHROW_PIC) += heathrow_pic.o
244hw-obj-$(CONFIG_GRACKLE_PCI) += grackle_pci.o
245# NewWorld PowerMac
246hw-obj-$(CONFIG_UNIN_PCI) += unin_pci.o
247hw-obj-$(CONFIG_DEC_PCI) += dec_pci.o
248# PowerPC E500 boards
249hw-obj-$(CONFIG_PPCE500_PCI) += ppce500_pci.o
250
251# MIPS devices
252hw-obj-$(CONFIG_PIIX4) += piix4.o
253hw-obj-$(CONFIG_G364FB) += g364fb.o
254hw-obj-$(CONFIG_JAZZ_LED) += jazz_led.o
255
256# PCI watchdog devices
257hw-obj-$(CONFIG_PCI) += wdt_i6300esb.o
258
259hw-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o pcie_port.o
260
261# PCI network cards
262hw-obj-$(CONFIG_NE2000_PCI) += ne2000.o
263hw-obj-$(CONFIG_EEPRO100_PCI) += eepro100.o
264hw-obj-$(CONFIG_PCNET_PCI) += pcnet-pci.o
265hw-obj-$(CONFIG_PCNET_COMMON) += pcnet.o
266hw-obj-$(CONFIG_E1000_PCI) += e1000.o
267hw-obj-$(CONFIG_RTL8139_PCI) += rtl8139.o
268
269hw-obj-$(CONFIG_SMC91C111) += smc91c111.o
270hw-obj-$(CONFIG_LAN9118) += lan9118.o
271hw-obj-$(CONFIG_NE2000_ISA) += ne2000-isa.o
272hw-obj-$(CONFIG_OPENCORES_ETH) += opencores_eth.o
273
274# IDE
275hw-obj-$(CONFIG_IDE_CORE) += ide/core.o ide/atapi.o
276hw-obj-$(CONFIG_IDE_QDEV) += ide/qdev.o
277hw-obj-$(CONFIG_IDE_PCI) += ide/pci.o
278hw-obj-$(CONFIG_IDE_ISA) += ide/isa.o
279hw-obj-$(CONFIG_IDE_PIIX) += ide/piix.o
280hw-obj-$(CONFIG_IDE_CMD646) += ide/cmd646.o
281hw-obj-$(CONFIG_IDE_MACIO) += ide/macio.o
282hw-obj-$(CONFIG_IDE_VIA) += ide/via.o
283hw-obj-$(CONFIG_AHCI) += ide/ahci.o
284hw-obj-$(CONFIG_AHCI) += ide/ich.o
285
286# SCSI layer
287hw-obj-$(CONFIG_LSI_SCSI_PCI) += lsi53c895a.o
288hw-obj-$(CONFIG_ESP) += esp.o
289
290hw-obj-y += dma-helpers.o sysbus.o isa-bus.o
291hw-obj-y += qdev-addr.o
292
293# VGA
294hw-obj-$(CONFIG_VGA_PCI) += vga-pci.o
295hw-obj-$(CONFIG_VGA_ISA) += vga-isa.o
296hw-obj-$(CONFIG_VGA_ISA_MM) += vga-isa-mm.o
297hw-obj-$(CONFIG_VMWARE_VGA) += vmware_vga.o
298hw-obj-$(CONFIG_VMMOUSE) += vmmouse.o
299hw-obj-$(CONFIG_VGA_CIRRUS) += cirrus_vga.o
300
301hw-obj-$(CONFIG_RC4030) += rc4030.o
302hw-obj-$(CONFIG_DP8393X) += dp8393x.o
303hw-obj-$(CONFIG_DS1225Y) += ds1225y.o
304hw-obj-$(CONFIG_MIPSNET) += mipsnet.o
305
306# Sound
307sound-obj-y =
308sound-obj-$(CONFIG_SB16) += sb16.o
309sound-obj-$(CONFIG_ES1370) += es1370.o
310sound-obj-$(CONFIG_AC97) += ac97.o
311sound-obj-$(CONFIG_ADLIB) += fmopl.o adlib.o
312sound-obj-$(CONFIG_GUS) += gus.o gusemu_hal.o gusemu_mixer.o
313sound-obj-$(CONFIG_CS4231A) += cs4231a.o
314sound-obj-$(CONFIG_HDA) += intel-hda.o hda-audio.o
315
316adlib.o fmopl.o: QEMU_CFLAGS += -DBUILD_Y8950=0
317hw-obj-$(CONFIG_SOUND) += $(sound-obj-y)
318
3199pfs-nested-$(CONFIG_VIRTFS) = virtio-9p.o
3209pfs-nested-$(CONFIG_VIRTFS) += virtio-9p-local.o virtio-9p-xattr.o
3219pfs-nested-$(CONFIG_VIRTFS) += virtio-9p-xattr-user.o virtio-9p-posix-acl.o
3229pfs-nested-$(CONFIG_VIRTFS) += virtio-9p-coth.o cofs.o codir.o cofile.o
3239pfs-nested-$(CONFIG_VIRTFS) += coxattr.o virtio-9p-synth.o
3249pfs-nested-$(CONFIG_OPEN_BY_HANDLE) += virtio-9p-handle.o
3259pfs-nested-$(CONFIG_VIRTFS) += virtio-9p-proxy.o
326
327hw-obj-$(CONFIG_REALLY_VIRTFS) += $(addprefix 9pfs/, $(9pfs-nested-y))
328121
329######################################################################122######################################################################
330# libdis123# libdis
@@ -344,22 +137,28 @@
344libdis-$(CONFIG_S390_DIS) += s390-dis.o137libdis-$(CONFIG_S390_DIS) += s390-dis.o
345libdis-$(CONFIG_SH4_DIS) += sh4-dis.o138libdis-$(CONFIG_SH4_DIS) += sh4-dis.o
346libdis-$(CONFIG_SPARC_DIS) += sparc-dis.o139libdis-$(CONFIG_SPARC_DIS) += sparc-dis.o
140libdis-$(CONFIG_LM32_DIS) += lm32-dis.o
347141
348######################################################################142######################################################################
349# trace143# trace
350144
351ifeq ($(TRACE_BACKEND),dtrace)145ifeq ($(TRACE_BACKEND),dtrace)
352trace.h: trace.h-timestamp trace-dtrace.h146TRACE_H_EXTRA_DEPS=trace-dtrace.h
353else
354trace.h: trace.h-timestamp
355endif147endif
148trace.h: trace.h-timestamp $(TRACE_H_EXTRA_DEPS)
356trace.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak149trace.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
357 $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -h < $< > $@," GEN trace.h")150 $(call quiet-command,$(TRACETOOL) \
151 --format=h \
152 --backend=$(TRACE_BACKEND) \
153 < $< > $@," GEN trace.h")
358 @cmp -s $@ trace.h || cp $@ trace.h154 @cmp -s $@ trace.h || cp $@ trace.h
359155
360trace.c: trace.c-timestamp156trace.c: trace.c-timestamp
361trace.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak157trace.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
362 $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -c < $< > $@," GEN trace.c")158 $(call quiet-command,$(TRACETOOL) \
159 --format=c \
160 --backend=$(TRACE_BACKEND) \
161 < $< > $@," GEN trace.c")
363 @cmp -s $@ trace.c || cp $@ trace.c162 @cmp -s $@ trace.c || cp $@ trace.c
364163
365trace.o: trace.c $(GENERATED_HEADERS)164trace.o: trace.c $(GENERATED_HEADERS)
@@ -372,11 +171,14 @@
372# rule file. So we use '.dtrace' instead171# rule file. So we use '.dtrace' instead
373trace-dtrace.dtrace: trace-dtrace.dtrace-timestamp172trace-dtrace.dtrace: trace-dtrace.dtrace-timestamp
374trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak173trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
375 $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -d < $< > $@," GEN trace-dtrace.dtrace")174 $(call quiet-command,$(TRACETOOL) \
175 --format=d \
176 --backend=$(TRACE_BACKEND) \
177 < $< > $@," GEN trace-dtrace.dtrace")
376 @cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace178 @cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace
377179
378trace-dtrace.o: trace-dtrace.dtrace $(GENERATED_HEADERS)180trace-dtrace.o: trace-dtrace.dtrace $(GENERATED_HEADERS)
379 $(call quiet-command,dtrace -o $@ -G -s $<, " GEN trace-dtrace.o")181 $(call quiet-command,dtrace -o $@ -G -s $<, " GEN trace-dtrace.o")
380182
381ifeq ($(LIBTOOL),)183ifeq ($(LIBTOOL),)
382trace-dtrace.lo: trace-dtrace.dtrace184trace-dtrace.lo: trace-dtrace.dtrace
@@ -393,43 +195,40 @@
393trace-obj-y = trace.o195trace-obj-y = trace.o
394endif196endif
395197
396trace-nested-$(CONFIG_TRACE_DEFAULT) += default.o198trace-obj-$(CONFIG_TRACE_DEFAULT) += trace/default.o
397199trace-obj-$(CONFIG_TRACE_SIMPLE) += trace/simple.o
398trace-nested-$(CONFIG_TRACE_SIMPLE) += simple.o
399trace-obj-$(CONFIG_TRACE_SIMPLE) += qemu-timer-common.o200trace-obj-$(CONFIG_TRACE_SIMPLE) += qemu-timer-common.o
400201trace-obj-$(CONFIG_TRACE_STDERR) += trace/stderr.o
401trace-nested-$(CONFIG_TRACE_STDERR) += stderr.o202trace-obj-y += trace/control.o
402
403trace-nested-y += control.o
404
405trace-obj-y += $(addprefix trace/, $(trace-nested-y))
406203
407$(trace-obj-y): $(GENERATED_HEADERS)204$(trace-obj-y): $(GENERATED_HEADERS)
408205
409######################################################################206######################################################################
410# smartcard207# smartcard
411208
412libcacard-y = cac.o event.o vcard.o vreader.o vcard_emul_nss.o vcard_emul_type.o card_7816.o209libcacard-y += libcacard/cac.o libcacard/event.o
210libcacard-y += libcacard/vcard.o libcacard/vreader.o
211libcacard-y += libcacard/vcard_emul_nss.o
212libcacard-y += libcacard/vcard_emul_type.o
213libcacard-y += libcacard/card_7816.o
214
215common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
413216
414######################################################################217######################################################################
415# qapi218# qapi
416219
417qapi-nested-y = qapi-visit-core.o qapi-dealloc-visitor.o qmp-input-visitor.o220qapi-obj-y = qapi/
418qapi-nested-y += qmp-output-visitor.o qmp-registry.o qmp-dispatch.o221qapi-obj-y += qapi-types.o qapi-visit.o
419qapi-nested-y += string-input-visitor.o string-output-visitor.o
420qapi-obj-y = $(addprefix qapi/, $(qapi-nested-y))
421222
422common-obj-y += qmp-marshal.o qapi-visit.o qapi-types.o $(qapi-obj-y)223common-obj-y += qmp-marshal.o qapi-visit.o qapi-types.o
423common-obj-y += qmp.o hmp.o224common-obj-y += qmp.o hmp.o
424225
226universal-obj-y += $(qapi-obj-y)
227
425######################################################################228######################################################################
426# guest agent229# guest agent
427230
428qga-nested-y = commands.o guest-agent-command-state.o231qga-obj-y = qga/ qemu-ga.o module.o
429qga-nested-$(CONFIG_POSIX) += commands-posix.o channel-posix.o
430qga-nested-$(CONFIG_WIN32) += commands-win32.o channel-win32.o service-win32.o
431qga-obj-y = $(addprefix qga/, $(qga-nested-y))
432qga-obj-y += qemu-ga.o module.o
433qga-obj-$(CONFIG_WIN32) += oslib-win32.o232qga-obj-$(CONFIG_WIN32) += oslib-win32.o
434qga-obj-$(CONFIG_POSIX) += oslib-posix.o qemu-sockets.o qemu-option.o233qga-obj-$(CONFIG_POSIX) += oslib-posix.o qemu-sockets.o qemu-option.o
435234
@@ -439,3 +238,13 @@
439238
440QEMU_CFLAGS+=$(GLIB_CFLAGS)239QEMU_CFLAGS+=$(GLIB_CFLAGS)
441240
241nested-vars += \
242 hw-obj-y \
243 qga-obj-y \
244 block-obj-y \
245 qom-obj-y \
246 qapi-obj-y \
247 user-obj-y \
248 common-obj-y \
249 extra-obj-y
250dummy := $(call unnest-vars)
442251
=== modified file 'Makefile.target'
--- Makefile.target 2012-03-15 16:18:18 +0000
+++ Makefile.target 2012-09-17 14:09:22 +0000
@@ -1,10 +1,5 @@
1# -*- Mode: makefile -*-1# -*- Mode: makefile -*-
22
3GENERATED_HEADERS = config-target.h
4CONFIG_NO_PCI = $(if $(subst n,,$(CONFIG_PCI)),n,y)
5CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y)
6CONFIG_NO_XEN = $(if $(subst n,,$(CONFIG_XEN)),n,y)
7
8include ../config-host.mak3include ../config-host.mak
9include config-devices.mak4include config-devices.mak
10include config-target.mak5include config-target.mak
@@ -13,14 +8,11 @@
13include $(HWDIR)/config.mak8include $(HWDIR)/config.mak
14endif9endif
1510
16TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)11$(call set-vpath, $(SRC_PATH))
17$(call set-vpath, $(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw)
18ifdef CONFIG_LINUX12ifdef CONFIG_LINUX
19QEMU_CFLAGS += -I../linux-headers13QEMU_CFLAGS += -I../linux-headers
20endif14endif
21QEMU_CFLAGS += -I.. -I$(TARGET_PATH) -DNEED_CPU_H15QEMU_CFLAGS += -I.. -I$(SRC_PATH)/target-$(TARGET_BASE_ARCH) -DNEED_CPU_H
22
23include $(SRC_PATH)/Makefile.objs
2416
25QEMU_CFLAGS+=-I$(SRC_PATH)/include17QEMU_CFLAGS+=-I$(SRC_PATH)/include
2618
@@ -58,13 +50,14 @@
58TARGET_TYPE=system50TARGET_TYPE=system
59endif51endif
6052
61$(QEMU_PROG).stp:53$(QEMU_PROG).stp: $(SRC_PATH)/trace-events
62 $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool \54 $(call quiet-command,$(TRACETOOL) \
63 --$(TRACE_BACKEND) \55 --format=stap \
64 --binary $(bindir)/$(QEMU_PROG) \56 --backend=$(TRACE_BACKEND) \
65 --target-arch $(TARGET_ARCH) \57 --binary=$(bindir)/$(QEMU_PROG) \
66 --target-type $(TARGET_TYPE) \58 --target-arch=$(TARGET_ARCH) \
67 --stap < $(SRC_PATH)/trace-events > $(QEMU_PROG).stp," GEN $(QEMU_PROG).stp")59 --target-type=$(TARGET_TYPE) \
60 < $< > $@," GEN $(QEMU_PROG).stp")
68else61else
69stap:62stap:
70endif63endif
@@ -76,359 +69,117 @@
7669
77#########################################################70#########################################################
78# cpu emulator library71# cpu emulator library
79libobj-y = exec.o translate-all.o cpu-exec.o translate.o72obj-y = exec.o translate-all.o cpu-exec.o
80libobj-y += tcg/tcg.o tcg/optimize.o73obj-y += tcg/tcg.o tcg/optimize.o
81libobj-$(CONFIG_TCG_INTERPRETER) += tci.o74obj-$(CONFIG_TCG_INTERPRETER) += tci.o
82libobj-y += fpu/softfloat.o75obj-y += fpu/softfloat.o
83libobj-y += op_helper.o helper.o76obj-y += disas.o
84ifeq ($(TARGET_BASE_ARCH), i386)77obj-$(CONFIG_TCI_DIS) += tci-dis.o
85libobj-y += cpuid.o78obj-y += target-$(TARGET_BASE_ARCH)/
86endif79obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o
87libobj-$(TARGET_SPARC64) += vis_helper.o
88libobj-$(CONFIG_NEED_MMU) += mmu.o
89libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
90ifeq ($(TARGET_BASE_ARCH), sparc)
91libobj-y += fop_helper.o cc_helper.o win_helper.o mmu_helper.o ldst_helper.o
92libobj-y += cpu_init.o
93endif
94libobj-$(TARGET_SPARC) += int32_helper.o
95libobj-$(TARGET_SPARC64) += int64_helper.o
96
97libobj-y += disas.o
98libobj-$(CONFIG_TCI_DIS) += tci-dis.o
9980
100tci-dis.o: QEMU_CFLAGS += -I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/tci81tci-dis.o: QEMU_CFLAGS += -I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/tci
10182
102$(libobj-y): $(GENERATED_HEADERS)83# HELPER_CFLAGS is used for all the legacy code compiled with static register
103
104# HELPER_CFLAGS is used for all the code compiled with static register
105# variables84# variables
106op_helper.o ldst_helper.o user-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS)85user-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
10786
108# Note: this is a workaround. The real fix is to avoid compiling87# Note: this is a workaround. The real fix is to avoid compiling
109# cpu_signal_handler() in user-exec.c.88# cpu_signal_handler() in user-exec.c.
110signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)89%/signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
11190
112#########################################################91#########################################################
113# Linux user emulator target92# Linux user emulator target
11493
115ifdef CONFIG_LINUX_USER94ifdef CONFIG_LINUX_USER
11695
117$(call set-vpath, $(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR))
118
119QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) -I$(SRC_PATH)/linux-user96QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) -I$(SRC_PATH)/linux-user
120obj-y = main.o syscall.o strace.o mmap.o signal.o thunk.o \97
121 elfload.o linuxload.o uaccess.o gdbstub.o cpu-uname.o \98obj-y += linux-user/
122 user-exec.o $(oslib-obj-y)99obj-y += gdbstub.o thunk.o user-exec.o $(oslib-obj-y)
123
124obj-$(TARGET_HAS_BFLT) += flatload.o
125
126obj-$(TARGET_I386) += vm86.o
127
128obj-i386-y += ioport-user.o
129
130nwfpe-obj-y = fpa11.o fpa11_cpdo.o fpa11_cpdt.o fpa11_cprt.o fpopcode.o
131nwfpe-obj-y += single_cpdo.o double_cpdo.o extended_cpdo.o
132obj-arm-y += $(addprefix nwfpe/, $(nwfpe-obj-y))
133obj-arm-y += arm-semi.o
134
135obj-m68k-y += m68k-sim.o m68k-semi.o
136
137$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
138
139obj-y += $(addprefix ../libuser/, $(user-obj-y))
140obj-y += $(addprefix ../libdis-user/, $(libdis-y))
141obj-y += $(libobj-y)
142100
143endif #CONFIG_LINUX_USER101endif #CONFIG_LINUX_USER
144102
145#########################################################103#########################################################
146# Darwin user emulator target
147
148ifdef CONFIG_DARWIN_USER
149
150$(call set-vpath, $(SRC_PATH)/darwin-user)
151
152QEMU_CFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
153
154# Leave some space for the regular program loading zone
155LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000
156
157LIBS+=-lmx
158
159obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \
160 gdbstub.o user-exec.o
161
162obj-i386-y += ioport-user.o
163
164$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
165
166obj-y += $(addprefix ../libuser/, $(user-obj-y))
167obj-y += $(addprefix ../libdis-user/, $(libdis-y))
168obj-y += $(libobj-y)
169
170endif #CONFIG_DARWIN_USER
171
172#########################################################
173# BSD user emulator target104# BSD user emulator target
174105
175ifdef CONFIG_BSD_USER106ifdef CONFIG_BSD_USER
176107
177$(call set-vpath, $(SRC_PATH)/bsd-user)
178
179QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)108QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
180109
181obj-y = main.o bsdload.o elfload.o mmap.o signal.o strace.o syscall.o \110obj-y += bsd-user/
182 gdbstub.o uaccess.o user-exec.o111obj-y += gdbstub.o user-exec.o $(oslib-obj-y)
183
184obj-i386-y += ioport-user.o
185
186$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
187
188obj-y += $(addprefix ../libuser/, $(user-obj-y))
189obj-y += $(addprefix ../libdis-user/, $(libdis-y))
190obj-y += $(libobj-y)
191112
192endif #CONFIG_BSD_USER113endif #CONFIG_BSD_USER
193114
194#########################################################115#########################################################
195# System emulator target116# System emulator target
196ifdef CONFIG_SOFTMMU117ifdef CONFIG_SOFTMMU
118CONFIG_NO_PCI = $(if $(subst n,,$(CONFIG_PCI)),n,y)
119CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y)
120CONFIG_NO_XEN = $(if $(subst n,,$(CONFIG_XEN)),n,y)
121CONFIG_NO_GET_MEMORY_MAPPING = $(if $(subst n,,$(CONFIG_HAVE_GET_MEMORY_MAPPING)),n,y)
122CONFIG_NO_CORE_DUMP = $(if $(subst n,,$(CONFIG_HAVE_CORE_DUMP)),n,y)
197123
198obj-y = arch_init.o cpus.o monitor.o machine.o gdbstub.o balloon.o ioport.o124obj-y += arch_init.o cpus.o monitor.o gdbstub.o balloon.o ioport.o
199# virtio has to be here due to weird dependency between PCI and virtio-net.125obj-y += hw/
200# need to fix this properly126obj-$(CONFIG_KVM) += kvm-all.o
201obj-$(CONFIG_NO_PCI) += pci-stub.o
202obj-$(CONFIG_VIRTIO) += virtio.o virtio-blk.o virtio-balloon.o virtio-net.o virtio-serial-bus.o
203obj-$(CONFIG_VIRTIO_SCSI) += virtio-scsi.o
204obj-y += vhost_net.o
205obj-$(CONFIG_VHOST_NET) += vhost.o
206obj-$(CONFIG_REALLY_VIRTFS) += 9pfs/virtio-9p-device.o
207obj-$(CONFIG_KVM) += kvm.o kvm-all.o
208obj-$(CONFIG_NO_KVM) += kvm-stub.o127obj-$(CONFIG_NO_KVM) += kvm-stub.o
209obj-$(CONFIG_VGA) += vga.o128obj-y += memory.o savevm.o cputlb.o
210obj-y += memory.o savevm.o129obj-$(CONFIG_HAVE_GET_MEMORY_MAPPING) += memory_mapping.o
130obj-$(CONFIG_HAVE_CORE_DUMP) += dump.o
131obj-$(CONFIG_NO_GET_MEMORY_MAPPING) += memory_mapping-stub.o
132obj-$(CONFIG_NO_CORE_DUMP) += dump-stub.o
211LIBS+=-lz133LIBS+=-lz
212134
213obj-i386-$(CONFIG_KVM) += hyperv.o
214
215QEMU_CFLAGS += $(VNC_TLS_CFLAGS)135QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
216QEMU_CFLAGS += $(VNC_SASL_CFLAGS)136QEMU_CFLAGS += $(VNC_SASL_CFLAGS)
217QEMU_CFLAGS += $(VNC_JPEG_CFLAGS)137QEMU_CFLAGS += $(VNC_JPEG_CFLAGS)
218QEMU_CFLAGS += $(VNC_PNG_CFLAGS)138QEMU_CFLAGS += $(VNC_PNG_CFLAGS)
219139
220# xen support140# xen support
221obj-$(CONFIG_XEN) += xen-all.o xen_machine_pv.o xen_domainbuild.o xen-mapcache.o141obj-$(CONFIG_XEN) += xen-all.o xen-mapcache.o
222obj-$(CONFIG_NO_XEN) += xen-stub.o142obj-$(CONFIG_NO_XEN) += xen-stub.o
223143
224obj-i386-$(CONFIG_XEN) += xen_platform.o
225
226# Inter-VM PCI shared memory
227CONFIG_IVSHMEM =
228ifeq ($(CONFIG_KVM), y)
229 ifeq ($(CONFIG_PCI), y)
230 CONFIG_IVSHMEM = y
231 endif
232endif
233obj-$(CONFIG_IVSHMEM) += ivshmem.o
234
235# Generic hotplugging
236obj-y += device-hotplug.o
237
238# Hardware support144# Hardware support
239obj-i386-y += mc146818rtc.o pc.o
240obj-i386-y += apic_common.o apic.o kvmvapic.o
241obj-i386-y += sga.o ioapic_common.o ioapic.o piix_pci.o
242obj-i386-y += vmport.o
243obj-i386-y += pci-hotplug.o smbios.o wdt_ib700.o
244obj-i386-y += debugcon.o multiboot.o
245obj-i386-y += pc_piix.o
246obj-i386-y += pc_sysfw.o
247obj-i386-$(CONFIG_KVM) += kvm/clock.o kvm/apic.o kvm/i8259.o kvm/ioapic.o
248obj-i386-$(CONFIG_SPICE) += qxl.o qxl-logger.o qxl-render.o
249
250# shared objects
251obj-ppc-y = ppc.o ppc_booke.o
252# PREP target
253obj-ppc-y += mc146818rtc.o
254obj-ppc-y += ppc_prep.o
255# OldWorld PowerMac
256obj-ppc-y += ppc_oldworld.o
257# NewWorld PowerMac
258obj-ppc-y += ppc_newworld.o
259# IBM pSeries (sPAPR)
260obj-ppc-$(CONFIG_PSERIES) += spapr.o spapr_hcall.o spapr_rtas.o spapr_vio.o
261obj-ppc-$(CONFIG_PSERIES) += xics.o spapr_vty.o spapr_llan.o spapr_vscsi.o
262obj-ppc-$(CONFIG_PSERIES) += spapr_pci.o device-hotplug.o pci-hotplug.o
263# PowerPC 4xx boards
264obj-ppc-y += ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
265obj-ppc-y += ppc440_bamboo.o
266# PowerPC E500 boards
267obj-ppc-y += ppce500_mpc8544ds.o mpc8544_guts.o ppce500_spin.o
268# PowerPC 440 Xilinx ML507 reference board.
269obj-ppc-y += virtex_ml507.o
270obj-ppc-$(CONFIG_KVM) += kvm_ppc.o
271obj-ppc-$(CONFIG_FDT) += device_tree.o
272# PowerPC OpenPIC
273obj-ppc-y += openpic.o
274
275# Xilinx PPC peripherals
276obj-ppc-y += xilinx_intc.o
277obj-ppc-y += xilinx_timer.o
278obj-ppc-y += xilinx_uartlite.o
279obj-ppc-y += xilinx_ethlite.o
280
281# LM32 boards
282obj-lm32-y += lm32_boards.o
283obj-lm32-y += milkymist.o
284
285# LM32 peripherals
286obj-lm32-y += lm32_pic.o
287obj-lm32-y += lm32_juart.o
288obj-lm32-y += lm32_timer.o
289obj-lm32-y += lm32_uart.o
290obj-lm32-y += lm32_sys.o
291obj-lm32-y += milkymist-ac97.o
292obj-lm32-y += milkymist-hpdmc.o
293obj-lm32-y += milkymist-memcard.o
294obj-lm32-y += milkymist-minimac2.o
295obj-lm32-y += milkymist-pfpu.o
296obj-lm32-y += milkymist-softusb.o
297obj-lm32-y += milkymist-sysctl.o
298obj-lm32-$(CONFIG_OPENGL) += milkymist-tmu2.o
299obj-lm32-y += milkymist-uart.o
300obj-lm32-y += milkymist-vgafb.o
301obj-lm32-y += framebuffer.o
302
303obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o
304obj-mips-y += mips_addr.o mips_timer.o mips_int.o
305obj-mips-y += gt64xxx.o mc146818rtc.o
306obj-mips-$(CONFIG_FULONG) += bonito.o vt82c686.o mips_fulong2e.o
307
308obj-microblaze-y = petalogix_s3adsp1800_mmu.o
309obj-microblaze-y += petalogix_ml605_mmu.o
310
311obj-microblaze-y += microblaze_pic_cpu.o
312obj-microblaze-y += xilinx_intc.o
313obj-microblaze-y += xilinx_timer.o
314obj-microblaze-y += xilinx_uartlite.o
315obj-microblaze-y += xilinx_ethlite.o
316obj-microblaze-y += xilinx_axidma.o
317obj-microblaze-y += xilinx_axienet.o
318
319obj-microblaze-$(CONFIG_FDT) += device_tree.o
320
321# Boards
322obj-cris-y = cris_pic_cpu.o
323obj-cris-y += cris-boot.o
324obj-cris-y += axis_dev88.o
325
326# IO blocks
327obj-cris-y += etraxfs_dma.o
328obj-cris-y += etraxfs_pic.o
329obj-cris-y += etraxfs_eth.o
330obj-cris-y += etraxfs_timer.o
331obj-cris-y += etraxfs_ser.o
332
333ifeq ($(TARGET_ARCH), sparc64)145ifeq ($(TARGET_ARCH), sparc64)
334obj-sparc-y = sun4u.o apb_pci.o146obj-y += hw/sparc64/
335obj-sparc-y += mc146818rtc.o
336else147else
337obj-sparc-y = sun4m.o lance.o tcx.o sun4m_iommu.o slavio_intctl.o148obj-y += hw/$(TARGET_BASE_ARCH)/
338obj-sparc-y += slavio_timer.o slavio_misc.o sparc32_dma.o
339obj-sparc-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o leon3.o
340
341# GRLIB
342obj-sparc-y += grlib_gptimer.o grlib_irqmp.o grlib_apbuart.o
343endif149endif
344150
345obj-arm-y = integratorcp.o versatilepb.o arm_pic.o arm_timer.o
346obj-arm-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o
347obj-arm-y += versatile_pci.o
348obj-arm-y += realview_gic.o realview.o arm_sysctl.o arm11mpcore.o a9mpcore.o
349obj-arm-y += exynos4210_gic.o exynos4210_combiner.o exynos4210.o
350obj-arm-y += exynos4_boards.o exynos4210_uart.o exynos4210_pwm.o
351obj-arm-y += exynos4210_pmu.o exynos4210_mct.o exynos4210_fimd.o
352obj-arm-y += arm_l2x0.o
353obj-arm-y += arm_mptimer.o a15mpcore.o
354obj-arm-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o
355obj-arm-y += highbank.o
356obj-arm-y += pl061.o
357obj-arm-y += xgmac.o
358obj-arm-y += arm-semi.o
359obj-arm-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o
360obj-arm-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o
361obj-arm-y += gumstix.o
362obj-arm-y += zaurus.o ide/microdrive.o spitz.o tosa.o tc6393xb.o
363obj-arm-y += omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o \
364 omap_gpio.o omap_intc.o omap_uart.o
365obj-arm-y += omap2.o omap_dss.o soc_dma.o omap_gptimer.o omap_synctimer.o \
366 omap_gpmc.o omap_sdrc.o omap_spi.o omap_tap.o omap_l4.o
367obj-arm-y += omap3.o omap_usb.o omap3_boot.o omap3_mmc.o dsi.o
368obj-arm-y += twl4030.o beagle.o overo.o
369obj-arm-y += omap_sx1.o palm.o tsc210x.o
370obj-arm-y += nseries.o blizzard.o onenand.o cbus.o tusb6010.o usb-musb.o
371obj-arm-y += mst_fpga.o mainstone.o
372obj-arm-y += z2.o
373obj-arm-y += musicpal.o bitbang_i2c.o marvell_88w8618_audio.o
374obj-arm-y += framebuffer.o
375obj-arm-y += vexpress.o
376obj-arm-y += strongarm.o
377obj-arm-y += collie.o
378obj-arm-y += pl041.o lm4549.o
379obj-arm-$(CONFIG_FDT) += device_tree.o
380
381obj-sh4-y = shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
382obj-sh4-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o
383obj-sh4-y += ide/mmio.o
384
385obj-m68k-y = an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
386obj-m68k-y += m68k-semi.o dummy_m68k.o
387
388obj-s390x-y = s390-virtio-bus.o s390-virtio.o
389
390obj-alpha-y = mc146818rtc.o
391obj-alpha-y += alpha_pci.o alpha_dp264.o alpha_typhoon.o
392
393obj-xtensa-y += xtensa_pic.o
394obj-xtensa-y += xtensa_sim.o
395obj-xtensa-y += xtensa_lx60.o
396obj-xtensa-y += xtensa-semi.o
397obj-xtensa-y += core-dc232b.o
398obj-xtensa-y += core-fsf.o
399
400main.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)151main.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
401152
402monitor.o: hmp-commands.h qmp-commands-old.h153GENERATED_HEADERS += hmp-commands.h qmp-commands-old.h
403
404$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
405
406obj-y += $(addprefix ../, $(common-obj-y))
407obj-y += $(addprefix ../libdis/, $(libdis-y))
408obj-y += $(libobj-y)
409obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y))
410obj-y += $(addprefix ../, $(trace-obj-y))
411154
412endif # CONFIG_SOFTMMU155endif # CONFIG_SOFTMMU
413156
414ifndef CONFIG_LINUX_USER157nested-vars += obj-y
415ifndef CONFIG_BSD_USER158
416# libcacard needs qemu-thread support, and besides is only needed by devices159# This resolves all nested paths, so it must come last
417# so not requires with linux-user / bsd-user targets160include $(SRC_PATH)/Makefile.objs
418obj-$(CONFIG_SMARTCARD_NSS) += $(addprefix ../libcacard/, $(libcacard-y))161
419endif # CONFIG_BSD_USER162all-obj-y = $(obj-y)
420endif # CONFIG_LINUX_USER163all-obj-y += $(addprefix ../, $(universal-obj-y))
421164
422obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o165ifdef CONFIG_SOFTMMU
166all-obj-y += $(addprefix ../, $(common-obj-y))
167all-obj-y += $(addprefix ../libdis/, $(libdis-y))
168all-obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y))
169all-obj-y += $(addprefix ../, $(trace-obj-y))
170else
171all-obj-y += $(addprefix ../libuser/, $(user-obj-y))
172all-obj-y += $(addprefix ../libdis-user/, $(libdis-y))
173endif #CONFIG_LINUX_USER
423174
424ifdef QEMU_PROGW175ifdef QEMU_PROGW
425# The linker builds a windows executable. Make also a console executable.176# The linker builds a windows executable. Make also a console executable.
426$(QEMU_PROGW): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)177$(QEMU_PROGW): $(all-obj-y)
427 $(call LINK,$^)178 $(call LINK,$^)
428$(QEMU_PROG): $(QEMU_PROGW)179$(QEMU_PROG): $(QEMU_PROGW)
429 $(call quiet-command,$(OBJCOPY) --subsystem console $(QEMU_PROGW) $(QEMU_PROG)," GEN $(TARGET_DIR)$(QEMU_PROG)")180 $(call quiet-command,$(OBJCOPY) --subsystem console $(QEMU_PROGW) $(QEMU_PROG)," GEN $(TARGET_DIR)$(QEMU_PROG)")
430else181else
431$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)182$(QEMU_PROG): $(all-obj-y)
432 $(call LINK,$^)183 $(call LINK,$^)
433endif184endif
434185
@@ -442,8 +193,8 @@
442 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@")193 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@")
443194
444clean:195clean:
445 rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o196 rm -f *.a *~ $(PROGS)
446 rm -f *.d */*.d tcg/*.o ide/*.o 9pfs/*.o kvm/*.o197 rm -f $(shell find . -name '*.[od]')
447 rm -f hmp-commands.h qmp-commands-old.h gdbstub-xml.c198 rm -f hmp-commands.h qmp-commands-old.h gdbstub-xml.c
448ifdef CONFIG_TRACE_SYSTEMTAP199ifdef CONFIG_TRACE_SYSTEMTAP
449 rm -f *.stp200 rm -f *.stp
@@ -457,9 +208,9 @@
457endif208endif
458endif209endif
459ifdef CONFIG_TRACE_SYSTEMTAP210ifdef CONFIG_TRACE_SYSTEMTAP
460 $(INSTALL_DIR) "$(DESTDIR)$(datadir)/../systemtap/tapset"211 $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset"
461 $(INSTALL_DATA) $(QEMU_PROG).stp "$(DESTDIR)$(datadir)/../systemtap/tapset"212 $(INSTALL_DATA) $(QEMU_PROG).stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset"
462endif213endif
463214
464# Include automatically generated dependency files215GENERATED_HEADERS += config-target.h
465-include $(wildcard *.d */*.d)216Makefile: $(GENERATED_HEADERS)
466217
=== modified file 'Makefile.user'
--- Makefile.user 2011-12-06 09:35:22 +0000
+++ Makefile.user 2012-09-17 14:09:22 +0000
@@ -9,6 +9,8 @@
9$(call set-vpath, $(SRC_PATH))9$(call set-vpath, $(SRC_PATH))
1010
11QEMU_CFLAGS+=-I..11QEMU_CFLAGS+=-I..
12QEMU_CFLAGS += -I$(SRC_PATH)/include
13QEMU_CFLAGS += -DCONFIG_USER_ONLY
1214
13include $(SRC_PATH)/Makefile.objs15include $(SRC_PATH)/Makefile.objs
1416
@@ -20,6 +22,3 @@
20 for d in . trace; do \22 for d in . trace; do \
21 rm -f $$d/*.o $$d/*.d $$d/*.a $$d/*~; \23 rm -f $$d/*.o $$d/*.d $$d/*.a $$d/*~; \
22 done24 done
23
24# Include automatically generated dependency files
25-include $(wildcard *.d */*.d)
2625
=== modified file 'QMP/qmp-events.txt'
--- QMP/qmp-events.txt 2012-03-15 16:18:18 +0000
+++ QMP/qmp-events.txt 2012-09-17 14:09:22 +0000
@@ -1,6 +1,23 @@
1 QEMU Monitor Protocol Events1 QEMU Monitor Protocol Events
2 ============================2 ============================
33
4BALLOON_CHANGE
5--------------
6
7Emitted when the guest changes the actual BALLOON level. This
8value is equivalent to the 'actual' field return by the
9'query-balloon' command
10
11Data:
12
13- "actual": actual level of the guest memory balloon in bytes (json-number)
14
15Example:
16
17{ "event": "BALLOON_CHANGE",
18 "data": { "actual": 944766976 },
19 "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
20
4BLOCK_IO_ERROR21BLOCK_IO_ERROR
5--------------22--------------
623
@@ -26,6 +43,57 @@
26Note: If action is "stop", a STOP event will eventually follow the43Note: If action is "stop", a STOP event will eventually follow the
27BLOCK_IO_ERROR event.44BLOCK_IO_ERROR event.
2845
46BLOCK_JOB_CANCELLED
47-------------------
48
49Emitted when a block job has been cancelled.
50
51Data:
52
53- "type": Job type ("stream" for image streaming, json-string)
54- "device": Device name (json-string)
55- "len": Maximum progress value (json-int)
56- "offset": Current progress value (json-int)
57 On success this is equal to len.
58 On failure this is less than len.
59- "speed": Rate limit, bytes per second (json-int)
60
61Example:
62
63{ "event": "BLOCK_JOB_CANCELLED",
64 "data": { "type": "stream", "device": "virtio-disk0",
65 "len": 10737418240, "offset": 134217728,
66 "speed": 0 },
67 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
68
69BLOCK_JOB_COMPLETED
70-------------------
71
72Emitted when a block job has completed.
73
74Data:
75
76- "type": Job type ("stream" for image streaming, json-string)
77- "device": Device name (json-string)
78- "len": Maximum progress value (json-int)
79- "offset": Current progress value (json-int)
80 On success this is equal to len.
81 On failure this is less than len.
82- "speed": Rate limit, bytes per second (json-int)
83- "error": Error message (json-string, optional)
84 Only present on failure. This field contains a human-readable
85 error message. There are no semantics other than that streaming
86 has failed and clients should not try to interpret the error
87 string.
88
89Example:
90
91{ "event": "BLOCK_JOB_COMPLETED",
92 "data": { "type": "stream", "device": "virtio-disk0",
93 "len": 10737418240, "offset": 10737418240,
94 "speed": 0 },
95 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
96
29DEVICE_TRAY_MOVED97DEVICE_TRAY_MOVED
30-----------------98-----------------
3199
@@ -98,108 +166,6 @@
98Note: If the command-line option "-no-shutdown" has been specified, a STOP166Note: If the command-line option "-no-shutdown" has been specified, a STOP
99event will eventually follow the SHUTDOWN event.167event will eventually follow the SHUTDOWN event.
100168
101STOP
102----
103
104Emitted when the Virtual Machine is stopped.
105
106Data: None.
107
108Example:
109
110{ "event": "STOP",
111 "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
112
113VNC_CONNECTED
114-------------
115
116Emitted when a VNC client establishes a connection.
117
118Data:
119
120- "server": Server information (json-object)
121 - "host": IP address (json-string)
122 - "service": port number (json-string)
123 - "family": address family (json-string, "ipv4" or "ipv6")
124 - "auth": authentication method (json-string, optional)
125- "client": Client information (json-object)
126 - "host": IP address (json-string)
127 - "service": port number (json-string)
128 - "family": address family (json-string, "ipv4" or "ipv6")
129
130Example:
131
132{ "event": "VNC_CONNECTED",
133 "data": {
134 "server": { "auth": "sasl", "family": "ipv4",
135 "service": "5901", "host": "0.0.0.0" },
136 "client": { "family": "ipv4", "service": "58425",
137 "host": "127.0.0.1" } },
138 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
139
140
141Note: This event is emitted before any authentication takes place, thus
142the authentication ID is not provided.
143
144VNC_DISCONNECTED
145----------------
146
147Emitted when the connection is closed.
148
149Data:
150
151- "server": Server information (json-object)
152 - "host": IP address (json-string)
153 - "service": port number (json-string)
154 - "family": address family (json-string, "ipv4" or "ipv6")
155 - "auth": authentication method (json-string, optional)
156- "client": Client information (json-object)
157 - "host": IP address (json-string)
158 - "service": port number (json-string)
159 - "family": address family (json-string, "ipv4" or "ipv6")
160 - "x509_dname": TLS dname (json-string, optional)
161 - "sasl_username": SASL username (json-string, optional)
162
163Example:
164
165{ "event": "VNC_DISCONNECTED",
166 "data": {
167 "server": { "auth": "sasl", "family": "ipv4",
168 "service": "5901", "host": "0.0.0.0" },
169 "client": { "family": "ipv4", "service": "58425",
170 "host": "127.0.0.1", "sasl_username": "luiz" } },
171 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
172
173VNC_INITIALIZED
174---------------
175
176Emitted after authentication takes place (if any) and the VNC session is
177made active.
178
179Data:
180
181- "server": Server information (json-object)
182 - "host": IP address (json-string)
183 - "service": port number (json-string)
184 - "family": address family (json-string, "ipv4" or "ipv6")
185 - "auth": authentication method (json-string, optional)
186- "client": Client information (json-object)
187 - "host": IP address (json-string)
188 - "service": port number (json-string)
189 - "family": address family (json-string, "ipv4" or "ipv6")
190 - "x509_dname": TLS dname (json-string, optional)
191 - "sasl_username": SASL username (json-string, optional)
192
193Example:
194
195{ "event": "VNC_INITIALIZED",
196 "data": {
197 "server": { "auth": "sasl", "family": "ipv4",
198 "service": "5901", "host": "0.0.0.0"},
199 "client": { "family": "ipv4", "service": "46089",
200 "host": "127.0.0.1", "sasl_username": "luiz" } },
201 "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
202
203SPICE_CONNECTED, SPICE_DISCONNECTED169SPICE_CONNECTED, SPICE_DISCONNECTED
204-----------------------------------170-----------------------------------
205171
@@ -225,7 +191,6 @@
225 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}191 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
226}}192}}
227193
228
229SPICE_INITIALIZED194SPICE_INITIALIZED
230-----------------195-----------------
231196
@@ -263,6 +228,145 @@
263 "channel-id": 0, "tls": true}228 "channel-id": 0, "tls": true}
264}}229}}
265230
231STOP
232----
233
234Emitted when the Virtual Machine is stopped.
235
236Data: None.
237
238Example:
239
240{ "event": "STOP",
241 "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
242
243SUSPEND
244-------
245
246Emitted when guest enters S3 state.
247
248Data: None.
249
250Example:
251
252{ "event": "SUSPEND",
253 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
254
255SUSPEND_DISK
256------------
257
258Emitted when the guest makes a request to enter S4 state.
259
260Data: None.
261
262Example:
263
264{ "event": "SUSPEND_DISK",
265 "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
266
267Note: QEMU shuts down when entering S4 state.
268
269VNC_CONNECTED
270-------------
271
272Emitted when a VNC client establishes a connection.
273
274Data:
275
276- "server": Server information (json-object)
277 - "host": IP address (json-string)
278 - "service": port number (json-string)
279 - "family": address family (json-string, "ipv4" or "ipv6")
280 - "auth": authentication method (json-string, optional)
281- "client": Client information (json-object)
282 - "host": IP address (json-string)
283 - "service": port number (json-string)
284 - "family": address family (json-string, "ipv4" or "ipv6")
285
286Example:
287
288{ "event": "VNC_CONNECTED",
289 "data": {
290 "server": { "auth": "sasl", "family": "ipv4",
291 "service": "5901", "host": "0.0.0.0" },
292 "client": { "family": "ipv4", "service": "58425",
293 "host": "127.0.0.1" } },
294 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
295
296
297Note: This event is emitted before any authentication takes place, thus
298the authentication ID is not provided.
299
300VNC_DISCONNECTED
301----------------
302
303Emitted when the connection is closed.
304
305Data:
306
307- "server": Server information (json-object)
308 - "host": IP address (json-string)
309 - "service": port number (json-string)
310 - "family": address family (json-string, "ipv4" or "ipv6")
311 - "auth": authentication method (json-string, optional)
312- "client": Client information (json-object)
313 - "host": IP address (json-string)
314 - "service": port number (json-string)
315 - "family": address family (json-string, "ipv4" or "ipv6")
316 - "x509_dname": TLS dname (json-string, optional)
317 - "sasl_username": SASL username (json-string, optional)
318
319Example:
320
321{ "event": "VNC_DISCONNECTED",
322 "data": {
323 "server": { "auth": "sasl", "family": "ipv4",
324 "service": "5901", "host": "0.0.0.0" },
325 "client": { "family": "ipv4", "service": "58425",
326 "host": "127.0.0.1", "sasl_username": "luiz" } },
327 "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
328
329VNC_INITIALIZED
330---------------
331
332Emitted after authentication takes place (if any) and the VNC session is
333made active.
334
335Data:
336
337- "server": Server information (json-object)
338 - "host": IP address (json-string)
339 - "service": port number (json-string)
340 - "family": address family (json-string, "ipv4" or "ipv6")
341 - "auth": authentication method (json-string, optional)
342- "client": Client information (json-object)
343 - "host": IP address (json-string)
344 - "service": port number (json-string)
345 - "family": address family (json-string, "ipv4" or "ipv6")
346 - "x509_dname": TLS dname (json-string, optional)
347 - "sasl_username": SASL username (json-string, optional)
348
349Example:
350
351{ "event": "VNC_INITIALIZED",
352 "data": {
353 "server": { "auth": "sasl", "family": "ipv4",
354 "service": "5901", "host": "0.0.0.0"},
355 "client": { "family": "ipv4", "service": "46089",
356 "host": "127.0.0.1", "sasl_username": "luiz" } },
357 "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
358
359WAKEUP
360------
361
362Emitted when the guest has woken up from S3 and is running.
363
364Data: None.
365
366Example:
367
368{ "event": "WATCHDOG",
369 "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
266370
267WATCHDOG371WATCHDOG
268--------372--------
@@ -282,56 +386,3 @@
282386
283Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is387Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
284followed respectively by the RESET, SHUTDOWN, or STOP events.388followed respectively by the RESET, SHUTDOWN, or STOP events.
285
286
287BLOCK_JOB_COMPLETED
288-------------------
289
290Emitted when a block job has completed.
291
292Data:
293
294- "type": Job type ("stream" for image streaming, json-string)
295- "device": Device name (json-string)
296- "len": Maximum progress value (json-int)
297- "offset": Current progress value (json-int)
298 On success this is equal to len.
299 On failure this is less than len.
300- "speed": Rate limit, bytes per second (json-int)
301- "error": Error message (json-string, optional)
302 Only present on failure. This field contains a human-readable
303 error message. There are no semantics other than that streaming
304 has failed and clients should not try to interpret the error
305 string.
306
307Example:
308
309{ "event": "BLOCK_JOB_COMPLETED",
310 "data": { "type": "stream", "device": "virtio-disk0",
311 "len": 10737418240, "offset": 10737418240,
312 "speed": 0 },
313 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
314
315
316BLOCK_JOB_CANCELLED
317-------------------
318
319Emitted when a block job has been cancelled.
320
321Data:
322
323- "type": Job type ("stream" for image streaming, json-string)
324- "device": Device name (json-string)
325- "len": Maximum progress value (json-int)
326- "offset": Current progress value (json-int)
327 On success this is equal to len.
328 On failure this is less than len.
329- "speed": Rate limit, bytes per second (json-int)
330
331Example:
332
333{ "event": "BLOCK_JOB_CANCELLED",
334 "data": { "type": "stream", "device": "virtio-disk0",
335 "len": 10737418240, "offset": 134217728,
336 "speed": 0 },
337 "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
338389
=== modified file 'QMP/qmp-spec.txt'
--- QMP/qmp-spec.txt 2011-02-02 19:58:26 +0000
+++ QMP/qmp-spec.txt 2012-09-17 14:09:22 +0000
@@ -106,14 +106,11 @@
106106
107The format is:107The format is:
108108
109{ "error": { "class": json-string, "data": json-object, "desc": json-string },109{ "error": { "class": json-string, "desc": json-string }, "id": json-value }
110 "id": json-value }
111110
112 Where,111 Where,
113112
114- The "class" member contains the error class name (eg. "ServiceUnavailable")113- The "class" member contains the error class name (eg. "GenericError")
115- The "data" member contains specific error data and is defined in a
116 per-command basis, it will be an empty json-object if the error has no data
117- The "desc" member is a human-readable error message. Clients should114- The "desc" member is a human-readable error message. Clients should
118 not attempt to parse this message.115 not attempt to parse this message.
119- The "id" member contains the transaction identification associated with116- The "id" member contains the transaction identification associated with
@@ -173,8 +170,7 @@
173------------------170------------------
174171
175C: { "execute": }172C: { "execute": }
176S: {"error": {"class": "JSONParsing", "desc": "Invalid JSON syntax", "data":173S: {"error": {"class": "GenericError", "desc": "Invalid JSON syntax" } }
177{}}}
178174
1793.5 Powerdown event1753.5 Powerdown event
180-------------------176-------------------
@@ -209,13 +205,27 @@
209capabilities array (section '2.2 Server Greeting'). Thus, Clients can check205capabilities array (section '2.2 Server Greeting'). Thus, Clients can check
210that array and enable the capabilities they support.206that array and enable the capabilities they support.
211207
212Additionally, Clients must not assume any particular:208The QMP Server performs a type check on the arguments to a command. It
213209generates an error if a value does not have the expected type for its
214- Size of json-objects or length of json-arrays210key, or if it does not understand a key that the Client included. The
211strictness of the Server catches wrong assumptions of Clients about
212the Server's schema. Clients can assume that, when such validation
213errors occur, they will be reported before the command generated any
214side effect.
215
216However, Clients must not assume any particular:
217
218- Length of json-arrays
219- Size of json-objects; in particular, future versions of QEMU may add
220 new keys and Clients should be able to ignore them.
215- Order of json-object members or json-array elements221- Order of json-object members or json-array elements
216- Amount of errors generated by a command, that is, new errors can be added222- Amount of errors generated by a command, that is, new errors can be added
217 to any existing command in newer versions of the Server223 to any existing command in newer versions of the Server
218224
225Of course, the Server does guarantee to send valid JSON. But apart from
226this, a Client should be "conservative in what they send, and liberal in
227what they accept".
228
2196. Downstream extension of QMP2296. Downstream extension of QMP
220------------------------------230------------------------------
221231
222232
=== added file 'QMP/qom-fuse'
--- QMP/qom-fuse 1970-01-01 00:00:00 +0000
+++ QMP/qom-fuse 2012-09-17 14:09:22 +0000
@@ -0,0 +1,138 @@
1#!/usr/bin/python
2##
3# QEMU Object Model test tools
4#
5# Copyright IBM, Corp. 2012
6#
7# Authors:
8# Anthony Liguori <aliguori@us.ibm.com>
9#
10# This work is licensed under the terms of the GNU GPL, version 2 or later. See
11# the COPYING file in the top-level directory.
12##
13
14import fuse, stat
15from fuse import Fuse
16import os, posix
17from errno import *
18from qmp import QEMUMonitorProtocol
19
20fuse.fuse_python_api = (0, 2)
21
22class QOMFS(Fuse):
23 def __init__(self, qmp, *args, **kwds):
24 Fuse.__init__(self, *args, **kwds)
25 self.qmp = qmp
26 self.qmp.connect()
27 self.ino_map = {}
28 self.ino_count = 1
29
30 def get_ino(self, path):
31 if self.ino_map.has_key(path):
32 return self.ino_map[path]
33 self.ino_map[path] = self.ino_count
34 self.ino_count += 1
35 return self.ino_map[path]
36
37 def is_object(self, path):
38 try:
39 items = self.qmp.command('qom-list', path=path)
40 return True
41 except:
42 return False
43
44 def is_property(self, path):
45 try:
46 path, prop = path.rsplit('/', 1)
47 for item in self.qmp.command('qom-list', path=path):
48 if item['name'] == prop:
49 return True
50 return False
51 except:
52 return False
53
54 def is_link(self, path):
55 try:
56 path, prop = path.rsplit('/', 1)
57 for item in self.qmp.command('qom-list', path=path):
58 if item['name'] == prop:
59 if item['type'].startswith('link<'):
60 return True
61 return False
62 return False
63 except:
64 return False
65
66 def read(self, path, length, offset):
67 if not self.is_property(path):
68 return -ENOENT
69
70 path, prop = path.rsplit('/', 1)
71 try:
72 data = str(self.qmp.command('qom-get', path=path, property=prop))
73 data += '\n' # make values shell friendly
74 except:
75 return -EPERM
76
77 if offset > len(data):
78 return ''
79
80 return str(data[offset:][:length])
81
82 def readlink(self, path):
83 if not self.is_link(path):
84 return False
85 path, prop = path.rsplit('/', 1)
86 prefix = '/'.join(['..'] * (len(path.split('/')) - 1))
87 return prefix + str(self.qmp.command('qom-get', path=path,
88 property=prop))
89
90 def getattr(self, path):
91 if self.is_link(path):
92 value = posix.stat_result((0755 | stat.S_IFLNK,
93 self.get_ino(path),
94 0,
95 2,
96 1000,
97 1000,
98 4096,
99 0,
100 0,
101 0))
102 elif self.is_object(path):
103 value = posix.stat_result((0755 | stat.S_IFDIR,
104 self.get_ino(path),
105 0,
106 2,
107 1000,
108 1000,
109 4096,
110 0,
111 0,
112 0))
113 elif self.is_property(path):
114 value = posix.stat_result((0644 | stat.S_IFREG,
115 self.get_ino(path),
116 0,
117 1,
118 1000,
119 1000,
120 4096,
121 0,
122 0,
123 0))
124 else:
125 value = -ENOENT
126 return value
127
128 def readdir(self, path, offset):
129 yield fuse.Direntry('.')
130 yield fuse.Direntry('..')
131 for item in self.qmp.command('qom-list', path=path):
132 yield fuse.Direntry(str(item['name']))
133
134if __name__ == '__main__':
135 import sys, os
136
137 fs = QOMFS(QEMUMonitorProtocol(os.environ['QMP_SOCKET']))
138 fs.main(sys.argv)
0139
=== modified file 'VERSION'
--- VERSION 2012-02-02 14:25:28 +0000
+++ VERSION 2012-09-17 14:09:22 +0000
@@ -1,1 +1,1 @@
11.0.5011.2.0
22
=== modified file 'VERSION.LINARO'
--- VERSION.LINARO 2012-03-15 16:18:18 +0000
+++ VERSION.LINARO 2012-09-17 14:09:22 +0000
@@ -1,1 +1,1 @@
1qemu-linaro 2012.031qemu-linaro 2012.09
22
=== modified file 'aio.c'
--- aio.c 2012-02-20 17:32:06 +0000
+++ aio.c 2012-09-17 14:09:22 +0000
@@ -35,7 +35,6 @@
35 IOHandler *io_read;35 IOHandler *io_read;
36 IOHandler *io_write;36 IOHandler *io_write;
37 AioFlushHandler *io_flush;37 AioFlushHandler *io_flush;
38 AioProcessQueue *io_process_queue;
39 int deleted;38 int deleted;
40 void *opaque;39 void *opaque;
41 QLIST_ENTRY(AioHandler) node;40 QLIST_ENTRY(AioHandler) node;
@@ -58,7 +57,6 @@
58 IOHandler *io_read,57 IOHandler *io_read,
59 IOHandler *io_write,58 IOHandler *io_write,
60 AioFlushHandler *io_flush,59 AioFlushHandler *io_flush,
61 AioProcessQueue *io_process_queue,
62 void *opaque)60 void *opaque)
63{61{
64 AioHandler *node;62 AioHandler *node;
@@ -91,7 +89,6 @@
91 node->io_read = io_read;89 node->io_read = io_read;
92 node->io_write = io_write;90 node->io_write = io_write;
93 node->io_flush = io_flush;91 node->io_flush = io_flush;
94 node->io_process_queue = io_process_queue;
95 node->opaque = opaque;92 node->opaque = opaque;
96 }93 }
9794
@@ -102,131 +99,96 @@
10299
103void qemu_aio_flush(void)100void qemu_aio_flush(void)
104{101{
105 AioHandler *node;102 while (qemu_aio_wait());
106 int ret;103}
107104
108 do {105bool qemu_aio_wait(void)
109 ret = 0;106{
110107 AioHandler *node;
111 /*108 fd_set rdfds, wrfds;
112 * If there are pending emulated aio start them now so flush109 int max_fd = -1;
113 * will be able to return 1.110 int ret;
114 */111 bool busy;
115 qemu_aio_wait();
116
117 QLIST_FOREACH(node, &aio_handlers, node) {
118 if (node->io_flush) {
119 ret |= node->io_flush(node->opaque);
120 }
121 }
122 } while (qemu_bh_poll() || ret > 0);
123}
124
125int qemu_aio_process_queue(void)
126{
127 AioHandler *node;
128 int ret = 0;
129
130 walking_handlers = 1;
131
132 QLIST_FOREACH(node, &aio_handlers, node) {
133 if (node->io_process_queue) {
134 if (node->io_process_queue(node->opaque)) {
135 ret = 1;
136 }
137 }
138 }
139
140 walking_handlers = 0;
141
142 return ret;
143}
144
145void qemu_aio_wait(void)
146{
147 int ret;
148
149 if (qemu_bh_poll())
150 return;
151112
152 /*113 /*
153 * If there are callbacks left that have been queued, we need to call then.114 * If there are callbacks left that have been queued, we need to call then.
154 * Return afterwards to avoid waiting needlessly in select().115 * Do not call select in this case, because it is possible that the caller
116 * does not need a complete flush (as is the case for qemu_aio_wait loops).
155 */117 */
156 if (qemu_aio_process_queue())118 if (qemu_bh_poll()) {
157 return;119 return true;
158120 }
159 do {121
160 AioHandler *node;122 walking_handlers = 1;
161 fd_set rdfds, wrfds;123
162 int max_fd = -1;124 FD_ZERO(&rdfds);
163125 FD_ZERO(&wrfds);
126
127 /* fill fd sets */
128 busy = false;
129 QLIST_FOREACH(node, &aio_handlers, node) {
130 /* If there aren't pending AIO operations, don't invoke callbacks.
131 * Otherwise, if there are no AIO requests, qemu_aio_wait() would
132 * wait indefinitely.
133 */
134 if (node->io_flush) {
135 if (node->io_flush(node->opaque) == 0) {
136 continue;
137 }
138 busy = true;
139 }
140 if (!node->deleted && node->io_read) {
141 FD_SET(node->fd, &rdfds);
142 max_fd = MAX(max_fd, node->fd + 1);
143 }
144 if (!node->deleted && node->io_write) {
145 FD_SET(node->fd, &wrfds);
146 max_fd = MAX(max_fd, node->fd + 1);
147 }
148 }
149
150 walking_handlers = 0;
151
152 /* No AIO operations? Get us out of here */
153 if (!busy) {
154 return false;
155 }
156
157 /* wait until next event */
158 ret = select(max_fd, &rdfds, &wrfds, NULL, NULL);
159
160 /* if we have any readable fds, dispatch event */
161 if (ret > 0) {
164 walking_handlers = 1;162 walking_handlers = 1;
165163
166 FD_ZERO(&rdfds);164 /* we have to walk very carefully in case
167 FD_ZERO(&wrfds);165 * qemu_aio_set_fd_handler is called while we're walking */
168166 node = QLIST_FIRST(&aio_handlers);
169 /* fill fd sets */167 while (node) {
170 QLIST_FOREACH(node, &aio_handlers, node) {168 AioHandler *tmp;
171 /* If there aren't pending AIO operations, don't invoke callbacks.169
172 * Otherwise, if there are no AIO requests, qemu_aio_wait() would170 if (!node->deleted &&
173 * wait indefinitely.171 FD_ISSET(node->fd, &rdfds) &&
174 */172 node->io_read) {
175 if (node->io_flush && node->io_flush(node->opaque) == 0)173 node->io_read(node->opaque);
176 continue;174 }
177175 if (!node->deleted &&
178 if (!node->deleted && node->io_read) {176 FD_ISSET(node->fd, &wrfds) &&
179 FD_SET(node->fd, &rdfds);177 node->io_write) {
180 max_fd = MAX(max_fd, node->fd + 1);178 node->io_write(node->opaque);
181 }179 }
182 if (!node->deleted && node->io_write) {180
183 FD_SET(node->fd, &wrfds);181 tmp = node;
184 max_fd = MAX(max_fd, node->fd + 1);182 node = QLIST_NEXT(node, node);
183
184 if (tmp->deleted) {
185 QLIST_REMOVE(tmp, node);
186 g_free(tmp);
185 }187 }
186 }188 }
187189
188 walking_handlers = 0;190 walking_handlers = 0;
189191 }
190 /* No AIO operations? Get us out of here */192
191 if (max_fd == -1)193 return true;
192 break;
193
194 /* wait until next event */
195 ret = select(max_fd, &rdfds, &wrfds, NULL, NULL);
196 if (ret == -1 && errno == EINTR)
197 continue;
198
199 /* if we have any readable fds, dispatch event */
200 if (ret > 0) {
201 walking_handlers = 1;
202
203 /* we have to walk very carefully in case
204 * qemu_aio_set_fd_handler is called while we're walking */
205 node = QLIST_FIRST(&aio_handlers);
206 while (node) {
207 AioHandler *tmp;
208
209 if (!node->deleted &&
210 FD_ISSET(node->fd, &rdfds) &&
211 node->io_read) {
212 node->io_read(node->opaque);
213 }
214 if (!node->deleted &&
215 FD_ISSET(node->fd, &wrfds) &&
216 node->io_write) {
217 node->io_write(node->opaque);
218 }
219
220 tmp = node;
221 node = QLIST_NEXT(node, node);
222
223 if (tmp->deleted) {
224 QLIST_REMOVE(tmp, node);
225 g_free(tmp);
226 }
227 }
228
229 walking_handlers = 0;
230 }
231 } while (ret == 0);
232}194}
233195
=== modified file 'arch_init.c'
--- arch_init.c 2012-03-15 16:18:18 +0000
+++ arch_init.c 2012-09-17 14:09:22 +0000
@@ -43,6 +43,16 @@
43#include "hw/smbios.h"43#include "hw/smbios.h"
44#include "exec-memory.h"44#include "exec-memory.h"
45#include "hw/pcspk.h"45#include "hw/pcspk.h"
46#include "qemu/page_cache.h"
47#include "qmp-commands.h"
48
49#ifdef DEBUG_ARCH_INIT
50#define DPRINTF(fmt, ...) \
51 do { fprintf(stdout, "arch_init: " fmt, ## __VA_ARGS__); } while (0)
52#else
53#define DPRINTF(fmt, ...) \
54 do { } while (0)
55#endif
4656
47#ifdef TARGET_SPARC57#ifdef TARGET_SPARC
48int graphic_width = 1024;58int graphic_width = 1024;
@@ -54,7 +64,6 @@
54int graphic_depth = 15;64int graphic_depth = 15;
55#endif65#endif
5666
57const char arch_config_name[] = CONFIG_QEMU_CONFDIR "/target-" TARGET_ARCH ".conf";
5867
59#if defined(TARGET_ALPHA)68#if defined(TARGET_ALPHA)
60#define QEMU_ARCH QEMU_ARCH_ALPHA69#define QEMU_ARCH QEMU_ARCH_ALPHA
@@ -72,6 +81,8 @@
72#define QEMU_ARCH QEMU_ARCH_MICROBLAZE81#define QEMU_ARCH QEMU_ARCH_MICROBLAZE
73#elif defined(TARGET_MIPS)82#elif defined(TARGET_MIPS)
74#define QEMU_ARCH QEMU_ARCH_MIPS83#define QEMU_ARCH QEMU_ARCH_MIPS
84#elif defined(TARGET_OPENRISC)
85#define QEMU_ARCH QEMU_ARCH_OPENRISC
75#elif defined(TARGET_PPC)86#elif defined(TARGET_PPC)
76#define QEMU_ARCH QEMU_ARCH_PPC87#define QEMU_ARCH QEMU_ARCH_PPC
77#elif defined(TARGET_S390X)88#elif defined(TARGET_S390X)
@@ -82,6 +93,8 @@
82#define QEMU_ARCH QEMU_ARCH_SPARC93#define QEMU_ARCH QEMU_ARCH_SPARC
83#elif defined(TARGET_XTENSA)94#elif defined(TARGET_XTENSA)
84#define QEMU_ARCH QEMU_ARCH_XTENSA95#define QEMU_ARCH QEMU_ARCH_XTENSA
96#elif defined(TARGET_UNICORE32)
97#define QEMU_ARCH QEMU_ARCH_UNICORE32
85#endif98#endif
8699
87const uint32_t arch_type = QEMU_ARCH;100const uint32_t arch_type = QEMU_ARCH;
@@ -95,12 +108,17 @@
95#define RAM_SAVE_FLAG_PAGE 0x08108#define RAM_SAVE_FLAG_PAGE 0x08
96#define RAM_SAVE_FLAG_EOS 0x10109#define RAM_SAVE_FLAG_EOS 0x10
97#define RAM_SAVE_FLAG_CONTINUE 0x20110#define RAM_SAVE_FLAG_CONTINUE 0x20
111#define RAM_SAVE_FLAG_XBZRLE 0x40
98112
99#ifdef __ALTIVEC__113#ifdef __ALTIVEC__
100#include <altivec.h>114#include <altivec.h>
101#define VECTYPE vector unsigned char115#define VECTYPE vector unsigned char
102#define SPLAT(p) vec_splat(vec_ld(0, p), 0)116#define SPLAT(p) vec_splat(vec_ld(0, p), 0)
103#define ALL_EQ(v1, v2) vec_all_eq(v1, v2)117#define ALL_EQ(v1, v2) vec_all_eq(v1, v2)
118/* altivec.h may redefine the bool macro as vector type.
119 * Reset it to POSIX semantics. */
120#undef bool
121#define bool _Bool
104#elif defined __SSE2__122#elif defined __SSE2__
105#include <emmintrin.h>123#include <emmintrin.h>
106#define VECTYPE __m128i124#define VECTYPE __m128i
@@ -112,6 +130,37 @@
112#define ALL_EQ(v1, v2) ((v1) == (v2))130#define ALL_EQ(v1, v2) ((v1) == (v2))
113#endif131#endif
114132
133
134static struct defconfig_file {
135 const char *filename;
136 /* Indicates it is an user config file (disabled by -no-user-config) */
137 bool userconfig;
138} default_config_files[] = {
139 { CONFIG_QEMU_DATADIR "/cpus-" TARGET_ARCH ".conf", false },
140 { CONFIG_QEMU_CONFDIR "/qemu.conf", true },
141 { CONFIG_QEMU_CONFDIR "/target-" TARGET_ARCH ".conf", true },
142 { NULL }, /* end of list */
143};
144
145
146int qemu_read_default_config_files(bool userconfig)
147{
148 int ret;
149 struct defconfig_file *f;
150
151 for (f = default_config_files; f->filename; f++) {
152 if (!userconfig && f->userconfig) {
153 continue;
154 }
155 ret = qemu_read_config_file(f->filename);
156 if (ret < 0 && ret != -ENOENT) {
157 return ret;
158 }
159 }
160
161 return 0;
162}
163
115static int is_dup_page(uint8_t *page)164static int is_dup_page(uint8_t *page)
116{165{
117 VECTYPE *p = (VECTYPE *)page;166 VECTYPE *p = (VECTYPE *)page;
@@ -127,15 +176,177 @@
127 return 1;176 return 1;
128}177}
129178
179/* struct contains XBZRLE cache and a static page
180 used by the compression */
181static struct {
182 /* buffer used for XBZRLE encoding */
183 uint8_t *encoded_buf;
184 /* buffer for storing page content */
185 uint8_t *current_buf;
186 /* buffer used for XBZRLE decoding */
187 uint8_t *decoded_buf;
188 /* Cache for XBZRLE */
189 PageCache *cache;
190} XBZRLE = {
191 .encoded_buf = NULL,
192 .current_buf = NULL,
193 .decoded_buf = NULL,
194 .cache = NULL,
195};
196
197
198int64_t xbzrle_cache_resize(int64_t new_size)
199{
200 if (XBZRLE.cache != NULL) {
201 return cache_resize(XBZRLE.cache, new_size / TARGET_PAGE_SIZE) *
202 TARGET_PAGE_SIZE;
203 }
204 return pow2floor(new_size);
205}
206
207/* accounting for migration statistics */
208typedef struct AccountingInfo {
209 uint64_t dup_pages;
210 uint64_t norm_pages;
211 uint64_t iterations;
212 uint64_t xbzrle_bytes;
213 uint64_t xbzrle_pages;
214 uint64_t xbzrle_cache_miss;
215 uint64_t xbzrle_overflows;
216} AccountingInfo;
217
218static AccountingInfo acct_info;
219
220static void acct_clear(void)
221{
222 memset(&acct_info, 0, sizeof(acct_info));
223}
224
225uint64_t dup_mig_bytes_transferred(void)
226{
227 return acct_info.dup_pages * TARGET_PAGE_SIZE;
228}
229
230uint64_t dup_mig_pages_transferred(void)
231{
232 return acct_info.dup_pages;
233}
234
235uint64_t norm_mig_bytes_transferred(void)
236{
237 return acct_info.norm_pages * TARGET_PAGE_SIZE;
238}
239
240uint64_t norm_mig_pages_transferred(void)
241{
242 return acct_info.norm_pages;
243}
244
245uint64_t xbzrle_mig_bytes_transferred(void)
246{
247 return acct_info.xbzrle_bytes;
248}
249
250uint64_t xbzrle_mig_pages_transferred(void)
251{
252 return acct_info.xbzrle_pages;
253}
254
255uint64_t xbzrle_mig_pages_cache_miss(void)
256{
257 return acct_info.xbzrle_cache_miss;
258}
259
260uint64_t xbzrle_mig_pages_overflow(void)
261{
262 return acct_info.xbzrle_overflows;
263}
264
265static void save_block_hdr(QEMUFile *f, RAMBlock *block, ram_addr_t offset,
266 int cont, int flag)
267{
268 qemu_put_be64(f, offset | cont | flag);
269 if (!cont) {
270 qemu_put_byte(f, strlen(block->idstr));
271 qemu_put_buffer(f, (uint8_t *)block->idstr,
272 strlen(block->idstr));
273 }
274
275}
276
277#define ENCODING_FLAG_XBZRLE 0x1
278
279static int save_xbzrle_page(QEMUFile *f, uint8_t *current_data,
280 ram_addr_t current_addr, RAMBlock *block,
281 ram_addr_t offset, int cont, bool last_stage)
282{
283 int encoded_len = 0, bytes_sent = -1;
284 uint8_t *prev_cached_page;
285
286 if (!cache_is_cached(XBZRLE.cache, current_addr)) {
287 if (!last_stage) {
288 cache_insert(XBZRLE.cache, current_addr,
289 g_memdup(current_data, TARGET_PAGE_SIZE));
290 }
291 acct_info.xbzrle_cache_miss++;
292 return -1;
293 }
294
295 prev_cached_page = get_cached_data(XBZRLE.cache, current_addr);
296
297 /* save current buffer into memory */
298 memcpy(XBZRLE.current_buf, current_data, TARGET_PAGE_SIZE);
299
300 /* XBZRLE encoding (if there is no overflow) */
301 encoded_len = xbzrle_encode_buffer(prev_cached_page, XBZRLE.current_buf,
302 TARGET_PAGE_SIZE, XBZRLE.encoded_buf,
303 TARGET_PAGE_SIZE);
304 if (encoded_len == 0) {
305 DPRINTF("Skipping unmodified page\n");
306 return 0;
307 } else if (encoded_len == -1) {
308 DPRINTF("Overflow\n");
309 acct_info.xbzrle_overflows++;
310 /* update data in the cache */
311 memcpy(prev_cached_page, current_data, TARGET_PAGE_SIZE);
312 return -1;
313 }
314
315 /* we need to update the data in the cache, in order to get the same data */
316 if (!last_stage) {
317 memcpy(prev_cached_page, XBZRLE.current_buf, TARGET_PAGE_SIZE);
318 }
319
320 /* Send XBZRLE based compressed page */
321 save_block_hdr(f, block, offset, cont, RAM_SAVE_FLAG_XBZRLE);
322 qemu_put_byte(f, ENCODING_FLAG_XBZRLE);
323 qemu_put_be16(f, encoded_len);
324 qemu_put_buffer(f, XBZRLE.encoded_buf, encoded_len);
325 bytes_sent = encoded_len + 1 + 2;
326 acct_info.xbzrle_pages++;
327 acct_info.xbzrle_bytes += bytes_sent;
328
329 return bytes_sent;
330}
331
130static RAMBlock *last_block;332static RAMBlock *last_block;
131static ram_addr_t last_offset;333static ram_addr_t last_offset;
132334
133static int ram_save_block(QEMUFile *f)335/*
336 * ram_save_block: Writes a page of memory to the stream f
337 *
338 * Returns: 0: if the page hasn't changed
339 * -1: if there are no more dirty pages
340 * n: the amount of bytes written in other case
341 */
342
343static int ram_save_block(QEMUFile *f, bool last_stage)
134{344{
135 RAMBlock *block = last_block;345 RAMBlock *block = last_block;
136 ram_addr_t offset = last_offset;346 ram_addr_t offset = last_offset;
137 int bytes_sent = 0;347 int bytes_sent = -1;
138 MemoryRegion *mr;348 MemoryRegion *mr;
349 ram_addr_t current_addr;
139350
140 if (!block)351 if (!block)
141 block = QLIST_FIRST(&ram_list.blocks);352 block = QLIST_FIRST(&ram_list.blocks);
@@ -153,26 +364,31 @@
153 p = memory_region_get_ram_ptr(mr) + offset;364 p = memory_region_get_ram_ptr(mr) + offset;
154365
155 if (is_dup_page(p)) {366 if (is_dup_page(p)) {
156 qemu_put_be64(f, offset | cont | RAM_SAVE_FLAG_COMPRESS);367 acct_info.dup_pages++;
157 if (!cont) {368 save_block_hdr(f, block, offset, cont, RAM_SAVE_FLAG_COMPRESS);
158 qemu_put_byte(f, strlen(block->idstr));
159 qemu_put_buffer(f, (uint8_t *)block->idstr,
160 strlen(block->idstr));
161 }
162 qemu_put_byte(f, *p);369 qemu_put_byte(f, *p);
163 bytes_sent = 1;370 bytes_sent = 1;
164 } else {371 } else if (migrate_use_xbzrle()) {
165 qemu_put_be64(f, offset | cont | RAM_SAVE_FLAG_PAGE);372 current_addr = block->offset + offset;
166 if (!cont) {373 bytes_sent = save_xbzrle_page(f, p, current_addr, block,
167 qemu_put_byte(f, strlen(block->idstr));374 offset, cont, last_stage);
168 qemu_put_buffer(f, (uint8_t *)block->idstr,375 if (!last_stage) {
169 strlen(block->idstr));376 p = get_cached_data(XBZRLE.cache, current_addr);
170 }377 }
378 }
379
380 /* either we didn't send yet (we may have had XBZRLE overflow) */
381 if (bytes_sent == -1) {
382 save_block_hdr(f, block, offset, cont, RAM_SAVE_FLAG_PAGE);
171 qemu_put_buffer(f, p, TARGET_PAGE_SIZE);383 qemu_put_buffer(f, p, TARGET_PAGE_SIZE);
172 bytes_sent = TARGET_PAGE_SIZE;384 bytes_sent = TARGET_PAGE_SIZE;
385 acct_info.norm_pages++;
173 }386 }
174387
175 break;388 /* if page is unmodified, continue to the next */
389 if (bytes_sent != 0) {
390 break;
391 }
176 }392 }
177393
178 offset += TARGET_PAGE_SIZE;394 offset += TARGET_PAGE_SIZE;
@@ -194,20 +410,7 @@
194410
195static ram_addr_t ram_save_remaining(void)411static ram_addr_t ram_save_remaining(void)
196{412{
197 RAMBlock *block;413 return ram_list.dirty_pages;
198 ram_addr_t count = 0;
199
200 QLIST_FOREACH(block, &ram_list.blocks, next) {
201 ram_addr_t addr;
202 for (addr = 0; addr < block->length; addr += TARGET_PAGE_SIZE) {
203 if (memory_region_get_dirty(block->mr, addr, TARGET_PAGE_SIZE,
204 DIRTY_MEMORY_MIGRATION)) {
205 count++;
206 }
207 }
208 }
209
210 return count;
211}414}
212415
213uint64_t ram_bytes_remaining(void)416uint64_t ram_bytes_remaining(void)
@@ -260,60 +463,111 @@
260 g_free(blocks);463 g_free(blocks);
261}464}
262465
263int ram_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque)466static void migration_end(void)
467{
468 memory_global_dirty_log_stop();
469
470 if (migrate_use_xbzrle()) {
471 cache_fini(XBZRLE.cache);
472 g_free(XBZRLE.cache);
473 g_free(XBZRLE.encoded_buf);
474 g_free(XBZRLE.current_buf);
475 g_free(XBZRLE.decoded_buf);
476 XBZRLE.cache = NULL;
477 }
478}
479
480static void ram_migration_cancel(void *opaque)
481{
482 migration_end();
483}
484
485#define MAX_WAIT 50 /* ms, half buffered_file limit */
486
487static int ram_save_setup(QEMUFile *f, void *opaque)
264{488{
265 ram_addr_t addr;489 ram_addr_t addr;
490 RAMBlock *block;
491
492 bytes_transferred = 0;
493 last_block = NULL;
494 last_offset = 0;
495 sort_ram_list();
496
497 if (migrate_use_xbzrle()) {
498 XBZRLE.cache = cache_init(migrate_xbzrle_cache_size() /
499 TARGET_PAGE_SIZE,
500 TARGET_PAGE_SIZE);
501 if (!XBZRLE.cache) {
502 DPRINTF("Error creating cache\n");
503 return -1;
504 }
505 XBZRLE.encoded_buf = g_malloc0(TARGET_PAGE_SIZE);
506 XBZRLE.current_buf = g_malloc(TARGET_PAGE_SIZE);
507 acct_clear();
508 }
509
510 /* Make sure all dirty bits are set */
511 QLIST_FOREACH(block, &ram_list.blocks, next) {
512 for (addr = 0; addr < block->length; addr += TARGET_PAGE_SIZE) {
513 if (!memory_region_get_dirty(block->mr, addr, TARGET_PAGE_SIZE,
514 DIRTY_MEMORY_MIGRATION)) {
515 memory_region_set_dirty(block->mr, addr, TARGET_PAGE_SIZE);
516 }
517 }
518 }
519
520 memory_global_dirty_log_start();
521
522 qemu_put_be64(f, ram_bytes_total() | RAM_SAVE_FLAG_MEM_SIZE);
523
524 QLIST_FOREACH(block, &ram_list.blocks, next) {
525 qemu_put_byte(f, strlen(block->idstr));
526 qemu_put_buffer(f, (uint8_t *)block->idstr, strlen(block->idstr));
527 qemu_put_be64(f, block->length);
528 }
529
530 qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
531
532 return 0;
533}
534
535static int ram_save_iterate(QEMUFile *f, void *opaque)
536{
266 uint64_t bytes_transferred_last;537 uint64_t bytes_transferred_last;
267 double bwidth = 0;538 double bwidth = 0;
268 uint64_t expected_time = 0;
269 int ret;539 int ret;
270540 int i;
271 if (stage < 0) {541 uint64_t expected_time;
272 memory_global_dirty_log_stop();
273 return 0;
274 }
275
276 memory_global_sync_dirty_bitmap(get_system_memory());
277
278 if (stage == 1) {
279 RAMBlock *block;
280 bytes_transferred = 0;
281 last_block = NULL;
282 last_offset = 0;
283 sort_ram_list();
284
285 /* Make sure all dirty bits are set */
286 QLIST_FOREACH(block, &ram_list.blocks, next) {
287 for (addr = 0; addr < block->length; addr += TARGET_PAGE_SIZE) {
288 if (!memory_region_get_dirty(block->mr, addr, TARGET_PAGE_SIZE,
289 DIRTY_MEMORY_MIGRATION)) {
290 memory_region_set_dirty(block->mr, addr, TARGET_PAGE_SIZE);
291 }
292 }
293 }
294
295 memory_global_dirty_log_start();
296
297 qemu_put_be64(f, ram_bytes_total() | RAM_SAVE_FLAG_MEM_SIZE);
298
299 QLIST_FOREACH(block, &ram_list.blocks, next) {
300 qemu_put_byte(f, strlen(block->idstr));
301 qemu_put_buffer(f, (uint8_t *)block->idstr, strlen(block->idstr));
302 qemu_put_be64(f, block->length);
303 }
304 }
305542
306 bytes_transferred_last = bytes_transferred;543 bytes_transferred_last = bytes_transferred;
307 bwidth = qemu_get_clock_ns(rt_clock);544 bwidth = qemu_get_clock_ns(rt_clock);
308545
546 i = 0;
309 while ((ret = qemu_file_rate_limit(f)) == 0) {547 while ((ret = qemu_file_rate_limit(f)) == 0) {
310 int bytes_sent;548 int bytes_sent;
311549
312 bytes_sent = ram_save_block(f);550 bytes_sent = ram_save_block(f, false);
551 /* no more blocks to sent */
552 if (bytes_sent < 0) {
553 break;
554 }
313 bytes_transferred += bytes_sent;555 bytes_transferred += bytes_sent;
314 if (bytes_sent == 0) { /* no more blocks */556 acct_info.iterations++;
315 break;557 /* we want to check in the 1st loop, just in case it was the 1st time
558 and we had to sync the dirty bitmap.
559 qemu_get_clock_ns() is a bit expensive, so we only check each some
560 iterations
561 */
562 if ((i & 63) == 0) {
563 uint64_t t1 = (qemu_get_clock_ns(rt_clock) - bwidth) / 1000000;
564 if (t1 > MAX_WAIT) {
565 DPRINTF("big wait: " PRIu64 " milliseconds, %d iterations\n",
566 t1, i);
567 break;
568 }
316 }569 }
570 i++;
317 }571 }
318572
319 if (ret < 0) {573 if (ret < 0) {
@@ -329,22 +583,85 @@
329 bwidth = 0.000001;583 bwidth = 0.000001;
330 }584 }
331585
586 qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
587
588 expected_time = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth;
589
590 DPRINTF("ram_save_live: expected(" PRIu64 ") <= max(" PRIu64 ")?\n",
591 expected_time, migrate_max_downtime());
592
593 if (expected_time <= migrate_max_downtime()) {
594 memory_global_sync_dirty_bitmap(get_system_memory());
595 expected_time = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth;
596
597 return expected_time <= migrate_max_downtime();
598 }
599 return 0;
600}
601
602static int ram_save_complete(QEMUFile *f, void *opaque)
603{
604 memory_global_sync_dirty_bitmap(get_system_memory());
605
332 /* try transferring iterative blocks of memory */606 /* try transferring iterative blocks of memory */
333 if (stage == 3) {607
608 /* flush all remaining blocks regardless of rate limiting */
609 while (true) {
334 int bytes_sent;610 int bytes_sent;
335611
336 /* flush all remaining blocks regardless of rate limiting */612 bytes_sent = ram_save_block(f, true);
337 while ((bytes_sent = ram_save_block(f)) != 0) {613 /* no more blocks to sent */
338 bytes_transferred += bytes_sent;614 if (bytes_sent < 0) {
615 break;
339 }616 }
340 memory_global_dirty_log_stop();617 bytes_transferred += bytes_sent;
341 }618 }
619 memory_global_dirty_log_stop();
342620
343 qemu_put_be64(f, RAM_SAVE_FLAG_EOS);621 qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
344622
345 expected_time = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth;623 return 0;
346624}
347 return (stage == 2) && (expected_time <= migrate_max_downtime());625
626static int load_xbzrle(QEMUFile *f, ram_addr_t addr, void *host)
627{
628 int ret, rc = 0;
629 unsigned int xh_len;
630 int xh_flags;
631
632 if (!XBZRLE.decoded_buf) {
633 XBZRLE.decoded_buf = g_malloc(TARGET_PAGE_SIZE);
634 }
635
636 /* extract RLE header */
637 xh_flags = qemu_get_byte(f);
638 xh_len = qemu_get_be16(f);
639
640 if (xh_flags != ENCODING_FLAG_XBZRLE) {
641 fprintf(stderr, "Failed to load XBZRLE page - wrong compression!\n");
642 return -1;
643 }
644
645 if (xh_len > TARGET_PAGE_SIZE) {
646 fprintf(stderr, "Failed to load XBZRLE page - len overflow!\n");
647 return -1;
648 }
649 /* load data and decode */
650 qemu_get_buffer(f, XBZRLE.decoded_buf, xh_len);
651
652 /* decode RLE */
653 ret = xbzrle_decode_buffer(XBZRLE.decoded_buf, xh_len, host,
654 TARGET_PAGE_SIZE);
655 if (ret == -1) {
656 fprintf(stderr, "Failed to load XBZRLE page - decode error!\n");
657 rc = -1;
658 } else if (ret > TARGET_PAGE_SIZE) {
659 fprintf(stderr, "Failed to load XBZRLE page - size %d exceeds %d!\n",
660 ret, TARGET_PAGE_SIZE);
661 abort();
662 }
663
664 return rc;
348}665}
349666
350static inline void *host_from_stream_offset(QEMUFile *f,667static inline void *host_from_stream_offset(QEMUFile *f,
@@ -377,11 +694,14 @@
377 return NULL;694 return NULL;
378}695}
379696
380int ram_load(QEMUFile *f, void *opaque, int version_id)697static int ram_load(QEMUFile *f, void *opaque, int version_id)
381{698{
382 ram_addr_t addr;699 ram_addr_t addr;
383 int flags;700 int flags, ret = 0;
384 int error;701 int error;
702 static uint64_t seq_iter;
703
704 seq_iter++;
385705
386 if (version_id < 4 || version_id > 4) {706 if (version_id < 4 || version_id > 4) {
387 return -EINVAL;707 return -EINVAL;
@@ -411,8 +731,10 @@
411731
412 QLIST_FOREACH(block, &ram_list.blocks, next) {732 QLIST_FOREACH(block, &ram_list.blocks, next) {
413 if (!strncmp(id, block->idstr, sizeof(id))) {733 if (!strncmp(id, block->idstr, sizeof(id))) {
414 if (block->length != length)734 if (block->length != length) {
415 return -EINVAL;735 ret = -EINVAL;
736 goto done;
737 }
416 break;738 break;
417 }739 }
418 }740 }
@@ -420,7 +742,8 @@
420 if (!block) {742 if (!block) {
421 fprintf(stderr, "Unknown ramblock \"%s\", cannot "743 fprintf(stderr, "Unknown ramblock \"%s\", cannot "
422 "accept migration\n", id);744 "accept migration\n", id);
423 return -EINVAL;745 ret = -EINVAL;
746 goto done;
424 }747 }
425748
426 total_ram_bytes -= length;749 total_ram_bytes -= length;
@@ -449,18 +772,46 @@
449 void *host;772 void *host;
450773
451 host = host_from_stream_offset(f, addr, flags);774 host = host_from_stream_offset(f, addr, flags);
775 if (!host) {
776 return -EINVAL;
777 }
452778
453 qemu_get_buffer(f, host, TARGET_PAGE_SIZE);779 qemu_get_buffer(f, host, TARGET_PAGE_SIZE);
780 } else if (flags & RAM_SAVE_FLAG_XBZRLE) {
781 if (!migrate_use_xbzrle()) {
782 return -EINVAL;
783 }
784 void *host = host_from_stream_offset(f, addr, flags);
785 if (!host) {
786 return -EINVAL;
787 }
788
789 if (load_xbzrle(f, addr, host) < 0) {
790 ret = -EINVAL;
791 goto done;
792 }
454 }793 }
455 error = qemu_file_get_error(f);794 error = qemu_file_get_error(f);
456 if (error) {795 if (error) {
457 return error;796 ret = error;
797 goto done;
458 }798 }
459 } while (!(flags & RAM_SAVE_FLAG_EOS));799 } while (!(flags & RAM_SAVE_FLAG_EOS));
460800
461 return 0;801done:
802 DPRINTF("Completed load of VM with exit code %d seq iteration " PRIu64 "\n",
803 ret, seq_iter);
804 return ret;
462}805}
463806
807SaveVMHandlers savevm_ram_handlers = {
808 .save_live_setup = ram_save_setup,
809 .save_live_iterate = ram_save_iterate,
810 .save_live_complete = ram_save_complete,
811 .load_state = ram_load,
812 .cancel = ram_migration_cancel,
813};
814
464#ifdef HAS_AUDIO815#ifdef HAS_AUDIO
465struct soundhw {816struct soundhw {
466 const char *name;817 const char *name;
@@ -475,7 +826,7 @@
475826
476static struct soundhw soundhw[] = {827static struct soundhw soundhw[] = {
477#ifdef HAS_AUDIO_CHOICE828#ifdef HAS_AUDIO_CHOICE
478#if defined(TARGET_I386) || defined(TARGET_MIPS)829#ifdef CONFIG_PCSPK
479 {830 {
480 "pcspk",831 "pcspk",
481 "PC speaker",832 "PC speaker",
@@ -568,7 +919,7 @@
568{919{
569 struct soundhw *c;920 struct soundhw *c;
570921
571 if (*optarg == '?') {922 if (is_help_option(optarg)) {
572 show_valid_cards:923 show_valid_cards:
573924
574 printf("Valid sound card names (comma separated):\n");925 printf("Valid sound card names (comma separated):\n");
@@ -576,7 +927,7 @@
576 printf ("%-11s %s\n", c->name, c->descr);927 printf ("%-11s %s\n", c->name, c->descr);
577 }928 }
578 printf("\n-soundhw all will enable all of the above\n");929 printf("\n-soundhw all will enable all of the above\n");
579 exit(*optarg != '?');930 exit(!is_help_option(optarg));
580 }931 }
581 else {932 else {
582 size_t l;933 size_t l;
@@ -730,3 +1081,13 @@
730 return 0;1081 return 0;
731#endif1082#endif
732}1083}
1084
1085
1086TargetInfo *qmp_query_target(Error **errp)
1087{
1088 TargetInfo *info = g_malloc0(sizeof(*info));
1089
1090 info->arch = TARGET_TYPE;
1091
1092 return info;
1093}
7331094
=== modified file 'arch_init.h'
--- arch_init.h 2012-02-02 14:25:28 +0000
+++ arch_init.h 2012-09-17 14:09:22 +0000
@@ -1,7 +1,7 @@
1#ifndef QEMU_ARCH_INIT_H1#ifndef QEMU_ARCH_INIT_H
2#define QEMU_ARCH_INIT_H2#define QEMU_ARCH_INIT_H
33
4extern const char arch_config_name[];4#include "qmp-commands.h"
55
6enum {6enum {
7 QEMU_ARCH_ALL = -1,7 QEMU_ARCH_ALL = -1,
@@ -18,6 +18,8 @@
18 QEMU_ARCH_SH4 = 1024,18 QEMU_ARCH_SH4 = 1024,
19 QEMU_ARCH_SPARC = 2048,19 QEMU_ARCH_SPARC = 2048,
20 QEMU_ARCH_XTENSA = 4096,20 QEMU_ARCH_XTENSA = 4096,
21 QEMU_ARCH_OPENRISC = 8192,
22 QEMU_ARCH_UNICORE32 = 0x4000,
21};23};
2224
23extern const uint32_t arch_type;25extern const uint32_t arch_type;
@@ -32,4 +34,6 @@
32int kvm_available(void);34int kvm_available(void);
33int xen_available(void);35int xen_available(void);
3436
37CpuDefinitionInfoList GCC_WEAK_DECL *arch_query_cpu_definitions(Error **errp);
38
35#endif39#endif
3640
=== removed file 'arm-semi.c'
--- arm-semi.c 2011-09-26 15:07:14 +0000
+++ arm-semi.c 1970-01-01 00:00:00 +0000
@@ -1,509 +0,0 @@
1/*
2 * Arm "Angel" semihosting syscalls
3 *
4 * Copyright (c) 2005, 2007 CodeSourcery.
5 * Written by Paul Brook.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, see <http://www.gnu.org/licenses/>.
19 */
20
21#include <sys/types.h>
22#include <sys/stat.h>
23#include <fcntl.h>
24#include <unistd.h>
25#include <stdlib.h>
26#include <stdio.h>
27#include <time.h>
28
29#include "cpu.h"
30#ifdef CONFIG_USER_ONLY
31#include "qemu.h"
32
33#define ARM_ANGEL_HEAP_SIZE (128 * 1024 * 1024)
34#else
35#include "qemu-common.h"
36#include "gdbstub.h"
37#include "hw/arm-misc.h"
38#endif
39
40#define SYS_OPEN 0x01
41#define SYS_CLOSE 0x02
42#define SYS_WRITEC 0x03
43#define SYS_WRITE0 0x04
44#define SYS_WRITE 0x05
45#define SYS_READ 0x06
46#define SYS_READC 0x07
47#define SYS_ISTTY 0x09
48#define SYS_SEEK 0x0a
49#define SYS_FLEN 0x0c
50#define SYS_TMPNAM 0x0d
51#define SYS_REMOVE 0x0e
52#define SYS_RENAME 0x0f
53#define SYS_CLOCK 0x10
54#define SYS_TIME 0x11
55#define SYS_SYSTEM 0x12
56#define SYS_ERRNO 0x13
57#define SYS_GET_CMDLINE 0x15
58#define SYS_HEAPINFO 0x16
59#define SYS_EXIT 0x18
60
61#ifndef O_BINARY
62#define O_BINARY 0
63#endif
64
65#define GDB_O_RDONLY 0x000
66#define GDB_O_WRONLY 0x001
67#define GDB_O_RDWR 0x002
68#define GDB_O_APPEND 0x008
69#define GDB_O_CREAT 0x200
70#define GDB_O_TRUNC 0x400
71#define GDB_O_BINARY 0
72
73static int gdb_open_modeflags[12] = {
74 GDB_O_RDONLY,
75 GDB_O_RDONLY | GDB_O_BINARY,
76 GDB_O_RDWR,
77 GDB_O_RDWR | GDB_O_BINARY,
78 GDB_O_WRONLY | GDB_O_CREAT | GDB_O_TRUNC,
79 GDB_O_WRONLY | GDB_O_CREAT | GDB_O_TRUNC | GDB_O_BINARY,
80 GDB_O_RDWR | GDB_O_CREAT | GDB_O_TRUNC,
81 GDB_O_RDWR | GDB_O_CREAT | GDB_O_TRUNC | GDB_O_BINARY,
82 GDB_O_WRONLY | GDB_O_CREAT | GDB_O_APPEND,
83 GDB_O_WRONLY | GDB_O_CREAT | GDB_O_APPEND | GDB_O_BINARY,
84 GDB_O_RDWR | GDB_O_CREAT | GDB_O_APPEND,
85 GDB_O_RDWR | GDB_O_CREAT | GDB_O_APPEND | GDB_O_BINARY
86};
87
88static int open_modeflags[12] = {
89 O_RDONLY,
90 O_RDONLY | O_BINARY,
91 O_RDWR,
92 O_RDWR | O_BINARY,
93 O_WRONLY | O_CREAT | O_TRUNC,
94 O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,
95 O_RDWR | O_CREAT | O_TRUNC,
96 O_RDWR | O_CREAT | O_TRUNC | O_BINARY,
97 O_WRONLY | O_CREAT | O_APPEND,
98 O_WRONLY | O_CREAT | O_APPEND | O_BINARY,
99 O_RDWR | O_CREAT | O_APPEND,
100 O_RDWR | O_CREAT | O_APPEND | O_BINARY
101};
102
103#ifdef CONFIG_USER_ONLY
104static inline uint32_t set_swi_errno(TaskState *ts, uint32_t code)
105{
106 if (code == (uint32_t)-1)
107 ts->swi_errno = errno;
108 return code;
109}
110#else
111static inline uint32_t set_swi_errno(CPUState *env, uint32_t code)
112{
113 return code;
114}
115
116#include "softmmu-semi.h"
117#endif
118
119static target_ulong arm_semi_syscall_len;
120
121#if !defined(CONFIG_USER_ONLY)
122static target_ulong syscall_err;
123#endif
124
125static void arm_semi_cb(CPUState *env, target_ulong ret, target_ulong err)
126{
127#ifdef CONFIG_USER_ONLY
128 TaskState *ts = env->opaque;
129#endif
130
131 if (ret == (target_ulong)-1) {
132#ifdef CONFIG_USER_ONLY
133 ts->swi_errno = err;
134#else
135 syscall_err = err;
136#endif
137 env->regs[0] = ret;
138 } else {
139 /* Fixup syscalls that use nonstardard return conventions. */
140 switch (env->regs[0]) {
141 case SYS_WRITE:
142 case SYS_READ:
143 env->regs[0] = arm_semi_syscall_len - ret;
144 break;
145 case SYS_SEEK:
146 env->regs[0] = 0;
147 break;
148 default:
149 env->regs[0] = ret;
150 break;
151 }
152 }
153}
154
155static void arm_semi_flen_cb(CPUState *env, target_ulong ret, target_ulong err)
156{
157 /* The size is always stored in big-endian order, extract
158 the value. We assume the size always fit in 32 bits. */
159 uint32_t size;
160 cpu_memory_rw_debug(env, env->regs[13]-64+32, (uint8_t *)&size, 4, 0);
161 env->regs[0] = be32_to_cpu(size);
162#ifdef CONFIG_USER_ONLY
163 ((TaskState *)env->opaque)->swi_errno = err;
164#else
165 syscall_err = err;
166#endif
167}
168
169#define ARG(n) \
170({ \
171 target_ulong __arg; \
172 /* FIXME - handle get_user() failure */ \
173 get_user_ual(__arg, args + (n) * 4); \
174 __arg; \
175})
176#define SET_ARG(n, val) put_user_ual(val, args + (n) * 4)
177uint32_t do_arm_semihosting(CPUState *env)
178{
179 target_ulong args;
180 char * s;
181 int nr;
182 uint32_t ret;
183 uint32_t len;
184#ifdef CONFIG_USER_ONLY
185 TaskState *ts = env->opaque;
186#else
187 CPUState *ts = env;
188#endif
189
190 nr = env->regs[0];
191 args = env->regs[1];
192 switch (nr) {
193 case SYS_OPEN:
194 if (!(s = lock_user_string(ARG(0))))
195 /* FIXME - should this error code be -TARGET_EFAULT ? */
196 return (uint32_t)-1;
197 if (ARG(1) >= 12)
198 return (uint32_t)-1;
199 if (strcmp(s, ":tt") == 0) {
200 if (ARG(1) < 4)
201 return STDIN_FILENO;
202 else
203 return STDOUT_FILENO;
204 }
205 if (use_gdb_syscalls()) {
206 gdb_do_syscall(arm_semi_cb, "open,%s,%x,1a4", ARG(0),
207 (int)ARG(2)+1, gdb_open_modeflags[ARG(1)]);
208 return env->regs[0];
209 } else {
210 ret = set_swi_errno(ts, open(s, open_modeflags[ARG(1)], 0644));
211 }
212 unlock_user(s, ARG(0), 0);
213 return ret;
214 case SYS_CLOSE:
215 if (use_gdb_syscalls()) {
216 gdb_do_syscall(arm_semi_cb, "close,%x", ARG(0));
217 return env->regs[0];
218 } else {
219 return set_swi_errno(ts, close(ARG(0)));
220 }
221 case SYS_WRITEC:
222 {
223 char c;
224
225 if (get_user_u8(c, args))
226 /* FIXME - should this error code be -TARGET_EFAULT ? */
227 return (uint32_t)-1;
228 /* Write to debug console. stderr is near enough. */
229 if (use_gdb_syscalls()) {
230 gdb_do_syscall(arm_semi_cb, "write,2,%x,1", args);
231 return env->regs[0];
232 } else {
233 return write(STDERR_FILENO, &c, 1);
234 }
235 }
236 case SYS_WRITE0:
237 if (!(s = lock_user_string(args)))
238 /* FIXME - should this error code be -TARGET_EFAULT ? */
239 return (uint32_t)-1;
240 len = strlen(s);
241 if (use_gdb_syscalls()) {
242 gdb_do_syscall(arm_semi_cb, "write,2,%x,%x\n", args, len);
243 ret = env->regs[0];
244 } else {
245 ret = write(STDERR_FILENO, s, len);
246 }
247 unlock_user(s, args, 0);
248 return ret;
249 case SYS_WRITE:
250 len = ARG(2);
251 if (use_gdb_syscalls()) {
252 arm_semi_syscall_len = len;
253 gdb_do_syscall(arm_semi_cb, "write,%x,%x,%x", ARG(0), ARG(1), len);
254 return env->regs[0];
255 } else {
256 if (!(s = lock_user(VERIFY_READ, ARG(1), len, 1)))
257 /* FIXME - should this error code be -TARGET_EFAULT ? */
258 return (uint32_t)-1;
259 ret = set_swi_errno(ts, write(ARG(0), s, len));
260 unlock_user(s, ARG(1), 0);
261 if (ret == (uint32_t)-1)
262 return -1;
263 return len - ret;
264 }
265 case SYS_READ:
266 len = ARG(2);
267 if (use_gdb_syscalls()) {
268 arm_semi_syscall_len = len;
269 gdb_do_syscall(arm_semi_cb, "read,%x,%x,%x", ARG(0), ARG(1), len);
270 return env->regs[0];
271 } else {
272 if (!(s = lock_user(VERIFY_WRITE, ARG(1), len, 0)))
273 /* FIXME - should this error code be -TARGET_EFAULT ? */
274 return (uint32_t)-1;
275 do
276 ret = set_swi_errno(ts, read(ARG(0), s, len));
277 while (ret == -1 && errno == EINTR);
278 unlock_user(s, ARG(1), len);
279 if (ret == (uint32_t)-1)
280 return -1;
281 return len - ret;
282 }
283 case SYS_READC:
284 /* XXX: Read from debug cosole. Not implemented. */
285 return 0;
286 case SYS_ISTTY:
287 if (use_gdb_syscalls()) {
288 gdb_do_syscall(arm_semi_cb, "isatty,%x", ARG(0));
289 return env->regs[0];
290 } else {
291 return isatty(ARG(0));
292 }
293 case SYS_SEEK:
294 if (use_gdb_syscalls()) {
295 gdb_do_syscall(arm_semi_cb, "lseek,%x,%x,0", ARG(0), ARG(1));
296 return env->regs[0];
297 } else {
298 ret = set_swi_errno(ts, lseek(ARG(0), ARG(1), SEEK_SET));
299 if (ret == (uint32_t)-1)
300 return -1;
301 return 0;
302 }
303 case SYS_FLEN:
304 if (use_gdb_syscalls()) {
305 gdb_do_syscall(arm_semi_flen_cb, "fstat,%x,%x",
306 ARG(0), env->regs[13]-64);
307 return env->regs[0];
308 } else {
309 struct stat buf;
310 ret = set_swi_errno(ts, fstat(ARG(0), &buf));
311 if (ret == (uint32_t)-1)
312 return -1;
313 return buf.st_size;
314 }
315 case SYS_TMPNAM:
316 /* XXX: Not implemented. */
317 return -1;
318 case SYS_REMOVE:
319 if (use_gdb_syscalls()) {
320 gdb_do_syscall(arm_semi_cb, "unlink,%s", ARG(0), (int)ARG(1)+1);
321 ret = env->regs[0];
322 } else {
323 if (!(s = lock_user_string(ARG(0))))
324 /* FIXME - should this error code be -TARGET_EFAULT ? */
325 return (uint32_t)-1;
326 ret = set_swi_errno(ts, remove(s));
327 unlock_user(s, ARG(0), 0);
328 }
329 return ret;
330 case SYS_RENAME:
331 if (use_gdb_syscalls()) {
332 gdb_do_syscall(arm_semi_cb, "rename,%s,%s",
333 ARG(0), (int)ARG(1)+1, ARG(2), (int)ARG(3)+1);
334 return env->regs[0];
335 } else {
336 char *s2;
337 s = lock_user_string(ARG(0));
338 s2 = lock_user_string(ARG(2));
339 if (!s || !s2)
340 /* FIXME - should this error code be -TARGET_EFAULT ? */
341 ret = (uint32_t)-1;
342 else
343 ret = set_swi_errno(ts, rename(s, s2));
344 if (s2)
345 unlock_user(s2, ARG(2), 0);
346 if (s)
347 unlock_user(s, ARG(0), 0);
348 return ret;
349 }
350 case SYS_CLOCK:
351 return clock() / (CLOCKS_PER_SEC / 100);
352 case SYS_TIME:
353 return set_swi_errno(ts, time(NULL));
354 case SYS_SYSTEM:
355 if (use_gdb_syscalls()) {
356 gdb_do_syscall(arm_semi_cb, "system,%s", ARG(0), (int)ARG(1)+1);
357 return env->regs[0];
358 } else {
359 if (!(s = lock_user_string(ARG(0))))
360 /* FIXME - should this error code be -TARGET_EFAULT ? */
361 return (uint32_t)-1;
362 ret = set_swi_errno(ts, system(s));
363 unlock_user(s, ARG(0), 0);
364 return ret;
365 }
366 case SYS_ERRNO:
367#ifdef CONFIG_USER_ONLY
368 return ts->swi_errno;
369#else
370 return syscall_err;
371#endif
372 case SYS_GET_CMDLINE:
373 {
374 /* Build a command-line from the original argv.
375 *
376 * The inputs are:
377 * * ARG(0), pointer to a buffer of at least the size
378 * specified in ARG(1).
379 * * ARG(1), size of the buffer pointed to by ARG(0) in
380 * bytes.
381 *
382 * The outputs are:
383 * * ARG(0), pointer to null-terminated string of the
384 * command line.
385 * * ARG(1), length of the string pointed to by ARG(0).
386 */
387
388 char *output_buffer;
389 size_t input_size = ARG(1);
390 size_t output_size;
391 int status = 0;
392
393 /* Compute the size of the output string. */
394#if !defined(CONFIG_USER_ONLY)
395 output_size = strlen(ts->boot_info->kernel_filename)
396 + 1 /* Separating space. */
397 + strlen(ts->boot_info->kernel_cmdline)
398 + 1; /* Terminating null byte. */
399#else
400 unsigned int i;
401
402 output_size = ts->info->arg_end - ts->info->arg_start;
403 if (!output_size) {
404 /* We special-case the "empty command line" case (argc==0).
405 Just provide the terminating 0. */
406 output_size = 1;
407 }
408#endif
409
410 if (output_size > input_size) {
411 /* Not enough space to store command-line arguments. */
412 return -1;
413 }
414
415 /* Adjust the command-line length. */
416 SET_ARG(1, output_size - 1);
417
418 /* Lock the buffer on the ARM side. */
419 output_buffer = lock_user(VERIFY_WRITE, ARG(0), output_size, 0);
420 if (!output_buffer) {
421 return -1;
422 }
423
424 /* Copy the command-line arguments. */
425#if !defined(CONFIG_USER_ONLY)
426 pstrcpy(output_buffer, output_size, ts->boot_info->kernel_filename);
427 pstrcat(output_buffer, output_size, " ");
428 pstrcat(output_buffer, output_size, ts->boot_info->kernel_cmdline);
429#else
430 if (output_size == 1) {
431 /* Empty command-line. */
432 output_buffer[0] = '\0';
433 goto out;
434 }
435
436 if (copy_from_user(output_buffer, ts->info->arg_start,
437 output_size)) {
438 status = -1;
439 goto out;
440 }
441
442 /* Separate arguments by white spaces. */
443 for (i = 0; i < output_size - 1; i++) {
444 if (output_buffer[i] == 0) {
445 output_buffer[i] = ' ';
446 }
447 }
448 out:
449#endif
450 /* Unlock the buffer on the ARM side. */
451 unlock_user(output_buffer, ARG(0), output_size);
452
453 return status;
454 }
455 case SYS_HEAPINFO:
456 {
457 uint32_t *ptr;
458 uint32_t limit;
459
460#ifdef CONFIG_USER_ONLY
461 /* Some C libraries assume the heap immediately follows .bss, so
462 allocate it using sbrk. */
463 if (!ts->heap_limit) {
464 abi_ulong ret;
465
466 ts->heap_base = do_brk(0);
467 limit = ts->heap_base + ARM_ANGEL_HEAP_SIZE;
468 /* Try a big heap, and reduce the size if that fails. */
469 for (;;) {
470 ret = do_brk(limit);
471 if (ret >= limit) {
472 break;
473 }
474 limit = (ts->heap_base >> 1) + (limit >> 1);
475 }
476 ts->heap_limit = limit;
477 }
478
479 if (!(ptr = lock_user(VERIFY_WRITE, ARG(0), 16, 0)))
480 /* FIXME - should this error code be -TARGET_EFAULT ? */
481 return (uint32_t)-1;
482 ptr[0] = tswap32(ts->heap_base);
483 ptr[1] = tswap32(ts->heap_limit);
484 ptr[2] = tswap32(ts->stack_base);
485 ptr[3] = tswap32(0); /* Stack limit. */
486 unlock_user(ptr, ARG(0), 16);
487#else
488 limit = ram_size;
489 if (!(ptr = lock_user(VERIFY_WRITE, ARG(0), 16, 0)))
490 /* FIXME - should this error code be -TARGET_EFAULT ? */
491 return (uint32_t)-1;
492 /* TODO: Make this use the limit of the loaded application. */
493 ptr[0] = tswap32(limit / 2);
494 ptr[1] = tswap32(limit);
495 ptr[2] = tswap32(limit); /* Stack base */
496 ptr[3] = tswap32(0); /* Stack limit. */
497 unlock_user(ptr, ARG(0), 16);
498#endif
499 return 0;
500 }
501 case SYS_EXIT:
502 gdb_exit(env, 0);
503 exit(0);
504 default:
505 fprintf(stderr, "qemu: Unsupported SemiHosting SWI 0x%02x\n", nr);
506 cpu_dump_state(env, stderr, fprintf, 0);
507 abort();
508 }
509}
5100
=== modified file 'async.c'
--- async.c 2011-12-06 09:35:22 +0000
+++ async.c 2012-09-17 14:09:22 +0000
@@ -35,10 +35,10 @@
35struct QEMUBH {35struct QEMUBH {
36 QEMUBHFunc *cb;36 QEMUBHFunc *cb;
37 void *opaque;37 void *opaque;
38 int scheduled;
39 int idle;
40 int deleted;
41 QEMUBH *next;38 QEMUBH *next;
39 bool scheduled;
40 bool idle;
41 bool deleted;
42};42};
4343
44QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque)44QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque)
@@ -120,7 +120,7 @@
120 bh->deleted = 1;120 bh->deleted = 1;
121}121}
122122
123void qemu_bh_update_timeout(int *timeout)123void qemu_bh_update_timeout(uint32_t *timeout)
124{124{
125 QEMUBH *bh;125 QEMUBH *bh;
126126
127127
=== added file 'audio/Makefile.objs'
--- audio/Makefile.objs 1970-01-01 00:00:00 +0000
+++ audio/Makefile.objs 2012-09-17 14:09:22 +0000
@@ -0,0 +1,14 @@
1common-obj-y = audio.o noaudio.o wavaudio.o mixeng.o
2common-obj-$(CONFIG_SDL) += sdlaudio.o
3common-obj-$(CONFIG_OSS) += ossaudio.o
4common-obj-$(CONFIG_SPICE) += spiceaudio.o
5common-obj-$(CONFIG_COREAUDIO) += coreaudio.o
6common-obj-$(CONFIG_ALSA) += alsaaudio.o
7common-obj-$(CONFIG_DSOUND) += dsoundaudio.o
8common-obj-$(CONFIG_FMOD) += fmodaudio.o
9common-obj-$(CONFIG_ESD) += esdaudio.o
10common-obj-$(CONFIG_PA) += paaudio.o
11common-obj-$(CONFIG_WINWAVE) += winwaveaudio.o
12common-obj-$(CONFIG_AUDIO_PT_INT) += audio_pt_int.o
13common-obj-$(CONFIG_AUDIO_WIN_INT) += audio_win_int.o
14common-obj-y += wavcapture.o
015
=== modified file 'audio/audio.c'
--- audio/audio.c 2012-03-15 16:18:18 +0000
+++ audio/audio.c 2012-09-17 14:09:22 +0000
@@ -818,6 +818,7 @@
818 sw->active = hw->enabled;818 sw->active = hw->enabled;
819 sw->conv = noop_conv;819 sw->conv = noop_conv;
820 sw->ratio = ((int64_t) hw_cap->info.freq << 32) / sw->info.freq;820 sw->ratio = ((int64_t) hw_cap->info.freq << 32) / sw->info.freq;
821 sw->vol = nominal_volume;
821 sw->rate = st_rate_start (sw->info.freq, hw_cap->info.freq);822 sw->rate = st_rate_start (sw->info.freq, hw_cap->info.freq);
822 if (!sw->rate) {823 if (!sw->rate) {
823 dolog ("Could not start rate conversion for `%s'\n", SW_NAME (sw));824 dolog ("Could not start rate conversion for `%s'\n", SW_NAME (sw));
@@ -957,7 +958,9 @@
957 total += isamp;958 total += isamp;
958 }959 }
959960
960 mixeng_volume (sw->buf, ret, &sw->vol);961 if (!(hw->ctl_caps & VOICE_VOLUME_CAP)) {
962 mixeng_volume (sw->buf, ret, &sw->vol);
963 }
961964
962 sw->clip (buf, sw->buf, ret);965 sw->clip (buf, sw->buf, ret);
963 sw->total_hw_samples_acquired += total;966 sw->total_hw_samples_acquired += total;
@@ -1041,7 +1044,10 @@
1041 swlim = audio_MIN (swlim, samples);1044 swlim = audio_MIN (swlim, samples);
1042 if (swlim) {1045 if (swlim) {
1043 sw->conv (sw->buf, buf, swlim);1046 sw->conv (sw->buf, buf, swlim);
1044 mixeng_volume (sw->buf, swlim, &sw->vol);1047
1048 if (!(sw->hw->ctl_caps & VOICE_VOLUME_CAP)) {
1049 mixeng_volume (sw->buf, swlim, &sw->vol);
1050 }
1045 }1051 }
10461052
1047 while (swlim) {1053 while (swlim) {
@@ -1770,10 +1776,12 @@
1770 HWVoiceOut *hwo = NULL;1776 HWVoiceOut *hwo = NULL;
1771 HWVoiceIn *hwi = NULL;1777 HWVoiceIn *hwi = NULL;
17721778
1773 while ((hwo = audio_pcm_hw_find_any_enabled_out (hwo))) {1779 while ((hwo = audio_pcm_hw_find_any_out (hwo))) {
1774 SWVoiceCap *sc;1780 SWVoiceCap *sc;
17751781
1776 hwo->pcm_ops->ctl_out (hwo, VOICE_DISABLE);1782 if (hwo->enabled) {
1783 hwo->pcm_ops->ctl_out (hwo, VOICE_DISABLE);
1784 }
1777 hwo->pcm_ops->fini_out (hwo);1785 hwo->pcm_ops->fini_out (hwo);
17781786
1779 for (sc = hwo->cap_head.lh_first; sc; sc = sc->entries.le_next) {1787 for (sc = hwo->cap_head.lh_first; sc; sc = sc->entries.le_next) {
@@ -1786,8 +1794,10 @@
1786 }1794 }
1787 }1795 }
17881796
1789 while ((hwi = audio_pcm_hw_find_any_enabled_in (hwi))) {1797 while ((hwi = audio_pcm_hw_find_any_in (hwi))) {
1790 hwi->pcm_ops->ctl_in (hwi, VOICE_DISABLE);1798 if (hwi->enabled) {
1799 hwi->pcm_ops->ctl_in (hwi, VOICE_DISABLE);
1800 }
1791 hwi->pcm_ops->fini_in (hwi);1801 hwi->pcm_ops->fini_in (hwi);
1792 }1802 }
17931803
@@ -2053,17 +2063,29 @@
2053void AUD_set_volume_out (SWVoiceOut *sw, int mute, uint8_t lvol, uint8_t rvol)2063void AUD_set_volume_out (SWVoiceOut *sw, int mute, uint8_t lvol, uint8_t rvol)
2054{2064{
2055 if (sw) {2065 if (sw) {
2066 HWVoiceOut *hw = sw->hw;
2067
2056 sw->vol.mute = mute;2068 sw->vol.mute = mute;
2057 sw->vol.l = nominal_volume.l * lvol / 255;2069 sw->vol.l = nominal_volume.l * lvol / 255;
2058 sw->vol.r = nominal_volume.r * rvol / 255;2070 sw->vol.r = nominal_volume.r * rvol / 255;
2071
2072 if (hw->pcm_ops->ctl_out) {
2073 hw->pcm_ops->ctl_out (hw, VOICE_VOLUME, sw);
2074 }
2059 }2075 }
2060}2076}
20612077
2062void AUD_set_volume_in (SWVoiceIn *sw, int mute, uint8_t lvol, uint8_t rvol)2078void AUD_set_volume_in (SWVoiceIn *sw, int mute, uint8_t lvol, uint8_t rvol)
2063{2079{
2064 if (sw) {2080 if (sw) {
2081 HWVoiceIn *hw = sw->hw;
2082
2065 sw->vol.mute = mute;2083 sw->vol.mute = mute;
2066 sw->vol.l = nominal_volume.l * lvol / 255;2084 sw->vol.l = nominal_volume.l * lvol / 255;
2067 sw->vol.r = nominal_volume.r * rvol / 255;2085 sw->vol.r = nominal_volume.r * rvol / 255;
2086
2087 if (hw->pcm_ops->ctl_in) {
2088 hw->pcm_ops->ctl_in (hw, VOICE_VOLUME, sw);
2089 }
2068 }2090 }
2069}2091}
20702092
=== modified file 'audio/audio_int.h'
--- audio/audio_int.h 2011-02-02 19:58:26 +0000
+++ audio/audio_int.h 2012-09-17 14:09:22 +0000
@@ -82,6 +82,7 @@
82 int samples;82 int samples;
83 QLIST_HEAD (sw_out_listhead, SWVoiceOut) sw_head;83 QLIST_HEAD (sw_out_listhead, SWVoiceOut) sw_head;
84 QLIST_HEAD (sw_cap_listhead, SWVoiceCap) cap_head;84 QLIST_HEAD (sw_cap_listhead, SWVoiceCap) cap_head;
85 int ctl_caps;
85 struct audio_pcm_ops *pcm_ops;86 struct audio_pcm_ops *pcm_ops;
86 QLIST_ENTRY (HWVoiceOut) entries;87 QLIST_ENTRY (HWVoiceOut) entries;
87} HWVoiceOut;88} HWVoiceOut;
@@ -101,6 +102,7 @@
101102
102 int samples;103 int samples;
103 QLIST_HEAD (sw_in_listhead, SWVoiceIn) sw_head;104 QLIST_HEAD (sw_in_listhead, SWVoiceIn) sw_head;
105 int ctl_caps;
104 struct audio_pcm_ops *pcm_ops;106 struct audio_pcm_ops *pcm_ops;
105 QLIST_ENTRY (HWVoiceIn) entries;107 QLIST_ENTRY (HWVoiceIn) entries;
106} HWVoiceIn;108} HWVoiceIn;
@@ -150,6 +152,7 @@
150 int max_voices_in;152 int max_voices_in;
151 int voice_size_out;153 int voice_size_out;
152 int voice_size_in;154 int voice_size_in;
155 int ctl_caps;
153};156};
154157
155struct audio_pcm_ops {158struct audio_pcm_ops {
@@ -231,6 +234,9 @@
231234
232#define VOICE_ENABLE 1235#define VOICE_ENABLE 1
233#define VOICE_DISABLE 2236#define VOICE_DISABLE 2
237#define VOICE_VOLUME 3
238
239#define VOICE_VOLUME_CAP (1 << VOICE_VOLUME)
234240
235static inline int audio_ring_dist (int dst, int src, int len)241static inline int audio_ring_dist (int dst, int src, int len)
236{242{
237243
=== modified file 'audio/audio_template.h'
--- audio/audio_template.h 2011-10-28 17:37:30 +0000
+++ audio/audio_template.h 2012-09-17 14:09:22 +0000
@@ -263,6 +263,8 @@
263 }263 }
264264
265 hw->pcm_ops = drv->pcm_ops;265 hw->pcm_ops = drv->pcm_ops;
266 hw->ctl_caps = drv->ctl_caps;
267
266 QLIST_INIT (&hw->sw_head);268 QLIST_INIT (&hw->sw_head);
267#ifdef DAC269#ifdef DAC
268 QLIST_INIT (&hw->cap_head);270 QLIST_INIT (&hw->cap_head);
269271
=== modified file 'audio/mixeng.c'
--- audio/mixeng.c 2011-10-28 17:37:30 +0000
+++ audio/mixeng.c 2012-09-17 14:09:22 +0000
@@ -33,7 +33,8 @@
33#define ENDIAN_CONVERT(v) (v)33#define ENDIAN_CONVERT(v) (v)
3434
35/* Signed 8 bit */35/* Signed 8 bit */
36#define IN_T int8_t36#define BSIZE 8
37#define ITYPE int
37#define IN_MIN SCHAR_MIN38#define IN_MIN SCHAR_MIN
38#define IN_MAX SCHAR_MAX39#define IN_MAX SCHAR_MAX
39#define SIGNED40#define SIGNED
@@ -42,25 +43,29 @@
42#undef SIGNED43#undef SIGNED
43#undef IN_MAX44#undef IN_MAX
44#undef IN_MIN45#undef IN_MIN
45#undef IN_T46#undef BSIZE
47#undef ITYPE
46#undef SHIFT48#undef SHIFT
4749
48/* Unsigned 8 bit */50/* Unsigned 8 bit */
49#define IN_T uint8_t51#define BSIZE 8
52#define ITYPE uint
50#define IN_MIN 053#define IN_MIN 0
51#define IN_MAX UCHAR_MAX54#define IN_MAX UCHAR_MAX
52#define SHIFT 855#define SHIFT 8
53#include "mixeng_template.h"56#include "mixeng_template.h"
54#undef IN_MAX57#undef IN_MAX
55#undef IN_MIN58#undef IN_MIN
56#undef IN_T59#undef BSIZE
60#undef ITYPE
57#undef SHIFT61#undef SHIFT
5862
59#undef ENDIAN_CONVERT63#undef ENDIAN_CONVERT
60#undef ENDIAN_CONVERSION64#undef ENDIAN_CONVERSION
6165
62/* Signed 16 bit */66/* Signed 16 bit */
63#define IN_T int16_t67#define BSIZE 16
68#define ITYPE int
64#define IN_MIN SHRT_MIN69#define IN_MIN SHRT_MIN
65#define IN_MAX SHRT_MAX70#define IN_MAX SHRT_MAX
66#define SIGNED71#define SIGNED
@@ -78,11 +83,13 @@
78#undef SIGNED83#undef SIGNED
79#undef IN_MAX84#undef IN_MAX
80#undef IN_MIN85#undef IN_MIN
81#undef IN_T86#undef BSIZE
87#undef ITYPE
82#undef SHIFT88#undef SHIFT
8389
84/* Unsigned 16 bit */90/* Unsigned 16 bit */
85#define IN_T uint16_t91#define BSIZE 16
92#define ITYPE uint
86#define IN_MIN 093#define IN_MIN 0
87#define IN_MAX USHRT_MAX94#define IN_MAX USHRT_MAX
88#define SHIFT 1695#define SHIFT 16
@@ -98,11 +105,13 @@
98#undef ENDIAN_CONVERSION105#undef ENDIAN_CONVERSION
99#undef IN_MAX106#undef IN_MAX
100#undef IN_MIN107#undef IN_MIN
101#undef IN_T108#undef BSIZE
109#undef ITYPE
102#undef SHIFT110#undef SHIFT
103111
104/* Signed 32 bit */112/* Signed 32 bit */
105#define IN_T int32_t113#define BSIZE 32
114#define ITYPE int
106#define IN_MIN INT32_MIN115#define IN_MIN INT32_MIN
107#define IN_MAX INT32_MAX116#define IN_MAX INT32_MAX
108#define SIGNED117#define SIGNED
@@ -120,11 +129,13 @@
120#undef SIGNED129#undef SIGNED
121#undef IN_MAX130#undef IN_MAX
122#undef IN_MIN131#undef IN_MIN
123#undef IN_T132#undef BSIZE
133#undef ITYPE
124#undef SHIFT134#undef SHIFT
125135
126/* Unsigned 32 bit */136/* Unsigned 32 bit */
127#define IN_T uint32_t137#define BSIZE 32
138#define ITYPE uint
128#define IN_MIN 0139#define IN_MIN 0
129#define IN_MAX UINT32_MAX140#define IN_MAX UINT32_MAX
130#define SHIFT 32141#define SHIFT 32
@@ -140,7 +151,8 @@
140#undef ENDIAN_CONVERSION151#undef ENDIAN_CONVERSION
141#undef IN_MAX152#undef IN_MAX
142#undef IN_MIN153#undef IN_MIN
143#undef IN_T154#undef BSIZE
155#undef ITYPE
144#undef SHIFT156#undef SHIFT
145157
146t_sample *mixeng_conv[2][2][2][3] = {158t_sample *mixeng_conv[2][2][2][3] = {
147159
=== modified file 'audio/mixeng_template.h'
--- audio/mixeng_template.h 2011-06-16 09:04:43 +0000
+++ audio/mixeng_template.h 2012-09-17 14:09:22 +0000
@@ -31,7 +31,8 @@
31#define HALF (IN_MAX >> 1)31#define HALF (IN_MAX >> 1)
32#endif32#endif
3333
34#define ET glue (ENDIAN_CONVERSION, glue (_, IN_T))34#define ET glue (ENDIAN_CONVERSION, glue (glue (glue (_, ITYPE), BSIZE), _t))
35#define IN_T glue (glue (ITYPE, BSIZE), _t)
3536
36#ifdef FLOAT_MIXENG37#ifdef FLOAT_MIXENG
37static mixeng_real inline glue (conv_, ET) (IN_T v)38static mixeng_real inline glue (conv_, ET) (IN_T v)
@@ -150,3 +151,4 @@
150151
151#undef ET152#undef ET
152#undef HALF153#undef HALF
154#undef IN_T
153155
=== modified file 'audio/paaudio.c'
--- audio/paaudio.c 2011-10-28 17:37:30 +0000
+++ audio/paaudio.c 2012-09-17 14:09:22 +0000
@@ -2,8 +2,7 @@
2#include "qemu-common.h"2#include "qemu-common.h"
3#include "audio.h"3#include "audio.h"
44
5#include <pulse/simple.h>5#include <pulse/pulseaudio.h>
6#include <pulse/error.h>
76
8#define AUDIO_CAP "pulseaudio"7#define AUDIO_CAP "pulseaudio"
9#include "audio_int.h"8#include "audio_int.h"
@@ -15,7 +14,7 @@
15 int live;14 int live;
16 int decr;15 int decr;
17 int rpos;16 int rpos;
18 pa_simple *s;17 pa_stream *stream;
19 void *pcm_buf;18 void *pcm_buf;
20 struct audio_pt pt;19 struct audio_pt pt;
21} PAVoiceOut;20} PAVoiceOut;
@@ -26,17 +25,23 @@
26 int dead;25 int dead;
27 int incr;26 int incr;
28 int wpos;27 int wpos;
29 pa_simple *s;28 pa_stream *stream;
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: