aboutsummaryrefslogtreecommitdiff
path: root/target-arm/kvm_arm.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2013-03-05 00:34:42 +0000
committerPeter Maydell <peter.maydell@linaro.org>2013-03-05 00:45:25 +0000
commiteb035b48d5ff26a155f37106f693acb8b8487d80 (patch)
treede712e474eb09d9fc74fcf86de6308b919f8f6df /target-arm/kvm_arm.h
parent53111180946a56d314a9c1d07d09b9ef91e847b9 (diff)
downloadqemu-eb035b48d5ff26a155f37106f693acb8b8487d80.zip
qemu-eb035b48d5ff26a155f37106f693acb8b8487d80.tar.gz
qemu-eb035b48d5ff26a155f37106f693acb8b8487d80.tar.bz2
target-arm: Use MemoryListener to identify GIC base address for KVM
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>
Diffstat (limited to 'target-arm/kvm_arm.h')
-rw-r--r--target-arm/kvm_arm.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/target-arm/kvm_arm.h b/target-arm/kvm_arm.h
new file mode 100644
index 0000000..b1c54ff
--- /dev/null
+++ b/target-arm/kvm_arm.h
@@ -0,0 +1,32 @@
+/*
+ * QEMU KVM support -- ARM specific functions.
+ *
+ * Copyright (c) 2012 Linaro Limited
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ *
+ */
+
+#ifndef QEMU_KVM_ARM_H
+#define QEMU_KVM_ARM_H
+
+#include "sysemu/kvm.h"
+#include "exec/memory.h"
+
+/**
+ * kvm_arm_register_device:
+ * @mr: memory region for this device
+ * @devid: the KVM device ID
+ *
+ * Remember the memory region @mr, and when it is mapped by the
+ * machine model, tell the kernel that base address using the
+ * KVM_SET_DEVICE_ADDRESS ioctl. @devid should be the ID of
+ * the device as defined by KVM_SET_DEVICE_ADDRESS.
+ * The machine model may map and unmap the device multiple times;
+ * the kernel will only be told the final address at the point
+ * where machine init is complete.
+ */
+void kvm_arm_register_device(MemoryRegion *mr, uint64_t devid);
+
+#endif