aboutsummaryrefslogtreecommitdiffstats
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2012-02-21qxl: add user-friendly bar size propertiesGerd Hoffmann2-0/+12
Add two properties to specify bar sizes in megabytes instead of bytes, which is alot more user-friendly. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-02-21qxl: move ram size init to new functionGerd Hoffmann1-19/+22
Factor memory bar sizing bits out to a separate function. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-02-21qxl: drop vram bar minimum sizeGerd Hoffmann1-2/+2
There is no reason to require a minimum size of 16 MB for the vram. Lower the limit to 4096 (one page). Make it disapper completely would break guests.
2012-02-21qxl: make sure primary surface is saved on migration also in compat modeYonit Halperin1-1/+1
RHBZ #790083 Signed-off-by: Yonit Halperin <yhalperi@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-02-21qxl: set only off-screen surfaces dirty instead of the whole vramYonit Halperin1-9/+44
We used to assure the guest surfaces were saved before migration by setting the whole vram dirty. This patch sets dirty only the areas that are actually used in the vram. Signed-off-by: Yonit Halperin <yhalperi@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-02-21qxl: don't render stuff when the vm is stopped.Gerd Hoffmann1-7/+5
This patch fixes the local qxl renderer to not kick spice-server in case the vm is stopped. First it is largely pointless because we ask spice-server to process all not-yet processed commands when the vm is stopped, so there isn't much do do anyway. Second we avoid triggering an assert in spice-server. The patch makes sure we still honor redraw requests, even if we don't ask spice-server for updates. This is needed to handle displaysurface changes with a stopped vm correctly. With this patch applied it is possible to take screen shots (via screendump monitor command) from a qxl gpu even in case the guest is stopped. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-02-21qxl: fix warnings on 32bitGerd Hoffmann1-3/+4
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-02-17i8259: Do not clear level-triggered lines in IRR on initJan Kiszka3-3/+3
When an input line is handled as level-triggered, it will immediately raise an IRQ on the output of a PIC again that goes through an init reset. So only clear the edge-triggered inputs from IRR in that scenario. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17i8254: Factor out pit_get_channel_infoJan Kiszka3-34/+29
Instead of providing 4 individual query functions for mode, gate, output and initial counter state, introduce a service that queries all information at once. This comes with tiny additional costs for pcspk_callback but with a much cleaner interface. Also, it will simplify the implementation of the KVM in-kernel PIT model. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17pcspk: Convert to qdevJan Kiszka6-17/+108
Convert the PC speaker device to a qdev ISA model. Move the public interface to a dedicated header file at this chance. CC: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17i8254: Rework & fix interaction with HPET in legacy modeJan Kiszka5-48/+57
When the HPET enters legacy mode, the IRQ output of the PIT is suppressed and replaced by the HPET timer 0. But the current code to emulate this was broken in many ways. It reset the PIT state after re-enabling, it worked against a stale static PIT structure, and it did not properly saved/restored the IRQ output mask in the PIT vmstate. This patch solves the PIT IRQ control in a different way. On x86, it both redirects the PIT IRQ to the HPET, just like the RTC. But it also keeps the control line from the HPET to the PIT. This allows to disable the PIT QEMU timer when it is not needed. The PIT's view on the control line state is now saved in the same format that qemu-kvm is already using. Note that, in contrast to the suppressed RTC IRQ line, we do not need to save/restore the PIT line state in the HPET. As we trigger a PIT IRQ update via the control line, the line state is reconstructed on mode switch. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17i8254: Pass alternative IRQ output object on initializationJan Kiszka9-12/+12
HPET legacy emulation will require control over the PIT IRQ output. To enable this, add support for an alternative IRQ output object to the PIT factory function. If the isa_irq number is < 0, this object will be used. This also removes the IRQ number property from the PIT class as we now use a generic GPIO output pin that is connected by the factory function. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17i8254: Factor out interface headerJan Kiszka12-25/+64
Move the public interface of the PIT into its own header file and update all users. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17hpet: Save/restore cached RTC IRQ levelJan Kiszka1-0/+29
In legacy mode, the HPET suppresses the RTC interrupt delivery via IRQ 8 but keeps track of the RTC output level and applies it when legacy mode is turned off again. This value has to be preserved across save/ restore as it cannot be reconstructed otherwise. To document that a raised rtc_irq_level won't survive a vmload without a hpet/rtc_irq_level subsection, add an explicit clearing to the reset handler. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17i8254: Do not raise IRQ level on resetJan Kiszka1-1/+7
Avoid changing the IRQ level to high on reset as it may trigger spurious events. Instead, open-code the effects of pit_load_count(0) in the reset handler. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17qdev: Fix qdev_try_create() semanticsAndreas Färber1-0/+3
Since QOM'ification, qdev_try_create() uses object_new() internally, which asserts "type != NULL" when the type is not registered. This was revealed by the combination of kvmclock's kvm_enabled() check and early QOM type registration. Check whether the class exists before calling object_new(), so that the caller (e.g., qdev_create) can fail gracefully, telling us which device could not be created. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <aliguori@codemonkey.ws> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17Merge remote-tracking branch 'pmaydell/arm-devs.for-upstream' into stagingAnthony Liguori23-122/+7083
* pmaydell/arm-devs.for-upstream: (22 commits) hw/pl031: Actually raise interrupt on timer expiry MAINTAINERS: Add hw/highbank.c maintainer Remove unnecessary includes of primecell.h hw/primecell.h: Remove obsolete pl080_init() declaration hw/arm_sysctl: Drop legacy init function hw/vexpress.c: Add vexpress-a15 machine arm_boot: Pass base address of GIC CPU interface, not whole GIC hw/vexpress.c: Instantiate the motherboard CLCD hw/vexpress.c: Factor out daughterboard-specific initialization hw/vexpress.c: Move secondary CPU boot code to SRAM hw/vexpress.c: Make motherboard peripheral memory map table-driven hw/a15mpcore.c: Add Cortex-A15 private peripheral model MAINTAINERS: Add maintainers for Exynos SOC. Exynos4210: added display controller implementation hw/exynos4210.c: Add LAN support for SMDKC210. hw/lan9118: Add basic 16-bit mode support. ARM: exynos4210: MCT support. ARM: exynos4210: basic Power Management Unit implementation ARM: exynos4210: PWM support. ARM: exynos4210: UART support ...
2012-02-17Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori4-7/+6
* stefanha/trivial-patches: linux-user: brk() debugging virtio: Remove unneeded g_free() check in virtio_cleanup() net: remove extra spaces in help messages fmopl: Fix typo in function name vl.c: Fix typo in variable name ide: fix compilation errors when DEBUG_IDE is set cpu-exec.c: Correct comment about this file and indentation cleanup CODING_STYLE: Clarify style for enum and function type names linux-user: fail execve() if env/args too big
2012-02-17hw/pl031: Actually raise interrupt on timer expiryPeter Maydell1-1/+1
Fix a typo in pl031_interrupt() which meant we were setting a bit in the interrupt mask rather than the interrupt status register and thus not actually raising an interrupt. This fix allows the rtctest program from the kernel's Documentation/rtc.txt to pass rather than hanging. Reported-by: Daniel Forsgren <daniel.forsgren@enea.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Andreas Färber <afaerber@suse.de>
2012-02-17Remove unnecessary includes of primecell.hPeter Maydell4-4/+0
The primecell.h header now only has the definitions of constants indicating the usage of the arm_sysctl GPIO lines; remove obsolete includes of it from source files which don't care about those GPIO lines. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17hw/primecell.h: Remove obsolete pl080_init() declarationPeter Maydell1-3/+0
Remove an obsolete declaration of pl080_init(), which has been incorrect since the conversion of pl080 to qdev back in 2009. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17hw/arm_sysctl: Drop legacy init functionPeter Maydell2-17/+2
Drop the legacy init function arm_sysctl_init(), since it has no users left any more. This allows us to drop the awkward '1' from the actual device init function. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Andreas Färber <afaerber@suse.de>
2012-02-17hw/vexpress.c: Add vexpress-a15 machinePeter Maydell1-0/+141
Add the vexpress-a15 machine, and the A-Series memory map it uses. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de>
2012-02-17arm_boot: Pass base address of GIC CPU interface, not whole GICPeter Maydell5-13/+18
The arm_boot secondary boot loader code needs the address of the GIC CPU interface. Obtaining this from the base address of the private peripheral region was possible for A9 and 11MPcore, but the A15 puts the GIC CPU interface in a different place. So make boards pass in the GIC CPU interface address directly. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17hw/vexpress.c: Instantiate the motherboard CLCDPeter Maydell1-1/+1
Instantiate the CLCD on the vexpress motherboard as well as one on the daughterboard -- the A15 daughterboard does not have a CLCD and so relies on the motherboard one. At the moment QEMU doesn't provide infrastructure for selecting which display device gets to actually show graphics -- the first one registered is it. Fortunately this works for the major use case (Linux): if the daughterboard has a CLCD it will come first and be used, otherwise we fall back to the motherboard CLCD. So we don't (currently) need to implement the control register which allows software to tell the mux which video output to pass through to the outside world. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de>
2012-02-17hw/vexpress.c: Factor out daughterboard-specific initializationPeter Maydell1-35/+83
Factor out daughterboard specifics into a data structure and daughterboard initialization function, in preparation for adding vexpress-a15 support. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17hw/vexpress.c: Move secondary CPU boot code to SRAMPeter Maydell1-14/+2
On real Versatile Express hardware, the boot ROM puts the secondary CPU bootcode/holding pen in SRAM. We can therefore rely on Linux not trashing this memory until secondary CPUs have booted up, and can put our QEMU-specific pen code in the same place. This allows us to drop the odd "hack" RAM page we were using before. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17hw/vexpress.c: Make motherboard peripheral memory map table-drivenPeter Maydell1-34/+103
Pull the addresses used for mapping motherboard peripherals into memory out into a table. This will allow us to simply provide a second table to implement the "Cortex-A Series" memory map used by the A15 variant of Versatile Express, as well as the current "Legacy" map used by A9. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de>
2012-02-17hw/a15mpcore.c: Add Cortex-A15 private peripheral modelPeter Maydell1-0/+103
Add a model of the Cortex-A15 memory mapped private peripheral space. This is fairly simple because the only memory mapped bit of the A15 is the GIC. Note that we don't currently model a VGIC and therefore don't map the VGIC related bits of the GIC. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17Exynos4210: added display controller implementationMitsyanko Igor2-0/+1938
Exynos4210 display controller (FIMD) has 5 hardware windows with alpha and chroma key blending functions. Signed-off-by: Mitsyanko Igor <i.mitsyanko@samsung.com> Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17hw/exynos4210.c: Add LAN support for SMDKC210.Evgeny Voevodin1-2/+25
SMDKC210 uses lan9215 chip, but lan9118 in 16-bit mode seems to be enough. Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17hw/lan9118: Add basic 16-bit mode support.Evgeny Voevodin1-6/+118
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17ARM: exynos4210: MCT support.Evgeny Voevodin2-0/+1507
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17ARM: exynos4210: basic Power Management Unit implementationMaksim Kozlov2-0/+508
Patch adds basic model for Exynos4210 SoC PMU. This model implements PMU registers just as a bulk of memory. Currently, the only reason this device exists is that secondary CPU boot loader uses PMU INFORM5 register as a holding pen. Signed-off-by: Maksim Kozlov <m.kozlov@samsung.com> Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17ARM: exynos4210: PWM support.Evgeny Voevodin2-0/+434
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17ARM: exynos4210: UART supportMaksim Kozlov3-0/+714
Add basic support of exynos4210 UART Signed-off-by: Maksim Kozlov <m.kozlov@samsung.com> Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17ARM: Samsung exynos4210-based boards emulationEvgeny Voevodin3-0/+384
Add initial support of NURI and SMDKC210 boards Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17ARM: exynos4210: IRQ subsystem support.Evgeny Voevodin3-0/+1009
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17hw/arm: Remove redundant arguments from set_kernel_args*Stefan Weil1-9/+8
The parameters initrd_size and base are already included in the info parameter, so there is no need to pass them separately. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>,
2012-02-17pxa2xx_lcd: SRAM is valid location for the framebufferVasily Khoruzhick1-4/+9
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2012-02-17nseries: attach monitor powerdown request to menelausPaolo Bonzini2-12/+11
I noticed some unused code in the twl92230, probably from before qdev-ification. This patch makes the machine use the chip's pwrbtn signal. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
2012-02-15Merge remote-tracking branch 'qemu-kvm/uq/master' into stagingAnthony Liguori3-6/+11
* qemu-kvm/uq/master: apic: Fix legacy vmstate loading for KVM kvm: Implement kvm_irqchip_in_kernel like kvm_enabled kvm: Allow to set shadow MMU size
2012-02-15Merge remote-tracking branch 'kraxel/usb.38' into stagingAnthony Liguori17-360/+596
* kraxel/usb.38: (28 commits) xhci: handle USB_RET_NAK xhci: remote wakeup support xhci: kill port arg from xhci_setup_packet xhci: stop on errors xhci: add trb type name lookup support. xhci: signal low- and fullspeed support usb: add USBBusOps->wakeup_endpoint usb: pass USBEndpoint to usb_wakeup usb: maintain async packet list per endpoint usb: Set USBEndpoint in usb_packet_setup(). usb: add USBEndpoint->{nr,pid} usb: USBPacket: add status, rename owner -> ep usb: fold usb_generic_handle_packet into usb_handle_packet usb: kill handle_packet callback usb-xhci: switch to usb_find_device() usb-musb: switch to usb_find_device() usb-ohci: switch to usb_find_device() usb-ehci: switch to usb_find_device() usb-uhci: switch to usb_find_device() usb: handle dev == NULL in usb_handle_packet() ...
2012-02-15Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori1-0/+7
* kwolf/for-anthony: AHCI: Masking of IRQs actually masks them sheepdog: fix co_recv coroutine context AHCI: Fix port reset race rewrite QEMU_BUILD_BUG_ON qcow2: Keep unknown header extension when rewriting header qcow2: Update whole header at once vpc: Round up image size during fixed image creation vpc: Add support for Fixed Disk type iSCSI: add configuration variables for iSCSI qemu-io: add write -z option for bdrv_co_write_zeroes qed: add .bdrv_co_write_zeroes() support qed: replace is_write with flags field block: perform zero-detection during copy-on-read block: add .bdrv_co_write_zeroes() interface cutils: extract buffer_is_zero() from qemu-img.c
2012-02-15device_add: don't add a /peripheral link until init is completeAnthony Liguori1-8/+10
Otherwise we end up with a dangling reference which causes qdev_free() to fail. Reported-by: Michael Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-15qom: Unify type registrationAndreas Färber224-537/+530
Replace device_init() with generalized type_init(). While at it, unify naming convention: type_init([$prefix_]register_types) Also, type_init() is a function, so add preceding blank line where necessary and don't put a semicolon after the closing brace. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: malc <av1474@comtv.ru> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-14qdev: print error message before abortingPaolo Bonzini1-13/+13
qdev_prop_set_* functions are always called by machine init functions that should know what they're doing, so they abort on error. Still, an assert(!errp) does not aid debugging. Print an error before aborting. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-02-14qdev: allow setting properties to NULLPaolo Bonzini1-6/+9
SPARC and PPC set properties to NULL. This can be done with an empty string value. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-02-11cfi02: Fix lazy ROMD switching - once againJan Kiszka1-0/+1
The conversion to memory regions broke lazy ROMD switching by forgetting to update the rom_mode state variable. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-02-11vga: Fix full updates in graphic modeJan Kiszka1-2/+3
This fixes the regression introduced by cd7a45c95e: We lost the or'ing with the full_update flag. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>