diff mbox series

[v2,1/2] kvm: sync linux headers

Message ID 1528231969-19584-2-git-send-email-gengdongjiu@huawei.com
State New
Headers show
Series add support for VCPU event states | expand

Commit Message

Dongjiu Geng June 5, 2018, 8:52 p.m. UTC
Import KVM_CAP_ARM_INJECT_SERROR_ESR and struct kvm_vcpu_events
for arm64

Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
---
 linux-headers/asm-arm64/kvm.h | 13 +++++++++++++
 linux-headers/linux/kvm.h     |  1 +
 2 files changed, 14 insertions(+)

Comments

Peter Maydell June 5, 2018, 1:07 p.m. UTC | #1
On 5 June 2018 at 21:52, Dongjiu Geng <gengdongjiu@huawei.com> wrote:
> Import KVM_CAP_ARM_INJECT_SERROR_ESR and struct kvm_vcpu_events
> for arm64
>
> Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>

Was this produced with the update-headers script? If so,
the commit message should say so and also which upstream
kernel commit/tag the sync is against. (See QEMU commit
65a6d8dd3f32 for an example.) If not then this series should
be tagged as an RFC, since it shouldn't be applied until
the kernel API changes have gone into the kernel upstream.

thanks
-- PMM
diff mbox series

Patch

diff --git a/linux-headers/asm-arm64/kvm.h b/linux-headers/asm-arm64/kvm.h
index 17315ab..e240afc 100644
--- a/linux-headers/asm-arm64/kvm.h
+++ b/linux-headers/asm-arm64/kvm.h
@@ -39,6 +39,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
 
@@ -153,6 +154,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
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index cdb148e..cd8be47 100644
--- a/linux-headers/linux/kvm.h
+++ b/linux-headers/linux/kvm.h
@@ -948,6 +948,7 @@  struct kvm_ppc_resize_hpt {
 #define KVM_CAP_S390_BPB 152
 #define KVM_CAP_GET_MSR_FEATURES 153
 #define KVM_CAP_HYPERV_EVENTFD 154
+#define KVM_CAP_ARM_INJECT_SERROR_ESR 155
 
 #ifdef KVM_CAP_IRQ_ROUTING