diff options
| author | Fan Zhang <zhangfan@linux.vnet.ibm.com> | 2016-01-07 05:24:29 -0500 |
|---|---|---|
| committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2016-01-07 08:48:26 -0500 |
| commit | c6e5f166373a20a433c38a34bd16f2b62bd0864c (patch) | |
| tree | 7e444674777fad893eb4ab353267c397c44db57c /arch/s390/include/uapi/asm | |
| parent | c57ee5faf4503b0cd586c3af663262a3d5599fc1 (diff) | |
KVM: s390: implement the RI support of guest
This patch adds runtime instrumentation support for KVM guest. We need to
setup a save area for the runtime instrumentation-controls control block(RICCB)
and implement the necessary interfaces to live migrate the guest settings.
We setup the sie control block in a way, that the runtime
instrumentation instructions of a guest are handled by hardware.
We also add a capability KVM_CAP_S390_RI to make this feature opt-in as
it needs migration support.
Signed-off-by: Fan Zhang <zhangfan@linux.vnet.ibm.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'arch/s390/include/uapi/asm')
| -rw-r--r-- | arch/s390/include/uapi/asm/kvm.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/include/uapi/asm/kvm.h b/arch/s390/include/uapi/asm/kvm.h index d2aea31252f2..fe84bd5fe7ce 100644 --- a/arch/s390/include/uapi/asm/kvm.h +++ b/arch/s390/include/uapi/asm/kvm.h | |||
| @@ -153,6 +153,7 @@ struct kvm_guest_debug_arch { | |||
| 153 | #define KVM_SYNC_ARCH0 (1UL << 4) | 153 | #define KVM_SYNC_ARCH0 (1UL << 4) |
| 154 | #define KVM_SYNC_PFAULT (1UL << 5) | 154 | #define KVM_SYNC_PFAULT (1UL << 5) |
| 155 | #define KVM_SYNC_VRS (1UL << 6) | 155 | #define KVM_SYNC_VRS (1UL << 6) |
| 156 | #define KVM_SYNC_RICCB (1UL << 7) | ||
| 156 | /* definition of registers in kvm_run */ | 157 | /* definition of registers in kvm_run */ |
| 157 | struct kvm_sync_regs { | 158 | struct kvm_sync_regs { |
| 158 | __u64 prefix; /* prefix register */ | 159 | __u64 prefix; /* prefix register */ |
| @@ -170,6 +171,8 @@ struct kvm_sync_regs { | |||
| 170 | __u64 vrs[32][2]; /* vector registers */ | 171 | __u64 vrs[32][2]; /* vector registers */ |
| 171 | __u8 reserved[512]; /* for future vector expansion */ | 172 | __u8 reserved[512]; /* for future vector expansion */ |
| 172 | __u32 fpc; /* only valid with vector registers */ | 173 | __u32 fpc; /* only valid with vector registers */ |
| 174 | __u8 padding[52]; /* riccb needs to be 64byte aligned */ | ||
| 175 | __u8 riccb[64]; /* runtime instrumentation controls block */ | ||
| 173 | }; | 176 | }; |
| 174 | 177 | ||
| 175 | #define KVM_REG_S390_TODPR (KVM_REG_S390 | KVM_REG_SIZE_U32 | 0x1) | 178 | #define KVM_REG_S390_TODPR (KVM_REG_S390 | KVM_REG_SIZE_U32 | 0x1) |
