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

Proposed by Fathi Boudra on 2012-09-15
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 2012-09-15 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 on 2012-09-17

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
1=== modified file '.gitignore'
2--- .gitignore 2012-03-15 16:18:18 +0000
3+++ .gitignore 2012-09-17 14:09:22 +0000
4@@ -39,13 +39,16 @@
5 qemu-img-cmds.h
6 qemu-io
7 qemu-ga
8+qemu-bridge-helper
9 qemu-monitor.texi
10+vscclient
11 QMP/qmp-commands.txt
12 test-coroutine
13 test-qmp-input-visitor
14 test-qmp-output-visitor
15 test-string-input-visitor
16 test-string-output-visitor
17+test-visitor-serialization
18 fsdev/virtfs-proxy-helper.1
19 fsdev/virtfs-proxy-helper.pod
20 .gdbinit
21@@ -68,6 +71,10 @@
22 *.vr
23 *.d
24 *.o
25+*.lo
26+*.la
27+*.pc
28+.libs
29 *.swp
30 *.orig
31 .pc
32@@ -75,9 +82,14 @@
33 pc-bios/bios-pq/status
34 pc-bios/vgabios-pq/status
35 pc-bios/optionrom/linuxboot.bin
36+pc-bios/optionrom/linuxboot.raw
37+pc-bios/optionrom/linuxboot.img
38 pc-bios/optionrom/multiboot.bin
39 pc-bios/optionrom/multiboot.raw
40+pc-bios/optionrom/multiboot.img
41 pc-bios/optionrom/kvmvapic.bin
42+pc-bios/optionrom/kvmvapic.raw
43+pc-bios/optionrom/kvmvapic.img
44 .stgit-*
45 cscope.*
46 tags
47
48=== removed directory '.pc'
49=== removed file '.pc/.version'
50--- .pc/.version 2012-02-17 11:27:00 +0000
51+++ .pc/.version 1970-01-01 00:00:00 +0000
52@@ -1,1 +0,0 @@
53-2
54
55=== removed file '.pc/applied-patches'
56--- .pc/applied-patches 2012-04-22 13:53:58 +0000
57+++ .pc/applied-patches 1970-01-01 00:00:00 +0000
58@@ -1,2 +0,0 @@
59-define_AT_EMPTY_PATH.patch
60-powerpc-missing-include.patch
61
62=== removed directory '.pc/define_AT_EMPTY_PATH.patch'
63=== removed directory '.pc/define_AT_EMPTY_PATH.patch/hw'
64=== removed directory '.pc/define_AT_EMPTY_PATH.patch/hw/9pfs'
65=== removed file '.pc/define_AT_EMPTY_PATH.patch/hw/9pfs/virtio-9p-handle.c'
66--- .pc/define_AT_EMPTY_PATH.patch/hw/9pfs/virtio-9p-handle.c 2012-03-15 16:18:18 +0000
67+++ .pc/define_AT_EMPTY_PATH.patch/hw/9pfs/virtio-9p-handle.c 1970-01-01 00:00:00 +0000
68@@ -1,699 +0,0 @@
69-/*
70- * Virtio 9p handle callback
71- *
72- * Copyright IBM, Corp. 2011
73- *
74- * Authors:
75- * Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
76- *
77- * This work is licensed under the terms of the GNU GPL, version 2. See
78- * the COPYING file in the top-level directory.
79- *
80- */
81-
82-#include "hw/virtio.h"
83-#include "virtio-9p.h"
84-#include "virtio-9p-xattr.h"
85-#include <arpa/inet.h>
86-#include <pwd.h>
87-#include <grp.h>
88-#include <sys/socket.h>
89-#include <sys/un.h>
90-#include "qemu-xattr.h"
91-#include <unistd.h>
92-#include <linux/fs.h>
93-#ifdef CONFIG_LINUX_MAGIC_H
94-#include <linux/magic.h>
95-#endif
96-#include <sys/ioctl.h>
97-
98-#ifndef XFS_SUPER_MAGIC
99-#define XFS_SUPER_MAGIC 0x58465342
100-#endif
101-#ifndef EXT2_SUPER_MAGIC
102-#define EXT2_SUPER_MAGIC 0xEF53
103-#endif
104-#ifndef REISERFS_SUPER_MAGIC
105-#define REISERFS_SUPER_MAGIC 0x52654973
106-#endif
107-#ifndef BTRFS_SUPER_MAGIC
108-#define BTRFS_SUPER_MAGIC 0x9123683E
109-#endif
110-
111-struct handle_data {
112- int mountfd;
113- int handle_bytes;
114-};
115-
116-static inline int name_to_handle(int dirfd, const char *name,
117- struct file_handle *fh, int *mnt_id, int flags)
118-{
119- return name_to_handle_at(dirfd, name, fh, mnt_id, flags);
120-}
121-
122-static inline int open_by_handle(int mountfd, const char *fh, int flags)
123-{
124- return open_by_handle_at(mountfd, (struct file_handle *)fh, flags);
125-}
126-
127-static int handle_update_file_cred(int dirfd, const char *name, FsCred *credp)
128-{
129- int fd, ret;
130- fd = openat(dirfd, name, O_NONBLOCK | O_NOFOLLOW);
131- if (fd < 0) {
132- return fd;
133- }
134- ret = fchownat(fd, "", credp->fc_uid, credp->fc_gid, AT_EMPTY_PATH);
135- if (ret < 0) {
136- goto err_out;
137- }
138- ret = fchmod(fd, credp->fc_mode & 07777);
139-err_out:
140- close(fd);
141- return ret;
142-}
143-
144-
145-static int handle_lstat(FsContext *fs_ctx, V9fsPath *fs_path,
146- struct stat *stbuf)
147-{
148- int fd, ret;
149- struct handle_data *data = (struct handle_data *)fs_ctx->private;
150-
151- fd = open_by_handle(data->mountfd, fs_path->data, O_PATH);
152- if (fd < 0) {
153- return fd;
154- }
155- ret = fstatat(fd, "", stbuf, AT_EMPTY_PATH);
156- close(fd);
157- return ret;
158-}
159-
160-static ssize_t handle_readlink(FsContext *fs_ctx, V9fsPath *fs_path,
161- char *buf, size_t bufsz)
162-{
163- int fd, ret;
164- struct handle_data *data = (struct handle_data *)fs_ctx->private;
165-
166- fd = open_by_handle(data->mountfd, fs_path->data, O_PATH);
167- if (fd < 0) {
168- return fd;
169- }
170- ret = readlinkat(fd, "", buf, bufsz);
171- close(fd);
172- return ret;
173-}
174-
175-static int handle_close(FsContext *ctx, V9fsFidOpenState *fs)
176-{
177- return close(fs->fd);
178-}
179-
180-static int handle_closedir(FsContext *ctx, V9fsFidOpenState *fs)
181-{
182- return closedir(fs->dir);
183-}
184-
185-static int handle_open(FsContext *ctx, V9fsPath *fs_path,
186- int flags, V9fsFidOpenState *fs)
187-{
188- struct handle_data *data = (struct handle_data *)ctx->private;
189-
190- fs->fd = open_by_handle(data->mountfd, fs_path->data, flags);
191- return fs->fd;
192-}
193-
194-static int handle_opendir(FsContext *ctx,
195- V9fsPath *fs_path, V9fsFidOpenState *fs)
196-{
197- int ret;
198- ret = handle_open(ctx, fs_path, O_DIRECTORY, fs);
199- if (ret < 0) {
200- return -1;
201- }
202- fs->dir = fdopendir(ret);
203- if (!fs->dir) {
204- return -1;
205- }
206- return 0;
207-}
208-
209-static void handle_rewinddir(FsContext *ctx, V9fsFidOpenState *fs)
210-{
211- return rewinddir(fs->dir);
212-}
213-
214-static off_t handle_telldir(FsContext *ctx, V9fsFidOpenState *fs)
215-{
216- return telldir(fs->dir);
217-}
218-
219-static int handle_readdir_r(FsContext *ctx, V9fsFidOpenState *fs,
220- struct dirent *entry,
221- struct dirent **result)
222-{
223- return readdir_r(fs->dir, entry, result);
224-}
225-
226-static void handle_seekdir(FsContext *ctx, V9fsFidOpenState *fs, off_t off)
227-{
228- return seekdir(fs->dir, off);
229-}
230-
231-static ssize_t handle_preadv(FsContext *ctx, V9fsFidOpenState *fs,
232- const struct iovec *iov,
233- int iovcnt, off_t offset)
234-{
235-#ifdef CONFIG_PREADV
236- return preadv(fs->fd, iov, iovcnt, offset);
237-#else
238- int err = lseek(fs->fd, offset, SEEK_SET);
239- if (err == -1) {
240- return err;
241- } else {
242- return readv(fs->fd, iov, iovcnt);
243- }
244-#endif
245-}
246-
247-static ssize_t handle_pwritev(FsContext *ctx, V9fsFidOpenState *fs,
248- const struct iovec *iov,
249- int iovcnt, off_t offset)
250-{
251- ssize_t ret;
252-#ifdef CONFIG_PREADV
253- ret = pwritev(fs->fd, iov, iovcnt, offset);
254-#else
255- int err = lseek(fs->fd, offset, SEEK_SET);
256- if (err == -1) {
257- return err;
258- } else {
259- ret = writev(fs->fd, iov, iovcnt);
260- }
261-#endif
262-#ifdef CONFIG_SYNC_FILE_RANGE
263- if (ret > 0 && ctx->export_flags & V9FS_IMMEDIATE_WRITEOUT) {
264- /*
265- * Initiate a writeback. This is not a data integrity sync.
266- * We want to ensure that we don't leave dirty pages in the cache
267- * after write when writeout=immediate is sepcified.
268- */
269- sync_file_range(fs->fd, offset, ret,
270- SYNC_FILE_RANGE_WAIT_BEFORE | SYNC_FILE_RANGE_WRITE);
271- }
272-#endif
273- return ret;
274-}
275-
276-static int handle_chmod(FsContext *fs_ctx, V9fsPath *fs_path, FsCred *credp)
277-{
278- int fd, ret;
279- struct handle_data *data = (struct handle_data *)fs_ctx->private;
280-
281- fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK);
282- if (fd < 0) {
283- return fd;
284- }
285- ret = fchmod(fd, credp->fc_mode);
286- close(fd);
287- return ret;
288-}
289-
290-static int handle_mknod(FsContext *fs_ctx, V9fsPath *dir_path,
291- const char *name, FsCred *credp)
292-{
293- int dirfd, ret;
294- struct handle_data *data = (struct handle_data *)fs_ctx->private;
295-
296- dirfd = open_by_handle(data->mountfd, dir_path->data, O_PATH);
297- if (dirfd < 0) {
298- return dirfd;
299- }
300- ret = mknodat(dirfd, name, credp->fc_mode, credp->fc_rdev);
301- if (!ret) {
302- ret = handle_update_file_cred(dirfd, name, credp);
303- }
304- close(dirfd);
305- return ret;
306-}
307-
308-static int handle_mkdir(FsContext *fs_ctx, V9fsPath *dir_path,
309- const char *name, FsCred *credp)
310-{
311- int dirfd, ret;
312- struct handle_data *data = (struct handle_data *)fs_ctx->private;
313-
314- dirfd = open_by_handle(data->mountfd, dir_path->data, O_PATH);
315- if (dirfd < 0) {
316- return dirfd;
317- }
318- ret = mkdirat(dirfd, name, credp->fc_mode);
319- if (!ret) {
320- ret = handle_update_file_cred(dirfd, name, credp);
321- }
322- close(dirfd);
323- return ret;
324-}
325-
326-static int handle_fstat(FsContext *fs_ctx, int fid_type,
327- V9fsFidOpenState *fs, struct stat *stbuf)
328-{
329- int fd;
330-
331- if (fid_type == P9_FID_DIR) {
332- fd = dirfd(fs->dir);
333- } else {
334- fd = fs->fd;
335- }
336- return fstat(fd, stbuf);
337-}
338-
339-static int handle_open2(FsContext *fs_ctx, V9fsPath *dir_path, const char *name,
340- int flags, FsCred *credp, V9fsFidOpenState *fs)
341-{
342- int ret;
343- int dirfd, fd;
344- struct handle_data *data = (struct handle_data *)fs_ctx->private;
345-
346- dirfd = open_by_handle(data->mountfd, dir_path->data, O_PATH);
347- if (dirfd < 0) {
348- return dirfd;
349- }
350- fd = openat(dirfd, name, flags | O_NOFOLLOW, credp->fc_mode);
351- if (fd >= 0) {
352- ret = handle_update_file_cred(dirfd, name, credp);
353- if (ret < 0) {
354- close(fd);
355- fd = ret;
356- } else {
357- fs->fd = fd;
358- }
359- }
360- close(dirfd);
361- return fd;
362-}
363-
364-
365-static int handle_symlink(FsContext *fs_ctx, const char *oldpath,
366- V9fsPath *dir_path, const char *name, FsCred *credp)
367-{
368- int fd, dirfd, ret;
369- struct handle_data *data = (struct handle_data *)fs_ctx->private;
370-
371- dirfd = open_by_handle(data->mountfd, dir_path->data, O_PATH);
372- if (dirfd < 0) {
373- return dirfd;
374- }
375- ret = symlinkat(oldpath, dirfd, name);
376- if (!ret) {
377- fd = openat(dirfd, name, O_PATH | O_NOFOLLOW);
378- if (fd < 0) {
379- ret = fd;
380- goto err_out;
381- }
382- ret = fchownat(fd, "", credp->fc_uid, credp->fc_gid, AT_EMPTY_PATH);
383- close(fd);
384- }
385-err_out:
386- close(dirfd);
387- return ret;
388-}
389-
390-static int handle_link(FsContext *ctx, V9fsPath *oldpath,
391- V9fsPath *dirpath, const char *name)
392-{
393- int oldfd, newdirfd, ret;
394- struct handle_data *data = (struct handle_data *)ctx->private;
395-
396- oldfd = open_by_handle(data->mountfd, oldpath->data, O_PATH);
397- if (oldfd < 0) {
398- return oldfd;
399- }
400- newdirfd = open_by_handle(data->mountfd, dirpath->data, O_PATH);
401- if (newdirfd < 0) {
402- close(oldfd);
403- return newdirfd;
404- }
405- ret = linkat(oldfd, "", newdirfd, name, AT_EMPTY_PATH);
406- close(newdirfd);
407- close(oldfd);
408- return ret;
409-}
410-
411-static int handle_truncate(FsContext *ctx, V9fsPath *fs_path, off_t size)
412-{
413- int fd, ret;
414- struct handle_data *data = (struct handle_data *)ctx->private;
415-
416- fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK | O_WRONLY);
417- if (fd < 0) {
418- return fd;
419- }
420- ret = ftruncate(fd, size);
421- close(fd);
422- return ret;
423-}
424-
425-static int handle_rename(FsContext *ctx, const char *oldpath,
426- const char *newpath)
427-{
428- errno = EOPNOTSUPP;
429- return -1;
430-}
431-
432-static int handle_chown(FsContext *fs_ctx, V9fsPath *fs_path, FsCred *credp)
433-{
434- int fd, ret;
435- struct handle_data *data = (struct handle_data *)fs_ctx->private;
436-
437- fd = open_by_handle(data->mountfd, fs_path->data, O_PATH);
438- if (fd < 0) {
439- return fd;
440- }
441- ret = fchownat(fd, "", credp->fc_uid, credp->fc_gid, AT_EMPTY_PATH);
442- close(fd);
443- return ret;
444-}
445-
446-static int handle_utimensat(FsContext *ctx, V9fsPath *fs_path,
447- const struct timespec *buf)
448-{
449- int ret;
450-#ifdef CONFIG_UTIMENSAT
451- int fd;
452- struct handle_data *data = (struct handle_data *)ctx->private;
453-
454- fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK);
455- if (fd < 0) {
456- return fd;
457- }
458- ret = futimens(fd, buf);
459- close(fd);
460-#else
461- ret = -1;
462- errno = ENOSYS;
463-#endif
464- return ret;
465-}
466-
467-static int handle_remove(FsContext *ctx, const char *path)
468-{
469- errno = EOPNOTSUPP;
470- return -1;
471-}
472-
473-static int handle_fsync(FsContext *ctx, int fid_type,
474- V9fsFidOpenState *fs, int datasync)
475-{
476- int fd;
477-
478- if (fid_type == P9_FID_DIR) {
479- fd = dirfd(fs->dir);
480- } else {
481- fd = fs->fd;
482- }
483-
484- if (datasync) {
485- return qemu_fdatasync(fd);
486- } else {
487- return fsync(fd);
488- }
489-}
490-
491-static int handle_statfs(FsContext *ctx, V9fsPath *fs_path,
492- struct statfs *stbuf)
493-{
494- int fd, ret;
495- struct handle_data *data = (struct handle_data *)ctx->private;
496-
497- fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK);
498- if (fd < 0) {
499- return fd;
500- }
501- ret = fstatfs(fd, stbuf);
502- close(fd);
503- return ret;
504-}
505-
506-static ssize_t handle_lgetxattr(FsContext *ctx, V9fsPath *fs_path,
507- const char *name, void *value, size_t size)
508-{
509- int fd, ret;
510- struct handle_data *data = (struct handle_data *)ctx->private;
511-
512- fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK);
513- if (fd < 0) {
514- return fd;
515- }
516- ret = fgetxattr(fd, name, value, size);
517- close(fd);
518- return ret;
519-}
520-
521-static ssize_t handle_llistxattr(FsContext *ctx, V9fsPath *fs_path,
522- void *value, size_t size)
523-{
524- int fd, ret;
525- struct handle_data *data = (struct handle_data *)ctx->private;
526-
527- fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK);
528- if (fd < 0) {
529- return fd;
530- }
531- ret = flistxattr(fd, value, size);
532- close(fd);
533- return ret;
534-}
535-
536-static int handle_lsetxattr(FsContext *ctx, V9fsPath *fs_path, const char *name,
537- void *value, size_t size, int flags)
538-{
539- int fd, ret;
540- struct handle_data *data = (struct handle_data *)ctx->private;
541-
542- fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK);
543- if (fd < 0) {
544- return fd;
545- }
546- ret = fsetxattr(fd, name, value, size, flags);
547- close(fd);
548- return ret;
549-}
550-
551-static int handle_lremovexattr(FsContext *ctx, V9fsPath *fs_path,
552- const char *name)
553-{
554- int fd, ret;
555- struct handle_data *data = (struct handle_data *)ctx->private;
556-
557- fd = open_by_handle(data->mountfd, fs_path->data, O_NONBLOCK);
558- if (fd < 0) {
559- return fd;
560- }
561- ret = fremovexattr(fd, name);
562- close(fd);
563- return ret;
564-}
565-
566-static int handle_name_to_path(FsContext *ctx, V9fsPath *dir_path,
567- const char *name, V9fsPath *target)
568-{
569- char buffer[PATH_MAX];
570- struct file_handle *fh;
571- int dirfd, ret, mnt_id;
572- struct handle_data *data = (struct handle_data *)ctx->private;
573-
574- /* "." and ".." are not allowed */
575- if (!strcmp(name, ".") || !strcmp(name, "..")) {
576- errno = EINVAL;
577- return -1;
578-
579- }
580- if (dir_path) {
581- dirfd = open_by_handle(data->mountfd, dir_path->data, O_PATH);
582- } else {
583- /* relative to export root */
584- dirfd = open(rpath(ctx, ".", buffer), O_DIRECTORY);
585- }
586- if (dirfd < 0) {
587- return dirfd;
588- }
589- fh = g_malloc(sizeof(struct file_handle) + data->handle_bytes);
590- fh->handle_bytes = data->handle_bytes;
591- /* add a "./" at the beginning of the path */
592- snprintf(buffer, PATH_MAX, "./%s", name);
593- /* flag = 0 imply don't follow symlink */
594- ret = name_to_handle(dirfd, buffer, fh, &mnt_id, 0);
595- if (!ret) {
596- target->data = (char *)fh;
597- target->size = sizeof(struct file_handle) + data->handle_bytes;
598- } else {
599- g_free(fh);
600- }
601- close(dirfd);
602- return ret;
603-}
604-
605-static int handle_renameat(FsContext *ctx, V9fsPath *olddir,
606- const char *old_name, V9fsPath *newdir,
607- const char *new_name)
608-{
609- int olddirfd, newdirfd, ret;
610- struct handle_data *data = (struct handle_data *)ctx->private;
611-
612- olddirfd = open_by_handle(data->mountfd, olddir->data, O_PATH);
613- if (olddirfd < 0) {
614- return olddirfd;
615- }
616- newdirfd = open_by_handle(data->mountfd, newdir->data, O_PATH);
617- if (newdirfd < 0) {
618- close(olddirfd);
619- return newdirfd;
620- }
621- ret = renameat(olddirfd, old_name, newdirfd, new_name);
622- close(newdirfd);
623- close(olddirfd);
624- return ret;
625-}
626-
627-static int handle_unlinkat(FsContext *ctx, V9fsPath *dir,
628- const char *name, int flags)
629-{
630- int dirfd, ret;
631- struct handle_data *data = (struct handle_data *)ctx->private;
632- int rflags;
633-
634- dirfd = open_by_handle(data->mountfd, dir->data, O_PATH);
635- if (dirfd < 0) {
636- return dirfd;
637- }
638-
639- rflags = 0;
640- if (flags & P9_DOTL_AT_REMOVEDIR) {
641- rflags |= AT_REMOVEDIR;
642- }
643-
644- ret = unlinkat(dirfd, name, rflags);
645-
646- close(dirfd);
647- return ret;
648-}
649-
650-static int handle_ioc_getversion(FsContext *ctx, V9fsPath *path,
651- mode_t st_mode, uint64_t *st_gen)
652-{
653- int err;
654- V9fsFidOpenState fid_open;
655-
656- /*
657- * Do not try to open special files like device nodes, fifos etc
658- * We can get fd for regular files and directories only
659- */
660- if (!S_ISREG(st_mode) && !S_ISDIR(st_mode)) {
661- return 0;
662- }
663- err = handle_open(ctx, path, O_RDONLY, &fid_open);
664- if (err < 0) {
665- return err;
666- }
667- err = ioctl(fid_open.fd, FS_IOC_GETVERSION, st_gen);
668- handle_close(ctx, &fid_open);
669- return err;
670-}
671-
672-static int handle_init(FsContext *ctx)
673-{
674- int ret, mnt_id;
675- struct statfs stbuf;
676- struct file_handle fh;
677- struct handle_data *data = g_malloc(sizeof(struct handle_data));
678-
679- data->mountfd = open(ctx->fs_root, O_DIRECTORY);
680- if (data->mountfd < 0) {
681- ret = data->mountfd;
682- goto err_out;
683- }
684- ret = statfs(ctx->fs_root, &stbuf);
685- if (!ret) {
686- switch (stbuf.f_type) {
687- case EXT2_SUPER_MAGIC:
688- case BTRFS_SUPER_MAGIC:
689- case REISERFS_SUPER_MAGIC:
690- case XFS_SUPER_MAGIC:
691- ctx->exops.get_st_gen = handle_ioc_getversion;
692- break;
693- }
694- }
695- memset(&fh, 0, sizeof(struct file_handle));
696- ret = name_to_handle(data->mountfd, ".", &fh, &mnt_id, 0);
697- if (ret && errno == EOVERFLOW) {
698- data->handle_bytes = fh.handle_bytes;
699- ctx->private = data;
700- ret = 0;
701- goto out;
702- }
703- /* we got 0 byte handle ? */
704- ret = -1;
705- close(data->mountfd);
706-err_out:
707- g_free(data);
708-out:
709- return ret;
710-}
711-
712-static int handle_parse_opts(QemuOpts *opts, struct FsDriverEntry *fse)
713-{
714- const char *sec_model = qemu_opt_get(opts, "security_model");
715- const char *path = qemu_opt_get(opts, "path");
716-
717- if (sec_model) {
718- fprintf(stderr, "Invalid argument security_model specified with handle fsdriver\n");
719- return -1;
720- }
721-
722- if (!path) {
723- fprintf(stderr, "fsdev: No path specified.\n");
724- return -1;
725- }
726- fse->path = g_strdup(path);
727- return 0;
728-
729-}
730-
731-FileOperations handle_ops = {
732- .parse_opts = handle_parse_opts,
733- .init = handle_init,
734- .lstat = handle_lstat,
735- .readlink = handle_readlink,
736- .close = handle_close,
737- .closedir = handle_closedir,
738- .open = handle_open,
739- .opendir = handle_opendir,
740- .rewinddir = handle_rewinddir,
741- .telldir = handle_telldir,
742- .readdir_r = handle_readdir_r,
743- .seekdir = handle_seekdir,
744- .preadv = handle_preadv,
745- .pwritev = handle_pwritev,
746- .chmod = handle_chmod,
747- .mknod = handle_mknod,
748- .mkdir = handle_mkdir,
749- .fstat = handle_fstat,
750- .open2 = handle_open2,
751- .symlink = handle_symlink,
752- .link = handle_link,
753- .truncate = handle_truncate,
754- .rename = handle_rename,
755- .chown = handle_chown,
756- .utimensat = handle_utimensat,
757- .remove = handle_remove,
758- .fsync = handle_fsync,
759- .statfs = handle_statfs,
760- .lgetxattr = handle_lgetxattr,
761- .llistxattr = handle_llistxattr,
762- .lsetxattr = handle_lsetxattr,
763- .lremovexattr = handle_lremovexattr,
764- .name_to_path = handle_name_to_path,
765- .renameat = handle_renameat,
766- .unlinkat = handle_unlinkat,
767-};
768
769=== removed directory '.pc/powerpc-missing-include.patch'
770=== removed file '.pc/powerpc-missing-include.patch/cache-utils.h'
771--- .pc/powerpc-missing-include.patch/cache-utils.h 2012-04-22 13:53:58 +0000
772+++ .pc/powerpc-missing-include.patch/cache-utils.h 1970-01-01 00:00:00 +0000
773@@ -1,41 +0,0 @@
774-#ifndef QEMU_CACHE_UTILS_H
775-#define QEMU_CACHE_UTILS_H
776-
777-#if defined(_ARCH_PPC)
778-struct qemu_cache_conf {
779- unsigned long dcache_bsize;
780- unsigned long icache_bsize;
781-};
782-
783-extern struct qemu_cache_conf qemu_cache_conf;
784-
785-void qemu_cache_utils_init(char **envp);
786-
787-/* mildly adjusted code from tcg-dyngen.c */
788-static inline void flush_icache_range(uintptr_t start, uintptr_t stop)
789-{
790- unsigned long p, start1, stop1;
791- unsigned long dsize = qemu_cache_conf.dcache_bsize;
792- unsigned long isize = qemu_cache_conf.icache_bsize;
793-
794- start1 = start & ~(dsize - 1);
795- stop1 = (stop + dsize - 1) & ~(dsize - 1);
796- for (p = start1; p < stop1; p += dsize) {
797- asm volatile ("dcbst 0,%0" : : "r"(p) : "memory");
798- }
799- asm volatile ("sync" : : : "memory");
800-
801- start &= start & ~(isize - 1);
802- stop1 = (stop + isize - 1) & ~(isize - 1);
803- for (p = start1; p < stop1; p += isize) {
804- asm volatile ("icbi 0,%0" : : "r"(p) : "memory");
805- }
806- asm volatile ("sync" : : : "memory");
807- asm volatile ("isync" : : : "memory");
808-}
809-
810-#else
811-#define qemu_cache_utils_init(envp) do { (void) (envp); } while (0)
812-#endif
813-
814-#endif /* QEMU_CACHE_UTILS_H */
815
816=== modified file 'CODING_STYLE'
817--- CODING_STYLE 2012-03-15 16:18:18 +0000
818+++ CODING_STYLE 2012-09-17 14:09:22 +0000
819@@ -1,4 +1,4 @@
820-Qemu Coding Style
821+QEMU Coding Style
822 =================
823
824 Please use the script checkpatch.pl in the scripts directory to check
825
826=== modified file 'Changelog'
827--- Changelog 2012-02-02 14:25:28 +0000
828+++ Changelog 2012-09-17 14:09:22 +0000
829@@ -447,7 +447,7 @@
830 - multi-target build
831 - fixed: no error code in hardware interrupts
832 - fixed: pop ss, mov ss, x and sti disable hardware irqs for the next insn
833- - correct single stepping thru string operations
834+ - correct single stepping through string operations
835 - preliminary SPARC target support (Thomas M. Ogrisegg)
836 - tun-fd option (Rusty Russell)
837 - automatic IDE geometry detection
838
839=== modified file 'Changelog.LINARO'
840--- Changelog.LINARO 2012-03-15 16:18:18 +0000
841+++ Changelog.LINARO 2012-09-17 14:09:22 +0000
842@@ -12,6 +12,40 @@
843 Bug numbers refer to Launchpad qemu-linaro bugs, eg:
844 https://bugs.launchpad.net/qemu-linaro/+bug/703094
845
846+version 2012.09:
847+ - No significant changes, rebased onto upstream v1.2.0.
848+
849+version 2012.08:
850+ - Fixes #1004205: the -dtb option now accepts a filename
851+ with no directory as being in the current directory
852+ (in line with -kernel and -initrd).
853+
854+version 2012.07:
855+ - Fixes #1008338: QEMU built to use the 'Tiny Code
856+ Interpreter' rather than JITting to native code now
857+ works correctly (previously it would hang booting a
858+ Linux guest).
859+
860+version 2012.06:
861+ - No significant changes, rebased onto upstream v1.1.0.
862+
863+version 2012.05:
864+ - Fixes #978694: Beagle bootrom emulation now correctly handles
865+ FAT12/FAT16 images (thanks to Peter Chubb for the bug report
866+ and patch).
867+ - We now support running ARM BE8 userspace binaries (ie
868+ byte-invariant big-endian data and little-endian code).
869+
870+version 2012.04:
871+ - Fixes #928432: compiling spice support for i386 should
872+ no longer give compile warnings/errors.
873+ - Fixes #953544: 'SETEND' in Thumb mode should now UNDEF,
874+ in line with the behaviour for the ARM encoding.
875+ - Fixes #956799: add support for the ppoll syscall for
876+ ARM linux-user emulation.
877+ - Fixes #970252: add the OMAP36xx UART FIFO status registers
878+ (thanks to Jan Vesely for the bug report and patch).
879+
880 version 2012.03:
881 - Fixes #932856: the OMAP3 boot rom emulation now tries
882 sector 256 in raw mode as well as sector 0.
883
884=== modified file 'MAINTAINERS'
885--- MAINTAINERS 2012-03-15 16:18:18 +0000
886+++ MAINTAINERS 2012-09-17 14:09:22 +0000
887@@ -78,7 +78,7 @@
888
889 M68K
890 M: Paul Brook <paul@codesourcery.com>
891-S: Maintained
892+S: Odd Fixes
893 F: target-m68k/
894
895 MicroBlaze
896@@ -88,7 +88,7 @@
897
898 MIPS
899 M: Aurelien Jarno <aurelien@aurel32.net>
900-S: Maintained
901+S: Odd Fixes
902 F: target-mips/
903
904 PowerPC
905@@ -104,7 +104,7 @@
906
907 SH4
908 M: Aurelien Jarno <aurelien@aurel32.net>
909-S: Maintained
910+S: Odd Fixes
911 F: target-sh4/
912
913 SPARC
914@@ -112,6 +112,11 @@
915 S: Maintained
916 F: target-sparc/
917
918+UniCore32
919+M: Guan Xuetao <gxt@mprc.pku.edu.cn>
920+S: Maintained
921+F: target-unicore32/
922+
923 X86
924 M: qemu-devel@nongnu.org
925 S: Odd Fixes
926@@ -202,6 +207,12 @@
927 S: Orphan
928 F: hw/gumstix.c
929
930+i.MX31
931+M: Peter Chubb <peter.chubb@nicta.com.au>
932+S: Odd fixes
933+F: hw/imx*
934+F: hw/kzm.c
935+
936 Integrator CP
937 M: Paul Brook <paul@codesourcery.com>
938 M: Peter Maydell <peter.maydell@linaro.org>
939@@ -251,6 +262,13 @@
940 S: Maintained
941 F: hw/versatilepb.c
942
943+Xilinx Zynq
944+M: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
945+S: Maintained
946+F: hw/xilinx_zynq.c
947+F: hw/zynq_slcr.c
948+F: hw/cadence_*
949+
950 CRIS Machines
951 -------------
952 Axis Dev88
953@@ -299,6 +317,11 @@
954 S: Maintained
955 F: hw/petalogix_s3adsp1800.c
956
957+petalogix_ml605
958+M: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
959+S: Maintained
960+F: hw/petalogix_ml605_mmu.c
961+
962 MIPS Machines
963 -------------
964 Jazz
965@@ -382,12 +405,21 @@
966 S: Maintained
967 F: hw/s390-*.c
968
969+UniCore32 Machines
970+-------------
971+PKUnity-3 SoC initramfs-with-busybox
972+M: Guan Xuetao <gxt@mprc.pku.edu.cn>
973+S: Maintained
974+F: hw/puv3*
975+F: hw/unicore32/
976+
977 X86 Machines
978 ------------
979 PC
980 M: Anthony Liguori <aliguori@us.ibm.com>
981 S: Supported
982-F: hw/pc.[ch] hw/pc_piix.c
983+F: hw/pc.[ch]
984+F: hw/pc_piix.c
985
986 Xtensa Machines
987 ---------------
988@@ -424,7 +456,7 @@
989 S: Supported
990 F: hw/virtio-scsi.*
991 F: hw/scsi*
992-T: git://github.com/bonzini/qemu.git scsi-next
993+T: git git://github.com/bonzini/qemu.git scsi-next
994
995 LSI53C895A
996 M: Paul Brook <paul@codesourcery.com>
997@@ -449,9 +481,9 @@
998 virtio-9p
999 M: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
1000 S: Supported
1001-F: hw/9pfs/ fsdev/
1002-T: https://github.com/kvaneesh/QEMU
1003-
1004+F: hw/9pfs/
1005+F: fsdev/
1006+T: git git://github.com/kvaneesh/QEMU.git
1007
1008 virtio-blk
1009 M: Kevin Wolf <kwolf@redhat.com>
1010@@ -464,6 +496,17 @@
1011 F: hw/virtio-serial*
1012 F: hw/virtio-console*
1013
1014+Xilinx EDK
1015+M: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
1016+M: Edgar E. Iglesias <edgar.iglesias@gmail.com>
1017+S: Maintained
1018+F: hw/xilinx_axi*
1019+F: hw/xilinx_uartlite.c
1020+F: hw/xilinx_intc.c
1021+F: hw/xilinx_ethlite.c
1022+F: hw/xilinx_timer.c
1023+F: hw/xilinx.h
1024+
1025 Subsystems
1026 ----------
1027 Audio
1028@@ -482,6 +525,12 @@
1029 S: Maintained
1030 F: qemu-char.c
1031
1032+Device Tree
1033+M: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
1034+M: Alexander Graf <agraf@suse.de>
1035+S: Maintained
1036+F: device-tree.[ch]
1037+
1038 GDB stub
1039 M: qemu-devel@nongnu.org
1040 S: Odd Fixes
1041@@ -519,9 +568,10 @@
1042
1043 Network device layer
1044 M: Anthony Liguori <aliguori@us.ibm.com>
1045-M: Mark McLoughlin <markmc@redhat.com>
1046+M: Stefan Hajnoczi <stefanha@gmail.com>
1047 S: Maintained
1048 F: net/
1049+T: git git://github.com/stefanha/qemu.git net
1050
1051 Network Block Device (NBD)
1052 M: Paolo Bonzini <pbonzini@redhat.com>
1053@@ -529,19 +579,22 @@
1054 F: block/nbd.c
1055 F: nbd.*
1056 F: qemu-nbd.c
1057-T: git://github.com/bonzini/qemu.git nbd-next
1058+T: git git://github.com/bonzini/qemu.git nbd-next
1059
1060 SLIRP
1061 M: Jan Kiszka <jan.kiszka@siemens.com>
1062 S: Maintained
1063 F: slirp/
1064-T: git://git.kiszka.org/qemu.git queues/slirp
1065+T: git git://git.kiszka.org/qemu.git queues/slirp
1066
1067 Tracing
1068-M: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
1069+M: Stefan Hajnoczi <stefanha@gmail.com>
1070 S: Maintained
1071 F: trace/
1072-T: git://github.com/stefanha/qemu.git tracing
1073+F: scripts/tracetool.py
1074+F: scripts/tracetool/
1075+F: docs/tracing.txt
1076+T: git git://github.com/stefanha/qemu.git tracing
1077
1078 Checkpatch
1079 M: Blue Swirl <blauwirbel@gmail.com>
1080@@ -555,11 +608,6 @@
1081 S: Maintained
1082 F: bsd-user/
1083
1084-Darwin user
1085-M: qemu-devel@nongnu.org
1086-S: Orphan
1087-F: darwin-user/
1088-
1089 Linux user
1090 M: Riku Voipio <riku.voipio@iki.fi>
1091 S: Maintained
1092@@ -621,4 +669,26 @@
1093 TCI target
1094 M: Stefan Weil <sw@weilnetz.de>
1095 S: Maintained
1096-F: tcg/tci
1097+F: tcg/tci/
1098+
1099+Stable branches
1100+---------------
1101+Stable 1.0
1102+L: qemu-stable@nongnu.org
1103+T: git git://git.qemu.org/qemu-stable-1.0.git
1104+S: Orphan
1105+
1106+Stable 0.15
1107+L: qemu-stable@nongnu.org
1108+T: git git://git.qemu.org/qemu-stable-0.15.git
1109+S: Orphan
1110+
1111+Stable 0.14
1112+L: qemu-stable@nongnu.org
1113+T: git git://git.qemu.org/qemu-stable-0.14.git
1114+S: Orphan
1115+
1116+Stable 0.10
1117+L: qemu-stable@nongnu.org
1118+T: git git://git.qemu.org/qemu-stable-0.10.git
1119+S: Orphan
1120
1121=== modified file 'Makefile'
1122--- Makefile 2012-03-15 16:18:18 +0000
1123+++ Makefile 2012-09-17 14:09:22 +0000
1124@@ -3,16 +3,10 @@
1125 # Always point to the root of the build tree (needs GNU make).
1126 BUILD_DIR=$(CURDIR)
1127
1128-GENERATED_HEADERS = config-host.h trace.h qemu-options.def
1129-ifeq ($(TRACE_BACKEND),dtrace)
1130-GENERATED_HEADERS += trace-dtrace.h
1131-endif
1132-GENERATED_HEADERS += qmp-commands.h qapi-types.h qapi-visit.h
1133-GENERATED_SOURCES += qmp-marshal.c qapi-types.c qapi-visit.c
1134-
1135+# All following code might depend on configuration variables
1136 ifneq ($(wildcard config-host.mak),)
1137 # Put the all: rule here so that config-host.mak can contain dependencies.
1138-all: build-all
1139+all:
1140 include config-host.mak
1141 include $(SRC_PATH)/rules.mak
1142 config-host.mak: $(SRC_PATH)/configure
1143@@ -24,15 +18,22 @@
1144 @exit 1
1145 endif
1146
1147+GENERATED_HEADERS = config-host.h trace.h qemu-options.def
1148+ifeq ($(TRACE_BACKEND),dtrace)
1149+GENERATED_HEADERS += trace-dtrace.h
1150+endif
1151+GENERATED_HEADERS += qmp-commands.h qapi-types.h qapi-visit.h
1152+GENERATED_SOURCES += qmp-marshal.c qapi-types.c qapi-visit.c trace.c
1153+
1154 # Don't try to regenerate Makefile or configure
1155 # We don't generate any of them
1156 Makefile: ;
1157 configure: ;
1158
1159 .PHONY: all clean cscope distclean dvi html info install install-doc \
1160- pdf recurse-all speed tar tarbin test build-all
1161+ pdf recurse-all speed test dist
1162
1163-$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)
1164+$(call set-vpath, $(SRC_PATH))
1165
1166 LIBS+=-lz $(LIBS_TOOLS)
1167
1168@@ -81,7 +82,7 @@
1169
1170 -include config-all-devices.mak
1171
1172-build-all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all
1173+all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all
1174
1175 config-host.h: config-host.h-timestamp
1176 config-host.h-timestamp: config-host.mak
1177@@ -90,19 +91,18 @@
1178
1179 SUBDIR_RULES=$(patsubst %,subdir-%, $(TARGET_DIRS))
1180
1181-subdir-%: $(GENERATED_HEADERS)
1182+subdir-%:
1183 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V="$(V)" TARGET_DIR="$*/" all,)
1184
1185 ifneq ($(wildcard config-host.mak),)
1186 include $(SRC_PATH)/Makefile.objs
1187 endif
1188
1189-$(common-obj-y): $(GENERATED_HEADERS)
1190 subdir-libcacard: $(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o
1191
1192-$(filter %-softmmu,$(SUBDIR_RULES)): $(trace-obj-y) $(common-obj-y) subdir-libdis
1193+$(filter %-softmmu,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) $(common-obj-y) $(extra-obj-y) subdir-libdis
1194
1195-$(filter %-user,$(SUBDIR_RULES)): $(GENERATED_HEADERS) $(trace-obj-y) subdir-libdis-user subdir-libuser
1196+$(filter %-user,$(SUBDIR_RULES)): $(universal-obj-y) $(trace-obj-y) subdir-libdis-user subdir-libuser
1197
1198 ROMSUBDIR_RULES=$(patsubst %,romsubdir-%, $(ROMS))
1199 romsubdir-%:
1200@@ -120,7 +120,7 @@
1201
1202 ui/cocoa.o: ui/cocoa.m
1203
1204-ui/sdl.o audio/sdlaudio.o ui/sdl_zoom.o baum.o: QEMU_CFLAGS += $(SDL_CFLAGS)
1205+ui/sdl.o audio/sdlaudio.o ui/sdl_zoom.o hw/baum.o: QEMU_CFLAGS += $(SDL_CFLAGS)
1206
1207 ui/vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
1208
1209@@ -141,19 +141,20 @@
1210 install-libcacard:
1211 @echo "libtool is missing, please install and rerun configure"; exit 1
1212 else
1213-libcacard.la: $(GENERATED_HEADERS) $(oslib-obj-y) qemu-timer-common.o $(addsuffix .lo, $(basename $(trace-obj-y)))
1214+libcacard.la: $(oslib-obj-y) qemu-timer-common.o $(addsuffix .lo, $(basename $(trace-obj-y)))
1215 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" libcacard.la,)
1216
1217 install-libcacard: libcacard.la
1218 $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" TARGET_DIR="$*/" install-libcacard,)
1219 endif
1220+
1221 ######################################################################
1222
1223 qemu-img.o: qemu-img-cmds.h
1224-qemu-img.o qemu-tool.o qemu-nbd.o qemu-io.o cmd.o qemu-ga.o: $(GENERATED_HEADERS)
1225
1226 tools-obj-y = $(oslib-obj-y) $(trace-obj-y) qemu-tool.o qemu-timer.o \
1227- qemu-timer-common.o main-loop.o notify.o iohandler.o cutils.o async.o
1228+ qemu-timer-common.o main-loop.o notify.o \
1229+ iohandler.o cutils.o iov.o async.o
1230 tools-obj-$(CONFIG_POSIX) += compatfd.o
1231
1232 qemu-img$(EXESUF): qemu-img.o $(tools-obj-y) $(block-obj-y)
1233@@ -161,7 +162,9 @@
1234 qemu-io$(EXESUF): qemu-io.o cmd.o $(tools-obj-y) $(block-obj-y)
1235
1236 qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o
1237-qemu-bridge-helper.o: $(GENERATED_HEADERS)
1238+
1239+vscclient$(EXESUF): $(libcacard-y) $(oslib-obj-y) $(trace-obj-y) $(tools-obj-y) qemu-timer-common.o libcacard/vscclient.o
1240+ $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(libcacard_libs) $(LIBS)," LINK $@")
1241
1242 fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o oslib-posix.o $(trace-obj-y)
1243 fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
1244@@ -169,9 +172,8 @@
1245 qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
1246 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@")
1247
1248-$(qapi-obj-y): $(GENERATED_HEADERS)
1249-qapi-dir := $(BUILD_DIR)/qapi-generated
1250 qemu-ga$(EXESUF): LIBS = $(LIBS_QGA)
1251+qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated
1252
1253 gen-out-type = $(subst .,-,$(suffix $@))
1254
1255@@ -179,32 +181,32 @@
1256 include $(SRC_PATH)/tests/Makefile
1257 endif
1258
1259-$(qapi-dir)/qga-qapi-types.c $(qapi-dir)/qga-qapi-types.h :\
1260-$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py
1261- $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "$(qapi-dir)" -p "qga-" < $<, " GEN $@")
1262-$(qapi-dir)/qga-qapi-visit.c $(qapi-dir)/qga-qapi-visit.h :\
1263-$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-visit.py
1264- $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "$(qapi-dir)" -p "qga-" < $<, " GEN $@")
1265-$(qapi-dir)/qga-qmp-commands.h $(qapi-dir)/qga-qmp-marshal.c :\
1266-$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-commands.py
1267- $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o "$(qapi-dir)" -p "qga-" < $<, " GEN $@")
1268+qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py
1269+
1270+qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h :\
1271+$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
1272+ $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@")
1273+qga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h :\
1274+$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
1275+ $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@")
1276+qga/qapi-generated/qga-qmp-commands.h qga/qapi-generated/qga-qmp-marshal.c :\
1277+$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
1278+ $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o qga/qapi-generated -p "qga-" < $<, " GEN $@")
1279
1280 qapi-types.c qapi-types.h :\
1281-$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py
1282+$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py)
1283 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "." < $<, " GEN $@")
1284 qapi-visit.c qapi-visit.h :\
1285-$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py
1286+$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-visit.py $(qapi-py)
1287 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "." < $<, " GEN $@")
1288 qmp-commands.h qmp-marshal.c :\
1289-$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py
1290+$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)
1291 $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -m -o "." < $<, " GEN $@")
1292
1293-QGALIB_OBJ=$(addprefix $(qapi-dir)/, qga-qapi-types.o qga-qapi-visit.o qga-qmp-marshal.o)
1294-QGALIB_GEN=$(addprefix $(qapi-dir)/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h)
1295-$(QGALIB_OBJ): $(QGALIB_GEN) $(GENERATED_HEADERS)
1296-$(qga-obj-y) qemu-ga.o: $(QGALIB_GEN) $(GENERATED_HEADERS)
1297+QGALIB_GEN=$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h)
1298+$(qga-obj-y) qemu-ga.o: $(QGALIB_GEN)
1299
1300-qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(tools-obj-y) $(qapi-obj-y) $(qobject-obj-y) $(version-obj-y) $(QGALIB_OBJ)
1301+qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(tools-obj-y) $(qapi-obj-y) $(qobject-obj-y) $(version-obj-y)
1302
1303 QEMULIBS=libhw32 libhw64 libuser libdis libdis-user
1304
1305@@ -212,23 +214,30 @@
1306 # avoid old build problems by removing potentially incorrect old files
1307 rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
1308 rm -f qemu-options.def
1309- rm -f *.o *.d *.a *.lo $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~
1310+ find . -name '*.[od]' -exec rm -f {} +
1311+ rm -f *.a *.lo $(TOOLS) $(HELPERS-y) qemu-ga TAGS cscope.* *.pod *~ */*~
1312 rm -Rf .libs
1313- 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
1314 rm -f qemu-img-cmds.h
1315- rm -f trace/*.o trace/*.d
1316- rm -f trace.c trace.h trace.c-timestamp trace.h-timestamp
1317 rm -f trace-dtrace.dtrace trace-dtrace.dtrace-timestamp
1318+ @# May not be present in GENERATED_HEADERS
1319 rm -f trace-dtrace.h trace-dtrace.h-timestamp
1320- rm -f $(GENERATED_HEADERS)
1321- rm -f $(GENERATED_SOURCES)
1322- rm -rf $(qapi-dir)
1323+ rm -f $(foreach f,$(GENERATED_HEADERS),$(f) $(f)-timestamp)
1324+ rm -f $(foreach f,$(GENERATED_SOURCES),$(f) $(f)-timestamp)
1325+ rm -rf qapi-generated
1326+ rm -rf qga/qapi-generated
1327 $(MAKE) -C tests/tcg clean
1328 for d in $(ALL_SUBDIRS) $(QEMULIBS) libcacard; do \
1329 if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \
1330 rm -f $$d/qemu-options.def; \
1331 done
1332
1333+VERSION ?= $(shell cat VERSION)
1334+
1335+dist: qemu-$(VERSION).tar.bz2
1336+
1337+qemu-%.tar.bz2:
1338+ $(SRC_PATH)/scripts/make-release "$(SRC_PATH)" "$(patsubst qemu-%.tar.bz2,%,$@)"
1339+
1340 distclean: clean
1341 rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.texi qemu-img-cmds.texi qemu-monitor.texi
1342 rm -f config-all-devices.mak
1343@@ -246,7 +255,8 @@
1344
1345 KEYMAPS=da en-gb et fr fr-ch is lt modifiers no pt-br sv \
1346 ar de en-us fi fr-be hr it lv nl pl ru th \
1347-common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
1348+common de-ch es fo fr-ca hu ja mk nl-be pt sl tr \
1349+bepo
1350
1351 ifdef INSTALL_BLOBS
1352 BLOBS=bios.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \
1353@@ -254,8 +264,8 @@
1354 ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc \
1355 pxe-e1000.rom pxe-eepro100.rom pxe-ne2k_pci.rom \
1356 pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \
1357+qemu-icon.bmp \
1358 bamboo.dtb petalogix-s3adsp1800.dtb petalogix-ml605.dtb \
1359-mpc8544ds.dtb \
1360 multiboot.bin linuxboot.bin kvmvapic.bin \
1361 s390-zipl.rom \
1362 spapr-rtas.bin slof.bin \
1363@@ -265,8 +275,9 @@
1364 endif
1365
1366 install-doc: $(DOCS)
1367- $(INSTALL_DIR) "$(DESTDIR)$(docdir)"
1368- $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
1369+ $(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
1370+ $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(qemu_docdir)"
1371+ $(INSTALL_DATA) QMP/qmp-commands.txt "$(DESTDIR)$(qemu_docdir)"
1372 ifdef CONFIG_POSIX
1373 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
1374 $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
1375@@ -277,11 +288,18 @@
1376 $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
1377 $(INSTALL_DATA) fsdev/virtfs-proxy-helper.1 "$(DESTDIR)$(mandir)/man1"
1378 endif
1379-install-sysconfig:
1380- $(INSTALL_DIR) "$(DESTDIR)$(sysconfdir)/qemu"
1381- $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(sysconfdir)/qemu"
1382-
1383-install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig
1384+
1385+install-datadir:
1386+ $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)"
1387+
1388+install-confdir:
1389+ $(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)"
1390+
1391+install-sysconfig: install-datadir install-confdir
1392+ $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)"
1393+ $(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/cpus-x86_64.conf "$(DESTDIR)$(qemu_datadir)"
1394+
1395+install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig install-datadir
1396 $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
1397 ifneq ($(TOOLS),)
1398 $(INSTALL_PROG) $(STRIP_OPT) $(TOOLS) "$(DESTDIR)$(bindir)"
1399@@ -291,15 +309,14 @@
1400 $(INSTALL_PROG) $(STRIP_OPT) $(HELPERS-y) "$(DESTDIR)$(libexecdir)"
1401 endif
1402 ifneq ($(BLOBS),)
1403- $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
1404 set -e; for x in $(BLOBS); do \
1405 [ -e "$(SRC_PATH)/pc-bios/$$x" ] || continue; \
1406- $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
1407+ $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \
1408 done
1409 endif
1410- $(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
1411+ $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps"
1412 set -e; for x in $(KEYMAPS); do \
1413- $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
1414+ $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \
1415 done
1416 for d in $(TARGET_DIRS); do \
1417 $(MAKE) -C $$d $@ || exit 1 ; \
1418@@ -326,7 +343,7 @@
1419 $(call quiet-command,texi2dvi $(TEXIFLAG) -I . $<," GEN $@")
1420
1421 %.html: %.texi
1422- $(call quiet-command,$(MAKEINFO) $(MAKEINFOFLAGS) --html $< -o $@, \
1423+ $(call quiet-command,LC_ALL=C $(MAKEINFO) $(MAKEINFOFLAGS) --html $< -o $@, \
1424 " GEN $@")
1425
1426 %.info: %.texi
1427@@ -350,25 +367,25 @@
1428 qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi
1429 $(call quiet-command, \
1430 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu.pod && \
1431- pod2man --section=1 --center=" " --release=" " qemu.pod > $@, \
1432+ $(POD2MAN) --section=1 --center=" " --release=" " qemu.pod > $@, \
1433 " GEN $@")
1434
1435 qemu-img.1: qemu-img.texi qemu-img-cmds.texi
1436 $(call quiet-command, \
1437 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-img.pod && \
1438- pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@, \
1439+ $(POD2MAN) --section=1 --center=" " --release=" " qemu-img.pod > $@, \
1440 " GEN $@")
1441
1442 fsdev/virtfs-proxy-helper.1: fsdev/virtfs-proxy-helper.texi
1443 $(call quiet-command, \
1444 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< fsdev/virtfs-proxy-helper.pod && \
1445- pod2man --section=1 --center=" " --release=" " fsdev/virtfs-proxy-helper.pod > $@, \
1446+ $(POD2MAN) --section=1 --center=" " --release=" " fsdev/virtfs-proxy-helper.pod > $@, \
1447 " GEN $@")
1448
1449 qemu-nbd.8: qemu-nbd.texi
1450 $(call quiet-command, \
1451 perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-nbd.pod && \
1452- pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
1453+ $(POD2MAN) --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \
1454 " GEN $@")
1455
1456 dvi: qemu-doc.dvi qemu-tech.dvi
1457@@ -380,15 +397,10 @@
1458 qemu-img.texi qemu-nbd.texi qemu-options.texi \
1459 qemu-monitor.texi qemu-img-cmds.texi
1460
1461-VERSION ?= $(shell cat VERSION)
1462-FILE = qemu-$(VERSION)
1463-
1464-# tar release (use 'make -k tar' on a checkouted tree)
1465-tar:
1466- rm -rf /tmp/$(FILE)
1467- cp -r . /tmp/$(FILE)
1468- cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS --exclude .git --exclude .svn
1469- rm -rf /tmp/$(FILE)
1470+# Add a dependency on the generated files, so that they are always
1471+# rebuilt before other object files
1472+Makefile: $(GENERATED_HEADERS)
1473
1474 # Include automatically generated dependency files
1475--include $(wildcard *.d audio/*.d slirp/*.d block/*.d net/*.d ui/*.d qapi/*.d qga/*.d)
1476+# Dependencies in Makefile.objs files come from our recursive subdir rules
1477+-include $(wildcard *.d tests/*.d)
1478
1479=== modified file 'Makefile.dis'
1480--- Makefile.dis 2011-02-02 19:58:26 +0000
1481+++ Makefile.dis 2012-09-17 14:09:22 +0000
1482@@ -18,6 +18,3 @@
1483
1484 clean:
1485 rm -f *.o *.d *.a *~
1486-
1487-# Include automatically generated dependency files
1488--include $(wildcard *.d */*.d)
1489
1490=== modified file 'Makefile.hw'
1491--- Makefile.hw 2012-03-15 16:18:18 +0000
1492+++ Makefile.hw 2012-09-17 14:09:22 +0000
1493@@ -7,7 +7,7 @@
1494
1495 .PHONY: all
1496
1497-$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)
1498+$(call set-vpath, $(SRC_PATH))
1499
1500 QEMU_CFLAGS+=-I..
1501 QEMU_CFLAGS += -I$(SRC_PATH)/include
1502@@ -19,7 +19,5 @@
1503 @true
1504
1505 clean:
1506- rm -f *.o */*.o *.d */*.d *.a */*.a *~ */*~
1507-
1508-# Include automatically generated dependency files
1509--include $(wildcard *.d */*.d)
1510+ rm -f $(addsuffix *.o, $(sort $(dir $(hw-obj-y))))
1511+ rm -f $(addsuffix *.d, $(sort $(dir $(hw-obj-y))))
1512
1513=== modified file 'Makefile.objs'
1514--- Makefile.objs 2012-03-15 16:18:18 +0000
1515+++ Makefile.objs 2012-09-17 14:09:22 +0000
1516@@ -1,9 +1,22 @@
1517 #######################################################################
1518+# Target-independent parts used in system and user emulation
1519+universal-obj-y =
1520+universal-obj-y += qemu-log.o
1521+
1522+#######################################################################
1523 # QObject
1524 qobject-obj-y = qint.o qstring.o qdict.o qlist.o qfloat.o qbool.o
1525 qobject-obj-y += qjson.o json-lexer.o json-streamer.o json-parser.o
1526 qobject-obj-y += qerror.o error.o qemu-error.o
1527
1528+universal-obj-y += $(qobject-obj-y)
1529+
1530+#######################################################################
1531+# QOM
1532+qom-obj-y = qom/
1533+
1534+universal-obj-y += $(qom-obj-y)
1535+
1536 #######################################################################
1537 # oslib-obj-y is code depending on the OS (win32 vs posix)
1538 oslib-obj-y = osdep.o
1539@@ -17,57 +30,29 @@
1540 ifeq ($(CONFIG_UCONTEXT_COROUTINE),y)
1541 coroutine-obj-$(CONFIG_POSIX) += coroutine-ucontext.o
1542 else
1543+ifeq ($(CONFIG_SIGALTSTACK_COROUTINE),y)
1544+coroutine-obj-$(CONFIG_POSIX) += coroutine-sigaltstack.o
1545+else
1546 coroutine-obj-$(CONFIG_POSIX) += coroutine-gthread.o
1547 endif
1548+endif
1549 coroutine-obj-$(CONFIG_WIN32) += coroutine-win32.o
1550
1551 #######################################################################
1552 # block-obj-y is code used by both qemu system emulation and qemu-img
1553
1554-block-obj-y = cutils.o cache-utils.o qemu-option.o module.o async.o
1555+block-obj-y = cutils.o iov.o cache-utils.o qemu-option.o module.o async.o
1556 block-obj-y += nbd.o block.o aio.o aes.o qemu-config.o qemu-progress.o qemu-sockets.o
1557 block-obj-y += $(coroutine-obj-y) $(qobject-obj-y) $(version-obj-y)
1558 block-obj-$(CONFIG_POSIX) += posix-aio-compat.o
1559 block-obj-$(CONFIG_LINUX_AIO) += linux-aio.o
1560-
1561-block-nested-y += raw.o cow.o qcow.o vdi.o vmdk.o cloop.o dmg.o bochs.o vpc.o vvfat.o
1562-block-nested-y += qcow2.o qcow2-refcount.o qcow2-cluster.o qcow2-snapshot.o qcow2-cache.o
1563-block-nested-y += qed.o qed-gencb.o qed-l2-cache.o qed-table.o qed-cluster.o
1564-block-nested-y += qed-check.o
1565-block-nested-y += parallels.o nbd.o blkdebug.o sheepdog.o blkverify.o
1566-block-nested-y += stream.o
1567-block-nested-$(CONFIG_WIN32) += raw-win32.o
1568-block-nested-$(CONFIG_POSIX) += raw-posix.o
1569-block-nested-$(CONFIG_LIBISCSI) += iscsi.o
1570-block-nested-$(CONFIG_CURL) += curl.o
1571-block-nested-$(CONFIG_RBD) += rbd.o
1572-
1573-block-obj-y += $(addprefix block/, $(block-nested-y))
1574-
1575-net-obj-y = net.o
1576-net-nested-y = queue.o checksum.o util.o
1577-net-nested-y += socket.o
1578-net-nested-y += dump.o
1579-net-nested-$(CONFIG_POSIX) += tap.o
1580-net-nested-$(CONFIG_LINUX) += tap-linux.o
1581-net-nested-$(CONFIG_WIN32) += tap-win32.o
1582-net-nested-$(CONFIG_BSD) += tap-bsd.o
1583-net-nested-$(CONFIG_SOLARIS) += tap-solaris.o
1584-net-nested-$(CONFIG_AIX) += tap-aix.o
1585-net-nested-$(CONFIG_HAIKU) += tap-haiku.o
1586-net-nested-$(CONFIG_SLIRP) += slirp.o
1587-net-nested-$(CONFIG_VDE) += vde.o
1588-net-obj-y += $(addprefix net/, $(net-nested-y))
1589+block-obj-y += block/
1590
1591 ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
1592 # Lots of the fsdev/9pcode is pulled in by vl.c via qemu_fsdev_add.
1593 # only pull in the actual virtio-9p device if we also enabled virtio.
1594 CONFIG_REALLY_VIRTFS=y
1595-fsdev-nested-y = qemu-fsdev.o virtio-9p-marshal.o
1596-else
1597-fsdev-nested-y = qemu-fsdev-dummy.o
1598 endif
1599-fsdev-obj-$(CONFIG_VIRTFS) += $(addprefix fsdev/, $(fsdev-nested-y))
1600
1601 ######################################################################
1602 # Target independent part of system emulation. The long term path is to
1603@@ -75,106 +60,47 @@
1604 # single QEMU executable should support all CPUs and machines.
1605
1606 common-obj-y = $(block-obj-y) blockdev.o
1607-common-obj-y += $(net-obj-y)
1608-common-obj-y += $(qobject-obj-y)
1609-common-obj-$(CONFIG_LINUX) += $(fsdev-obj-$(CONFIG_LINUX))
1610+common-obj-y += net.o net/
1611+common-obj-y += qom/
1612 common-obj-y += readline.o console.o cursor.o
1613 common-obj-y += $(oslib-obj-y)
1614 common-obj-$(CONFIG_WIN32) += os-win32.o
1615 common-obj-$(CONFIG_POSIX) += os-posix.o
1616
1617+common-obj-$(CONFIG_LINUX) += fsdev/
1618+extra-obj-$(CONFIG_LINUX) += fsdev/
1619+
1620 common-obj-y += tcg-runtime.o host-utils.o main-loop.o
1621-common-obj-y += irq.o input.o
1622-common-obj-$(CONFIG_PTIMER) += ptimer.o
1623-common-obj-$(CONFIG_MAX7310) += max7310.o
1624-common-obj-$(CONFIG_WM8750) += wm8750.o
1625-common-obj-$(CONFIG_TWL92230) += twl92230.o
1626-common-obj-$(CONFIG_TSC2005) += tsc2005.o
1627-common-obj-$(CONFIG_LM832X) += lm832x.o
1628-common-obj-$(CONFIG_TMP105) += tmp105.o
1629-common-obj-$(CONFIG_STELLARIS_INPUT) += stellaris_input.o
1630-common-obj-$(CONFIG_SSD0303) += ssd0303.o
1631-common-obj-$(CONFIG_SSD0323) += ssd0323.o
1632-common-obj-$(CONFIG_ADS7846) += ads7846.o
1633-common-obj-$(CONFIG_MAX111X) += max111x.o
1634-common-obj-$(CONFIG_DS1338) += ds1338.o
1635-common-obj-y += i2c.o spi.o smbus.o smbus_eeprom.o
1636-common-obj-y += i2c-ddc.o
1637-common-obj-y += eeprom93xx.o
1638-common-obj-y += scsi-disk.o cdrom.o
1639-common-obj-y += scsi-generic.o scsi-bus.o
1640-common-obj-y += hid.o
1641-common-obj-y += usb.o usb-hub.o usb-$(HOST_USB).o usb-hid.o usb-msd.o usb-wacom.o
1642-common-obj-y += usb-serial.o usb-net.o usb-bus.o usb-desc.o usb-audio.o
1643-common-obj-$(CONFIG_SSI) += ssi.o
1644-common-obj-$(CONFIG_SSI_SD) += ssi-sd.o
1645-common-obj-$(CONFIG_SD) += sd.o
1646-common-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
1647-common-obj-y += bt-hci-csr.o
1648+common-obj-y += input.o
1649 common-obj-y += buffered_file.o migration.o migration-tcp.o
1650 common-obj-y += qemu-char.o #aio.o
1651-common-obj-y += msmouse.o ps2.o
1652-common-obj-y += qdev.o qdev-properties.o qdev-monitor.o
1653 common-obj-y += block-migration.o iohandler.o
1654 common-obj-y += pflib.o
1655 common-obj-y += bitmap.o bitops.o
1656+common-obj-y += page_cache.o
1657
1658-common-obj-$(CONFIG_BRLAPI) += baum.o
1659 common-obj-$(CONFIG_POSIX) += migration-exec.o migration-unix.o migration-fd.o
1660 common-obj-$(CONFIG_WIN32) += version.o
1661
1662-common-obj-$(CONFIG_SPICE) += ui/spice-core.o ui/spice-input.o ui/spice-display.o spice-qemu-char.o
1663-
1664-include $(SRC_PATH)/qom/Makefile
1665-common-obj-y += $(addprefix qom/, $(qom-y))
1666-
1667-audio-obj-y = audio.o noaudio.o wavaudio.o mixeng.o
1668-audio-obj-$(CONFIG_SDL) += sdlaudio.o
1669-audio-obj-$(CONFIG_OSS) += ossaudio.o
1670-audio-obj-$(CONFIG_SPICE) += spiceaudio.o
1671-audio-obj-$(CONFIG_COREAUDIO) += coreaudio.o
1672-audio-obj-$(CONFIG_ALSA) += alsaaudio.o
1673-audio-obj-$(CONFIG_DSOUND) += dsoundaudio.o
1674-audio-obj-$(CONFIG_FMOD) += fmodaudio.o
1675-audio-obj-$(CONFIG_ESD) += esdaudio.o
1676-audio-obj-$(CONFIG_PA) += paaudio.o
1677-audio-obj-$(CONFIG_WINWAVE) += winwaveaudio.o
1678-audio-obj-$(CONFIG_AUDIO_PT_INT) += audio_pt_int.o
1679-audio-obj-$(CONFIG_AUDIO_WIN_INT) += audio_win_int.o
1680-audio-obj-y += wavcapture.o
1681-common-obj-y += $(addprefix audio/, $(audio-obj-y))
1682-
1683-ui-obj-y += keymaps.o
1684-ui-obj-$(CONFIG_SDL) += sdl.o sdl_zoom.o x_keymap.o
1685-ui-obj-$(CONFIG_COCOA) += cocoa.o
1686-ui-obj-$(CONFIG_CURSES) += curses.o
1687-vnc-obj-y += vnc.o d3des.o
1688-vnc-obj-y += vnc-enc-zlib.o vnc-enc-hextile.o
1689-vnc-obj-y += vnc-enc-tight.o vnc-palette.o
1690-vnc-obj-y += vnc-enc-zrle.o
1691-vnc-obj-$(CONFIG_VNC_TLS) += vnc-tls.o vnc-auth-vencrypt.o
1692-vnc-obj-$(CONFIG_VNC_SASL) += vnc-auth-sasl.o
1693-ifdef CONFIG_VNC_THREAD
1694-vnc-obj-y += vnc-jobs-async.o
1695-else
1696-vnc-obj-y += vnc-jobs-sync.o
1697-endif
1698-common-obj-y += $(addprefix ui/, $(ui-obj-y))
1699-common-obj-$(CONFIG_VNC) += $(addprefix ui/, $(vnc-obj-y))
1700+common-obj-$(CONFIG_SPICE) += spice-qemu-char.o
1701+
1702+common-obj-y += audio/
1703+common-obj-y += hw/
1704+common-obj-y += ui/
1705+common-obj-y += bt-host.o bt-vhci.o
1706
1707 common-obj-y += iov.o acl.o
1708 common-obj-$(CONFIG_POSIX) += compatfd.o
1709 common-obj-y += notify.o event_notifier.o
1710 common-obj-y += qemu-timer.o qemu-timer-common.o
1711
1712-slirp-obj-y = cksum.o if.o ip_icmp.o ip_input.o ip_output.o
1713-slirp-obj-y += slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o
1714-slirp-obj-y += tcp_subr.o tcp_timer.o udp.o bootp.o tftp.o arp_table.o
1715-common-obj-$(CONFIG_SLIRP) += $(addprefix slirp/, $(slirp-obj-y))
1716+common-obj-$(CONFIG_SLIRP) += slirp/
1717
1718-# xen backend driver support
1719-common-obj-$(CONFIG_XEN_BACKEND) += xen_backend.o xen_devconfig.o
1720-common-obj-$(CONFIG_XEN_BACKEND) += xen_console.o xenfb.o xen_disk.o xen_nic.o
1721+######################################################################
1722+# libseccomp
1723+ifeq ($(CONFIG_SECCOMP),y)
1724+common-obj-y += qemu-seccomp.o
1725+endif
1726
1727 ######################################################################
1728 # libuser
1729@@ -182,149 +108,16 @@
1730 user-obj-y =
1731 user-obj-y += envlist.o path.o
1732 user-obj-y += tcg-runtime.o host-utils.o
1733-user-obj-y += cutils.o cache-utils.o
1734+user-obj-y += cutils.o iov.o cache-utils.o
1735+user-obj-y += module.o
1736+user-obj-y += qemu-user.o
1737 user-obj-y += $(trace-obj-y)
1738+user-obj-y += qom/
1739
1740 ######################################################################
1741 # libhw
1742
1743-hw-obj-y =
1744-hw-obj-y += vl.o loader.o
1745-hw-obj-$(CONFIG_VIRTIO) += virtio-console.o
1746-hw-obj-y += usb-libhw.o
1747-hw-obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o
1748-hw-obj-y += fw_cfg.o
1749-hw-obj-$(CONFIG_PCI) += pci.o pci_bridge.o
1750-hw-obj-$(CONFIG_PCI) += msix.o msi.o
1751-hw-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o
1752-hw-obj-$(CONFIG_PCI) += ioh3420.o xio3130_upstream.o xio3130_downstream.o
1753-hw-obj-y += watchdog.o
1754-hw-obj-$(CONFIG_ISA_MMIO) += isa_mmio.o
1755-hw-obj-$(CONFIG_ECC) += ecc.o
1756-hw-obj-$(CONFIG_NAND) += nand.o
1757-hw-obj-$(CONFIG_PFLASH_CFI01) += pflash_cfi01.o
1758-hw-obj-$(CONFIG_PFLASH_CFI02) += pflash_cfi02.o
1759-
1760-hw-obj-$(CONFIG_M48T59) += m48t59.o
1761-hw-obj-$(CONFIG_ESCC) += escc.o
1762-hw-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o
1763-
1764-hw-obj-$(CONFIG_SERIAL) += serial.o
1765-hw-obj-$(CONFIG_PARALLEL) += parallel.o
1766-hw-obj-$(CONFIG_I8254) += i8254.o
1767-hw-obj-$(CONFIG_PCSPK) += pcspk.o
1768-hw-obj-$(CONFIG_PCKBD) += pckbd.o
1769-hw-obj-$(CONFIG_USB_UHCI) += usb-uhci.o
1770-hw-obj-$(CONFIG_USB_OHCI) += usb-ohci.o
1771-hw-obj-$(CONFIG_USB_EHCI) += usb-ehci.o
1772-hw-obj-$(CONFIG_USB_XHCI) += usb-xhci.o
1773-hw-obj-$(CONFIG_FDC) += fdc.o
1774-hw-obj-$(CONFIG_ACPI) += acpi.o acpi_piix4.o
1775-hw-obj-$(CONFIG_APM) += pm_smbus.o apm.o
1776-hw-obj-$(CONFIG_DMA) += dma.o
1777-hw-obj-$(CONFIG_I82374) += i82374.o
1778-hw-obj-$(CONFIG_HPET) += hpet.o
1779-hw-obj-$(CONFIG_APPLESMC) += applesmc.o
1780-hw-obj-$(CONFIG_SMARTCARD) += usb-ccid.o ccid-card-passthru.o
1781-hw-obj-$(CONFIG_SMARTCARD_NSS) += ccid-card-emulated.o
1782-hw-obj-$(CONFIG_USB_REDIR) += usb-redir.o
1783-hw-obj-$(CONFIG_I8259) += i8259_common.o i8259.o
1784-
1785-# PPC devices
1786-hw-obj-$(CONFIG_PREP_PCI) += prep_pci.o
1787-hw-obj-$(CONFIG_I82378) += i82378.o
1788-# Mac shared devices
1789-hw-obj-$(CONFIG_MACIO) += macio.o
1790-hw-obj-$(CONFIG_CUDA) += cuda.o
1791-hw-obj-$(CONFIG_ADB) += adb.o
1792-hw-obj-$(CONFIG_MAC_NVRAM) += mac_nvram.o
1793-hw-obj-$(CONFIG_MAC_DBDMA) += mac_dbdma.o
1794-# OldWorld PowerMac
1795-hw-obj-$(CONFIG_HEATHROW_PIC) += heathrow_pic.o
1796-hw-obj-$(CONFIG_GRACKLE_PCI) += grackle_pci.o
1797-# NewWorld PowerMac
1798-hw-obj-$(CONFIG_UNIN_PCI) += unin_pci.o
1799-hw-obj-$(CONFIG_DEC_PCI) += dec_pci.o
1800-# PowerPC E500 boards
1801-hw-obj-$(CONFIG_PPCE500_PCI) += ppce500_pci.o
1802-
1803-# MIPS devices
1804-hw-obj-$(CONFIG_PIIX4) += piix4.o
1805-hw-obj-$(CONFIG_G364FB) += g364fb.o
1806-hw-obj-$(CONFIG_JAZZ_LED) += jazz_led.o
1807-
1808-# PCI watchdog devices
1809-hw-obj-$(CONFIG_PCI) += wdt_i6300esb.o
1810-
1811-hw-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o pcie_port.o
1812-
1813-# PCI network cards
1814-hw-obj-$(CONFIG_NE2000_PCI) += ne2000.o
1815-hw-obj-$(CONFIG_EEPRO100_PCI) += eepro100.o
1816-hw-obj-$(CONFIG_PCNET_PCI) += pcnet-pci.o
1817-hw-obj-$(CONFIG_PCNET_COMMON) += pcnet.o
1818-hw-obj-$(CONFIG_E1000_PCI) += e1000.o
1819-hw-obj-$(CONFIG_RTL8139_PCI) += rtl8139.o
1820-
1821-hw-obj-$(CONFIG_SMC91C111) += smc91c111.o
1822-hw-obj-$(CONFIG_LAN9118) += lan9118.o
1823-hw-obj-$(CONFIG_NE2000_ISA) += ne2000-isa.o
1824-hw-obj-$(CONFIG_OPENCORES_ETH) += opencores_eth.o
1825-
1826-# IDE
1827-hw-obj-$(CONFIG_IDE_CORE) += ide/core.o ide/atapi.o
1828-hw-obj-$(CONFIG_IDE_QDEV) += ide/qdev.o
1829-hw-obj-$(CONFIG_IDE_PCI) += ide/pci.o
1830-hw-obj-$(CONFIG_IDE_ISA) += ide/isa.o
1831-hw-obj-$(CONFIG_IDE_PIIX) += ide/piix.o
1832-hw-obj-$(CONFIG_IDE_CMD646) += ide/cmd646.o
1833-hw-obj-$(CONFIG_IDE_MACIO) += ide/macio.o
1834-hw-obj-$(CONFIG_IDE_VIA) += ide/via.o
1835-hw-obj-$(CONFIG_AHCI) += ide/ahci.o
1836-hw-obj-$(CONFIG_AHCI) += ide/ich.o
1837-
1838-# SCSI layer
1839-hw-obj-$(CONFIG_LSI_SCSI_PCI) += lsi53c895a.o
1840-hw-obj-$(CONFIG_ESP) += esp.o
1841-
1842-hw-obj-y += dma-helpers.o sysbus.o isa-bus.o
1843-hw-obj-y += qdev-addr.o
1844-
1845-# VGA
1846-hw-obj-$(CONFIG_VGA_PCI) += vga-pci.o
1847-hw-obj-$(CONFIG_VGA_ISA) += vga-isa.o
1848-hw-obj-$(CONFIG_VGA_ISA_MM) += vga-isa-mm.o
1849-hw-obj-$(CONFIG_VMWARE_VGA) += vmware_vga.o
1850-hw-obj-$(CONFIG_VMMOUSE) += vmmouse.o
1851-hw-obj-$(CONFIG_VGA_CIRRUS) += cirrus_vga.o
1852-
1853-hw-obj-$(CONFIG_RC4030) += rc4030.o
1854-hw-obj-$(CONFIG_DP8393X) += dp8393x.o
1855-hw-obj-$(CONFIG_DS1225Y) += ds1225y.o
1856-hw-obj-$(CONFIG_MIPSNET) += mipsnet.o
1857-
1858-# Sound
1859-sound-obj-y =
1860-sound-obj-$(CONFIG_SB16) += sb16.o
1861-sound-obj-$(CONFIG_ES1370) += es1370.o
1862-sound-obj-$(CONFIG_AC97) += ac97.o
1863-sound-obj-$(CONFIG_ADLIB) += fmopl.o adlib.o
1864-sound-obj-$(CONFIG_GUS) += gus.o gusemu_hal.o gusemu_mixer.o
1865-sound-obj-$(CONFIG_CS4231A) += cs4231a.o
1866-sound-obj-$(CONFIG_HDA) += intel-hda.o hda-audio.o
1867-
1868-adlib.o fmopl.o: QEMU_CFLAGS += -DBUILD_Y8950=0
1869-hw-obj-$(CONFIG_SOUND) += $(sound-obj-y)
1870-
1871-9pfs-nested-$(CONFIG_VIRTFS) = virtio-9p.o
1872-9pfs-nested-$(CONFIG_VIRTFS) += virtio-9p-local.o virtio-9p-xattr.o
1873-9pfs-nested-$(CONFIG_VIRTFS) += virtio-9p-xattr-user.o virtio-9p-posix-acl.o
1874-9pfs-nested-$(CONFIG_VIRTFS) += virtio-9p-coth.o cofs.o codir.o cofile.o
1875-9pfs-nested-$(CONFIG_VIRTFS) += coxattr.o virtio-9p-synth.o
1876-9pfs-nested-$(CONFIG_OPEN_BY_HANDLE) += virtio-9p-handle.o
1877-9pfs-nested-$(CONFIG_VIRTFS) += virtio-9p-proxy.o
1878-
1879-hw-obj-$(CONFIG_REALLY_VIRTFS) += $(addprefix 9pfs/, $(9pfs-nested-y))
1880+hw-obj-y = vl.o dma-helpers.o qtest.o hw/
1881
1882 ######################################################################
1883 # libdis
1884@@ -344,22 +137,28 @@
1885 libdis-$(CONFIG_S390_DIS) += s390-dis.o
1886 libdis-$(CONFIG_SH4_DIS) += sh4-dis.o
1887 libdis-$(CONFIG_SPARC_DIS) += sparc-dis.o
1888+libdis-$(CONFIG_LM32_DIS) += lm32-dis.o
1889
1890 ######################################################################
1891 # trace
1892
1893 ifeq ($(TRACE_BACKEND),dtrace)
1894-trace.h: trace.h-timestamp trace-dtrace.h
1895-else
1896-trace.h: trace.h-timestamp
1897+TRACE_H_EXTRA_DEPS=trace-dtrace.h
1898 endif
1899+trace.h: trace.h-timestamp $(TRACE_H_EXTRA_DEPS)
1900 trace.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
1901- $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -h < $< > $@," GEN trace.h")
1902+ $(call quiet-command,$(TRACETOOL) \
1903+ --format=h \
1904+ --backend=$(TRACE_BACKEND) \
1905+ < $< > $@," GEN trace.h")
1906 @cmp -s $@ trace.h || cp $@ trace.h
1907
1908 trace.c: trace.c-timestamp
1909 trace.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
1910- $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -c < $< > $@," GEN trace.c")
1911+ $(call quiet-command,$(TRACETOOL) \
1912+ --format=c \
1913+ --backend=$(TRACE_BACKEND) \
1914+ < $< > $@," GEN trace.c")
1915 @cmp -s $@ trace.c || cp $@ trace.c
1916
1917 trace.o: trace.c $(GENERATED_HEADERS)
1918@@ -372,11 +171,14 @@
1919 # rule file. So we use '.dtrace' instead
1920 trace-dtrace.dtrace: trace-dtrace.dtrace-timestamp
1921 trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
1922- $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -d < $< > $@," GEN trace-dtrace.dtrace")
1923+ $(call quiet-command,$(TRACETOOL) \
1924+ --format=d \
1925+ --backend=$(TRACE_BACKEND) \
1926+ < $< > $@," GEN trace-dtrace.dtrace")
1927 @cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace
1928
1929 trace-dtrace.o: trace-dtrace.dtrace $(GENERATED_HEADERS)
1930- $(call quiet-command,dtrace -o $@ -G -s $<, " GEN trace-dtrace.o")
1931+ $(call quiet-command,dtrace -o $@ -G -s $<, " GEN trace-dtrace.o")
1932
1933 ifeq ($(LIBTOOL),)
1934 trace-dtrace.lo: trace-dtrace.dtrace
1935@@ -393,43 +195,40 @@
1936 trace-obj-y = trace.o
1937 endif
1938
1939-trace-nested-$(CONFIG_TRACE_DEFAULT) += default.o
1940-
1941-trace-nested-$(CONFIG_TRACE_SIMPLE) += simple.o
1942+trace-obj-$(CONFIG_TRACE_DEFAULT) += trace/default.o
1943+trace-obj-$(CONFIG_TRACE_SIMPLE) += trace/simple.o
1944 trace-obj-$(CONFIG_TRACE_SIMPLE) += qemu-timer-common.o
1945-
1946-trace-nested-$(CONFIG_TRACE_STDERR) += stderr.o
1947-
1948-trace-nested-y += control.o
1949-
1950-trace-obj-y += $(addprefix trace/, $(trace-nested-y))
1951+trace-obj-$(CONFIG_TRACE_STDERR) += trace/stderr.o
1952+trace-obj-y += trace/control.o
1953
1954 $(trace-obj-y): $(GENERATED_HEADERS)
1955
1956 ######################################################################
1957 # smartcard
1958
1959-libcacard-y = cac.o event.o vcard.o vreader.o vcard_emul_nss.o vcard_emul_type.o card_7816.o
1960+libcacard-y += libcacard/cac.o libcacard/event.o
1961+libcacard-y += libcacard/vcard.o libcacard/vreader.o
1962+libcacard-y += libcacard/vcard_emul_nss.o
1963+libcacard-y += libcacard/vcard_emul_type.o
1964+libcacard-y += libcacard/card_7816.o
1965+
1966+common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
1967
1968 ######################################################################
1969 # qapi
1970
1971-qapi-nested-y = qapi-visit-core.o qapi-dealloc-visitor.o qmp-input-visitor.o
1972-qapi-nested-y += qmp-output-visitor.o qmp-registry.o qmp-dispatch.o
1973-qapi-nested-y += string-input-visitor.o string-output-visitor.o
1974-qapi-obj-y = $(addprefix qapi/, $(qapi-nested-y))
1975+qapi-obj-y = qapi/
1976+qapi-obj-y += qapi-types.o qapi-visit.o
1977
1978-common-obj-y += qmp-marshal.o qapi-visit.o qapi-types.o $(qapi-obj-y)
1979+common-obj-y += qmp-marshal.o qapi-visit.o qapi-types.o
1980 common-obj-y += qmp.o hmp.o
1981
1982+universal-obj-y += $(qapi-obj-y)
1983+
1984 ######################################################################
1985 # guest agent
1986
1987-qga-nested-y = commands.o guest-agent-command-state.o
1988-qga-nested-$(CONFIG_POSIX) += commands-posix.o channel-posix.o
1989-qga-nested-$(CONFIG_WIN32) += commands-win32.o channel-win32.o service-win32.o
1990-qga-obj-y = $(addprefix qga/, $(qga-nested-y))
1991-qga-obj-y += qemu-ga.o module.o
1992+qga-obj-y = qga/ qemu-ga.o module.o
1993 qga-obj-$(CONFIG_WIN32) += oslib-win32.o
1994 qga-obj-$(CONFIG_POSIX) += oslib-posix.o qemu-sockets.o qemu-option.o
1995
1996@@ -439,3 +238,13 @@
1997
1998 QEMU_CFLAGS+=$(GLIB_CFLAGS)
1999
2000+nested-vars += \
2001+ hw-obj-y \
2002+ qga-obj-y \
2003+ block-obj-y \
2004+ qom-obj-y \
2005+ qapi-obj-y \
2006+ user-obj-y \
2007+ common-obj-y \
2008+ extra-obj-y
2009+dummy := $(call unnest-vars)
2010
2011=== modified file 'Makefile.target'
2012--- Makefile.target 2012-03-15 16:18:18 +0000
2013+++ Makefile.target 2012-09-17 14:09:22 +0000
2014@@ -1,10 +1,5 @@
2015 # -*- Mode: makefile -*-
2016
2017-GENERATED_HEADERS = config-target.h
2018-CONFIG_NO_PCI = $(if $(subst n,,$(CONFIG_PCI)),n,y)
2019-CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y)
2020-CONFIG_NO_XEN = $(if $(subst n,,$(CONFIG_XEN)),n,y)
2021-
2022 include ../config-host.mak
2023 include config-devices.mak
2024 include config-target.mak
2025@@ -13,14 +8,11 @@
2026 include $(HWDIR)/config.mak
2027 endif
2028
2029-TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
2030-$(call set-vpath, $(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw)
2031+$(call set-vpath, $(SRC_PATH))
2032 ifdef CONFIG_LINUX
2033 QEMU_CFLAGS += -I../linux-headers
2034 endif
2035-QEMU_CFLAGS += -I.. -I$(TARGET_PATH) -DNEED_CPU_H
2036-
2037-include $(SRC_PATH)/Makefile.objs
2038+QEMU_CFLAGS += -I.. -I$(SRC_PATH)/target-$(TARGET_BASE_ARCH) -DNEED_CPU_H
2039
2040 QEMU_CFLAGS+=-I$(SRC_PATH)/include
2041
2042@@ -58,13 +50,14 @@
2043 TARGET_TYPE=system
2044 endif
2045
2046-$(QEMU_PROG).stp:
2047- $(call quiet-command,sh $(SRC_PATH)/scripts/tracetool \
2048- --$(TRACE_BACKEND) \
2049- --binary $(bindir)/$(QEMU_PROG) \
2050- --target-arch $(TARGET_ARCH) \
2051- --target-type $(TARGET_TYPE) \
2052- --stap < $(SRC_PATH)/trace-events > $(QEMU_PROG).stp," GEN $(QEMU_PROG).stp")
2053+$(QEMU_PROG).stp: $(SRC_PATH)/trace-events
2054+ $(call quiet-command,$(TRACETOOL) \
2055+ --format=stap \
2056+ --backend=$(TRACE_BACKEND) \
2057+ --binary=$(bindir)/$(QEMU_PROG) \
2058+ --target-arch=$(TARGET_ARCH) \
2059+ --target-type=$(TARGET_TYPE) \
2060+ < $< > $@," GEN $(QEMU_PROG).stp")
2061 else
2062 stap:
2063 endif
2064@@ -76,359 +69,117 @@
2065
2066 #########################################################
2067 # cpu emulator library
2068-libobj-y = exec.o translate-all.o cpu-exec.o translate.o
2069-libobj-y += tcg/tcg.o tcg/optimize.o
2070-libobj-$(CONFIG_TCG_INTERPRETER) += tci.o
2071-libobj-y += fpu/softfloat.o
2072-libobj-y += op_helper.o helper.o
2073-ifeq ($(TARGET_BASE_ARCH), i386)
2074-libobj-y += cpuid.o
2075-endif
2076-libobj-$(TARGET_SPARC64) += vis_helper.o
2077-libobj-$(CONFIG_NEED_MMU) += mmu.o
2078-libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
2079-ifeq ($(TARGET_BASE_ARCH), sparc)
2080-libobj-y += fop_helper.o cc_helper.o win_helper.o mmu_helper.o ldst_helper.o
2081-libobj-y += cpu_init.o
2082-endif
2083-libobj-$(TARGET_SPARC) += int32_helper.o
2084-libobj-$(TARGET_SPARC64) += int64_helper.o
2085-
2086-libobj-y += disas.o
2087-libobj-$(CONFIG_TCI_DIS) += tci-dis.o
2088+obj-y = exec.o translate-all.o cpu-exec.o
2089+obj-y += tcg/tcg.o tcg/optimize.o
2090+obj-$(CONFIG_TCG_INTERPRETER) += tci.o
2091+obj-y += fpu/softfloat.o
2092+obj-y += disas.o
2093+obj-$(CONFIG_TCI_DIS) += tci-dis.o
2094+obj-y += target-$(TARGET_BASE_ARCH)/
2095+obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o
2096
2097 tci-dis.o: QEMU_CFLAGS += -I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/tci
2098
2099-$(libobj-y): $(GENERATED_HEADERS)
2100-
2101-# HELPER_CFLAGS is used for all the code compiled with static register
2102+# HELPER_CFLAGS is used for all the legacy code compiled with static register
2103 # variables
2104-op_helper.o ldst_helper.o user-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
2105+user-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
2106
2107 # Note: this is a workaround. The real fix is to avoid compiling
2108 # cpu_signal_handler() in user-exec.c.
2109-signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
2110+%/signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
2111
2112 #########################################################
2113 # Linux user emulator target
2114
2115 ifdef CONFIG_LINUX_USER
2116
2117-$(call set-vpath, $(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR))
2118-
2119 QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) -I$(SRC_PATH)/linux-user
2120-obj-y = main.o syscall.o strace.o mmap.o signal.o thunk.o \
2121- elfload.o linuxload.o uaccess.o gdbstub.o cpu-uname.o \
2122- user-exec.o $(oslib-obj-y)
2123-
2124-obj-$(TARGET_HAS_BFLT) += flatload.o
2125-
2126-obj-$(TARGET_I386) += vm86.o
2127-
2128-obj-i386-y += ioport-user.o
2129-
2130-nwfpe-obj-y = fpa11.o fpa11_cpdo.o fpa11_cpdt.o fpa11_cprt.o fpopcode.o
2131-nwfpe-obj-y += single_cpdo.o double_cpdo.o extended_cpdo.o
2132-obj-arm-y += $(addprefix nwfpe/, $(nwfpe-obj-y))
2133-obj-arm-y += arm-semi.o
2134-
2135-obj-m68k-y += m68k-sim.o m68k-semi.o
2136-
2137-$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
2138-
2139-obj-y += $(addprefix ../libuser/, $(user-obj-y))
2140-obj-y += $(addprefix ../libdis-user/, $(libdis-y))
2141-obj-y += $(libobj-y)
2142+
2143+obj-y += linux-user/
2144+obj-y += gdbstub.o thunk.o user-exec.o $(oslib-obj-y)
2145
2146 endif #CONFIG_LINUX_USER
2147
2148 #########################################################
2149-# Darwin user emulator target
2150-
2151-ifdef CONFIG_DARWIN_USER
2152-
2153-$(call set-vpath, $(SRC_PATH)/darwin-user)
2154-
2155-QEMU_CFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
2156-
2157-# Leave some space for the regular program loading zone
2158-LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000
2159-
2160-LIBS+=-lmx
2161-
2162-obj-y = main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o \
2163- gdbstub.o user-exec.o
2164-
2165-obj-i386-y += ioport-user.o
2166-
2167-$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
2168-
2169-obj-y += $(addprefix ../libuser/, $(user-obj-y))
2170-obj-y += $(addprefix ../libdis-user/, $(libdis-y))
2171-obj-y += $(libobj-y)
2172-
2173-endif #CONFIG_DARWIN_USER
2174-
2175-#########################################################
2176 # BSD user emulator target
2177
2178 ifdef CONFIG_BSD_USER
2179
2180-$(call set-vpath, $(SRC_PATH)/bsd-user)
2181-
2182 QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
2183
2184-obj-y = main.o bsdload.o elfload.o mmap.o signal.o strace.o syscall.o \
2185- gdbstub.o uaccess.o user-exec.o
2186-
2187-obj-i386-y += ioport-user.o
2188-
2189-$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
2190-
2191-obj-y += $(addprefix ../libuser/, $(user-obj-y))
2192-obj-y += $(addprefix ../libdis-user/, $(libdis-y))
2193-obj-y += $(libobj-y)
2194+obj-y += bsd-user/
2195+obj-y += gdbstub.o user-exec.o $(oslib-obj-y)
2196
2197 endif #CONFIG_BSD_USER
2198
2199 #########################################################
2200 # System emulator target
2201 ifdef CONFIG_SOFTMMU
2202+CONFIG_NO_PCI = $(if $(subst n,,$(CONFIG_PCI)),n,y)
2203+CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y)
2204+CONFIG_NO_XEN = $(if $(subst n,,$(CONFIG_XEN)),n,y)
2205+CONFIG_NO_GET_MEMORY_MAPPING = $(if $(subst n,,$(CONFIG_HAVE_GET_MEMORY_MAPPING)),n,y)
2206+CONFIG_NO_CORE_DUMP = $(if $(subst n,,$(CONFIG_HAVE_CORE_DUMP)),n,y)
2207
2208-obj-y = arch_init.o cpus.o monitor.o machine.o gdbstub.o balloon.o ioport.o
2209-# virtio has to be here due to weird dependency between PCI and virtio-net.
2210-# need to fix this properly
2211-obj-$(CONFIG_NO_PCI) += pci-stub.o
2212-obj-$(CONFIG_VIRTIO) += virtio.o virtio-blk.o virtio-balloon.o virtio-net.o virtio-serial-bus.o
2213-obj-$(CONFIG_VIRTIO_SCSI) += virtio-scsi.o
2214-obj-y += vhost_net.o
2215-obj-$(CONFIG_VHOST_NET) += vhost.o
2216-obj-$(CONFIG_REALLY_VIRTFS) += 9pfs/virtio-9p-device.o
2217-obj-$(CONFIG_KVM) += kvm.o kvm-all.o
2218+obj-y += arch_init.o cpus.o monitor.o gdbstub.o balloon.o ioport.o
2219+obj-y += hw/
2220+obj-$(CONFIG_KVM) += kvm-all.o
2221 obj-$(CONFIG_NO_KVM) += kvm-stub.o
2222-obj-$(CONFIG_VGA) += vga.o
2223-obj-y += memory.o savevm.o
2224+obj-y += memory.o savevm.o cputlb.o
2225+obj-$(CONFIG_HAVE_GET_MEMORY_MAPPING) += memory_mapping.o
2226+obj-$(CONFIG_HAVE_CORE_DUMP) += dump.o
2227+obj-$(CONFIG_NO_GET_MEMORY_MAPPING) += memory_mapping-stub.o
2228+obj-$(CONFIG_NO_CORE_DUMP) += dump-stub.o
2229 LIBS+=-lz
2230
2231-obj-i386-$(CONFIG_KVM) += hyperv.o
2232-
2233 QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
2234 QEMU_CFLAGS += $(VNC_SASL_CFLAGS)
2235 QEMU_CFLAGS += $(VNC_JPEG_CFLAGS)
2236 QEMU_CFLAGS += $(VNC_PNG_CFLAGS)
2237
2238 # xen support
2239-obj-$(CONFIG_XEN) += xen-all.o xen_machine_pv.o xen_domainbuild.o xen-mapcache.o
2240+obj-$(CONFIG_XEN) += xen-all.o xen-mapcache.o
2241 obj-$(CONFIG_NO_XEN) += xen-stub.o
2242
2243-obj-i386-$(CONFIG_XEN) += xen_platform.o
2244-
2245-# Inter-VM PCI shared memory
2246-CONFIG_IVSHMEM =
2247-ifeq ($(CONFIG_KVM), y)
2248- ifeq ($(CONFIG_PCI), y)
2249- CONFIG_IVSHMEM = y
2250- endif
2251-endif
2252-obj-$(CONFIG_IVSHMEM) += ivshmem.o
2253-
2254-# Generic hotplugging
2255-obj-y += device-hotplug.o
2256-
2257 # Hardware support
2258-obj-i386-y += mc146818rtc.o pc.o
2259-obj-i386-y += apic_common.o apic.o kvmvapic.o
2260-obj-i386-y += sga.o ioapic_common.o ioapic.o piix_pci.o
2261-obj-i386-y += vmport.o
2262-obj-i386-y += pci-hotplug.o smbios.o wdt_ib700.o
2263-obj-i386-y += debugcon.o multiboot.o
2264-obj-i386-y += pc_piix.o
2265-obj-i386-y += pc_sysfw.o
2266-obj-i386-$(CONFIG_KVM) += kvm/clock.o kvm/apic.o kvm/i8259.o kvm/ioapic.o
2267-obj-i386-$(CONFIG_SPICE) += qxl.o qxl-logger.o qxl-render.o
2268-
2269-# shared objects
2270-obj-ppc-y = ppc.o ppc_booke.o
2271-# PREP target
2272-obj-ppc-y += mc146818rtc.o
2273-obj-ppc-y += ppc_prep.o
2274-# OldWorld PowerMac
2275-obj-ppc-y += ppc_oldworld.o
2276-# NewWorld PowerMac
2277-obj-ppc-y += ppc_newworld.o
2278-# IBM pSeries (sPAPR)
2279-obj-ppc-$(CONFIG_PSERIES) += spapr.o spapr_hcall.o spapr_rtas.o spapr_vio.o
2280-obj-ppc-$(CONFIG_PSERIES) += xics.o spapr_vty.o spapr_llan.o spapr_vscsi.o
2281-obj-ppc-$(CONFIG_PSERIES) += spapr_pci.o device-hotplug.o pci-hotplug.o
2282-# PowerPC 4xx boards
2283-obj-ppc-y += ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o
2284-obj-ppc-y += ppc440_bamboo.o
2285-# PowerPC E500 boards
2286-obj-ppc-y += ppce500_mpc8544ds.o mpc8544_guts.o ppce500_spin.o
2287-# PowerPC 440 Xilinx ML507 reference board.
2288-obj-ppc-y += virtex_ml507.o
2289-obj-ppc-$(CONFIG_KVM) += kvm_ppc.o
2290-obj-ppc-$(CONFIG_FDT) += device_tree.o
2291-# PowerPC OpenPIC
2292-obj-ppc-y += openpic.o
2293-
2294-# Xilinx PPC peripherals
2295-obj-ppc-y += xilinx_intc.o
2296-obj-ppc-y += xilinx_timer.o
2297-obj-ppc-y += xilinx_uartlite.o
2298-obj-ppc-y += xilinx_ethlite.o
2299-
2300-# LM32 boards
2301-obj-lm32-y += lm32_boards.o
2302-obj-lm32-y += milkymist.o
2303-
2304-# LM32 peripherals
2305-obj-lm32-y += lm32_pic.o
2306-obj-lm32-y += lm32_juart.o
2307-obj-lm32-y += lm32_timer.o
2308-obj-lm32-y += lm32_uart.o
2309-obj-lm32-y += lm32_sys.o
2310-obj-lm32-y += milkymist-ac97.o
2311-obj-lm32-y += milkymist-hpdmc.o
2312-obj-lm32-y += milkymist-memcard.o
2313-obj-lm32-y += milkymist-minimac2.o
2314-obj-lm32-y += milkymist-pfpu.o
2315-obj-lm32-y += milkymist-softusb.o
2316-obj-lm32-y += milkymist-sysctl.o
2317-obj-lm32-$(CONFIG_OPENGL) += milkymist-tmu2.o
2318-obj-lm32-y += milkymist-uart.o
2319-obj-lm32-y += milkymist-vgafb.o
2320-obj-lm32-y += framebuffer.o
2321-
2322-obj-mips-y = mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o
2323-obj-mips-y += mips_addr.o mips_timer.o mips_int.o
2324-obj-mips-y += gt64xxx.o mc146818rtc.o
2325-obj-mips-$(CONFIG_FULONG) += bonito.o vt82c686.o mips_fulong2e.o
2326-
2327-obj-microblaze-y = petalogix_s3adsp1800_mmu.o
2328-obj-microblaze-y += petalogix_ml605_mmu.o
2329-
2330-obj-microblaze-y += microblaze_pic_cpu.o
2331-obj-microblaze-y += xilinx_intc.o
2332-obj-microblaze-y += xilinx_timer.o
2333-obj-microblaze-y += xilinx_uartlite.o
2334-obj-microblaze-y += xilinx_ethlite.o
2335-obj-microblaze-y += xilinx_axidma.o
2336-obj-microblaze-y += xilinx_axienet.o
2337-
2338-obj-microblaze-$(CONFIG_FDT) += device_tree.o
2339-
2340-# Boards
2341-obj-cris-y = cris_pic_cpu.o
2342-obj-cris-y += cris-boot.o
2343-obj-cris-y += axis_dev88.o
2344-
2345-# IO blocks
2346-obj-cris-y += etraxfs_dma.o
2347-obj-cris-y += etraxfs_pic.o
2348-obj-cris-y += etraxfs_eth.o
2349-obj-cris-y += etraxfs_timer.o
2350-obj-cris-y += etraxfs_ser.o
2351-
2352 ifeq ($(TARGET_ARCH), sparc64)
2353-obj-sparc-y = sun4u.o apb_pci.o
2354-obj-sparc-y += mc146818rtc.o
2355+obj-y += hw/sparc64/
2356 else
2357-obj-sparc-y = sun4m.o lance.o tcx.o sun4m_iommu.o slavio_intctl.o
2358-obj-sparc-y += slavio_timer.o slavio_misc.o sparc32_dma.o
2359-obj-sparc-y += cs4231.o eccmemctl.o sbi.o sun4c_intctl.o leon3.o
2360-
2361-# GRLIB
2362-obj-sparc-y += grlib_gptimer.o grlib_irqmp.o grlib_apbuart.o
2363+obj-y += hw/$(TARGET_BASE_ARCH)/
2364 endif
2365
2366-obj-arm-y = integratorcp.o versatilepb.o arm_pic.o arm_timer.o
2367-obj-arm-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o
2368-obj-arm-y += versatile_pci.o
2369-obj-arm-y += realview_gic.o realview.o arm_sysctl.o arm11mpcore.o a9mpcore.o
2370-obj-arm-y += exynos4210_gic.o exynos4210_combiner.o exynos4210.o
2371-obj-arm-y += exynos4_boards.o exynos4210_uart.o exynos4210_pwm.o
2372-obj-arm-y += exynos4210_pmu.o exynos4210_mct.o exynos4210_fimd.o
2373-obj-arm-y += arm_l2x0.o
2374-obj-arm-y += arm_mptimer.o a15mpcore.o
2375-obj-arm-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o
2376-obj-arm-y += highbank.o
2377-obj-arm-y += pl061.o
2378-obj-arm-y += xgmac.o
2379-obj-arm-y += arm-semi.o
2380-obj-arm-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o
2381-obj-arm-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o
2382-obj-arm-y += gumstix.o
2383-obj-arm-y += zaurus.o ide/microdrive.o spitz.o tosa.o tc6393xb.o
2384-obj-arm-y += omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o \
2385- omap_gpio.o omap_intc.o omap_uart.o
2386-obj-arm-y += omap2.o omap_dss.o soc_dma.o omap_gptimer.o omap_synctimer.o \
2387- omap_gpmc.o omap_sdrc.o omap_spi.o omap_tap.o omap_l4.o
2388-obj-arm-y += omap3.o omap_usb.o omap3_boot.o omap3_mmc.o dsi.o
2389-obj-arm-y += twl4030.o beagle.o overo.o
2390-obj-arm-y += omap_sx1.o palm.o tsc210x.o
2391-obj-arm-y += nseries.o blizzard.o onenand.o cbus.o tusb6010.o usb-musb.o
2392-obj-arm-y += mst_fpga.o mainstone.o
2393-obj-arm-y += z2.o
2394-obj-arm-y += musicpal.o bitbang_i2c.o marvell_88w8618_audio.o
2395-obj-arm-y += framebuffer.o
2396-obj-arm-y += vexpress.o
2397-obj-arm-y += strongarm.o
2398-obj-arm-y += collie.o
2399-obj-arm-y += pl041.o lm4549.o
2400-obj-arm-$(CONFIG_FDT) += device_tree.o
2401-
2402-obj-sh4-y = shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
2403-obj-sh4-y += sh_timer.o sh_serial.o sh_intc.o sh_pci.o sm501.o
2404-obj-sh4-y += ide/mmio.o
2405-
2406-obj-m68k-y = an5206.o mcf5206.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o
2407-obj-m68k-y += m68k-semi.o dummy_m68k.o
2408-
2409-obj-s390x-y = s390-virtio-bus.o s390-virtio.o
2410-
2411-obj-alpha-y = mc146818rtc.o
2412-obj-alpha-y += alpha_pci.o alpha_dp264.o alpha_typhoon.o
2413-
2414-obj-xtensa-y += xtensa_pic.o
2415-obj-xtensa-y += xtensa_sim.o
2416-obj-xtensa-y += xtensa_lx60.o
2417-obj-xtensa-y += xtensa-semi.o
2418-obj-xtensa-y += core-dc232b.o
2419-obj-xtensa-y += core-fsf.o
2420-
2421 main.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
2422
2423-monitor.o: hmp-commands.h qmp-commands-old.h
2424-
2425-$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
2426-
2427-obj-y += $(addprefix ../, $(common-obj-y))
2428-obj-y += $(addprefix ../libdis/, $(libdis-y))
2429-obj-y += $(libobj-y)
2430-obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y))
2431-obj-y += $(addprefix ../, $(trace-obj-y))
2432+GENERATED_HEADERS += hmp-commands.h qmp-commands-old.h
2433
2434 endif # CONFIG_SOFTMMU
2435
2436-ifndef CONFIG_LINUX_USER
2437-ifndef CONFIG_BSD_USER
2438-# libcacard needs qemu-thread support, and besides is only needed by devices
2439-# so not requires with linux-user / bsd-user targets
2440-obj-$(CONFIG_SMARTCARD_NSS) += $(addprefix ../libcacard/, $(libcacard-y))
2441-endif # CONFIG_BSD_USER
2442-endif # CONFIG_LINUX_USER
2443-
2444-obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o
2445+nested-vars += obj-y
2446+
2447+# This resolves all nested paths, so it must come last
2448+include $(SRC_PATH)/Makefile.objs
2449+
2450+all-obj-y = $(obj-y)
2451+all-obj-y += $(addprefix ../, $(universal-obj-y))
2452+
2453+ifdef CONFIG_SOFTMMU
2454+all-obj-y += $(addprefix ../, $(common-obj-y))
2455+all-obj-y += $(addprefix ../libdis/, $(libdis-y))
2456+all-obj-y += $(addprefix $(HWDIR)/, $(hw-obj-y))
2457+all-obj-y += $(addprefix ../, $(trace-obj-y))
2458+else
2459+all-obj-y += $(addprefix ../libuser/, $(user-obj-y))
2460+all-obj-y += $(addprefix ../libdis-user/, $(libdis-y))
2461+endif #CONFIG_LINUX_USER
2462
2463 ifdef QEMU_PROGW
2464 # The linker builds a windows executable. Make also a console executable.
2465-$(QEMU_PROGW): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
2466+$(QEMU_PROGW): $(all-obj-y)
2467 $(call LINK,$^)
2468 $(QEMU_PROG): $(QEMU_PROGW)
2469 $(call quiet-command,$(OBJCOPY) --subsystem console $(QEMU_PROGW) $(QEMU_PROG)," GEN $(TARGET_DIR)$(QEMU_PROG)")
2470 else
2471-$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
2472+$(QEMU_PROG): $(all-obj-y)
2473 $(call LINK,$^)
2474 endif
2475
2476@@ -442,8 +193,8 @@
2477 $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@")
2478
2479 clean:
2480- rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
2481- rm -f *.d */*.d tcg/*.o ide/*.o 9pfs/*.o kvm/*.o
2482+ rm -f *.a *~ $(PROGS)
2483+ rm -f $(shell find . -name '*.[od]')
2484 rm -f hmp-commands.h qmp-commands-old.h gdbstub-xml.c
2485 ifdef CONFIG_TRACE_SYSTEMTAP
2486 rm -f *.stp
2487@@ -457,9 +208,9 @@
2488 endif
2489 endif
2490 ifdef CONFIG_TRACE_SYSTEMTAP
2491- $(INSTALL_DIR) "$(DESTDIR)$(datadir)/../systemtap/tapset"
2492- $(INSTALL_DATA) $(QEMU_PROG).stp "$(DESTDIR)$(datadir)/../systemtap/tapset"
2493+ $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset"
2494+ $(INSTALL_DATA) $(QEMU_PROG).stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset"
2495 endif
2496
2497-# Include automatically generated dependency files
2498--include $(wildcard *.d */*.d)
2499+GENERATED_HEADERS += config-target.h
2500+Makefile: $(GENERATED_HEADERS)
2501
2502=== modified file 'Makefile.user'
2503--- Makefile.user 2011-12-06 09:35:22 +0000
2504+++ Makefile.user 2012-09-17 14:09:22 +0000
2505@@ -9,6 +9,8 @@
2506 $(call set-vpath, $(SRC_PATH))
2507
2508 QEMU_CFLAGS+=-I..
2509+QEMU_CFLAGS += -I$(SRC_PATH)/include
2510+QEMU_CFLAGS += -DCONFIG_USER_ONLY
2511
2512 include $(SRC_PATH)/Makefile.objs
2513
2514@@ -20,6 +22,3 @@
2515 for d in . trace; do \
2516 rm -f $$d/*.o $$d/*.d $$d/*.a $$d/*~; \
2517 done
2518-
2519-# Include automatically generated dependency files
2520--include $(wildcard *.d */*.d)
2521
2522=== modified file 'QMP/qmp-events.txt'
2523--- QMP/qmp-events.txt 2012-03-15 16:18:18 +0000
2524+++ QMP/qmp-events.txt 2012-09-17 14:09:22 +0000
2525@@ -1,6 +1,23 @@
2526 QEMU Monitor Protocol Events
2527 ============================
2528
2529+BALLOON_CHANGE
2530+--------------
2531+
2532+Emitted when the guest changes the actual BALLOON level. This
2533+value is equivalent to the 'actual' field return by the
2534+'query-balloon' command
2535+
2536+Data:
2537+
2538+- "actual": actual level of the guest memory balloon in bytes (json-number)
2539+
2540+Example:
2541+
2542+{ "event": "BALLOON_CHANGE",
2543+ "data": { "actual": 944766976 },
2544+ "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
2545+
2546 BLOCK_IO_ERROR
2547 --------------
2548
2549@@ -26,6 +43,57 @@
2550 Note: If action is "stop", a STOP event will eventually follow the
2551 BLOCK_IO_ERROR event.
2552
2553+BLOCK_JOB_CANCELLED
2554+-------------------
2555+
2556+Emitted when a block job has been cancelled.
2557+
2558+Data:
2559+
2560+- "type": Job type ("stream" for image streaming, json-string)
2561+- "device": Device name (json-string)
2562+- "len": Maximum progress value (json-int)
2563+- "offset": Current progress value (json-int)
2564+ On success this is equal to len.
2565+ On failure this is less than len.
2566+- "speed": Rate limit, bytes per second (json-int)
2567+
2568+Example:
2569+
2570+{ "event": "BLOCK_JOB_CANCELLED",
2571+ "data": { "type": "stream", "device": "virtio-disk0",
2572+ "len": 10737418240, "offset": 134217728,
2573+ "speed": 0 },
2574+ "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
2575+
2576+BLOCK_JOB_COMPLETED
2577+-------------------
2578+
2579+Emitted when a block job has completed.
2580+
2581+Data:
2582+
2583+- "type": Job type ("stream" for image streaming, json-string)
2584+- "device": Device name (json-string)
2585+- "len": Maximum progress value (json-int)
2586+- "offset": Current progress value (json-int)
2587+ On success this is equal to len.
2588+ On failure this is less than len.
2589+- "speed": Rate limit, bytes per second (json-int)
2590+- "error": Error message (json-string, optional)
2591+ Only present on failure. This field contains a human-readable
2592+ error message. There are no semantics other than that streaming
2593+ has failed and clients should not try to interpret the error
2594+ string.
2595+
2596+Example:
2597+
2598+{ "event": "BLOCK_JOB_COMPLETED",
2599+ "data": { "type": "stream", "device": "virtio-disk0",
2600+ "len": 10737418240, "offset": 10737418240,
2601+ "speed": 0 },
2602+ "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
2603+
2604 DEVICE_TRAY_MOVED
2605 -----------------
2606
2607@@ -98,108 +166,6 @@
2608 Note: If the command-line option "-no-shutdown" has been specified, a STOP
2609 event will eventually follow the SHUTDOWN event.
2610
2611-STOP
2612-----
2613-
2614-Emitted when the Virtual Machine is stopped.
2615-
2616-Data: None.
2617-
2618-Example:
2619-
2620-{ "event": "STOP",
2621- "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
2622-
2623-VNC_CONNECTED
2624--------------
2625-
2626-Emitted when a VNC client establishes a connection.
2627-
2628-Data:
2629-
2630-- "server": Server information (json-object)
2631- - "host": IP address (json-string)
2632- - "service": port number (json-string)
2633- - "family": address family (json-string, "ipv4" or "ipv6")
2634- - "auth": authentication method (json-string, optional)
2635-- "client": Client information (json-object)
2636- - "host": IP address (json-string)
2637- - "service": port number (json-string)
2638- - "family": address family (json-string, "ipv4" or "ipv6")
2639-
2640-Example:
2641-
2642-{ "event": "VNC_CONNECTED",
2643- "data": {
2644- "server": { "auth": "sasl", "family": "ipv4",
2645- "service": "5901", "host": "0.0.0.0" },
2646- "client": { "family": "ipv4", "service": "58425",
2647- "host": "127.0.0.1" } },
2648- "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
2649-
2650-
2651-Note: This event is emitted before any authentication takes place, thus
2652-the authentication ID is not provided.
2653-
2654-VNC_DISCONNECTED
2655-----------------
2656-
2657-Emitted when the connection is closed.
2658-
2659-Data:
2660-
2661-- "server": Server information (json-object)
2662- - "host": IP address (json-string)
2663- - "service": port number (json-string)
2664- - "family": address family (json-string, "ipv4" or "ipv6")
2665- - "auth": authentication method (json-string, optional)
2666-- "client": Client information (json-object)
2667- - "host": IP address (json-string)
2668- - "service": port number (json-string)
2669- - "family": address family (json-string, "ipv4" or "ipv6")
2670- - "x509_dname": TLS dname (json-string, optional)
2671- - "sasl_username": SASL username (json-string, optional)
2672-
2673-Example:
2674-
2675-{ "event": "VNC_DISCONNECTED",
2676- "data": {
2677- "server": { "auth": "sasl", "family": "ipv4",
2678- "service": "5901", "host": "0.0.0.0" },
2679- "client": { "family": "ipv4", "service": "58425",
2680- "host": "127.0.0.1", "sasl_username": "luiz" } },
2681- "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
2682-
2683-VNC_INITIALIZED
2684----------------
2685-
2686-Emitted after authentication takes place (if any) and the VNC session is
2687-made active.
2688-
2689-Data:
2690-
2691-- "server": Server information (json-object)
2692- - "host": IP address (json-string)
2693- - "service": port number (json-string)
2694- - "family": address family (json-string, "ipv4" or "ipv6")
2695- - "auth": authentication method (json-string, optional)
2696-- "client": Client information (json-object)
2697- - "host": IP address (json-string)
2698- - "service": port number (json-string)
2699- - "family": address family (json-string, "ipv4" or "ipv6")
2700- - "x509_dname": TLS dname (json-string, optional)
2701- - "sasl_username": SASL username (json-string, optional)
2702-
2703-Example:
2704-
2705-{ "event": "VNC_INITIALIZED",
2706- "data": {
2707- "server": { "auth": "sasl", "family": "ipv4",
2708- "service": "5901", "host": "0.0.0.0"},
2709- "client": { "family": "ipv4", "service": "46089",
2710- "host": "127.0.0.1", "sasl_username": "luiz" } },
2711- "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
2712-
2713 SPICE_CONNECTED, SPICE_DISCONNECTED
2714 -----------------------------------
2715
2716@@ -225,7 +191,6 @@
2717 "client": {"port": "52873", "family": "ipv4", "host": "127.0.0.1"}
2718 }}
2719
2720-
2721 SPICE_INITIALIZED
2722 -----------------
2723
2724@@ -263,6 +228,145 @@
2725 "channel-id": 0, "tls": true}
2726 }}
2727
2728+STOP
2729+----
2730+
2731+Emitted when the Virtual Machine is stopped.
2732+
2733+Data: None.
2734+
2735+Example:
2736+
2737+{ "event": "STOP",
2738+ "timestamp": { "seconds": 1267041730, "microseconds": 281295 } }
2739+
2740+SUSPEND
2741+-------
2742+
2743+Emitted when guest enters S3 state.
2744+
2745+Data: None.
2746+
2747+Example:
2748+
2749+{ "event": "SUSPEND",
2750+ "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
2751+
2752+SUSPEND_DISK
2753+------------
2754+
2755+Emitted when the guest makes a request to enter S4 state.
2756+
2757+Data: None.
2758+
2759+Example:
2760+
2761+{ "event": "SUSPEND_DISK",
2762+ "timestamp": { "seconds": 1344456160, "microseconds": 309119 } }
2763+
2764+Note: QEMU shuts down when entering S4 state.
2765+
2766+VNC_CONNECTED
2767+-------------
2768+
2769+Emitted when a VNC client establishes a connection.
2770+
2771+Data:
2772+
2773+- "server": Server information (json-object)
2774+ - "host": IP address (json-string)
2775+ - "service": port number (json-string)
2776+ - "family": address family (json-string, "ipv4" or "ipv6")
2777+ - "auth": authentication method (json-string, optional)
2778+- "client": Client information (json-object)
2779+ - "host": IP address (json-string)
2780+ - "service": port number (json-string)
2781+ - "family": address family (json-string, "ipv4" or "ipv6")
2782+
2783+Example:
2784+
2785+{ "event": "VNC_CONNECTED",
2786+ "data": {
2787+ "server": { "auth": "sasl", "family": "ipv4",
2788+ "service": "5901", "host": "0.0.0.0" },
2789+ "client": { "family": "ipv4", "service": "58425",
2790+ "host": "127.0.0.1" } },
2791+ "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
2792+
2793+
2794+Note: This event is emitted before any authentication takes place, thus
2795+the authentication ID is not provided.
2796+
2797+VNC_DISCONNECTED
2798+----------------
2799+
2800+Emitted when the connection is closed.
2801+
2802+Data:
2803+
2804+- "server": Server information (json-object)
2805+ - "host": IP address (json-string)
2806+ - "service": port number (json-string)
2807+ - "family": address family (json-string, "ipv4" or "ipv6")
2808+ - "auth": authentication method (json-string, optional)
2809+- "client": Client information (json-object)
2810+ - "host": IP address (json-string)
2811+ - "service": port number (json-string)
2812+ - "family": address family (json-string, "ipv4" or "ipv6")
2813+ - "x509_dname": TLS dname (json-string, optional)
2814+ - "sasl_username": SASL username (json-string, optional)
2815+
2816+Example:
2817+
2818+{ "event": "VNC_DISCONNECTED",
2819+ "data": {
2820+ "server": { "auth": "sasl", "family": "ipv4",
2821+ "service": "5901", "host": "0.0.0.0" },
2822+ "client": { "family": "ipv4", "service": "58425",
2823+ "host": "127.0.0.1", "sasl_username": "luiz" } },
2824+ "timestamp": { "seconds": 1262976601, "microseconds": 975795 } }
2825+
2826+VNC_INITIALIZED
2827+---------------
2828+
2829+Emitted after authentication takes place (if any) and the VNC session is
2830+made active.
2831+
2832+Data:
2833+
2834+- "server": Server information (json-object)
2835+ - "host": IP address (json-string)
2836+ - "service": port number (json-string)
2837+ - "family": address family (json-string, "ipv4" or "ipv6")
2838+ - "auth": authentication method (json-string, optional)
2839+- "client": Client information (json-object)
2840+ - "host": IP address (json-string)
2841+ - "service": port number (json-string)
2842+ - "family": address family (json-string, "ipv4" or "ipv6")
2843+ - "x509_dname": TLS dname (json-string, optional)
2844+ - "sasl_username": SASL username (json-string, optional)
2845+
2846+Example:
2847+
2848+{ "event": "VNC_INITIALIZED",
2849+ "data": {
2850+ "server": { "auth": "sasl", "family": "ipv4",
2851+ "service": "5901", "host": "0.0.0.0"},
2852+ "client": { "family": "ipv4", "service": "46089",
2853+ "host": "127.0.0.1", "sasl_username": "luiz" } },
2854+ "timestamp": { "seconds": 1263475302, "microseconds": 150772 } }
2855+
2856+WAKEUP
2857+------
2858+
2859+Emitted when the guest has woken up from S3 and is running.
2860+
2861+Data: None.
2862+
2863+Example:
2864+
2865+{ "event": "WATCHDOG",
2866+ "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }
2867
2868 WATCHDOG
2869 --------
2870@@ -282,56 +386,3 @@
2871
2872 Note: If action is "reset", "shutdown", or "pause" the WATCHDOG event is
2873 followed respectively by the RESET, SHUTDOWN, or STOP events.
2874-
2875-
2876-BLOCK_JOB_COMPLETED
2877--------------------
2878-
2879-Emitted when a block job has completed.
2880-
2881-Data:
2882-
2883-- "type": Job type ("stream" for image streaming, json-string)
2884-- "device": Device name (json-string)
2885-- "len": Maximum progress value (json-int)
2886-- "offset": Current progress value (json-int)
2887- On success this is equal to len.
2888- On failure this is less than len.
2889-- "speed": Rate limit, bytes per second (json-int)
2890-- "error": Error message (json-string, optional)
2891- Only present on failure. This field contains a human-readable
2892- error message. There are no semantics other than that streaming
2893- has failed and clients should not try to interpret the error
2894- string.
2895-
2896-Example:
2897-
2898-{ "event": "BLOCK_JOB_COMPLETED",
2899- "data": { "type": "stream", "device": "virtio-disk0",
2900- "len": 10737418240, "offset": 10737418240,
2901- "speed": 0 },
2902- "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
2903-
2904-
2905-BLOCK_JOB_CANCELLED
2906--------------------
2907-
2908-Emitted when a block job has been cancelled.
2909-
2910-Data:
2911-
2912-- "type": Job type ("stream" for image streaming, json-string)
2913-- "device": Device name (json-string)
2914-- "len": Maximum progress value (json-int)
2915-- "offset": Current progress value (json-int)
2916- On success this is equal to len.
2917- On failure this is less than len.
2918-- "speed": Rate limit, bytes per second (json-int)
2919-
2920-Example:
2921-
2922-{ "event": "BLOCK_JOB_CANCELLED",
2923- "data": { "type": "stream", "device": "virtio-disk0",
2924- "len": 10737418240, "offset": 134217728,
2925- "speed": 0 },
2926- "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
2927
2928=== modified file 'QMP/qmp-spec.txt'
2929--- QMP/qmp-spec.txt 2011-02-02 19:58:26 +0000
2930+++ QMP/qmp-spec.txt 2012-09-17 14:09:22 +0000
2931@@ -106,14 +106,11 @@
2932
2933 The format is:
2934
2935-{ "error": { "class": json-string, "data": json-object, "desc": json-string },
2936- "id": json-value }
2937+{ "error": { "class": json-string, "desc": json-string }, "id": json-value }
2938
2939 Where,
2940
2941-- The "class" member contains the error class name (eg. "ServiceUnavailable")
2942-- The "data" member contains specific error data and is defined in a
2943- per-command basis, it will be an empty json-object if the error has no data
2944+- The "class" member contains the error class name (eg. "GenericError")
2945 - The "desc" member is a human-readable error message. Clients should
2946 not attempt to parse this message.
2947 - The "id" member contains the transaction identification associated with
2948@@ -173,8 +170,7 @@
2949 ------------------
2950
2951 C: { "execute": }
2952-S: {"error": {"class": "JSONParsing", "desc": "Invalid JSON syntax", "data":
2953-{}}}
2954+S: {"error": {"class": "GenericError", "desc": "Invalid JSON syntax" } }
2955
2956 3.5 Powerdown event
2957 -------------------
2958@@ -209,13 +205,27 @@
2959 capabilities array (section '2.2 Server Greeting'). Thus, Clients can check
2960 that array and enable the capabilities they support.
2961
2962-Additionally, Clients must not assume any particular:
2963-
2964-- Size of json-objects or length of json-arrays
2965+The QMP Server performs a type check on the arguments to a command. It
2966+generates an error if a value does not have the expected type for its
2967+key, or if it does not understand a key that the Client included. The
2968+strictness of the Server catches wrong assumptions of Clients about
2969+the Server's schema. Clients can assume that, when such validation
2970+errors occur, they will be reported before the command generated any
2971+side effect.
2972+
2973+However, Clients must not assume any particular:
2974+
2975+- Length of json-arrays
2976+- Size of json-objects; in particular, future versions of QEMU may add
2977+ new keys and Clients should be able to ignore them.
2978 - Order of json-object members or json-array elements
2979 - Amount of errors generated by a command, that is, new errors can be added
2980 to any existing command in newer versions of the Server
2981
2982+Of course, the Server does guarantee to send valid JSON. But apart from
2983+this, a Client should be "conservative in what they send, and liberal in
2984+what they accept".
2985+
2986 6. Downstream extension of QMP
2987 ------------------------------
2988
2989
2990=== added file 'QMP/qom-fuse'
2991--- QMP/qom-fuse 1970-01-01 00:00:00 +0000
2992+++ QMP/qom-fuse 2012-09-17 14:09:22 +0000
2993@@ -0,0 +1,138 @@
2994+#!/usr/bin/python
2995+##
2996+# QEMU Object Model test tools
2997+#
2998+# Copyright IBM, Corp. 2012
2999+#
3000+# Authors:
3001+# Anthony Liguori <aliguori@us.ibm.com>
3002+#
3003+# This work is licensed under the terms of the GNU GPL, version 2 or later. See
3004+# the COPYING file in the top-level directory.
3005+##
3006+
3007+import fuse, stat
3008+from fuse import Fuse
3009+import os, posix
3010+from errno import *
3011+from qmp import QEMUMonitorProtocol
3012+
3013+fuse.fuse_python_api = (0, 2)
3014+
3015+class QOMFS(Fuse):
3016+ def __init__(self, qmp, *args, **kwds):
3017+ Fuse.__init__(self, *args, **kwds)
3018+ self.qmp = qmp
3019+ self.qmp.connect()
3020+ self.ino_map = {}
3021+ self.ino_count = 1
3022+
3023+ def get_ino(self, path):
3024+ if self.ino_map.has_key(path):
3025+ return self.ino_map[path]
3026+ self.ino_map[path] = self.ino_count
3027+ self.ino_count += 1
3028+ return self.ino_map[path]
3029+
3030+ def is_object(self, path):
3031+ try:
3032+ items = self.qmp.command('qom-list', path=path)
3033+ return True
3034+ except:
3035+ return False
3036+
3037+ def is_property(self, path):
3038+ try:
3039+ path, prop = path.rsplit('/', 1)
3040+ for item in self.qmp.command('qom-list', path=path):
3041+ if item['name'] == prop:
3042+ return True
3043+ return False
3044+ except:
3045+ return False
3046+
3047+ def is_link(self, path):
3048+ try:
3049+ path, prop = path.rsplit('/', 1)
3050+ for item in self.qmp.command('qom-list', path=path):
3051+ if item['name'] == prop:
3052+ if item['type'].startswith('link<'):
3053+ return True
3054+ return False
3055+ return False
3056+ except:
3057+ return False
3058+
3059+ def read(self, path, length, offset):
3060+ if not self.is_property(path):
3061+ return -ENOENT
3062+
3063+ path, prop = path.rsplit('/', 1)
3064+ try:
3065+ data = str(self.qmp.command('qom-get', path=path, property=prop))
3066+ data += '\n' # make values shell friendly
3067+ except:
3068+ return -EPERM
3069+
3070+ if offset > len(data):
3071+ return ''
3072+
3073+ return str(data[offset:][:length])
3074+
3075+ def readlink(self, path):
3076+ if not self.is_link(path):
3077+ return False
3078+ path, prop = path.rsplit('/', 1)
3079+ prefix = '/'.join(['..'] * (len(path.split('/')) - 1))
3080+ return prefix + str(self.qmp.command('qom-get', path=path,
3081+ property=prop))
3082+
3083+ def getattr(self, path):
3084+ if self.is_link(path):
3085+ value = posix.stat_result((0755 | stat.S_IFLNK,
3086+ self.get_ino(path),
3087+ 0,
3088+ 2,
3089+ 1000,
3090+ 1000,
3091+ 4096,
3092+ 0,
3093+ 0,
3094+ 0))
3095+ elif self.is_object(path):
3096+ value = posix.stat_result((0755 | stat.S_IFDIR,
3097+ self.get_ino(path),
3098+ 0,
3099+ 2,
3100+ 1000,
3101+ 1000,
3102+ 4096,
3103+ 0,
3104+ 0,
3105+ 0))
3106+ elif self.is_property(path):
3107+ value = posix.stat_result((0644 | stat.S_IFREG,
3108+ self.get_ino(path),
3109+ 0,
3110+ 1,
3111+ 1000,
3112+ 1000,
3113+ 4096,
3114+ 0,
3115+ 0,
3116+ 0))
3117+ else:
3118+ value = -ENOENT
3119+ return value
3120+
3121+ def readdir(self, path, offset):
3122+ yield fuse.Direntry('.')
3123+ yield fuse.Direntry('..')
3124+ for item in self.qmp.command('qom-list', path=path):
3125+ yield fuse.Direntry(str(item['name']))
3126+
3127+if __name__ == '__main__':
3128+ import sys, os
3129+
3130+ fs = QOMFS(QEMUMonitorProtocol(os.environ['QMP_SOCKET']))
3131+ fs.main(sys.argv)
3132
3133=== modified file 'VERSION'
3134--- VERSION 2012-02-02 14:25:28 +0000
3135+++ VERSION 2012-09-17 14:09:22 +0000
3136@@ -1,1 +1,1 @@
3137-1.0.50
3138+1.2.0
3139
3140=== modified file 'VERSION.LINARO'
3141--- VERSION.LINARO 2012-03-15 16:18:18 +0000
3142+++ VERSION.LINARO 2012-09-17 14:09:22 +0000
3143@@ -1,1 +1,1 @@
3144-qemu-linaro 2012.03
3145+qemu-linaro 2012.09
3146
3147=== modified file 'aio.c'
3148--- aio.c 2012-02-20 17:32:06 +0000
3149+++ aio.c 2012-09-17 14:09:22 +0000
3150@@ -35,7 +35,6 @@
3151 IOHandler *io_read;
3152 IOHandler *io_write;
3153 AioFlushHandler *io_flush;
3154- AioProcessQueue *io_process_queue;
3155 int deleted;
3156 void *opaque;
3157 QLIST_ENTRY(AioHandler) node;
3158@@ -58,7 +57,6 @@
3159 IOHandler *io_read,
3160 IOHandler *io_write,
3161 AioFlushHandler *io_flush,
3162- AioProcessQueue *io_process_queue,
3163 void *opaque)
3164 {
3165 AioHandler *node;
3166@@ -91,7 +89,6 @@
3167 node->io_read = io_read;
3168 node->io_write = io_write;
3169 node->io_flush = io_flush;
3170- node->io_process_queue = io_process_queue;
3171 node->opaque = opaque;
3172 }
3173
3174@@ -102,131 +99,96 @@
3175
3176 void qemu_aio_flush(void)
3177 {
3178- AioHandler *node;
3179- int ret;
3180-
3181- do {
3182- ret = 0;
3183-
3184- /*
3185- * If there are pending emulated aio start them now so flush
3186- * will be able to return 1.
3187- */
3188- qemu_aio_wait();
3189-
3190- QLIST_FOREACH(node, &aio_handlers, node) {
3191- if (node->io_flush) {
3192- ret |= node->io_flush(node->opaque);
3193- }
3194- }
3195- } while (qemu_bh_poll() || ret > 0);
3196-}
3197-
3198-int qemu_aio_process_queue(void)
3199-{
3200- AioHandler *node;
3201- int ret = 0;
3202-
3203- walking_handlers = 1;
3204-
3205- QLIST_FOREACH(node, &aio_handlers, node) {
3206- if (node->io_process_queue) {
3207- if (node->io_process_queue(node->opaque)) {
3208- ret = 1;
3209- }
3210- }
3211- }
3212-
3213- walking_handlers = 0;
3214-
3215- return ret;
3216-}
3217-
3218-void qemu_aio_wait(void)
3219-{
3220- int ret;
3221-
3222- if (qemu_bh_poll())
3223- return;
3224+ while (qemu_aio_wait());
3225+}
3226+
3227+bool qemu_aio_wait(void)
3228+{
3229+ AioHandler *node;
3230+ fd_set rdfds, wrfds;
3231+ int max_fd = -1;
3232+ int ret;
3233+ bool busy;
3234
3235 /*
3236 * If there are callbacks left that have been queued, we need to call then.
3237- * Return afterwards to avoid waiting needlessly in select().
3238+ * Do not call select in this case, because it is possible that the caller
3239+ * does not need a complete flush (as is the case for qemu_aio_wait loops).
3240 */
3241- if (qemu_aio_process_queue())
3242- return;
3243-
3244- do {
3245- AioHandler *node;
3246- fd_set rdfds, wrfds;
3247- int max_fd = -1;
3248-
3249+ if (qemu_bh_poll()) {
3250+ return true;
3251+ }
3252+
3253+ walking_handlers = 1;
3254+
3255+ FD_ZERO(&rdfds);
3256+ FD_ZERO(&wrfds);
3257+
3258+ /* fill fd sets */
3259+ busy = false;
3260+ QLIST_FOREACH(node, &aio_handlers, node) {
3261+ /* If there aren't pending AIO operations, don't invoke callbacks.
3262+ * Otherwise, if there are no AIO requests, qemu_aio_wait() would
3263+ * wait indefinitely.
3264+ */
3265+ if (node->io_flush) {
3266+ if (node->io_flush(node->opaque) == 0) {
3267+ continue;
3268+ }
3269+ busy = true;
3270+ }
3271+ if (!node->deleted && node->io_read) {
3272+ FD_SET(node->fd, &rdfds);
3273+ max_fd = MAX(max_fd, node->fd + 1);
3274+ }
3275+ if (!node->deleted && node->io_write) {
3276+ FD_SET(node->fd, &wrfds);
3277+ max_fd = MAX(max_fd, node->fd + 1);
3278+ }
3279+ }
3280+
3281+ walking_handlers = 0;
3282+
3283+ /* No AIO operations? Get us out of here */
3284+ if (!busy) {
3285+ return false;
3286+ }
3287+
3288+ /* wait until next event */
3289+ ret = select(max_fd, &rdfds, &wrfds, NULL, NULL);
3290+
3291+ /* if we have any readable fds, dispatch event */
3292+ if (ret > 0) {
3293 walking_handlers = 1;
3294
3295- FD_ZERO(&rdfds);
3296- FD_ZERO(&wrfds);
3297-
3298- /* fill fd sets */
3299- QLIST_FOREACH(node, &aio_handlers, node) {
3300- /* If there aren't pending AIO operations, don't invoke callbacks.
3301- * Otherwise, if there are no AIO requests, qemu_aio_wait() would
3302- * wait indefinitely.
3303- */
3304- if (node->io_flush && node->io_flush(node->opaque) == 0)
3305- continue;
3306-
3307- if (!node->deleted && node->io_read) {
3308- FD_SET(node->fd, &rdfds);
3309- max_fd = MAX(max_fd, node->fd + 1);
3310- }
3311- if (!node->deleted && node->io_write) {
3312- FD_SET(node->fd, &wrfds);
3313- max_fd = MAX(max_fd, node->fd + 1);
3314+ /* we have to walk very carefully in case
3315+ * qemu_aio_set_fd_handler is called while we're walking */
3316+ node = QLIST_FIRST(&aio_handlers);
3317+ while (node) {
3318+ AioHandler *tmp;
3319+
3320+ if (!node->deleted &&
3321+ FD_ISSET(node->fd, &rdfds) &&
3322+ node->io_read) {
3323+ node->io_read(node->opaque);
3324+ }
3325+ if (!node->deleted &&
3326+ FD_ISSET(node->fd, &wrfds) &&
3327+ node->io_write) {
3328+ node->io_write(node->opaque);
3329+ }
3330+
3331+ tmp = node;
3332+ node = QLIST_NEXT(node, node);
3333+
3334+ if (tmp->deleted) {
3335+ QLIST_REMOVE(tmp, node);
3336+ g_free(tmp);
3337 }
3338 }
3339
3340 walking_handlers = 0;
3341-
3342- /* No AIO operations? Get us out of here */
3343- if (max_fd == -1)
3344- break;
3345-
3346- /* wait until next event */
3347- ret = select(max_fd, &rdfds, &wrfds, NULL, NULL);
3348- if (ret == -1 && errno == EINTR)
3349- continue;
3350-
3351- /* if we have any readable fds, dispatch event */
3352- if (ret > 0) {
3353- walking_handlers = 1;
3354-
3355- /* we have to walk very carefully in case
3356- * qemu_aio_set_fd_handler is called while we're walking */
3357- node = QLIST_FIRST(&aio_handlers);
3358- while (node) {
3359- AioHandler *tmp;
3360-
3361- if (!node->deleted &&
3362- FD_ISSET(node->fd, &rdfds) &&
3363- node->io_read) {
3364- node->io_read(node->opaque);
3365- }
3366- if (!node->deleted &&
3367- FD_ISSET(node->fd, &wrfds) &&
3368- node->io_write) {
3369- node->io_write(node->opaque);
3370- }
3371-
3372- tmp = node;
3373- node = QLIST_NEXT(node, node);
3374-
3375- if (tmp->deleted) {
3376- QLIST_REMOVE(tmp, node);
3377- g_free(tmp);
3378- }
3379- }
3380-
3381- walking_handlers = 0;
3382- }
3383- } while (ret == 0);
3384+ }
3385+
3386+ return true;
3387 }
3388
3389=== modified file 'arch_init.c'
3390--- arch_init.c 2012-03-15 16:18:18 +0000
3391+++ arch_init.c 2012-09-17 14:09:22 +0000
3392@@ -43,6 +43,16 @@
3393 #include "hw/smbios.h"
3394 #include "exec-memory.h"
3395 #include "hw/pcspk.h"
3396+#include "qemu/page_cache.h"
3397+#include "qmp-commands.h"
3398+
3399+#ifdef DEBUG_ARCH_INIT
3400+#define DPRINTF(fmt, ...) \
3401+ do { fprintf(stdout, "arch_init: " fmt, ## __VA_ARGS__); } while (0)
3402+#else
3403+#define DPRINTF(fmt, ...) \
3404+ do { } while (0)
3405+#endif
3406
3407 #ifdef TARGET_SPARC
3408 int graphic_width = 1024;
3409@@ -54,7 +64,6 @@
3410 int graphic_depth = 15;
3411 #endif
3412
3413-const char arch_config_name[] = CONFIG_QEMU_CONFDIR "/target-" TARGET_ARCH ".conf";
3414
3415 #if defined(TARGET_ALPHA)
3416 #define QEMU_ARCH QEMU_ARCH_ALPHA
3417@@ -72,6 +81,8 @@
3418 #define QEMU_ARCH QEMU_ARCH_MICROBLAZE
3419 #elif defined(TARGET_MIPS)
3420 #define QEMU_ARCH QEMU_ARCH_MIPS
3421+#elif defined(TARGET_OPENRISC)
3422+#define QEMU_ARCH QEMU_ARCH_OPENRISC
3423 #elif defined(TARGET_PPC)
3424 #define QEMU_ARCH QEMU_ARCH_PPC
3425 #elif defined(TARGET_S390X)
3426@@ -82,6 +93,8 @@
3427 #define QEMU_ARCH QEMU_ARCH_SPARC
3428 #elif defined(TARGET_XTENSA)
3429 #define QEMU_ARCH QEMU_ARCH_XTENSA
3430+#elif defined(TARGET_UNICORE32)
3431+#define QEMU_ARCH QEMU_ARCH_UNICORE32
3432 #endif
3433
3434 const uint32_t arch_type = QEMU_ARCH;
3435@@ -95,12 +108,17 @@
3436 #define RAM_SAVE_FLAG_PAGE 0x08
3437 #define RAM_SAVE_FLAG_EOS 0x10
3438 #define RAM_SAVE_FLAG_CONTINUE 0x20
3439+#define RAM_SAVE_FLAG_XBZRLE 0x40
3440
3441 #ifdef __ALTIVEC__
3442 #include <altivec.h>
3443 #define VECTYPE vector unsigned char
3444 #define SPLAT(p) vec_splat(vec_ld(0, p), 0)
3445 #define ALL_EQ(v1, v2) vec_all_eq(v1, v2)
3446+/* altivec.h may redefine the bool macro as vector type.
3447+ * Reset it to POSIX semantics. */
3448+#undef bool
3449+#define bool _Bool
3450 #elif defined __SSE2__
3451 #include <emmintrin.h>
3452 #define VECTYPE __m128i
3453@@ -112,6 +130,37 @@
3454 #define ALL_EQ(v1, v2) ((v1) == (v2))
3455 #endif
3456
3457+
3458+static struct defconfig_file {
3459+ const char *filename;
3460+ /* Indicates it is an user config file (disabled by -no-user-config) */
3461+ bool userconfig;
3462+} default_config_files[] = {
3463+ { CONFIG_QEMU_DATADIR "/cpus-" TARGET_ARCH ".conf", false },
3464+ { CONFIG_QEMU_CONFDIR "/qemu.conf", true },
3465+ { CONFIG_QEMU_CONFDIR "/target-" TARGET_ARCH ".conf", true },
3466+ { NULL }, /* end of list */
3467+};
3468+
3469+
3470+int qemu_read_default_config_files(bool userconfig)
3471+{
3472+ int ret;
3473+ struct defconfig_file *f;
3474+
3475+ for (f = default_config_files; f->filename; f++) {
3476+ if (!userconfig && f->userconfig) {
3477+ continue;
3478+ }
3479+ ret = qemu_read_config_file(f->filename);
3480+ if (ret < 0 && ret != -ENOENT) {
3481+ return ret;
3482+ }
3483+ }
3484+
3485+ return 0;
3486+}
3487+
3488 static int is_dup_page(uint8_t *page)
3489 {
3490 VECTYPE *p = (VECTYPE *)page;
3491@@ -127,15 +176,177 @@
3492 return 1;
3493 }
3494
3495+/* struct contains XBZRLE cache and a static page
3496+ used by the compression */
3497+static struct {
3498+ /* buffer used for XBZRLE encoding */
3499+ uint8_t *encoded_buf;
3500+ /* buffer for storing page content */
3501+ uint8_t *current_buf;
3502+ /* buffer used for XBZRLE decoding */
3503+ uint8_t *decoded_buf;
3504+ /* Cache for XBZRLE */
3505+ PageCache *cache;
3506+} XBZRLE = {
3507+ .encoded_buf = NULL,
3508+ .current_buf = NULL,
3509+ .decoded_buf = NULL,
3510+ .cache = NULL,
3511+};
3512+
3513+
3514+int64_t xbzrle_cache_resize(int64_t new_size)
3515+{
3516+ if (XBZRLE.cache != NULL) {
3517+ return cache_resize(XBZRLE.cache, new_size / TARGET_PAGE_SIZE) *
3518+ TARGET_PAGE_SIZE;
3519+ }
3520+ return pow2floor(new_size);
3521+}
3522+
3523+/* accounting for migration statistics */
3524+typedef struct AccountingInfo {
3525+ uint64_t dup_pages;
3526+ uint64_t norm_pages;
3527+ uint64_t iterations;
3528+ uint64_t xbzrle_bytes;
3529+ uint64_t xbzrle_pages;
3530+ uint64_t xbzrle_cache_miss;
3531+ uint64_t xbzrle_overflows;
3532+} AccountingInfo;
3533+
3534+static AccountingInfo acct_info;
3535+
3536+static void acct_clear(void)
3537+{
3538+ memset(&acct_info, 0, sizeof(acct_info));
3539+}
3540+
3541+uint64_t dup_mig_bytes_transferred(void)
3542+{
3543+ return acct_info.dup_pages * TARGET_PAGE_SIZE;
3544+}
3545+
3546+uint64_t dup_mig_pages_transferred(void)
3547+{
3548+ return acct_info.dup_pages;
3549+}
3550+
3551+uint64_t norm_mig_bytes_transferred(void)
3552+{
3553+ return acct_info.norm_pages * TARGET_PAGE_SIZE;
3554+}
3555+
3556+uint64_t norm_mig_pages_transferred(void)
3557+{
3558+ return acct_info.norm_pages;
3559+}
3560+
3561+uint64_t xbzrle_mig_bytes_transferred(void)
3562+{
3563+ return acct_info.xbzrle_bytes;
3564+}
3565+
3566+uint64_t xbzrle_mig_pages_transferred(void)
3567+{
3568+ return acct_info.xbzrle_pages;
3569+}
3570+
3571+uint64_t xbzrle_mig_pages_cache_miss(void)
3572+{
3573+ return acct_info.xbzrle_cache_miss;
3574+}
3575+
3576+uint64_t xbzrle_mig_pages_overflow(void)
3577+{
3578+ return acct_info.xbzrle_overflows;
3579+}
3580+
3581+static void save_block_hdr(QEMUFile *f, RAMBlock *block, ram_addr_t offset,
3582+ int cont, int flag)
3583+{
3584+ qemu_put_be64(f, offset | cont | flag);
3585+ if (!cont) {
3586+ qemu_put_byte(f, strlen(block->idstr));
3587+ qemu_put_buffer(f, (uint8_t *)block->idstr,
3588+ strlen(block->idstr));
3589+ }
3590+
3591+}
3592+
3593+#define ENCODING_FLAG_XBZRLE 0x1
3594+
3595+static int save_xbzrle_page(QEMUFile *f, uint8_t *current_data,
3596+ ram_addr_t current_addr, RAMBlock *block,
3597+ ram_addr_t offset, int cont, bool last_stage)
3598+{
3599+ int encoded_len = 0, bytes_sent = -1;
3600+ uint8_t *prev_cached_page;
3601+
3602+ if (!cache_is_cached(XBZRLE.cache, current_addr)) {
3603+ if (!last_stage) {
3604+ cache_insert(XBZRLE.cache, current_addr,
3605+ g_memdup(current_data, TARGET_PAGE_SIZE));
3606+ }
3607+ acct_info.xbzrle_cache_miss++;
3608+ return -1;
3609+ }
3610+
3611+ prev_cached_page = get_cached_data(XBZRLE.cache, current_addr);
3612+
3613+ /* save current buffer into memory */
3614+ memcpy(XBZRLE.current_buf, current_data, TARGET_PAGE_SIZE);
3615+
3616+ /* XBZRLE encoding (if there is no overflow) */
3617+ encoded_len = xbzrle_encode_buffer(prev_cached_page, XBZRLE.current_buf,
3618+ TARGET_PAGE_SIZE, XBZRLE.encoded_buf,
3619+ TARGET_PAGE_SIZE);
3620+ if (encoded_len == 0) {
3621+ DPRINTF("Skipping unmodified page\n");
3622+ return 0;
3623+ } else if (encoded_len == -1) {
3624+ DPRINTF("Overflow\n");
3625+ acct_info.xbzrle_overflows++;
3626+ /* update data in the cache */
3627+ memcpy(prev_cached_page, current_data, TARGET_PAGE_SIZE);
3628+ return -1;
3629+ }
3630+
3631+ /* we need to update the data in the cache, in order to get the same data */
3632+ if (!last_stage) {
3633+ memcpy(prev_cached_page, XBZRLE.current_buf, TARGET_PAGE_SIZE);
3634+ }
3635+
3636+ /* Send XBZRLE based compressed page */
3637+ save_block_hdr(f, block, offset, cont, RAM_SAVE_FLAG_XBZRLE);
3638+ qemu_put_byte(f, ENCODING_FLAG_XBZRLE);
3639+ qemu_put_be16(f, encoded_len);
3640+ qemu_put_buffer(f, XBZRLE.encoded_buf, encoded_len);
3641+ bytes_sent = encoded_len + 1 + 2;
3642+ acct_info.xbzrle_pages++;
3643+ acct_info.xbzrle_bytes += bytes_sent;
3644+
3645+ return bytes_sent;
3646+}
3647+
3648 static RAMBlock *last_block;
3649 static ram_addr_t last_offset;
3650
3651-static int ram_save_block(QEMUFile *f)
3652+/*
3653+ * ram_save_block: Writes a page of memory to the stream f
3654+ *
3655+ * Returns: 0: if the page hasn't changed
3656+ * -1: if there are no more dirty pages
3657+ * n: the amount of bytes written in other case
3658+ */
3659+
3660+static int ram_save_block(QEMUFile *f, bool last_stage)
3661 {
3662 RAMBlock *block = last_block;
3663 ram_addr_t offset = last_offset;
3664- int bytes_sent = 0;
3665+ int bytes_sent = -1;
3666 MemoryRegion *mr;
3667+ ram_addr_t current_addr;
3668
3669 if (!block)
3670 block = QLIST_FIRST(&ram_list.blocks);
3671@@ -153,26 +364,31 @@
3672 p = memory_region_get_ram_ptr(mr) + offset;
3673
3674 if (is_dup_page(p)) {
3675- qemu_put_be64(f, offset | cont | RAM_SAVE_FLAG_COMPRESS);
3676- if (!cont) {
3677- qemu_put_byte(f, strlen(block->idstr));
3678- qemu_put_buffer(f, (uint8_t *)block->idstr,
3679- strlen(block->idstr));
3680- }
3681+ acct_info.dup_pages++;
3682+ save_block_hdr(f, block, offset, cont, RAM_SAVE_FLAG_COMPRESS);
3683 qemu_put_byte(f, *p);
3684 bytes_sent = 1;
3685- } else {
3686- qemu_put_be64(f, offset | cont | RAM_SAVE_FLAG_PAGE);
3687- if (!cont) {
3688- qemu_put_byte(f, strlen(block->idstr));
3689- qemu_put_buffer(f, (uint8_t *)block->idstr,
3690- strlen(block->idstr));
3691+ } else if (migrate_use_xbzrle()) {
3692+ current_addr = block->offset + offset;
3693+ bytes_sent = save_xbzrle_page(f, p, current_addr, block,
3694+ offset, cont, last_stage);
3695+ if (!last_stage) {
3696+ p = get_cached_data(XBZRLE.cache, current_addr);
3697 }
3698+ }
3699+
3700+ /* either we didn't send yet (we may have had XBZRLE overflow) */
3701+ if (bytes_sent == -1) {
3702+ save_block_hdr(f, block, offset, cont, RAM_SAVE_FLAG_PAGE);
3703 qemu_put_buffer(f, p, TARGET_PAGE_SIZE);
3704 bytes_sent = TARGET_PAGE_SIZE;
3705+ acct_info.norm_pages++;
3706 }
3707
3708- break;
3709+ /* if page is unmodified, continue to the next */
3710+ if (bytes_sent != 0) {
3711+ break;
3712+ }
3713 }
3714
3715 offset += TARGET_PAGE_SIZE;
3716@@ -194,20 +410,7 @@
3717
3718 static ram_addr_t ram_save_remaining(void)
3719 {
3720- RAMBlock *block;
3721- ram_addr_t count = 0;
3722-
3723- QLIST_FOREACH(block, &ram_list.blocks, next) {
3724- ram_addr_t addr;
3725- for (addr = 0; addr < block->length; addr += TARGET_PAGE_SIZE) {
3726- if (memory_region_get_dirty(block->mr, addr, TARGET_PAGE_SIZE,
3727- DIRTY_MEMORY_MIGRATION)) {
3728- count++;
3729- }
3730- }
3731- }
3732-
3733- return count;
3734+ return ram_list.dirty_pages;
3735 }
3736
3737 uint64_t ram_bytes_remaining(void)
3738@@ -260,60 +463,111 @@
3739 g_free(blocks);
3740 }
3741
3742-int ram_save_live(Monitor *mon, QEMUFile *f, int stage, void *opaque)
3743+static void migration_end(void)
3744+{
3745+ memory_global_dirty_log_stop();
3746+
3747+ if (migrate_use_xbzrle()) {
3748+ cache_fini(XBZRLE.cache);
3749+ g_free(XBZRLE.cache);
3750+ g_free(XBZRLE.encoded_buf);
3751+ g_free(XBZRLE.current_buf);
3752+ g_free(XBZRLE.decoded_buf);
3753+ XBZRLE.cache = NULL;
3754+ }
3755+}
3756+
3757+static void ram_migration_cancel(void *opaque)
3758+{
3759+ migration_end();
3760+}
3761+
3762+#define MAX_WAIT 50 /* ms, half buffered_file limit */
3763+
3764+static int ram_save_setup(QEMUFile *f, void *opaque)
3765 {
3766 ram_addr_t addr;
3767+ RAMBlock *block;
3768+
3769+ bytes_transferred = 0;
3770+ last_block = NULL;
3771+ last_offset = 0;
3772+ sort_ram_list();
3773+
3774+ if (migrate_use_xbzrle()) {
3775+ XBZRLE.cache = cache_init(migrate_xbzrle_cache_size() /
3776+ TARGET_PAGE_SIZE,
3777+ TARGET_PAGE_SIZE);
3778+ if (!XBZRLE.cache) {
3779+ DPRINTF("Error creating cache\n");
3780+ return -1;
3781+ }
3782+ XBZRLE.encoded_buf = g_malloc0(TARGET_PAGE_SIZE);
3783+ XBZRLE.current_buf = g_malloc(TARGET_PAGE_SIZE);
3784+ acct_clear();
3785+ }
3786+
3787+ /* Make sure all dirty bits are set */
3788+ QLIST_FOREACH(block, &ram_list.blocks, next) {
3789+ for (addr = 0; addr < block->length; addr += TARGET_PAGE_SIZE) {
3790+ if (!memory_region_get_dirty(block->mr, addr, TARGET_PAGE_SIZE,
3791+ DIRTY_MEMORY_MIGRATION)) {
3792+ memory_region_set_dirty(block->mr, addr, TARGET_PAGE_SIZE);
3793+ }
3794+ }
3795+ }
3796+
3797+ memory_global_dirty_log_start();
3798+
3799+ qemu_put_be64(f, ram_bytes_total() | RAM_SAVE_FLAG_MEM_SIZE);
3800+
3801+ QLIST_FOREACH(block, &ram_list.blocks, next) {
3802+ qemu_put_byte(f, strlen(block->idstr));
3803+ qemu_put_buffer(f, (uint8_t *)block->idstr, strlen(block->idstr));
3804+ qemu_put_be64(f, block->length);
3805+ }
3806+
3807+ qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
3808+
3809+ return 0;
3810+}
3811+
3812+static int ram_save_iterate(QEMUFile *f, void *opaque)
3813+{
3814 uint64_t bytes_transferred_last;
3815 double bwidth = 0;
3816- uint64_t expected_time = 0;
3817 int ret;
3818-
3819- if (stage < 0) {
3820- memory_global_dirty_log_stop();
3821- return 0;
3822- }
3823-
3824- memory_global_sync_dirty_bitmap(get_system_memory());
3825-
3826- if (stage == 1) {
3827- RAMBlock *block;
3828- bytes_transferred = 0;
3829- last_block = NULL;
3830- last_offset = 0;
3831- sort_ram_list();
3832-
3833- /* Make sure all dirty bits are set */
3834- QLIST_FOREACH(block, &ram_list.blocks, next) {
3835- for (addr = 0; addr < block->length; addr += TARGET_PAGE_SIZE) {
3836- if (!memory_region_get_dirty(block->mr, addr, TARGET_PAGE_SIZE,
3837- DIRTY_MEMORY_MIGRATION)) {
3838- memory_region_set_dirty(block->mr, addr, TARGET_PAGE_SIZE);
3839- }
3840- }
3841- }
3842-
3843- memory_global_dirty_log_start();
3844-
3845- qemu_put_be64(f, ram_bytes_total() | RAM_SAVE_FLAG_MEM_SIZE);
3846-
3847- QLIST_FOREACH(block, &ram_list.blocks, next) {
3848- qemu_put_byte(f, strlen(block->idstr));
3849- qemu_put_buffer(f, (uint8_t *)block->idstr, strlen(block->idstr));
3850- qemu_put_be64(f, block->length);
3851- }
3852- }
3853+ int i;
3854+ uint64_t expected_time;
3855
3856 bytes_transferred_last = bytes_transferred;
3857 bwidth = qemu_get_clock_ns(rt_clock);
3858
3859+ i = 0;
3860 while ((ret = qemu_file_rate_limit(f)) == 0) {
3861 int bytes_sent;
3862
3863- bytes_sent = ram_save_block(f);
3864+ bytes_sent = ram_save_block(f, false);
3865+ /* no more blocks to sent */
3866+ if (bytes_sent < 0) {
3867+ break;
3868+ }
3869 bytes_transferred += bytes_sent;
3870- if (bytes_sent == 0) { /* no more blocks */
3871- break;
3872+ acct_info.iterations++;
3873+ /* we want to check in the 1st loop, just in case it was the 1st time
3874+ and we had to sync the dirty bitmap.
3875+ qemu_get_clock_ns() is a bit expensive, so we only check each some
3876+ iterations
3877+ */
3878+ if ((i & 63) == 0) {
3879+ uint64_t t1 = (qemu_get_clock_ns(rt_clock) - bwidth) / 1000000;
3880+ if (t1 > MAX_WAIT) {
3881+ DPRINTF("big wait: " PRIu64 " milliseconds, %d iterations\n",
3882+ t1, i);
3883+ break;
3884+ }
3885 }
3886+ i++;
3887 }
3888
3889 if (ret < 0) {
3890@@ -329,22 +583,85 @@
3891 bwidth = 0.000001;
3892 }
3893
3894+ qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
3895+
3896+ expected_time = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth;
3897+
3898+ DPRINTF("ram_save_live: expected(" PRIu64 ") <= max(" PRIu64 ")?\n",
3899+ expected_time, migrate_max_downtime());
3900+
3901+ if (expected_time <= migrate_max_downtime()) {
3902+ memory_global_sync_dirty_bitmap(get_system_memory());
3903+ expected_time = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth;
3904+
3905+ return expected_time <= migrate_max_downtime();
3906+ }
3907+ return 0;
3908+}
3909+
3910+static int ram_save_complete(QEMUFile *f, void *opaque)
3911+{
3912+ memory_global_sync_dirty_bitmap(get_system_memory());
3913+
3914 /* try transferring iterative blocks of memory */
3915- if (stage == 3) {
3916+
3917+ /* flush all remaining blocks regardless of rate limiting */
3918+ while (true) {
3919 int bytes_sent;
3920
3921- /* flush all remaining blocks regardless of rate limiting */
3922- while ((bytes_sent = ram_save_block(f)) != 0) {
3923- bytes_transferred += bytes_sent;
3924+ bytes_sent = ram_save_block(f, true);
3925+ /* no more blocks to sent */
3926+ if (bytes_sent < 0) {
3927+ break;
3928 }
3929- memory_global_dirty_log_stop();
3930+ bytes_transferred += bytes_sent;
3931 }
3932+ memory_global_dirty_log_stop();
3933
3934 qemu_put_be64(f, RAM_SAVE_FLAG_EOS);
3935
3936- expected_time = ram_save_remaining() * TARGET_PAGE_SIZE / bwidth;
3937-
3938- return (stage == 2) && (expected_time <= migrate_max_downtime());
3939+ return 0;
3940+}
3941+
3942+static int load_xbzrle(QEMUFile *f, ram_addr_t addr, void *host)
3943+{
3944+ int ret, rc = 0;
3945+ unsigned int xh_len;
3946+ int xh_flags;
3947+
3948+ if (!XBZRLE.decoded_buf) {
3949+ XBZRLE.decoded_buf = g_malloc(TARGET_PAGE_SIZE);
3950+ }
3951+
3952+ /* extract RLE header */
3953+ xh_flags = qemu_get_byte(f);
3954+ xh_len = qemu_get_be16(f);
3955+
3956+ if (xh_flags != ENCODING_FLAG_XBZRLE) {
3957+ fprintf(stderr, "Failed to load XBZRLE page - wrong compression!\n");
3958+ return -1;
3959+ }
3960+
3961+ if (xh_len > TARGET_PAGE_SIZE) {
3962+ fprintf(stderr, "Failed to load XBZRLE page - len overflow!\n");
3963+ return -1;
3964+ }
3965+ /* load data and decode */
3966+ qemu_get_buffer(f, XBZRLE.decoded_buf, xh_len);
3967+
3968+ /* decode RLE */
3969+ ret = xbzrle_decode_buffer(XBZRLE.decoded_buf, xh_len, host,
3970+ TARGET_PAGE_SIZE);
3971+ if (ret == -1) {
3972+ fprintf(stderr, "Failed to load XBZRLE page - decode error!\n");
3973+ rc = -1;
3974+ } else if (ret > TARGET_PAGE_SIZE) {
3975+ fprintf(stderr, "Failed to load XBZRLE page - size %d exceeds %d!\n",
3976+ ret, TARGET_PAGE_SIZE);
3977+ abort();
3978+ }
3979+
3980+ return rc;
3981 }
3982
3983 static inline void *host_from_stream_offset(QEMUFile *f,
3984@@ -377,11 +694,14 @@
3985 return NULL;
3986 }
3987
3988-int ram_load(QEMUFile *f, void *opaque, int version_id)
3989+static int ram_load(QEMUFile *f, void *opaque, int version_id)
3990 {
3991 ram_addr_t addr;
3992- int flags;
3993+ int flags, ret = 0;
3994 int error;
3995+ static uint64_t seq_iter;
3996+
3997+ seq_iter++;
3998
3999 if (version_id < 4 || version_id > 4) {
4000 return -EINVAL;
4001@@ -411,8 +731,10 @@
4002
4003 QLIST_FOREACH(block, &ram_list.blocks, next) {
4004 if (!strncmp(id, block->idstr, sizeof(id))) {
4005- if (block->length != length)
4006- return -EINVAL;
4007+ if (block->length != length) {
4008+ ret = -EINVAL;
4009+ goto done;
4010+ }
4011 break;
4012 }
4013 }
4014@@ -420,7 +742,8 @@
4015 if (!block) {
4016 fprintf(stderr, "Unknown ramblock \"%s\", cannot "
4017 "accept migration\n", id);
4018- return -EINVAL;
4019+ ret = -EINVAL;
4020+ goto done;
4021 }
4022
4023 total_ram_bytes -= length;
4024@@ -449,18 +772,46 @@
4025 void *host;
4026
4027 host = host_from_stream_offset(f, addr, flags);
4028+ if (!host) {
4029+ return -EINVAL;
4030+ }
4031
4032 qemu_get_buffer(f, host, TARGET_PAGE_SIZE);
4033+ } else if (flags & RAM_SAVE_FLAG_XBZRLE) {
4034+ if (!migrate_use_xbzrle()) {
4035+ return -EINVAL;
4036+ }
4037+ void *host = host_from_stream_offset(f, addr, flags);
4038+ if (!host) {
4039+ return -EINVAL;
4040+ }
4041+
4042+ if (load_xbzrle(f, addr, host) < 0) {
4043+ ret = -EINVAL;
4044+ goto done;
4045+ }
4046 }
4047 error = qemu_file_get_error(f);
4048 if (error) {
4049- return error;
4050+ ret = error;
4051+ goto done;
4052 }
4053 } while (!(flags & RAM_SAVE_FLAG_EOS));
4054
4055- return 0;
4056+done:
4057+ DPRINTF("Completed load of VM with exit code %d seq iteration " PRIu64 "\n",
4058+ ret, seq_iter);
4059+ return ret;
4060 }
4061
4062+SaveVMHandlers savevm_ram_handlers = {
4063+ .save_live_setup = ram_save_setup,
4064+ .save_live_iterate = ram_save_iterate,
4065+ .save_live_complete = ram_save_complete,
4066+ .load_state = ram_load,
4067+ .cancel = ram_migration_cancel,
4068+};
4069+
4070 #ifdef HAS_AUDIO
4071 struct soundhw {
4072 const char *name;
4073@@ -475,7 +826,7 @@
4074
4075 static struct soundhw soundhw[] = {
4076 #ifdef HAS_AUDIO_CHOICE
4077-#if defined(TARGET_I386) || defined(TARGET_MIPS)
4078+#ifdef CONFIG_PCSPK
4079 {
4080 "pcspk",
4081 "PC speaker",
4082@@ -568,7 +919,7 @@
4083 {
4084 struct soundhw *c;
4085
4086- if (*optarg == '?') {
4087+ if (is_help_option(optarg)) {
4088 show_valid_cards:
4089
4090 printf("Valid sound card names (comma separated):\n");
4091@@ -576,7 +927,7 @@
4092 printf ("%-11s %s\n", c->name, c->descr);
4093 }
4094 printf("\n-soundhw all will enable all of the above\n");
4095- exit(*optarg != '?');
4096+ exit(!is_help_option(optarg));
4097 }
4098 else {
4099 size_t l;
4100@@ -730,3 +1081,13 @@
4101 return 0;
4102 #endif
4103 }
4104+
4105+
4106+TargetInfo *qmp_query_target(Error **errp)
4107+{
4108+ TargetInfo *info = g_malloc0(sizeof(*info));
4109+
4110+ info->arch = TARGET_TYPE;
4111+
4112+ return info;
4113+}
4114
4115=== modified file 'arch_init.h'
4116--- arch_init.h 2012-02-02 14:25:28 +0000
4117+++ arch_init.h 2012-09-17 14:09:22 +0000
4118@@ -1,7 +1,7 @@
4119 #ifndef QEMU_ARCH_INIT_H
4120 #define QEMU_ARCH_INIT_H
4121
4122-extern const char arch_config_name[];
4123+#include "qmp-commands.h"
4124
4125 enum {
4126 QEMU_ARCH_ALL = -1,
4127@@ -18,6 +18,8 @@
4128 QEMU_ARCH_SH4 = 1024,
4129 QEMU_ARCH_SPARC = 2048,
4130 QEMU_ARCH_XTENSA = 4096,
4131+ QEMU_ARCH_OPENRISC = 8192,
4132+ QEMU_ARCH_UNICORE32 = 0x4000,
4133 };
4134
4135 extern const uint32_t arch_type;
4136@@ -32,4 +34,6 @@
4137 int kvm_available(void);
4138 int xen_available(void);
4139
4140+CpuDefinitionInfoList GCC_WEAK_DECL *arch_query_cpu_definitions(Error **errp);
4141+
4142 #endif
4143
4144=== removed file 'arm-semi.c'
4145--- arm-semi.c 2011-09-26 15:07:14 +0000
4146+++ arm-semi.c 1970-01-01 00:00:00 +0000
4147@@ -1,509 +0,0 @@
4148-/*
4149- * Arm "Angel" semihosting syscalls
4150- *
4151- * Copyright (c) 2005, 2007 CodeSourcery.
4152- * Written by Paul Brook.
4153- *
4154- * This program is free software; you can redistribute it and/or modify
4155- * it under the terms of the GNU General Public License as published by
4156- * the Free Software Foundation; either version 2 of the License, or
4157- * (at your option) any later version.
4158- *
4159- * This program is distributed in the hope that it will be useful,
4160- * but WITHOUT ANY WARRANTY; without even the implied warranty of
4161- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4162- * GNU General Public License for more details.
4163- *
4164- * You should have received a copy of the GNU General Public License
4165- * along with this program; if not, see <http://www.gnu.org/licenses/>.
4166- */
4167-
4168-#include <sys/types.h>
4169-#include <sys/stat.h>
4170-#include <fcntl.h>
4171-#include <unistd.h>
4172-#include <stdlib.h>
4173-#include <stdio.h>
4174-#include <time.h>
4175-
4176-#include "cpu.h"
4177-#ifdef CONFIG_USER_ONLY
4178-#include "qemu.h"
4179-
4180-#define ARM_ANGEL_HEAP_SIZE (128 * 1024 * 1024)
4181-#else
4182-#include "qemu-common.h"
4183-#include "gdbstub.h"
4184-#include "hw/arm-misc.h"
4185-#endif
4186-
4187-#define SYS_OPEN 0x01
4188-#define SYS_CLOSE 0x02
4189-#define SYS_WRITEC 0x03
4190-#define SYS_WRITE0 0x04
4191-#define SYS_WRITE 0x05
4192-#define SYS_READ 0x06
4193-#define SYS_READC 0x07
4194-#define SYS_ISTTY 0x09
4195-#define SYS_SEEK 0x0a
4196-#define SYS_FLEN 0x0c
4197-#define SYS_TMPNAM 0x0d
4198-#define SYS_REMOVE 0x0e
4199-#define SYS_RENAME 0x0f
4200-#define SYS_CLOCK 0x10
4201-#define SYS_TIME 0x11
4202-#define SYS_SYSTEM 0x12
4203-#define SYS_ERRNO 0x13
4204-#define SYS_GET_CMDLINE 0x15
4205-#define SYS_HEAPINFO 0x16
4206-#define SYS_EXIT 0x18
4207-
4208-#ifndef O_BINARY
4209-#define O_BINARY 0
4210-#endif
4211-
4212-#define GDB_O_RDONLY 0x000
4213-#define GDB_O_WRONLY 0x001
4214-#define GDB_O_RDWR 0x002
4215-#define GDB_O_APPEND 0x008
4216-#define GDB_O_CREAT 0x200
4217-#define GDB_O_TRUNC 0x400
4218-#define GDB_O_BINARY 0
4219-
4220-static int gdb_open_modeflags[12] = {
4221- GDB_O_RDONLY,
4222- GDB_O_RDONLY | GDB_O_BINARY,
4223- GDB_O_RDWR,
4224- GDB_O_RDWR | GDB_O_BINARY,
4225- GDB_O_WRONLY | GDB_O_CREAT | GDB_O_TRUNC,
4226- GDB_O_WRONLY | GDB_O_CREAT | GDB_O_TRUNC | GDB_O_BINARY,
4227- GDB_O_RDWR | GDB_O_CREAT | GDB_O_TRUNC,
4228- GDB_O_RDWR | GDB_O_CREAT | GDB_O_TRUNC | GDB_O_BINARY,
4229- GDB_O_WRONLY | GDB_O_CREAT | GDB_O_APPEND,
4230- GDB_O_WRONLY | GDB_O_CREAT | GDB_O_APPEND | GDB_O_BINARY,
4231- GDB_O_RDWR | GDB_O_CREAT | GDB_O_APPEND,
4232- GDB_O_RDWR | GDB_O_CREAT | GDB_O_APPEND | GDB_O_BINARY
4233-};
4234-
4235-static int open_modeflags[12] = {
4236- O_RDONLY,
4237- O_RDONLY | O_BINARY,
4238- O_RDWR,
4239- O_RDWR | O_BINARY,
4240- O_WRONLY | O_CREAT | O_TRUNC,
4241- O_WRONLY | O_CREAT | O_TRUNC | O_BINARY,
4242- O_RDWR | O_CREAT | O_TRUNC,
4243- O_RDWR | O_CREAT | O_TRUNC | O_BINARY,
4244- O_WRONLY | O_CREAT | O_APPEND,
4245- O_WRONLY | O_CREAT | O_APPEND | O_BINARY,
4246- O_RDWR | O_CREAT | O_APPEND,
4247- O_RDWR | O_CREAT | O_APPEND | O_BINARY
4248-};
4249-
4250-#ifdef CONFIG_USER_ONLY
4251-static inline uint32_t set_swi_errno(TaskState *ts, uint32_t code)
4252-{
4253- if (code == (uint32_t)-1)
4254- ts->swi_errno = errno;
4255- return code;
4256-}
4257-#else
4258-static inline uint32_t set_swi_errno(CPUState *env, uint32_t code)
4259-{
4260- return code;
4261-}
4262-
4263-#include "softmmu-semi.h"
4264-#endif
4265-
4266-static target_ulong arm_semi_syscall_len;
4267-
4268-#if !defined(CONFIG_USER_ONLY)
4269-static target_ulong syscall_err;
4270-#endif
4271-
4272-static void arm_semi_cb(CPUState *env, target_ulong ret, target_ulong err)
4273-{
4274-#ifdef CONFIG_USER_ONLY
4275- TaskState *ts = env->opaque;
4276-#endif
4277-
4278- if (ret == (target_ulong)-1) {
4279-#ifdef CONFIG_USER_ONLY
4280- ts->swi_errno = err;
4281-#else
4282- syscall_err = err;
4283-#endif
4284- env->regs[0] = ret;
4285- } else {
4286- /* Fixup syscalls that use nonstardard return conventions. */
4287- switch (env->regs[0]) {
4288- case SYS_WRITE:
4289- case SYS_READ:
4290- env->regs[0] = arm_semi_syscall_len - ret;
4291- break;
4292- case SYS_SEEK:
4293- env->regs[0] = 0;
4294- break;
4295- default:
4296- env->regs[0] = ret;
4297- break;
4298- }
4299- }
4300-}
4301-
4302-static void arm_semi_flen_cb(CPUState *env, target_ulong ret, target_ulong err)
4303-{
4304- /* The size is always stored in big-endian order, extract
4305- the value. We assume the size always fit in 32 bits. */
4306- uint32_t size;
4307- cpu_memory_rw_debug(env, env->regs[13]-64+32, (uint8_t *)&size, 4, 0);
4308- env->regs[0] = be32_to_cpu(size);
4309-#ifdef CONFIG_USER_ONLY
4310- ((TaskState *)env->opaque)->swi_errno = err;
4311-#else
4312- syscall_err = err;
4313-#endif
4314-}
4315-
4316-#define ARG(n) \
4317-({ \
4318- target_ulong __arg; \
4319- /* FIXME - handle get_user() failure */ \
4320- get_user_ual(__arg, args + (n) * 4); \
4321- __arg; \
4322-})
4323-#define SET_ARG(n, val) put_user_ual(val, args + (n) * 4)
4324-uint32_t do_arm_semihosting(CPUState *env)
4325-{
4326- target_ulong args;
4327- char * s;
4328- int nr;
4329- uint32_t ret;
4330- uint32_t len;
4331-#ifdef CONFIG_USER_ONLY
4332- TaskState *ts = env->opaque;
4333-#else
4334- CPUState *ts = env;
4335-#endif
4336-
4337- nr = env->regs[0];
4338- args = env->regs[1];
4339- switch (nr) {
4340- case SYS_OPEN:
4341- if (!(s = lock_user_string(ARG(0))))
4342- /* FIXME - should this error code be -TARGET_EFAULT ? */
4343- return (uint32_t)-1;
4344- if (ARG(1) >= 12)
4345- return (uint32_t)-1;
4346- if (strcmp(s, ":tt") == 0) {
4347- if (ARG(1) < 4)
4348- return STDIN_FILENO;
4349- else
4350- return STDOUT_FILENO;
4351- }
4352- if (use_gdb_syscalls()) {
4353- gdb_do_syscall(arm_semi_cb, "open,%s,%x,1a4", ARG(0),
4354- (int)ARG(2)+1, gdb_open_modeflags[ARG(1)]);
4355- return env->regs[0];
4356- } else {
4357- ret = set_swi_errno(ts, open(s, open_modeflags[ARG(1)], 0644));
4358- }
4359- unlock_user(s, ARG(0), 0);
4360- return ret;
4361- case SYS_CLOSE:
4362- if (use_gdb_syscalls()) {
4363- gdb_do_syscall(arm_semi_cb, "close,%x", ARG(0));
4364- return env->regs[0];
4365- } else {
4366- return set_swi_errno(ts, close(ARG(0)));
4367- }
4368- case SYS_WRITEC:
4369- {
4370- char c;
4371-
4372- if (get_user_u8(c, args))
4373- /* FIXME - should this error code be -TARGET_EFAULT ? */
4374- return (uint32_t)-1;
4375- /* Write to debug console. stderr is near enough. */
4376- if (use_gdb_syscalls()) {
4377- gdb_do_syscall(arm_semi_cb, "write,2,%x,1", args);
4378- return env->regs[0];
4379- } else {
4380- return write(STDERR_FILENO, &c, 1);
4381- }
4382- }
4383- case SYS_WRITE0:
4384- if (!(s = lock_user_string(args)))
4385- /* FIXME - should this error code be -TARGET_EFAULT ? */
4386- return (uint32_t)-1;
4387- len = strlen(s);
4388- if (use_gdb_syscalls()) {
4389- gdb_do_syscall(arm_semi_cb, "write,2,%x,%x\n", args, len);
4390- ret = env->regs[0];
4391- } else {
4392- ret = write(STDERR_FILENO, s, len);
4393- }
4394- unlock_user(s, args, 0);
4395- return ret;
4396- case SYS_WRITE:
4397- len = ARG(2);
4398- if (use_gdb_syscalls()) {
4399- arm_semi_syscall_len = len;
4400- gdb_do_syscall(arm_semi_cb, "write,%x,%x,%x", ARG(0), ARG(1), len);
4401- return env->regs[0];
4402- } else {
4403- if (!(s = lock_user(VERIFY_READ, ARG(1), len, 1)))
4404- /* FIXME - should this error code be -TARGET_EFAULT ? */
4405- return (uint32_t)-1;
4406- ret = set_swi_errno(ts, write(ARG(0), s, len));
4407- unlock_user(s, ARG(1), 0);
4408- if (ret == (uint32_t)-1)
4409- return -1;
4410- return len - ret;
4411- }
4412- case SYS_READ:
4413- len = ARG(2);
4414- if (use_gdb_syscalls()) {
4415- arm_semi_syscall_len = len;
4416- gdb_do_syscall(arm_semi_cb, "read,%x,%x,%x", ARG(0), ARG(1), len);
4417- return env->regs[0];
4418- } else {
4419- if (!(s = lock_user(VERIFY_WRITE, ARG(1), len, 0)))
4420- /* FIXME - should this error code be -TARGET_EFAULT ? */
4421- return (uint32_t)-1;
4422- do
4423- ret = set_swi_errno(ts, read(ARG(0), s, len));
4424- while (ret == -1 && errno == EINTR);
4425- unlock_user(s, ARG(1), len);
4426- if (ret == (uint32_t)-1)
4427- return -1;
4428- return len - ret;
4429- }
4430- case SYS_READC:
4431- /* XXX: Read from debug cosole. Not implemented. */
4432- return 0;
4433- case SYS_ISTTY:
4434- if (use_gdb_syscalls()) {
4435- gdb_do_syscall(arm_semi_cb, "isatty,%x", ARG(0));
4436- return env->regs[0];
4437- } else {
4438- return isatty(ARG(0));
4439- }
4440- case SYS_SEEK:
4441- if (use_gdb_syscalls()) {
4442- gdb_do_syscall(arm_semi_cb, "lseek,%x,%x,0", ARG(0), ARG(1));
4443- return env->regs[0];
4444- } else {
4445- ret = set_swi_errno(ts, lseek(ARG(0), ARG(1), SEEK_SET));
4446- if (ret == (uint32_t)-1)
4447- return -1;
4448- return 0;
4449- }
4450- case SYS_FLEN:
4451- if (use_gdb_syscalls()) {
4452- gdb_do_syscall(arm_semi_flen_cb, "fstat,%x,%x",
4453- ARG(0), env->regs[13]-64);
4454- return env->regs[0];
4455- } else {
4456- struct stat buf;
4457- ret = set_swi_errno(ts, fstat(ARG(0), &buf));
4458- if (ret == (uint32_t)-1)
4459- return -1;
4460- return buf.st_size;
4461- }
4462- case SYS_TMPNAM:
4463- /* XXX: Not implemented. */
4464- return -1;
4465- case SYS_REMOVE:
4466- if (use_gdb_syscalls()) {
4467- gdb_do_syscall(arm_semi_cb, "unlink,%s", ARG(0), (int)ARG(1)+1);
4468- ret = env->regs[0];
4469- } else {
4470- if (!(s = lock_user_string(ARG(0))))
4471- /* FIXME - should this error code be -TARGET_EFAULT ? */
4472- return (uint32_t)-1;
4473- ret = set_swi_errno(ts, remove(s));
4474- unlock_user(s, ARG(0), 0);
4475- }
4476- return ret;
4477- case SYS_RENAME:
4478- if (use_gdb_syscalls()) {
4479- gdb_do_syscall(arm_semi_cb, "rename,%s,%s",
4480- ARG(0), (int)ARG(1)+1, ARG(2), (int)ARG(3)+1);
4481- return env->regs[0];
4482- } else {
4483- char *s2;
4484- s = lock_user_string(ARG(0));
4485- s2 = lock_user_string(ARG(2));
4486- if (!s || !s2)
4487- /* FIXME - should this error code be -TARGET_EFAULT ? */
4488- ret = (uint32_t)-1;
4489- else
4490- ret = set_swi_errno(ts, rename(s, s2));
4491- if (s2)
4492- unlock_user(s2, ARG(2), 0);
4493- if (s)
4494- unlock_user(s, ARG(0), 0);
4495- return ret;
4496- }
4497- case SYS_CLOCK:
4498- return clock() / (CLOCKS_PER_SEC / 100);
4499- case SYS_TIME:
4500- return set_swi_errno(ts, time(NULL));
4501- case SYS_SYSTEM:
4502- if (use_gdb_syscalls()) {
4503- gdb_do_syscall(arm_semi_cb, "system,%s", ARG(0), (int)ARG(1)+1);
4504- return env->regs[0];
4505- } else {
4506- if (!(s = lock_user_string(ARG(0))))
4507- /* FIXME - should this error code be -TARGET_EFAULT ? */
4508- return (uint32_t)-1;
4509- ret = set_swi_errno(ts, system(s));
4510- unlock_user(s, ARG(0), 0);
4511- return ret;
4512- }
4513- case SYS_ERRNO:
4514-#ifdef CONFIG_USER_ONLY
4515- return ts->swi_errno;
4516-#else
4517- return syscall_err;
4518-#endif
4519- case SYS_GET_CMDLINE:
4520- {
4521- /* Build a command-line from the original argv.
4522- *
4523- * The inputs are:
4524- * * ARG(0), pointer to a buffer of at least the size
4525- * specified in ARG(1).
4526- * * ARG(1), size of the buffer pointed to by ARG(0) in
4527- * bytes.
4528- *
4529- * The outputs are:
4530- * * ARG(0), pointer to null-terminated string of the
4531- * command line.
4532- * * ARG(1), length of the string pointed to by ARG(0).
4533- */
4534-
4535- char *output_buffer;
4536- size_t input_size = ARG(1);
4537- size_t output_size;
4538- int status = 0;
4539-
4540- /* Compute the size of the output string. */
4541-#if !defined(CONFIG_USER_ONLY)
4542- output_size = strlen(ts->boot_info->kernel_filename)
4543- + 1 /* Separating space. */
4544- + strlen(ts->boot_info->kernel_cmdline)
4545- + 1; /* Terminating null byte. */
4546-#else
4547- unsigned int i;
4548-
4549- output_size = ts->info->arg_end - ts->info->arg_start;
4550- if (!output_size) {
4551- /* We special-case the "empty command line" case (argc==0).
4552- Just provide the terminating 0. */
4553- output_size = 1;
4554- }
4555-#endif
4556-
4557- if (output_size > input_size) {
4558- /* Not enough space to store command-line arguments. */
4559- return -1;
4560- }
4561-
4562- /* Adjust the command-line length. */
4563- SET_ARG(1, output_size - 1);
4564-
4565- /* Lock the buffer on the ARM side. */
4566- output_buffer = lock_user(VERIFY_WRITE, ARG(0), output_size, 0);
4567- if (!output_buffer) {
4568- return -1;
4569- }
4570-
4571- /* Copy the command-line arguments. */
4572-#if !defined(CONFIG_USER_ONLY)
4573- pstrcpy(output_buffer, output_size, ts->boot_info->kernel_filename);
4574- pstrcat(output_buffer, output_size, " ");
4575- pstrcat(output_buffer, output_size, ts->boot_info->kernel_cmdline);
4576-#else
4577- if (output_size == 1) {
4578- /* Empty command-line. */
4579- output_buffer[0] = '\0';
4580- goto out;
4581- }
4582-
4583- if (copy_from_user(output_buffer, ts->info->arg_start,
4584- output_size)) {
4585- status = -1;
4586- goto out;
4587- }
4588-
4589- /* Separate arguments by white spaces. */
4590- for (i = 0; i < output_size - 1; i++) {
4591- if (output_buffer[i] == 0) {
4592- output_buffer[i] = ' ';
4593- }
4594- }
4595- out:
4596-#endif
4597- /* Unlock the buffer on the ARM side. */
4598- unlock_user(output_buffer, ARG(0), output_size);
4599-
4600- return status;
4601- }
4602- case SYS_HEAPINFO:
4603- {
4604- uint32_t *ptr;
4605- uint32_t limit;
4606-
4607-#ifdef CONFIG_USER_ONLY
4608- /* Some C libraries assume the heap immediately follows .bss, so
4609- allocate it using sbrk. */
4610- if (!ts->heap_limit) {
4611- abi_ulong ret;
4612-
4613- ts->heap_base = do_brk(0);
4614- limit = ts->heap_base + ARM_ANGEL_HEAP_SIZE;
4615- /* Try a big heap, and reduce the size if that fails. */
4616- for (;;) {
4617- ret = do_brk(limit);
4618- if (ret >= limit) {
4619- break;
4620- }
4621- limit = (ts->heap_base >> 1) + (limit >> 1);
4622- }
4623- ts->heap_limit = limit;
4624- }
4625-
4626- if (!(ptr = lock_user(VERIFY_WRITE, ARG(0), 16, 0)))
4627- /* FIXME - should this error code be -TARGET_EFAULT ? */
4628- return (uint32_t)-1;
4629- ptr[0] = tswap32(ts->heap_base);
4630- ptr[1] = tswap32(ts->heap_limit);
4631- ptr[2] = tswap32(ts->stack_base);
4632- ptr[3] = tswap32(0); /* Stack limit. */
4633- unlock_user(ptr, ARG(0), 16);
4634-#else
4635- limit = ram_size;
4636- if (!(ptr = lock_user(VERIFY_WRITE, ARG(0), 16, 0)))
4637- /* FIXME - should this error code be -TARGET_EFAULT ? */
4638- return (uint32_t)-1;
4639- /* TODO: Make this use the limit of the loaded application. */
4640- ptr[0] = tswap32(limit / 2);
4641- ptr[1] = tswap32(limit);
4642- ptr[2] = tswap32(limit); /* Stack base */
4643- ptr[3] = tswap32(0); /* Stack limit. */
4644- unlock_user(ptr, ARG(0), 16);
4645-#endif
4646- return 0;
4647- }
4648- case SYS_EXIT:
4649- gdb_exit(env, 0);
4650- exit(0);
4651- default:
4652- fprintf(stderr, "qemu: Unsupported SemiHosting SWI 0x%02x\n", nr);
4653- cpu_dump_state(env, stderr, fprintf, 0);
4654- abort();
4655- }
4656-}
4657
4658=== modified file 'async.c'
4659--- async.c 2011-12-06 09:35:22 +0000
4660+++ async.c 2012-09-17 14:09:22 +0000
4661@@ -35,10 +35,10 @@
4662 struct QEMUBH {
4663 QEMUBHFunc *cb;
4664 void *opaque;
4665- int scheduled;
4666- int idle;
4667- int deleted;
4668 QEMUBH *next;
4669+ bool scheduled;
4670+ bool idle;
4671+ bool deleted;
4672 };
4673
4674 QEMUBH *qemu_bh_new(QEMUBHFunc *cb, void *opaque)
4675@@ -120,7 +120,7 @@
4676 bh->deleted = 1;
4677 }
4678
4679-void qemu_bh_update_timeout(int *timeout)
4680+void qemu_bh_update_timeout(uint32_t *timeout)
4681 {
4682 QEMUBH *bh;
4683
4684
4685=== added file 'audio/Makefile.objs'
4686--- audio/Makefile.objs 1970-01-01 00:00:00 +0000
4687+++ audio/Makefile.objs 2012-09-17 14:09:22 +0000
4688@@ -0,0 +1,14 @@
4689+common-obj-y = audio.o noaudio.o wavaudio.o mixeng.o
4690+common-obj-$(CONFIG_SDL) += sdlaudio.o
4691+common-obj-$(CONFIG_OSS) += ossaudio.o
4692+common-obj-$(CONFIG_SPICE) += spiceaudio.o
4693+common-obj-$(CONFIG_COREAUDIO) += coreaudio.o
4694+common-obj-$(CONFIG_ALSA) += alsaaudio.o
4695+common-obj-$(CONFIG_DSOUND) += dsoundaudio.o
4696+common-obj-$(CONFIG_FMOD) += fmodaudio.o
4697+common-obj-$(CONFIG_ESD) += esdaudio.o
4698+common-obj-$(CONFIG_PA) += paaudio.o
4699+common-obj-$(CONFIG_WINWAVE) += winwaveaudio.o
4700+common-obj-$(CONFIG_AUDIO_PT_INT) += audio_pt_int.o
4701+common-obj-$(CONFIG_AUDIO_WIN_INT) += audio_win_int.o
4702+common-obj-y += wavcapture.o
4703
4704=== modified file 'audio/audio.c'
4705--- audio/audio.c 2012-03-15 16:18:18 +0000
4706+++ audio/audio.c 2012-09-17 14:09:22 +0000
4707@@ -818,6 +818,7 @@
4708 sw->active = hw->enabled;
4709 sw->conv = noop_conv;
4710 sw->ratio = ((int64_t) hw_cap->info.freq << 32) / sw->info.freq;
4711+ sw->vol = nominal_volume;
4712 sw->rate = st_rate_start (sw->info.freq, hw_cap->info.freq);
4713 if (!sw->rate) {
4714 dolog ("Could not start rate conversion for `%s'\n", SW_NAME (sw));
4715@@ -957,7 +958,9 @@
4716 total += isamp;
4717 }
4718
4719- mixeng_volume (sw->buf, ret, &sw->vol);
4720+ if (!(hw->ctl_caps & VOICE_VOLUME_CAP)) {
4721+ mixeng_volume (sw->buf, ret, &sw->vol);
4722+ }
4723
4724 sw->clip (buf, sw->buf, ret);
4725 sw->total_hw_samples_acquired += total;
4726@@ -1041,7 +1044,10 @@
4727 swlim = audio_MIN (swlim, samples);
4728 if (swlim) {
4729 sw->conv (sw->buf, buf, swlim);
4730- mixeng_volume (sw->buf, swlim, &sw->vol);
4731+
4732+ if (!(sw->hw->ctl_caps & VOICE_VOLUME_CAP)) {
4733+ mixeng_volume (sw->buf, swlim, &sw->vol);
4734+ }
4735 }
4736
4737 while (swlim) {
4738@@ -1770,10 +1776,12 @@
4739 HWVoiceOut *hwo = NULL;
4740 HWVoiceIn *hwi = NULL;
4741
4742- while ((hwo = audio_pcm_hw_find_any_enabled_out (hwo))) {
4743+ while ((hwo = audio_pcm_hw_find_any_out (hwo))) {
4744 SWVoiceCap *sc;
4745
4746- hwo->pcm_ops->ctl_out (hwo, VOICE_DISABLE);
4747+ if (hwo->enabled) {
4748+ hwo->pcm_ops->ctl_out (hwo, VOICE_DISABLE);
4749+ }
4750 hwo->pcm_ops->fini_out (hwo);
4751
4752 for (sc = hwo->cap_head.lh_first; sc; sc = sc->entries.le_next) {
4753@@ -1786,8 +1794,10 @@
4754 }
4755 }
4756
4757- while ((hwi = audio_pcm_hw_find_any_enabled_in (hwi))) {
4758- hwi->pcm_ops->ctl_in (hwi, VOICE_DISABLE);
4759+ while ((hwi = audio_pcm_hw_find_any_in (hwi))) {
4760+ if (hwi->enabled) {
4761+ hwi->pcm_ops->ctl_in (hwi, VOICE_DISABLE);
4762+ }
4763 hwi->pcm_ops->fini_in (hwi);
4764 }
4765
4766@@ -2053,17 +2063,29 @@
4767 void AUD_set_volume_out (SWVoiceOut *sw, int mute, uint8_t lvol, uint8_t rvol)
4768 {
4769 if (sw) {
4770+ HWVoiceOut *hw = sw->hw;
4771+
4772 sw->vol.mute = mute;
4773 sw->vol.l = nominal_volume.l * lvol / 255;
4774 sw->vol.r = nominal_volume.r * rvol / 255;
4775+
4776+ if (hw->pcm_ops->ctl_out) {
4777+ hw->pcm_ops->ctl_out (hw, VOICE_VOLUME, sw);
4778+ }
4779 }
4780 }
4781
4782 void AUD_set_volume_in (SWVoiceIn *sw, int mute, uint8_t lvol, uint8_t rvol)
4783 {
4784 if (sw) {
4785+ HWVoiceIn *hw = sw->hw;
4786+
4787 sw->vol.mute = mute;
4788 sw->vol.l = nominal_volume.l * lvol / 255;
4789 sw->vol.r = nominal_volume.r * rvol / 255;
4790+
4791+ if (hw->pcm_ops->ctl_in) {
4792+ hw->pcm_ops->ctl_in (hw, VOICE_VOLUME, sw);
4793+ }
4794 }
4795 }
4796
4797=== modified file 'audio/audio_int.h'
4798--- audio/audio_int.h 2011-02-02 19:58:26 +0000
4799+++ audio/audio_int.h 2012-09-17 14:09:22 +0000
4800@@ -82,6 +82,7 @@
4801 int samples;
4802 QLIST_HEAD (sw_out_listhead, SWVoiceOut) sw_head;
4803 QLIST_HEAD (sw_cap_listhead, SWVoiceCap) cap_head;
4804+ int ctl_caps;
4805 struct audio_pcm_ops *pcm_ops;
4806 QLIST_ENTRY (HWVoiceOut) entries;
4807 } HWVoiceOut;
4808@@ -101,6 +102,7 @@
4809
4810 int samples;
4811 QLIST_HEAD (sw_in_listhead, SWVoiceIn) sw_head;
4812+ int ctl_caps;
4813 struct audio_pcm_ops *pcm_ops;
4814 QLIST_ENTRY (HWVoiceIn) entries;
4815 } HWVoiceIn;
4816@@ -150,6 +152,7 @@
4817 int max_voices_in;
4818 int voice_size_out;
4819 int voice_size_in;
4820+ int ctl_caps;
4821 };
4822
4823 struct audio_pcm_ops {
4824@@ -231,6 +234,9 @@
4825
4826 #define VOICE_ENABLE 1
4827 #define VOICE_DISABLE 2
4828+#define VOICE_VOLUME 3
4829+
4830+#define VOICE_VOLUME_CAP (1 << VOICE_VOLUME)
4831
4832 static inline int audio_ring_dist (int dst, int src, int len)
4833 {
4834
4835=== modified file 'audio/audio_template.h'
4836--- audio/audio_template.h 2011-10-28 17:37:30 +0000
4837+++ audio/audio_template.h 2012-09-17 14:09:22 +0000
4838@@ -263,6 +263,8 @@
4839 }
4840
4841 hw->pcm_ops = drv->pcm_ops;
4842+ hw->ctl_caps = drv->ctl_caps;
4843+
4844 QLIST_INIT (&hw->sw_head);
4845 #ifdef DAC
4846 QLIST_INIT (&hw->cap_head);
4847
4848=== modified file 'audio/mixeng.c'
4849--- audio/mixeng.c 2011-10-28 17:37:30 +0000
4850+++ audio/mixeng.c 2012-09-17 14:09:22 +0000
4851@@ -33,7 +33,8 @@
4852 #define ENDIAN_CONVERT(v) (v)
4853
4854 /* Signed 8 bit */
4855-#define IN_T int8_t
4856+#define BSIZE 8
4857+#define ITYPE int
4858 #define IN_MIN SCHAR_MIN
4859 #define IN_MAX SCHAR_MAX
4860 #define SIGNED
4861@@ -42,25 +43,29 @@
4862 #undef SIGNED
4863 #undef IN_MAX
4864 #undef IN_MIN
4865-#undef IN_T
4866+#undef BSIZE
4867+#undef ITYPE
4868 #undef SHIFT
4869
4870 /* Unsigned 8 bit */
4871-#define IN_T uint8_t
4872+#define BSIZE 8
4873+#define ITYPE uint
4874 #define IN_MIN 0
4875 #define IN_MAX UCHAR_MAX
4876 #define SHIFT 8
4877 #include "mixeng_template.h"
4878 #undef IN_MAX
4879 #undef IN_MIN
4880-#undef IN_T
4881+#undef BSIZE
4882+#undef ITYPE
4883 #undef SHIFT
4884
4885 #undef ENDIAN_CONVERT
4886 #undef ENDIAN_CONVERSION
4887
4888 /* Signed 16 bit */
4889-#define IN_T int16_t
4890+#define BSIZE 16
4891+#define ITYPE int
4892 #define IN_MIN SHRT_MIN
4893 #define IN_MAX SHRT_MAX
4894 #define SIGNED
4895@@ -78,11 +83,13 @@
4896 #undef SIGNED
4897 #undef IN_MAX
4898 #undef IN_MIN
4899-#undef IN_T
4900+#undef BSIZE
4901+#undef ITYPE
4902 #undef SHIFT
4903
4904 /* Unsigned 16 bit */
4905-#define IN_T uint16_t
4906+#define BSIZE 16
4907+#define ITYPE uint
4908 #define IN_MIN 0
4909 #define IN_MAX USHRT_MAX
4910 #define SHIFT 16
4911@@ -98,11 +105,13 @@
4912 #undef ENDIAN_CONVERSION
4913 #undef IN_MAX
4914 #undef IN_MIN
4915-#undef IN_T
4916+#undef BSIZE
4917+#undef ITYPE
4918 #undef SHIFT
4919
4920 /* Signed 32 bit */
4921-#define IN_T int32_t
4922+#define BSIZE 32
4923+#define ITYPE int
4924 #define IN_MIN INT32_MIN
4925 #define IN_MAX INT32_MAX
4926 #define SIGNED
4927@@ -120,11 +129,13 @@
4928 #undef SIGNED
4929 #undef IN_MAX
4930 #undef IN_MIN
4931-#undef IN_T
4932+#undef BSIZE
4933+#undef ITYPE
4934 #undef SHIFT
4935
4936 /* Unsigned 32 bit */
4937-#define IN_T uint32_t
4938+#define BSIZE 32
4939+#define ITYPE uint
4940 #define IN_MIN 0
4941 #define IN_MAX UINT32_MAX
4942 #define SHIFT 32
4943@@ -140,7 +151,8 @@
4944 #undef ENDIAN_CONVERSION
4945 #undef IN_MAX
4946 #undef IN_MIN
4947-#undef IN_T
4948+#undef BSIZE
4949+#undef ITYPE
4950 #undef SHIFT
4951
4952 t_sample *mixeng_conv[2][2][2][3] = {
4953
4954=== modified file 'audio/mixeng_template.h'
4955--- audio/mixeng_template.h 2011-06-16 09:04:43 +0000
4956+++ audio/mixeng_template.h 2012-09-17 14:09:22 +0000
4957@@ -31,7 +31,8 @@
4958 #define HALF (IN_MAX >> 1)
4959 #endif
4960
4961-#define ET glue (ENDIAN_CONVERSION, glue (_, IN_T))
4962+#define ET glue (ENDIAN_CONVERSION, glue (glue (glue (_, ITYPE), BSIZE), _t))
4963+#define IN_T glue (glue (ITYPE, BSIZE), _t)
4964
4965 #ifdef FLOAT_MIXENG
4966 static mixeng_real inline glue (conv_, ET) (IN_T v)
4967@@ -150,3 +151,4 @@
4968
4969 #undef ET
4970 #undef HALF
4971+#undef IN_T
4972
4973=== modified file 'audio/paaudio.c'
4974--- audio/paaudio.c 2011-10-28 17:37:30 +0000
4975+++ audio/paaudio.c 2012-09-17 14:09:22 +0000
4976@@ -2,8 +2,7 @@
4977 #include "qemu-common.h"
4978 #include "audio.h"
4979
4980-#include <pulse/simple.h>
4981-#include <pulse/error.h>
4982+#include <pulse/pulseaudio.h>
4983
4984 #define AUDIO_CAP "pulseaudio"
4985 #include "audio_int.h"
4986@@ -15,7 +14,7 @@
4987 int live;
4988 int decr;
4989 int rpos;
4990- pa_simple *s;
4991+ pa_stream *stream;
4992 void *pcm_buf;
4993 struct audio_pt pt;
4994 } PAVoiceOut;
4995@@ -26,17 +25,23 @@
4996 int dead;
4997 int incr;
4998 int wpos;
4999- pa_simple *s;
5000+ pa_stream *stream;
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: