From: Christoffer Dall <christoffer.dall@linaro.org>
To: qemu-devel@nongnu.org
Cc: kvmarm@lists.cs.columbia.edu,
Christoffer Dall <christoffer.dall@linaro.org>,
patches@linaro.org
Subject: [Qemu-devel] [RFC PATCH v2 1/4] kvm: Update headers for device control api
Date: Thu, 26 Sep 2013 12:56:10 -0700 [thread overview]
Message-ID: <1380225373-22132-2-git-send-email-christoffer.dall@linaro.org> (raw)
In-Reply-To: <1380225373-22132-1-git-send-email-christoffer.dall@linaro.org>
Update the KVM kernel headers to add support for the device control API
on ARM used to create in-kernel devices and set and get attributes on
these.
This is needed for VGIC save/restore with KVM ARM targets.
Headers are included from:
git://git.linaro.org/people/cdall/linux-kvm-arm.git vgic-migrate
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
---
| 8 ++++++++
| 1 +
2 files changed, 9 insertions(+)
--git a/linux-headers/asm-arm/kvm.h b/linux-headers/asm-arm/kvm.h
index c1ee007..587f1ae 100644
--- a/linux-headers/asm-arm/kvm.h
+++ b/linux-headers/asm-arm/kvm.h
@@ -142,6 +142,14 @@ struct kvm_arch_memory_slot {
#define KVM_REG_ARM_VFP_FPINST 0x1009
#define KVM_REG_ARM_VFP_FPINST2 0x100A
+/* Device Control API: ARM VGIC */
+#define KVM_DEV_ARM_VGIC_GRP_ADDR 0
+#define KVM_DEV_ARM_VGIC_GRP_DIST_REGS 1
+#define KVM_DEV_ARM_VGIC_GRP_CPU_REGS 2
+#define KVM_DEV_ARM_VGIC_CPUID_SHIFT 32
+#define KVM_DEV_ARM_VGIC_CPUID_MASK (0xffULL << KVM_DEV_ARM_VGIC_CPUID_SHIFT)
+#define KVM_DEV_ARM_VGIC_OFFSET_SHIFT 0
+#define KVM_DEV_ARM_VGIC_OFFSET_MASK (0xffffffffULL << KVM_DEV_ARM_VGIC_OFFSET_SHIFT)
/* KVM_IRQ_LINE irq field index values */
#define KVM_ARM_IRQ_TYPE_SHIFT 24
--git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index c614070..7f66a4f 100644
--- a/linux-headers/linux/kvm.h
+++ b/linux-headers/linux/kvm.h
@@ -839,6 +839,7 @@ struct kvm_device_attr {
#define KVM_DEV_TYPE_FSL_MPIC_20 1
#define KVM_DEV_TYPE_FSL_MPIC_42 2
#define KVM_DEV_TYPE_XICS 3
+#define KVM_DEV_TYPE_ARM_VGIC_V2 4
/*
* ioctls for VM fds
--
1.7.10.4
next prev parent reply other threads:[~2013-09-26 19:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-26 19:56 [Qemu-devel] [RFC PATCH v2 0/4] Create ARM KVM VGIC with device control API Christoffer Dall
2013-09-26 19:56 ` Christoffer Dall [this message]
2013-09-26 19:56 ` [Qemu-devel] [RFC PATCH v2 2/4] kvm: Introduce kvm_arch_irqchip_create Christoffer Dall
2013-10-14 13:34 ` Peter Maydell
2013-09-26 19:56 ` [Qemu-devel] [RFC PATCH v2 3/4] kvm: Common device control API functions Christoffer Dall
2013-10-14 13:36 ` Peter Maydell
2013-09-26 19:56 ` [Qemu-devel] [RFC PATCH v2 4/4] arm: vgic device control api support Christoffer Dall
2013-10-14 13:49 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1380225373-22132-2-git-send-email-christoffer.dall@linaro.org \
--to=christoffer.dall@linaro.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=patches@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).