aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kvm.h
diff options
context:
space:
mode:
authorCarsten Otte <cotte@de.ibm.com>2012-01-04 04:25:22 -0500
committerAvi Kivity <avi@redhat.com>2012-03-05 07:52:19 -0500
commite168bf8de33e16a909df2401af1f7d419c5780de (patch)
tree49dee8cc76e65eb1347895a6cb8f8843f690066d /include/linux/kvm.h
parent27e0393f15fc8bc855c6a888387ff5ffd2181089 (diff)
KVM: s390: ucontrol: export page faults to user
This patch introduces a new exit reason in the kvm_run structure named KVM_EXIT_S390_UCONTROL. This exit indicates, that a virtual cpu has regognized a fault on the host page table. The idea is that userspace can handle this fault by mapping memory at the fault location into the cpu's address space and then continue to run the virtual cpu. Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux/kvm.h')
-rw-r--r--include/linux/kvm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 0a66c1072691..7f686f6708b0 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -162,6 +162,7 @@ struct kvm_pit_config {
162#define KVM_EXIT_INTERNAL_ERROR 17 162#define KVM_EXIT_INTERNAL_ERROR 17
163#define KVM_EXIT_OSI 18 163#define KVM_EXIT_OSI 18
164#define KVM_EXIT_PAPR_HCALL 19 164#define KVM_EXIT_PAPR_HCALL 19
165#define KVM_EXIT_S390_UCONTROL 20
165 166
166/* For KVM_EXIT_INTERNAL_ERROR */ 167/* For KVM_EXIT_INTERNAL_ERROR */
167#define KVM_INTERNAL_ERROR_EMULATION 1 168#define KVM_INTERNAL_ERROR_EMULATION 1
@@ -249,6 +250,11 @@ struct kvm_run {
249#define KVM_S390_RESET_CPU_INIT 8 250#define KVM_S390_RESET_CPU_INIT 8
250#define KVM_S390_RESET_IPL 16 251#define KVM_S390_RESET_IPL 16
251 __u64 s390_reset_flags; 252 __u64 s390_reset_flags;
253 /* KVM_EXIT_S390_UCONTROL */
254 struct {
255 __u64 trans_exc_code;
256 __u32 pgm_code;
257 } s390_ucontrol;
252 /* KVM_EXIT_DCR */ 258 /* KVM_EXIT_DCR */
253 struct { 259 struct {
254 __u32 dcrn; 260 __u32 dcrn;