aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/kvm-s390.h
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2012-01-11 05:19:32 -0500
committerAvi Kivity <avi@redhat.com>2012-03-05 07:52:21 -0500
commit8d26cf7b40b1648c39e77a113dac07ad31363120 (patch)
tree90aae47b22f248740f8802f2fdc6e28bdca0341b /arch/s390/kvm/kvm-s390.h
parent2b036c6b861dc5da295c6fe19a3edcff7093fdeb (diff)
KVM: s390: rework code that sets the prefix
There are several places in the kvm module, which set the prefix register. Since we need to flush the cpu, lets combine this operation into a helper function. This helper will also explicitely mask out the unused bits. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/s390/kvm/kvm-s390.h')
-rw-r--r--arch/s390/kvm/kvm-s390.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h
index 62aa5f19bb98..ff28f9d1c9eb 100644
--- a/arch/s390/kvm/kvm-s390.h
+++ b/arch/s390/kvm/kvm-s390.h
@@ -58,6 +58,13 @@ static inline int kvm_is_ucontrol(struct kvm *kvm)
58 return 0; 58 return 0;
59#endif 59#endif
60} 60}
61
62static inline void kvm_s390_set_prefix(struct kvm_vcpu *vcpu, u32 prefix)
63{
64 vcpu->arch.sie_block->prefix = prefix & 0x7fffe000u;
65 vcpu->arch.sie_block->ihcpu = 0xffff;
66}
67
61int kvm_s390_handle_wait(struct kvm_vcpu *vcpu); 68int kvm_s390_handle_wait(struct kvm_vcpu *vcpu);
62enum hrtimer_restart kvm_s390_idle_wakeup(struct hrtimer *timer); 69enum hrtimer_restart kvm_s390_idle_wakeup(struct hrtimer *timer);
63void kvm_s390_tasklet(unsigned long parm); 70void kvm_s390_tasklet(unsigned long parm);