summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-02-18target-xtensa: add DEBUGCAUSE SR and configurationMax Filippov2-0/+21
DEBUGCAUSE SR holds information about the most recent debug exception. See ISA, 4.7.7 for more details. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2012-02-18target-xtensa: fetch 3rd opcode byte only when neededMax Filippov1-1/+2
According to ISA, 3.5.4, third opcode byte should not be fetched for 2-byte instructions. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2012-02-18target-xtensa: implement info tlb monitor commandMax Filippov4-3/+71
Command dumps valid ITLB and DTLB entries. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2012-02-18target-xtensa: define TLB_TEMPLATE for MMU-less coresMax Filippov1-2/+16
TLB_TEMPLATE macro specifies TLB geometry in the core configuration. Make TLB_TEMPLATE available for region protection core variants, defining 1 way ITLB and DTLB with 8 entries each. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2012-02-17input: send kbd+mouse events only to running guests.Gerd Hoffmann1-0/+6
Trying to interact with a stopped guest will queue up the events, then send them all at once when the guest continues running, with a high chance to have them cause unwanted actions. Avoid that by only injecting the input events only when the guest is in running state. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.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 Kiszka7-17/+109
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-17vnc: Don't demote authentication scheme when changing password/disabling loginDaniel P. Berrange1-2/+6
Currently when disabling login in VNC, the password is cleared out and the authentication protocol is forced to AUTH_VNC. If you're using a stronger authentication protocol, this has the effect of downgrading your security protocol. Fix this by only changing the authentication protocol if the current authentication protocol is AUTH_NONE. That ensures we're never downgrading. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> -- NB. This patch is derived from one posted by Anthony last year, which got accidentally lost after Luiz took over the QMP series work https://lists.gnu.org/archive/html/qemu-devel/2011-09/msg00392.html v1 -> v2 - Make sure to not demote when changing password (Daniel) v2 -> v3 - Rebase to latest GIT master wrt QMP changes
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-17qom: Fix identifiers in documentationAndreas Färber1-2/+2
Fixes gtk-doc warnings. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17qom: Fix typo in Object's documentationAndreas Färber1-1/+1
Fixes a warning from gtk-doc. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17configure: Remove OpenBSD workaround for curses probeBrad Smith1-3/+0
Remove the OpenBSD workaround for the curses probe. This has not been necessary for 5 releases now. Signed-off-by: Brad Smith <brad@comstyle.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17libcacard configure fixesPaul Brook1-6/+6
libcacard is only used by system emulation. Only define libcacard_libs/cflags once. Signed-off-by: Paul Brook <paul@codesourcery.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17coroutine: switch to QSLISTPaolo Bonzini2-6/+6
QSLIST can be used for a free list, do it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17qemu-queue: drop QCIRCLEQPaolo Bonzini1-119/+3
The main advantage of circular lists (the fact that the head node has the same memory layout as any other node) is completely negated by the implementation in qemu-queue.h. Not surprisingly, nobody uses QCIRCLEQ. While this might change if RCU is ever adopted by QEMU, the QLIST is also RCU-friendly and in fact it is used in a RCU-like manner by 9pfs already. So, just kill QCIRCLEQ. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17qemu-queue: add QSLISTPaolo Bonzini1-3/+71
Based on http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/queue.h?rev=1.53 with only the prefix change. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17notifier: switch to QLISTPaolo Bonzini6-13/+13
Notifiers do not need to access both ends of the list, and using a QLIST also simplifies the API. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-17Merge remote-tracking branch 'bonzini/nbd-for-anthony' into stagingAnthony Liguori2-19/+24
* bonzini/nbd-for-anthony: nbd: add git tree to MAINTAINERS open /dev/nbd in nbd_client_thread do not chdir(/) in qemu-nbd before opening all files
2012-02-17Merge remote-tracking branch 'pmaydell/arm-devs.for-upstream' into stagingAnthony Liguori25-123/+7101
* 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 Liguori9-29/+40
* 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-17nbd: add git tree to MAINTAINERSPaolo Bonzini1-0/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-17open /dev/nbd in nbd_client_threadPaolo Bonzini1-18/+16
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-02-17do not chdir(/) in qemu-nbd before opening all filesMichael Tokarev1-1/+7
When qemu-nbd becomes a daemon it calls daemon(3) with nochdir=0, so daemon(3) changes current directory to /. But at this time, qemu-nbd did not open any user-specified files yet, so by changing current directory, all non-absolute paths becomes wrong. The solution is to pass nochdir=1 to daemon(3) function, and to chdir("/") after all init has been performed, before entering the main loop, -- just like a good daemon should do. This patch is applicable for -stable. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
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-17MAINTAINERS: Add hw/highbank.c maintainerMark Langsdorf1-0/+6
Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
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 Maydell2-1/+104
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-17MAINTAINERS: Add maintainers for Exynos SOC.Evgeny Voevodin1-0/+8
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Acked-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17Exynos4210: added display controller implementationMitsyanko Igor3-1/+1939
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 Voevodin3-1/+1508
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 Kozlov3-0/+509
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 Voevodin3-1/+435
Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-02-17ARM: exynos4210: UART supportMaksim Kozlov4-1/+715
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 Voevodin4-1/+386
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>