summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2012-11-01Merge remote-tracking branch 'kraxel/pixman.v3' into stagingAnthony Liguori22-104/+111
* kraxel/pixman.v3: (22 commits) pixman: drop obsolete fields from DisplaySurface pixman/vnc: remove dead code. pixman/vnc: remove rgb_prepare_row* functions pixman/vnc: use pixman images in vnc. pixman: switch screendump function. vga: stop direct access to DisplaySurface fields. qxl: stop direct access to DisplaySurface fields. console: don't set PixelFormat alpha fields for 32bpp console: make qemu_alloc_display static pixman: add pixman image to DisplaySurface pixman: helper functions pixman: windup in configure & makefiles pixman: add submodule console: remove DisplayAllocator console: remove dpy_gfx_fill vga: fix text mode updating console: init displaychangelisteners on register console: untangle gfx & txt updates console: s/TextConsole/QemuConsole/ console: move set_mouse + cursor_define callbacks ... Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-01Merge remote-tracking branch 'stefanha/net' into stagingAnthony Liguori1-5/+12
* stefanha/net: e1000: pre-initialize RAH/RAL registers net: Reject non-netdevs in qmp_netdev_del() net: use "socket" model name for UDP sockets e1000: drop check_rxov, always treat RX ring with RDH == RDT as empty Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-01Merge remote-tracking branch 'bonzini/threadpool' into stagingAnthony Liguori1-0/+1
* bonzini/threadpool: (39 commits) raw-win32: implement native asynchronous I/O raw-posix: move linux-aio.c to block/ raw-win32: add emulated AIO support raw-posix: rename raw-posix-aio.h, hide unavailable prototypes raw: merge posix-aio-compat.c into block/raw-posix.c block: switch posix-aio-compat to threadpool threadpool: do not take lock in event_notifier_ready aio: add generic thread-pool facility qemu-thread: add QemuSemaphore linux-aio: use event notifiers aio: clean up now-unused functions main-loop: use aio_notify for qemu_notify_event main-loop: use GSource to poll AIO file descriptors aio: call aio_notify after setting I/O handlers aio: add aio_notify aio: make AioContexts GSources aio: add Win32 implementation aio: prepare for introducing GSource-based dispatch aio: add non-blocking variant of aio_wait aio: test node->deleted before calling io_flush ... Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-01Merge remote-tracking branch 'qemu-kvm/uq/master' into stagingAnthony Liguori1-5/+16
* qemu-kvm/uq/master: (28 commits) update-linux-headers.sh: Handle new kernel uapi/ directories target-i386: kvm_cpu_fill_host: use GET_SUPPORTED_CPUID target-i386: cpu: make -cpu host/check/enforce code KVM-specific target-i386: make cpu_x86_fill_host() void Emulate qemu-kvms -no-kvm option Issue warning when deprecated -tdf option is used Issue warning when deprecated drive parameter boot=on|off is used Use global properties to emulate -no-kvm-pit-reinjection Issue warning when deprecated -no-kvm-pit is used Use machine options to emulate -no-kvm-irqchip cirrus_vga: allow configurable vram size target-i386: Add missing kvm cpuid feature name i386: cpu: add missing CPUID[EAX=7,ECX=0] flag names i386: kvm: filter CPUID leaf 7 based on GET_SUPPORTED_CPUID, too i386: kvm: reformat filter_features_for_kvm() code i386: kvm: filter CPUID feature words earlier, on cpu.c i386: kvm: mask cpuid_ext4_features bits earlier i386: kvm: mask cpuid_kvm_features earlier i386: kvm: x2apic is not supported without in-kernel irqchip i386: kvm: set CPUID_EXT_TSC_DEADLINE_TIMER on kvm_arch_get_supported_cpuid() ... Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-01Merge remote-tracking branch 'afaerber/qom-cpu' into stagingAnthony Liguori20-150/+145
* afaerber/qom-cpu: (35 commits) target-i386: Pass X86CPU to kvm_handle_halt() target-i386: Pass X86CPU to kvm_get_mp_state() cpu: Move thread_id to CPUState cpus: Pass CPUState to run_on_cpu() target-i386: Pass X86CPU to cpu_x86_inject_mce() target-i386: Pass X86CPU to kvm_mce_inject() cpus: Pass CPUState to [qemu_]cpu_has_work() spapr: Pass PowerPCCPU to hypercalls spapr: Pass PowerPCCPU to spapr_hypercall() target-ppc: Pass PowerPCCPU to cpu_ppc_hypercall target-ppc: Pass PowerPCCPU to powerpc_excp() xtensa_pic: Pass XtensaCPU to xtensa_ccompare_cb() cpus: Pass CPUState to qemu_wait_io_event_common() cpus: Pass CPUState to flush_queued_work() cpu: Move queued_work_{first,last} to CPUState cpus: Pass CPUState to qemu_cpu_kick() target-ppc: Rename kvm_kick_{env => cpu} and pass PowerPCCPU ppc: Pass PowerPCCPU to {ppc6xx,ppc970,power7,ppc40x,ppce500}_set_irq() cpus: Pass CPUState to qemu_tcg_init_vcpu() cpus: Pass CPUState to qemu_tcg_cpu_thread_fn ... Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-11-01arm_boot: Change initrd load address to "halfway through RAM"Peter Maydell2-15/+26
To avoid continually having to bump the initrd load address to account for larger kernel images, put the initrd halfway through RAM. This allows large kernels on new boards with lots of RAM to work OK, without breaking existing usecases for boards with only 32MB of RAM. Note that this change fixes in passing a bug where we were passing an overly large max_size to load_image_targphys() for the initrd, which meant that we wouldn't correctly refuse to load an enormous initrd that didn't actually fit into RAM. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Tested-by: Cole Robinson <crobinso@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2012-11-01Merge branch 'ppc-for-upstream' of git://repo.or.cz/qemu/agrafAurelien Jarno3-9/+49
* 'ppc-for-upstream' of git://repo.or.cz/qemu/agraf: pseries: Cleanup duplications of ics_valid_irq() code pseries: Clean up inconsistent variable name in xics.c target-ppc: Extend FPU state for newer POWER CPUs target-ppc: Rework storage of VPA registration state Revert "PPC: pseries: Remove hack for PIO window"
2012-11-01Merge branch 'arm-devs.for-upstream' of ↵Aurelien Jarno24-429/+487
git://git.linaro.org/people/pmaydell/qemu-arm * 'arm-devs.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm: (28 commits) hw/sd.c: add SD card save/load support vmstate: Add support for saving/loading bitmaps hw/sd.c: Fix erase for high capacity cards pflash_cfi01: Fix debug mode printfery pflash_cfi0x: QOMified pflash_cfi01: remove unused total_len field pflash_cfi0x: remove unused base field hw/versatile_i2c: Use LOG_GUEST_ERROR hw/arm_l2x0: Use LOG_GUEST_ERROR hw/arm_sysctl: Use LOG_GUEST_ERROR hw/armv7m_nvic: Use LOG_GUEST_ERROR and LOG_UNIMP hw/arm_timer: Use LOG_GUEST_ERROR and LOG_UNIMP hw/arm_gic: Use LOG_GUEST_ERROR hw/arm11mpcore: Use LOG_GUEST_ERROR rather than hw_error() hw/pl190: Use LOG_UNIMP rather than hw_error() hw/pl110: Use LOG_GUEST_ERROR rather than hw_error() hw/pl080: Use LOG_GUEST_ERROR and LOG_UNIMP hw/pl061: Use LOG_GUEST_ERROR hw/pl050: Use LOG_GUEST_ERROR hw/exynos4_boards: Don't prematurely explode QEMUMachineInitArgs ...
2012-11-01pixman: switch screendump function.Gerd Hoffmann1-28/+11
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-01vga: stop direct access to DisplaySurface fields.Gerd Hoffmann1-2/+7
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-01qxl: stop direct access to DisplaySurface fields.Gerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-01vga: fix text mode updatingGerd Hoffmann2-0/+21
With both text (curses) and graphics (vnc/sdl/spice/...) display active vga text mode emulation fails to update both correctly. Depending on whenever vga_update_text() or vga_draw_text() happens to be called first only the text display or only the graphics display will see display resolution changes and full redraws. Fix it by calling both text/gfx resize functions in both code paths and keep track of full screen redraws needed in VGACommonState fields. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-01console: untangle gfx & txt updatesGerd Hoffmann20-60/+57
Stop abusing displaysurface fields for text mode displays. (bpp = 0, width = cols, height = lines). Add flags to displaystate indicating whenever text mode display (curses) or gfx mode displays (sdl, vnc, ...) are present. Add separate displaychangelistener callbacks for text / gfx mode resize & updates. This allows to enable gfx and txt diplays at the same time and also paves the way for more cleanups in the future. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-01console: move set_mouse + cursor_define callbacksGerd Hoffmann4-12/+13
When adding DisplayChangeListeners the set_mouse and cursor_define callbacks have been left in DisplayState for some reason. Fix it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-01console: QLIST-ify display change listeners.Gerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-11-01pseries: Cleanup duplications of ics_valid_irq() codeDavid Gibson1-4/+2
A couple of places in xics.c open-coded the same logic as is already implemented in ics_valid_irq(). This patch fixes the code duplication. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-11-01pseries: Clean up inconsistent variable name in xics.cDavid Gibson1-3/+3
Throughout xics.c 'nr' is used to refer to a global interrupt number, and 'server' is used to refer to an interrupt server number (i.e. CPU number). Except in icp_set_mfrr(), where 'nr' is used as a server number. Fix this confusing inconsistency. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-11-01Revert "PPC: pseries: Remove hack for PIO window"David Gibson2-2/+44
This reverts commit a178274efabcbbc5d44805b51def874e47051325. Contrary to that commit's message, the users of old_portio are not all gone. In particular VGA still uses it via portio_list_add(). Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-11-01e1000: pre-initialize RAH/RAL registersGabriel L. Somlo1-0/+10
Some guest operating systems' drivers (Mac OS X in particular) fail to properly initialize the Receive Address registers (probably expecting them to be pre-initialized by an earlier component, such as a specific proprietary BIOS). This patch pre-initializes the RA registers, allowing OS X networking to function properly. Other guest operating systems are not affected, and free to (re)initialize these registers during boot. [According to the datasheet the Address Valid bits in the RA registers are cleared on PCI or software reset. This patch adds the NIC's MAC address and sets Address Valid on reset. So we diverge from real hardware behavior here. -- Stefan] Signed-off-by: Gabriel Somlo <somlo@cmu.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2012-11-01e1000: drop check_rxov, always treat RX ring with RDH == RDT as emptyDmitry Fleytman1-5/+2
Real HW always treats RX ring with RDH == RDT as empty. Emulation is supposed to behave the same. Reported-by: Chris Webb <chris.webb@elastichosts.com> Reported-by: Richard Davies <richard.davies@elastichosts.com> Signed-off-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2012-10-31Merge remote-tracking branch 'origin/master' into threadpoolPaolo Bonzini66-908/+2992
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-31cpus: Pass CPUState to run_on_cpu()Andreas Färber3-4/+6
CPUArchState is no longer needed. Move the declaration to include/qemu/cpu.h and add documentation. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-31cpus: Pass CPUState to [qemu_]cpu_has_work()Andreas Färber2-2/+2
For target-mips also change the return type to bool. Make include paths for cpu-qom.h consistent for alpha and unicore32. Signed-off-by: Andreas Färber <afaerber@suse.de> [AF: Updated new target-openrisc function accordingly] Acked-by: Richard Henderson <rth@twiddle.net> (for alpha)
2012-10-30cirrus_vga: allow configurable vram sizeMarcelo Tosatti1-5/+16
Allow RAM size to be configurable for cirrus, to allow migration compatibility from qemu-kvm. Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2012-10-31spapr: Pass PowerPCCPU to hypercallsAndreas Färber7-35/+42
Needed for changing cpu_has_work() argument type to CPUState, used in h_cede(). Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-31spapr: Pass PowerPCCPU to spapr_hypercall()Andreas Färber3-3/+5
Needed for changing the hypercall handlers' argument type to PowerPCCPU. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-31target-ppc: Pass PowerPCCPU to cpu_ppc_hypercallAndreas Färber1-1/+3
Adapt emulate_spapr_hypercall() accordingly. Needed for changing spapr_hypercall() argument type to PowerPCCPU. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-31xtensa_pic: Pass XtensaCPU to xtensa_ccompare_cb()Andreas Färber1-2/+5
Needed for changing cpu_has_work() argument type to CPUState. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Max Filippov <jcmvbkbc@gmail.com>
2012-10-31cpus: Pass CPUState to qemu_cpu_kick()Andreas Färber5-6/+9
CPUArchState is no longer needed there. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-31ppc: Pass PowerPCCPU to {ppc6xx,ppc970,power7,ppc40x,ppce500}_set_irq()Andreas Färber1-20/+35
Needed for changing qemu_cpu_kick() argument type to CPUState and for moving halted field into CPUState. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-31cpu: Move stopped field to CPUStateAndreas Färber1-1/+2
Change its type to bool. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-31ppce500_spin: Store PowerPCCPU in SpinKickAndreas Färber1-3/+3
Needed for moving stopped field to CPUState. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-31cpus: Pass CPUState to qemu_cpu_is_self()Andreas Färber1-2/+4
Change return type to bool, move to include/qemu/cpu.h and add documentation. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Igor Mammedov <imammedo@redhat.com> [AF: Updated new caller qemu_in_vcpu_thread()]
2012-10-30target-i386: Pass X86CPU to cpu_x86_load_seg_cache_sipi()Andreas Färber1-1/+1
Simplifies the call in apic_sipi() again and needed for moving halted field to CPUState. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
2012-10-30apic: Store X86CPU in APICCommonStateAndreas Färber4-24/+29
Prepares for using a link<> property to connect APIC with CPU and for changing the CPU APIs to CPUState. Resolve Coding Style warnings by moving the closing parenthesis of foreach_apic() macro to next line. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
2012-10-30target-i386: Inline APIC cpu_env property settingAndreas Färber1-1/+0
This prepares for changing the variable type from void*. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
2012-10-30target-i386: Initialize APIC at CPU levelIgor Mammedov1-51/+5
(L)APIC is a part of cpu [1] so move APIC initialization inside of x86_cpu object. Since cpu_model and override flags currently specify whether APIC should be created or not, APIC creation&initialization is moved into x86_cpu_apic_init() which is called from x86_cpu_realize(). [1] - all x86 cpus have integrated APIC if we overlook existence of i486, and it's more convenient to model after majority of them. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-10-30Merge branch 'qspi.2' of git://developer.petalogix.com/public/qemuBlue Swirl3-50/+340
* 'qspi.2' of git://developer.petalogix.com/public/qemu: xilinx_zynq: added QSPI controller xilinx_spips: Generalised to model QSPI m25p80: Support for Quad SPI
2012-10-30aio: introduce AioContext, move bottom halves therePaolo Bonzini1-0/+1
Start introducing AioContext, which will let us remove globals from aio.c/async.c, and introduce multiple I/O threads. The bottom half functions now take an additional AioContext argument. A bottom half is created with a specific AioContext that remains the same throughout the lifetime. qemu_bh_new is just a wrapper that uses a global context. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-30hw/sd.c: add SD card save/load supportIgor Mitsyanko1-25/+64
This patch updates SD card model to support save/load of card's state. Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-30hw/sd.c: Fix erase for high capacity cardsIgor Mitsyanko2-4/+14
Standard capacity cards SDSC use byte unit address while SDHC and SDXC cards use block unit address (512 bytes) when setting ERASE_START and ERASE_END with CMD32 and CMD33, we have to account for this. Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-30pflash_cfi01: Fix debug mode printferyPeter Crosthwaite1-1/+2
This DPRINTF was throwing a warning due to a missing cast. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-30pflash_cfi0x: QOMifiedPeter Crosthwaite2-87/+214
QOMified the pflash_cfi0x so machine models can connect them up in custom ways. Kept the pflash_cfi0x_register functions as is. They can still be used to create a flash straight onto system memory. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-30pflash_cfi01: remove unused total_len fieldPeter Crosthwaite1-2/+0
This field is completely unused. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-30pflash_cfi0x: remove unused base fieldPeter Crosthwaite2-5/+1
This field is completely unused. The base address should also be abstracted away from the device anyway. Removed. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-30hw/versatile_i2c: Use LOG_GUEST_ERRORPeter Maydell1-2/+4
Use LOG_GUEST_ERROR to report bad guest accesses. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-30hw/arm_l2x0: Use LOG_GUEST_ERRORPeter Maydell1-2/+4
Use LOG_GUEST_ERROR to report bad guest accesses. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-30hw/arm_sysctl: Use LOG_GUEST_ERRORPeter Maydell1-2/+6
Use LOG_GUEST_ERROR to report bad guest accesses. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-30hw/armv7m_nvic: Use LOG_GUEST_ERROR and LOG_UNIMPPeter Maydell1-12/+19
Use LOG_GUEST_ERROR and LOG_UNIMP rather than hw_error() where appropriate. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-10-30hw/arm_timer: Use LOG_GUEST_ERROR and LOG_UNIMPPeter Maydell1-6/+13
Use LOG_GUEST_ERROR to report guest accesses to bad register offsets, and LOG_UNIMP for access to the unimplemented test registers. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>