summaryrefslogtreecommitdiff
path: root/arch/arm/include/uapi
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2018-07-19 18:24:25 +0300
committerMarc Zyngier <marc.zyngier@arm.com>2018-07-21 18:02:32 +0300
commitb0960b9569db6b2fe8a75967d47b9dcdeb44016b (patch)
tree465340bda85cfe34f1d816e7e746b1e638e41f90 /arch/arm/include/uapi
parent539aee0edb9fdc8f465e3843c261acc88c47d8ee (diff)
downloadlinux-b0960b9569db6b2fe8a75967d47b9dcdeb44016b.tar.xz
KVM: arm: Add 32bit get/set events support
arm64's new use of KVMs get_events/set_events API calls isn't just or RAS, it allows an SError that has been made pending by KVM as part of its device emulation to be migrated. Wire this up for 32bit too. We only need to read/write the HCR_VA bit, and check that no esr has been provided, as we don't yet support VDFSR. Signed-off-by: James Morse <james.morse@arm.com> Reviewed-by: Dongjiu Geng <gengdongjiu@huawei.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm/include/uapi')
-rw-r--r--arch/arm/include/uapi/asm/kvm.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/include/uapi/asm/kvm.h b/arch/arm/include/uapi/asm/kvm.h
index 16e006f708ca..4602464ebdfb 100644
--- a/arch/arm/include/uapi/asm/kvm.h
+++ b/arch/arm/include/uapi/asm/kvm.h
@@ -27,6 +27,7 @@
#define __KVM_HAVE_GUEST_DEBUG
#define __KVM_HAVE_IRQ_LINE
#define __KVM_HAVE_READONLY_MEM
+#define __KVM_HAVE_VCPU_EVENTS
#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
@@ -125,6 +126,18 @@ struct kvm_sync_regs {
struct kvm_arch_memory_slot {
};
+/* for KVM_GET/SET_VCPU_EVENTS */
+struct kvm_vcpu_events {
+ struct {
+ __u8 serror_pending;
+ __u8 serror_has_esr;
+ /* Align it to 8 bytes */
+ __u8 pad[6];
+ __u64 serror_esr;
+ } exception;
+ __u32 reserved[12];
+};
+
/* If you need to interpret the index values, here is the key: */
#define KVM_REG_ARM_COPROC_MASK 0x000000000FFF0000
#define KVM_REG_ARM_COPROC_SHIFT 16