|
|
9ae3a8 |
From 203e2f3b71821558653d08bbd90ee493396ec1a6 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Nigel Croxon <ncroxon@redhat.com>
|
|
|
9ae3a8 |
Date: Tue, 6 Aug 2013 19:52:03 +0200
|
|
|
9ae3a8 |
Subject: linux-headers: Update to v3.10-rc5
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Nigel Croxon <ncroxon@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1375818724-41239-2-git-send-email-ncroxon@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 53016
|
|
|
9ae3a8 |
O-Subject: [RHEL7.0 qemu-kvm PATCH v2 1/2] linux-headers: Update to v3.10-rc5
|
|
|
9ae3a8 |
Bugzilla: 984604
|
|
|
9ae3a8 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Alex Williamson <alex.williamson@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
From: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
This adds symbols required for PPC64 pseries platform features:
|
|
|
9ae3a8 |
1. sPAPR live migration;
|
|
|
9ae3a8 |
2. in-kernel XICS interrupt controller.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
|
|
|
9ae3a8 |
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
|
|
|
9ae3a8 |
(cherry picked from commit e098b45386a86fecc1e573d305a240a2f4aa461d)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/linux-headers/asm-arm/kvm.h b/linux-headers/asm-arm/kvm.h
|
|
|
9ae3a8 |
index 023bfeb..c1ee007 100644
|
|
|
9ae3a8 |
--- a/linux-headers/asm-arm/kvm.h
|
|
|
9ae3a8 |
+++ b/linux-headers/asm-arm/kvm.h
|
|
|
9ae3a8 |
@@ -53,12 +53,12 @@
|
|
|
9ae3a8 |
#define KVM_ARM_FIQ_spsr fiq_regs[7]
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
struct kvm_regs {
|
|
|
9ae3a8 |
- struct pt_regs usr_regs;/* R0_usr - R14_usr, PC, CPSR */
|
|
|
9ae3a8 |
- __u32 svc_regs[3]; /* SP_svc, LR_svc, SPSR_svc */
|
|
|
9ae3a8 |
- __u32 abt_regs[3]; /* SP_abt, LR_abt, SPSR_abt */
|
|
|
9ae3a8 |
- __u32 und_regs[3]; /* SP_und, LR_und, SPSR_und */
|
|
|
9ae3a8 |
- __u32 irq_regs[3]; /* SP_irq, LR_irq, SPSR_irq */
|
|
|
9ae3a8 |
- __u32 fiq_regs[8]; /* R8_fiq - R14_fiq, SPSR_fiq */
|
|
|
9ae3a8 |
+ struct pt_regs usr_regs; /* R0_usr - R14_usr, PC, CPSR */
|
|
|
9ae3a8 |
+ unsigned long svc_regs[3]; /* SP_svc, LR_svc, SPSR_svc */
|
|
|
9ae3a8 |
+ unsigned long abt_regs[3]; /* SP_abt, LR_abt, SPSR_abt */
|
|
|
9ae3a8 |
+ unsigned long und_regs[3]; /* SP_und, LR_und, SPSR_und */
|
|
|
9ae3a8 |
+ unsigned long irq_regs[3]; /* SP_irq, LR_irq, SPSR_irq */
|
|
|
9ae3a8 |
+ unsigned long fiq_regs[8]; /* R8_fiq - R14_fiq, SPSR_fiq */
|
|
|
9ae3a8 |
};
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
/* Supported Processor Types */
|
|
|
9ae3a8 |
diff --git a/linux-headers/asm-mips/kvm.h b/linux-headers/asm-mips/kvm.h
|
|
|
9ae3a8 |
new file mode 100644
|
|
|
9ae3a8 |
index 0000000..3f424f5
|
|
|
9ae3a8 |
--- /dev/null
|
|
|
9ae3a8 |
+++ b/linux-headers/asm-mips/kvm.h
|
|
|
9ae3a8 |
@@ -0,0 +1,138 @@
|
|
|
9ae3a8 |
+/*
|
|
|
9ae3a8 |
+ * This file is subject to the terms and conditions of the GNU General Public
|
|
|
9ae3a8 |
+ * License. See the file "COPYING" in the main directory of this archive
|
|
|
9ae3a8 |
+ * for more details.
|
|
|
9ae3a8 |
+ *
|
|
|
9ae3a8 |
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
|
|
|
9ae3a8 |
+ * Copyright (C) 2013 Cavium, Inc.
|
|
|
9ae3a8 |
+ * Authors: Sanjay Lal <sanjayl@kymasys.com>
|
|
|
9ae3a8 |
+ */
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+#ifndef __LINUX_KVM_MIPS_H
|
|
|
9ae3a8 |
+#define __LINUX_KVM_MIPS_H
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+#include <linux/types.h>
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/*
|
|
|
9ae3a8 |
+ * KVM MIPS specific structures and definitions.
|
|
|
9ae3a8 |
+ *
|
|
|
9ae3a8 |
+ * Some parts derived from the x86 version of this file.
|
|
|
9ae3a8 |
+ */
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/*
|
|
|
9ae3a8 |
+ * for KVM_GET_REGS and KVM_SET_REGS
|
|
|
9ae3a8 |
+ *
|
|
|
9ae3a8 |
+ * If Config[AT] is zero (32-bit CPU), the register contents are
|
|
|
9ae3a8 |
+ * stored in the lower 32-bits of the struct kvm_regs fields and sign
|
|
|
9ae3a8 |
+ * extended to 64-bits.
|
|
|
9ae3a8 |
+ */
|
|
|
9ae3a8 |
+struct kvm_regs {
|
|
|
9ae3a8 |
+ /* out (KVM_GET_REGS) / in (KVM_SET_REGS) */
|
|
|
9ae3a8 |
+ __u64 gpr[32];
|
|
|
9ae3a8 |
+ __u64 hi;
|
|
|
9ae3a8 |
+ __u64 lo;
|
|
|
9ae3a8 |
+ __u64 pc;
|
|
|
9ae3a8 |
+};
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/*
|
|
|
9ae3a8 |
+ * for KVM_GET_FPU and KVM_SET_FPU
|
|
|
9ae3a8 |
+ *
|
|
|
9ae3a8 |
+ * If Status[FR] is zero (32-bit FPU), the upper 32-bits of the FPRs
|
|
|
9ae3a8 |
+ * are zero filled.
|
|
|
9ae3a8 |
+ */
|
|
|
9ae3a8 |
+struct kvm_fpu {
|
|
|
9ae3a8 |
+ __u64 fpr[32];
|
|
|
9ae3a8 |
+ __u32 fir;
|
|
|
9ae3a8 |
+ __u32 fccr;
|
|
|
9ae3a8 |
+ __u32 fexr;
|
|
|
9ae3a8 |
+ __u32 fenr;
|
|
|
9ae3a8 |
+ __u32 fcsr;
|
|
|
9ae3a8 |
+ __u32 pad;
|
|
|
9ae3a8 |
+};
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/*
|
|
|
9ae3a8 |
+ * For MIPS, we use KVM_SET_ONE_REG and KVM_GET_ONE_REG to access CP0
|
|
|
9ae3a8 |
+ * registers. The id field is broken down as follows:
|
|
|
9ae3a8 |
+ *
|
|
|
9ae3a8 |
+ * bits[2..0] - Register 'sel' index.
|
|
|
9ae3a8 |
+ * bits[7..3] - Register 'rd' index.
|
|
|
9ae3a8 |
+ * bits[15..8] - Must be zero.
|
|
|
9ae3a8 |
+ * bits[63..16] - 1 -> CP0 registers.
|
|
|
9ae3a8 |
+ *
|
|
|
9ae3a8 |
+ * Other sets registers may be added in the future. Each set would
|
|
|
9ae3a8 |
+ * have its own identifier in bits[63..16].
|
|
|
9ae3a8 |
+ *
|
|
|
9ae3a8 |
+ * The addr field of struct kvm_one_reg must point to an aligned
|
|
|
9ae3a8 |
+ * 64-bit wide location. For registers that are narrower than
|
|
|
9ae3a8 |
+ * 64-bits, the value is stored in the low order bits of the location,
|
|
|
9ae3a8 |
+ * and sign extended to 64-bits.
|
|
|
9ae3a8 |
+ *
|
|
|
9ae3a8 |
+ * The registers defined in struct kvm_regs are also accessible, the
|
|
|
9ae3a8 |
+ * id values for these are below.
|
|
|
9ae3a8 |
+ */
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R0 0
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R1 1
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R2 2
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R3 3
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R4 4
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R5 5
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R6 6
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R7 7
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R8 8
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R9 9
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R10 10
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R11 11
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R12 12
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R13 13
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R14 14
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R15 15
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R16 16
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R17 17
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R18 18
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R19 19
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R20 20
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R21 21
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R22 22
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R23 23
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R24 24
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R25 25
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R26 26
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R27 27
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R28 28
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R29 29
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R30 30
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_R31 31
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_HI 32
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_LO 33
|
|
|
9ae3a8 |
+#define KVM_REG_MIPS_PC 34
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/*
|
|
|
9ae3a8 |
+ * KVM MIPS specific structures and definitions
|
|
|
9ae3a8 |
+ *
|
|
|
9ae3a8 |
+ */
|
|
|
9ae3a8 |
+struct kvm_debug_exit_arch {
|
|
|
9ae3a8 |
+ __u64 epc;
|
|
|
9ae3a8 |
+};
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/* for KVM_SET_GUEST_DEBUG */
|
|
|
9ae3a8 |
+struct kvm_guest_debug_arch {
|
|
|
9ae3a8 |
+};
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/* definition of registers in kvm_run */
|
|
|
9ae3a8 |
+struct kvm_sync_regs {
|
|
|
9ae3a8 |
+};
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/* dummy definition */
|
|
|
9ae3a8 |
+struct kvm_sregs {
|
|
|
9ae3a8 |
+};
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+struct kvm_mips_interrupt {
|
|
|
9ae3a8 |
+ /* in */
|
|
|
9ae3a8 |
+ __u32 cpu;
|
|
|
9ae3a8 |
+ __u32 irq;
|
|
|
9ae3a8 |
+};
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+#endif /* __LINUX_KVM_MIPS_H */
|
|
|
9ae3a8 |
diff --git a/linux-headers/asm-mips/kvm_para.h b/linux-headers/asm-mips/kvm_para.h
|
|
|
9ae3a8 |
new file mode 100644
|
|
|
9ae3a8 |
index 0000000..14fab8f
|
|
|
9ae3a8 |
--- /dev/null
|
|
|
9ae3a8 |
+++ b/linux-headers/asm-mips/kvm_para.h
|
|
|
9ae3a8 |
@@ -0,0 +1 @@
|
|
|
9ae3a8 |
+#include <asm-generic/kvm_para.h>
|
|
|
9ae3a8 |
diff --git a/linux-headers/asm-powerpc/kvm.h b/linux-headers/asm-powerpc/kvm.h
|
|
|
9ae3a8 |
index ef072b1..0fb1a6e 100644
|
|
|
9ae3a8 |
--- a/linux-headers/asm-powerpc/kvm.h
|
|
|
9ae3a8 |
+++ b/linux-headers/asm-powerpc/kvm.h
|
|
|
9ae3a8 |
@@ -25,6 +25,8 @@
|
|
|
9ae3a8 |
/* Select powerpc specific features in <linux/kvm.h> */
|
|
|
9ae3a8 |
#define __KVM_HAVE_SPAPR_TCE
|
|
|
9ae3a8 |
#define __KVM_HAVE_PPC_SMT
|
|
|
9ae3a8 |
+#define __KVM_HAVE_IRQCHIP
|
|
|
9ae3a8 |
+#define __KVM_HAVE_IRQ_LINE
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
struct kvm_regs {
|
|
|
9ae3a8 |
__u64 pc;
|
|
|
9ae3a8 |
@@ -272,8 +274,31 @@ struct kvm_debug_exit_arch {
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
/* for KVM_SET_GUEST_DEBUG */
|
|
|
9ae3a8 |
struct kvm_guest_debug_arch {
|
|
|
9ae3a8 |
+ struct {
|
|
|
9ae3a8 |
+ /* H/W breakpoint/watchpoint address */
|
|
|
9ae3a8 |
+ __u64 addr;
|
|
|
9ae3a8 |
+ /*
|
|
|
9ae3a8 |
+ * Type denotes h/w breakpoint, read watchpoint, write
|
|
|
9ae3a8 |
+ * watchpoint or watchpoint (both read and write).
|
|
|
9ae3a8 |
+ */
|
|
|
9ae3a8 |
+#define KVMPPC_DEBUG_NONE 0x0
|
|
|
9ae3a8 |
+#define KVMPPC_DEBUG_BREAKPOINT (1UL << 1)
|
|
|
9ae3a8 |
+#define KVMPPC_DEBUG_WATCH_WRITE (1UL << 2)
|
|
|
9ae3a8 |
+#define KVMPPC_DEBUG_WATCH_READ (1UL << 3)
|
|
|
9ae3a8 |
+ __u32 type;
|
|
|
9ae3a8 |
+ __u32 reserved;
|
|
|
9ae3a8 |
+ } bp[16];
|
|
|
9ae3a8 |
};
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
+/* Debug related defines */
|
|
|
9ae3a8 |
+/*
|
|
|
9ae3a8 |
+ * kvm_guest_debug->control is a 32 bit field. The lower 16 bits are generic
|
|
|
9ae3a8 |
+ * and upper 16 bits are architecture specific. Architecture specific defines
|
|
|
9ae3a8 |
+ * that ioctl is for setting hardware breakpoint or software breakpoint.
|
|
|
9ae3a8 |
+ */
|
|
|
9ae3a8 |
+#define KVM_GUESTDBG_USE_SW_BP 0x00010000
|
|
|
9ae3a8 |
+#define KVM_GUESTDBG_USE_HW_BP 0x00020000
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
/* definition of registers in kvm_run */
|
|
|
9ae3a8 |
struct kvm_sync_regs {
|
|
|
9ae3a8 |
};
|
|
|
9ae3a8 |
@@ -299,6 +324,12 @@ struct kvm_allocate_rma {
|
|
|
9ae3a8 |
__u64 rma_size;
|
|
|
9ae3a8 |
};
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
+/* for KVM_CAP_PPC_RTAS */
|
|
|
9ae3a8 |
+struct kvm_rtas_token_args {
|
|
|
9ae3a8 |
+ char name[120];
|
|
|
9ae3a8 |
+ __u64 token; /* Use a token of 0 to undefine a mapping */
|
|
|
9ae3a8 |
+};
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
struct kvm_book3e_206_tlb_entry {
|
|
|
9ae3a8 |
__u32 mas8;
|
|
|
9ae3a8 |
__u32 mas1;
|
|
|
9ae3a8 |
@@ -359,6 +390,26 @@ struct kvm_get_htab_header {
|
|
|
9ae3a8 |
__u16 n_invalid;
|
|
|
9ae3a8 |
};
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
+/* Per-vcpu XICS interrupt controller state */
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_ICP_STATE (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x8c)
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_ICP_CPPR_SHIFT 56 /* current proc priority */
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_ICP_CPPR_MASK 0xff
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_ICP_XISR_SHIFT 32 /* interrupt status field */
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_ICP_XISR_MASK 0xffffff
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_ICP_MFRR_SHIFT 24 /* pending IPI priority */
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_ICP_MFRR_MASK 0xff
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_ICP_PPRI_SHIFT 16 /* pending irq priority */
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_ICP_PPRI_MASK 0xff
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/* Device control API: PPC-specific devices */
|
|
|
9ae3a8 |
+#define KVM_DEV_MPIC_GRP_MISC 1
|
|
|
9ae3a8 |
+#define KVM_DEV_MPIC_BASE_ADDR 0 /* 64-bit */
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+#define KVM_DEV_MPIC_GRP_REGISTER 2 /* 32-bit */
|
|
|
9ae3a8 |
+#define KVM_DEV_MPIC_GRP_IRQ_ACTIVE 3 /* 32-bit */
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/* One-Reg API: PPC-specific registers */
|
|
|
9ae3a8 |
#define KVM_REG_PPC_HIOR (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x1)
|
|
|
9ae3a8 |
#define KVM_REG_PPC_IAC1 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x2)
|
|
|
9ae3a8 |
#define KVM_REG_PPC_IAC2 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x3)
|
|
|
9ae3a8 |
@@ -422,4 +473,42 @@ struct kvm_get_htab_header {
|
|
|
9ae3a8 |
#define KVM_REG_PPC_CLEAR_TSR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x88)
|
|
|
9ae3a8 |
#define KVM_REG_PPC_TCR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x89)
|
|
|
9ae3a8 |
#define KVM_REG_PPC_TSR (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x8a)
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/* Debugging: Special instruction for software breakpoint */
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_DEBUG_INST (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x8b)
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/* MMU registers */
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_MAS0 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x8c)
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_MAS1 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x8d)
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_MAS2 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x8e)
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_MAS7_3 (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x8f)
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_MAS4 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x90)
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_MAS6 (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x91)
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_MMUCFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x92)
|
|
|
9ae3a8 |
+/*
|
|
|
9ae3a8 |
+ * TLBnCFG fields TLBnCFG_N_ENTRY and TLBnCFG_ASSOC can be changed only using
|
|
|
9ae3a8 |
+ * KVM_CAP_SW_TLB ioctl
|
|
|
9ae3a8 |
+ */
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_TLB0CFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x93)
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_TLB1CFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x94)
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_TLB2CFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x95)
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_TLB3CFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x96)
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_TLB0PS (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x97)
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_TLB1PS (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x98)
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_TLB2PS (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x99)
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_TLB3PS (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x9a)
|
|
|
9ae3a8 |
+#define KVM_REG_PPC_EPTCFG (KVM_REG_PPC | KVM_REG_SIZE_U32 | 0x9b)
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/* PPC64 eXternal Interrupt Controller Specification */
|
|
|
9ae3a8 |
+#define KVM_DEV_XICS_GRP_SOURCES 1 /* 64-bit source attributes */
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/* Layout of 64-bit source attribute values */
|
|
|
9ae3a8 |
+#define KVM_XICS_DESTINATION_SHIFT 0
|
|
|
9ae3a8 |
+#define KVM_XICS_DESTINATION_MASK 0xffffffffULL
|
|
|
9ae3a8 |
+#define KVM_XICS_PRIORITY_SHIFT 32
|
|
|
9ae3a8 |
+#define KVM_XICS_PRIORITY_MASK 0xff
|
|
|
9ae3a8 |
+#define KVM_XICS_LEVEL_SENSITIVE (1ULL << 40)
|
|
|
9ae3a8 |
+#define KVM_XICS_MASKED (1ULL << 41)
|
|
|
9ae3a8 |
+#define KVM_XICS_PENDING (1ULL << 42)
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
#endif /* __LINUX_KVM_POWERPC_H */
|
|
|
9ae3a8 |
diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h
|
|
|
9ae3a8 |
index a65ec29..5d9a303 100644
|
|
|
9ae3a8 |
--- a/linux-headers/asm-x86/kvm.h
|
|
|
9ae3a8 |
+++ b/linux-headers/asm-x86/kvm.h
|
|
|
9ae3a8 |
@@ -29,7 +29,6 @@
|
|
|
9ae3a8 |
#define __KVM_HAVE_PIT
|
|
|
9ae3a8 |
#define __KVM_HAVE_IOAPIC
|
|
|
9ae3a8 |
#define __KVM_HAVE_IRQ_LINE
|
|
|
9ae3a8 |
-#define __KVM_HAVE_DEVICE_ASSIGNMENT
|
|
|
9ae3a8 |
#define __KVM_HAVE_MSI
|
|
|
9ae3a8 |
#define __KVM_HAVE_USER_NMI
|
|
|
9ae3a8 |
#define __KVM_HAVE_GUEST_DEBUG
|
|
|
9ae3a8 |
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
|
|
|
9ae3a8 |
index eb02d8a..c614070 100644
|
|
|
9ae3a8 |
--- a/linux-headers/linux/kvm.h
|
|
|
9ae3a8 |
+++ b/linux-headers/linux/kvm.h
|
|
|
9ae3a8 |
@@ -561,9 +561,7 @@ struct kvm_ppc_smmu_info {
|
|
|
9ae3a8 |
#define KVM_CAP_MP_STATE 14
|
|
|
9ae3a8 |
#define KVM_CAP_COALESCED_MMIO 15
|
|
|
9ae3a8 |
#define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */
|
|
|
9ae3a8 |
-#ifdef __KVM_HAVE_DEVICE_ASSIGNMENT
|
|
|
9ae3a8 |
#define KVM_CAP_DEVICE_ASSIGNMENT 17
|
|
|
9ae3a8 |
-#endif
|
|
|
9ae3a8 |
#define KVM_CAP_IOMMU 18
|
|
|
9ae3a8 |
#ifdef __KVM_HAVE_MSI
|
|
|
9ae3a8 |
#define KVM_CAP_DEVICE_MSI 20
|
|
|
9ae3a8 |
@@ -579,13 +577,9 @@ struct kvm_ppc_smmu_info {
|
|
|
9ae3a8 |
#ifdef __KVM_HAVE_PIT
|
|
|
9ae3a8 |
#define KVM_CAP_REINJECT_CONTROL 24
|
|
|
9ae3a8 |
#endif
|
|
|
9ae3a8 |
-#ifdef __KVM_HAVE_IOAPIC
|
|
|
9ae3a8 |
#define KVM_CAP_IRQ_ROUTING 25
|
|
|
9ae3a8 |
-#endif
|
|
|
9ae3a8 |
#define KVM_CAP_IRQ_INJECT_STATUS 26
|
|
|
9ae3a8 |
-#ifdef __KVM_HAVE_DEVICE_ASSIGNMENT
|
|
|
9ae3a8 |
#define KVM_CAP_DEVICE_DEASSIGNMENT 27
|
|
|
9ae3a8 |
-#endif
|
|
|
9ae3a8 |
#ifdef __KVM_HAVE_MSIX
|
|
|
9ae3a8 |
#define KVM_CAP_DEVICE_MSIX 28
|
|
|
9ae3a8 |
#endif
|
|
|
9ae3a8 |
@@ -668,6 +662,10 @@ struct kvm_ppc_smmu_info {
|
|
|
9ae3a8 |
#define KVM_CAP_PPC_EPR 86
|
|
|
9ae3a8 |
#define KVM_CAP_ARM_PSCI 87
|
|
|
9ae3a8 |
#define KVM_CAP_ARM_SET_DEVICE_ADDR 88
|
|
|
9ae3a8 |
+#define KVM_CAP_DEVICE_CTRL 89
|
|
|
9ae3a8 |
+#define KVM_CAP_IRQ_MPIC 90
|
|
|
9ae3a8 |
+#define KVM_CAP_PPC_RTAS 91
|
|
|
9ae3a8 |
+#define KVM_CAP_IRQ_XICS 92
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
#ifdef KVM_CAP_IRQ_ROUTING
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
@@ -821,6 +819,28 @@ struct kvm_arm_device_addr {
|
|
|
9ae3a8 |
};
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
/*
|
|
|
9ae3a8 |
+ * Device control API, available with KVM_CAP_DEVICE_CTRL
|
|
|
9ae3a8 |
+ */
|
|
|
9ae3a8 |
+#define KVM_CREATE_DEVICE_TEST 1
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+struct kvm_create_device {
|
|
|
9ae3a8 |
+ __u32 type; /* in: KVM_DEV_TYPE_xxx */
|
|
|
9ae3a8 |
+ __u32 fd; /* out: device handle */
|
|
|
9ae3a8 |
+ __u32 flags; /* in: KVM_CREATE_DEVICE_xxx */
|
|
|
9ae3a8 |
+};
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+struct kvm_device_attr {
|
|
|
9ae3a8 |
+ __u32 flags; /* no flags currently defined */
|
|
|
9ae3a8 |
+ __u32 group; /* device-defined */
|
|
|
9ae3a8 |
+ __u64 attr; /* group-defined */
|
|
|
9ae3a8 |
+ __u64 addr; /* userspace address of attr data */
|
|
|
9ae3a8 |
+};
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+#define KVM_DEV_TYPE_FSL_MPIC_20 1
|
|
|
9ae3a8 |
+#define KVM_DEV_TYPE_FSL_MPIC_42 2
|
|
|
9ae3a8 |
+#define KVM_DEV_TYPE_XICS 3
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/*
|
|
|
9ae3a8 |
* ioctls for VM fds
|
|
|
9ae3a8 |
*/
|
|
|
9ae3a8 |
#define KVM_SET_MEMORY_REGION _IOW(KVMIO, 0x40, struct kvm_memory_region)
|
|
|
9ae3a8 |
@@ -907,6 +927,16 @@ struct kvm_s390_ucas_mapping {
|
|
|
9ae3a8 |
#define KVM_PPC_GET_HTAB_FD _IOW(KVMIO, 0xaa, struct kvm_get_htab_fd)
|
|
|
9ae3a8 |
/* Available with KVM_CAP_ARM_SET_DEVICE_ADDR */
|
|
|
9ae3a8 |
#define KVM_ARM_SET_DEVICE_ADDR _IOW(KVMIO, 0xab, struct kvm_arm_device_addr)
|
|
|
9ae3a8 |
+/* Available with KVM_CAP_PPC_RTAS */
|
|
|
9ae3a8 |
+#define KVM_PPC_RTAS_DEFINE_TOKEN _IOW(KVMIO, 0xac, struct kvm_rtas_token_args)
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/* ioctl for vm fd */
|
|
|
9ae3a8 |
+#define KVM_CREATE_DEVICE _IOWR(KVMIO, 0xe0, struct kvm_create_device)
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/* ioctls for fds returned by KVM_CREATE_DEVICE */
|
|
|
9ae3a8 |
+#define KVM_SET_DEVICE_ATTR _IOW(KVMIO, 0xe1, struct kvm_device_attr)
|
|
|
9ae3a8 |
+#define KVM_GET_DEVICE_ATTR _IOW(KVMIO, 0xe2, struct kvm_device_attr)
|
|
|
9ae3a8 |
+#define KVM_HAS_DEVICE_ATTR _IOW(KVMIO, 0xe3, struct kvm_device_attr)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
/*
|
|
|
9ae3a8 |
* ioctls for vcpu fds
|
|
|
9ae3a8 |
diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h
|
|
|
9ae3a8 |
index e094121..7ec1864 100644
|
|
|
9ae3a8 |
--- a/linux-headers/linux/vfio.h
|
|
|
9ae3a8 |
+++ b/linux-headers/linux/vfio.h
|
|
|
9ae3a8 |
@@ -319,6 +319,7 @@ enum {
|
|
|
9ae3a8 |
VFIO_PCI_INTX_IRQ_INDEX,
|
|
|
9ae3a8 |
VFIO_PCI_MSI_IRQ_INDEX,
|
|
|
9ae3a8 |
VFIO_PCI_MSIX_IRQ_INDEX,
|
|
|
9ae3a8 |
+ VFIO_PCI_ERR_IRQ_INDEX,
|
|
|
9ae3a8 |
VFIO_PCI_NUM_IRQS
|
|
|
9ae3a8 |
};
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/linux-headers/linux/vhost.h b/linux-headers/linux/vhost.h
|
|
|
9ae3a8 |
index 165a484..c656f61 100644
|
|
|
9ae3a8 |
--- a/linux-headers/linux/vhost.h
|
|
|
9ae3a8 |
+++ b/linux-headers/linux/vhost.h
|
|
|
9ae3a8 |
@@ -127,4 +127,32 @@ struct vhost_memory {
|
|
|
9ae3a8 |
/* vhost-net should add virtio_net_hdr for RX, and strip for TX packets. */
|
|
|
9ae3a8 |
#define VHOST_NET_F_VIRTIO_NET_HDR 27
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
+/* VHOST_SCSI specific definitions */
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+/*
|
|
|
9ae3a8 |
+ * Used by QEMU userspace to ensure a consistent vhost-scsi ABI.
|
|
|
9ae3a8 |
+ *
|
|
|
9ae3a8 |
+ * ABI Rev 0: July 2012 version starting point for v3.6-rc merge candidate +
|
|
|
9ae3a8 |
+ * RFC-v2 vhost-scsi userspace. Add GET_ABI_VERSION ioctl usage
|
|
|
9ae3a8 |
+ * ABI Rev 1: January 2013. Ignore vhost_tpgt filed in struct vhost_scsi_target.
|
|
|
9ae3a8 |
+ * All the targets under vhost_wwpn can be seen and used by guset.
|
|
|
9ae3a8 |
+ */
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+#define VHOST_SCSI_ABI_VERSION 1
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+struct vhost_scsi_target {
|
|
|
9ae3a8 |
+ int abi_version;
|
|
|
9ae3a8 |
+ char vhost_wwpn[224]; /* TRANSPORT_IQN_LEN */
|
|
|
9ae3a8 |
+ unsigned short vhost_tpgt;
|
|
|
9ae3a8 |
+ unsigned short reserved;
|
|
|
9ae3a8 |
+};
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+#define VHOST_SCSI_SET_ENDPOINT _IOW(VHOST_VIRTIO, 0x40, struct vhost_scsi_target)
|
|
|
9ae3a8 |
+#define VHOST_SCSI_CLEAR_ENDPOINT _IOW(VHOST_VIRTIO, 0x41, struct vhost_scsi_target)
|
|
|
9ae3a8 |
+/* Changing this breaks userspace. */
|
|
|
9ae3a8 |
+#define VHOST_SCSI_GET_ABI_VERSION _IOW(VHOST_VIRTIO, 0x42, int)
|
|
|
9ae3a8 |
+/* Set and get the events missed flag */
|
|
|
9ae3a8 |
+#define VHOST_SCSI_SET_EVENTS_MISSED _IOW(VHOST_VIRTIO, 0x43, __u32)
|
|
|
9ae3a8 |
+#define VHOST_SCSI_GET_EVENTS_MISSED _IOW(VHOST_VIRTIO, 0x44, __u32)
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
#endif
|