summaryrefslogtreecommitdiff
path: root/target-arm/kvm.c
AgeCommit message (Collapse)AuthorFilesLines
2013-10-31target-arm: fix sorting issue of KVM cpreg listAlvise Rigo1-1/+7
The compare_u64 function was not sorting the KVM cpreg_list in the right way due to the wrong returned value. Since we are comparing two 64bit values we can't simply return their difference if the returned type is int. Signed-off-by: Alvise Rigo <a.rigo@virtualopensystems.com> Message-id: 1381513125-26802-2-git-send-email-a.rigo@virtualopensystems.com [PMM: fixed coding style, indent and commit message formatting] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-07-04memory: add ref/unref callsPaolo Bonzini1-0/+2
Add ref/unref calls at the following places: - places where memory regions are stashed by a listener and used outside the BQL (including in Xen or KVM). - memory_region_find callsites - creation of aliases and containers (only the aliased/contained region gets a reference to avoid loops) - around calls to del_subregion/add_subregion, where the region could disappear after the first call Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-06-25target-arm: Use tuple list to sync cp regs with KVMPeter Maydell1-70/+33
Use the tuple list of cp registers for syncing KVM state to QEMU, rather than only syncing a very minimal set by hand. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-25target-arm: Reinitialize all KVM VCPU registers on resetPeter Maydell1-0/+16
Since the ARM KVM API doesn't include a "reset this VCPU" ioctl, we have to capture the initial values of every register it knows about so that we can reset the VCPU by feeding those values back again. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-25target-arm: Initialize cpreg list from KVM when using KVMPeter Maydell1-1/+163
When using KVM, use the kernel's initial state to set up the cpreg list, and sync to and from the kernel when doing migration. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-25target-arm: Convert TCG to using (index,value) list for cp migrationPeter Maydell1-0/+9
Convert the TCG ARM target to using an (index,value) list for migrating coprocessors. The primary benefit of the (index,value) list is for passing state between KVM and QEMU, but it works for TCG-to-TCG migration as well and is a useful self-contained first step. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-12KVM: ARM: Add dummy kvm_arch_init_irq_routing()Alexey Kardashevskiy1-0/+4
The common KVM code insists on calling kvm_arch_init_irq_routing() as soon as it sees kernel header support for it (regardless of whether QEMU supports it). Provide a dummy function to satisfy this. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-05-03target-arm: Fix incorrect check of kvm_vcpu_ioctl return valuePeter Maydell1-2/+2
kvm_vcpu_ioctl() returns -ETHING on error, not ETHING -- correct an incorrect check in kvm_arch_init_vcpu(). This would not have had any significant ill-effects -- we would just have propagated the less useful ENOENT up to the caller rather than the more accurate EINVAL in the unlikely case that the kernel didn't have VFP-D32 support. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-04-15arm: fix location of some include filesPeter Maydell1-1/+1
The recent rearrangement of include files had some minor errors: devices.h is not ARM specific and should not be in arm/ arm.h should be in arm/ Move these two headers to correct this. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-04-08hw: move headers to include/Paolo Bonzini1-1/+1
Many of these should be cleaned up with proper qdev-/QOM-ification. Right now there are many catch-all headers in include/hw/ARCH depending on cpu.h, and this makes it necessary to compile these files per-target. However, fixing this does not belong in these patches. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-03-05target-arm: Use MemoryListener to identify GIC base address for KVMPeter Maydell1-0/+87
When using an in-kernel GIC with KVM, we need to tell the kernel where the GIC's memory mapped registers live. Do this by registering a MemoryListener which tracks where the board model maps the A15's private peripherals, so we can finish the GIC initialisation when the GIC is actually mapped. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2013-03-05ARM KVM: save and load VFP registers from kernelPeter Maydell1-3/+75
Add support for saving and restoring VFP register state from the kernel. This includes a check that the KVM-created CPU has full VFP support (as the TCG Cortex-A15 model always does), since for the moment ARM QEMU doesn't have any way to tweak optional features on created CPUs. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2013-03-05ARM: KVM: Add support for KVM on ARM architectureChristoffer Dall1-0/+334
Add basic support for KVM on ARM architecture. Signed-off-by: Christoffer Dall <cdall@cs.columbia.edu> [PMM: Minor tweaks and code cleanup, switch to ONE_REG] Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>