diff options
Diffstat (limited to 'arch/s390/kvm/kvm-s390.h')
-rw-r--r-- | arch/s390/kvm/kvm-s390.h | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h index a7b7586626db..99b0b7597115 100644 --- a/arch/s390/kvm/kvm-s390.h +++ b/arch/s390/kvm/kvm-s390.h | |||
@@ -58,35 +58,9 @@ int kvm_s390_inject_vcpu(struct kvm_vcpu *vcpu, | |||
58 | int kvm_s390_inject_program_int(struct kvm_vcpu *vcpu, u16 code); | 58 | int kvm_s390_inject_program_int(struct kvm_vcpu *vcpu, u16 code); |
59 | int kvm_s390_inject_sigp_stop(struct kvm_vcpu *vcpu, int action); | 59 | int kvm_s390_inject_sigp_stop(struct kvm_vcpu *vcpu, int action); |
60 | 60 | ||
61 | static inline long kvm_s390_vcpu_get_memsize(struct kvm_vcpu *vcpu) | ||
62 | { | ||
63 | return vcpu->arch.sie_block->gmslm | ||
64 | - vcpu->arch.sie_block->gmsor | ||
65 | - VIRTIODESCSPACE + 1ul; | ||
66 | } | ||
67 | |||
68 | static inline void kvm_s390_vcpu_set_mem(struct kvm_vcpu *vcpu) | ||
69 | { | ||
70 | int idx; | ||
71 | struct kvm_memory_slot *mem; | ||
72 | struct kvm_memslots *memslots; | ||
73 | |||
74 | idx = srcu_read_lock(&vcpu->kvm->srcu); | ||
75 | memslots = kvm_memslots(vcpu->kvm); | ||
76 | |||
77 | mem = &memslots->memslots[0]; | ||
78 | |||
79 | vcpu->arch.sie_block->gmsor = mem->userspace_addr; | ||
80 | vcpu->arch.sie_block->gmslm = | ||
81 | mem->userspace_addr + | ||
82 | (mem->npages << PAGE_SHIFT) + | ||
83 | VIRTIODESCSPACE - 1ul; | ||
84 | |||
85 | srcu_read_unlock(&vcpu->kvm->srcu, idx); | ||
86 | } | ||
87 | |||
88 | /* implemented in priv.c */ | 61 | /* implemented in priv.c */ |
89 | int kvm_s390_handle_b2(struct kvm_vcpu *vcpu); | 62 | int kvm_s390_handle_b2(struct kvm_vcpu *vcpu); |
63 | int kvm_s390_handle_e5(struct kvm_vcpu *vcpu); | ||
90 | 64 | ||
91 | /* implemented in sigp.c */ | 65 | /* implemented in sigp.c */ |
92 | int kvm_s390_handle_sigp(struct kvm_vcpu *vcpu); | 66 | int kvm_s390_handle_sigp(struct kvm_vcpu *vcpu); |