diff options
-rw-r--r-- | arch/s390/kvm/interrupt.c | 3 | ||||
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 3 | ||||
-rw-r--r-- | arch/s390/kvm/kvm-s390.h | 7 | ||||
-rw-r--r-- | arch/s390/kvm/priv.c | 3 |
4 files changed, 10 insertions, 6 deletions
diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c index 278ee009ce65..c6366cfb3bf0 100644 --- a/arch/s390/kvm/interrupt.c +++ b/arch/s390/kvm/interrupt.c | |||
@@ -236,8 +236,7 @@ static void __do_deliver_interrupt(struct kvm_vcpu *vcpu, | |||
236 | VCPU_EVENT(vcpu, 4, "interrupt: set prefix to %x", | 236 | VCPU_EVENT(vcpu, 4, "interrupt: set prefix to %x", |
237 | inti->prefix.address); | 237 | inti->prefix.address); |
238 | vcpu->stat.deliver_prefix_signal++; | 238 | vcpu->stat.deliver_prefix_signal++; |
239 | vcpu->arch.sie_block->prefix = inti->prefix.address; | 239 | kvm_s390_set_prefix(vcpu, inti->prefix.address); |
240 | vcpu->arch.sie_block->ihcpu = 0xffff; | ||
241 | break; | 240 | break; |
242 | 241 | ||
243 | case KVM_S390_RESTART: | 242 | case KVM_S390_RESTART: |
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index a33b44487540..1868b89a840f 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -322,8 +322,7 @@ static void kvm_s390_vcpu_initial_reset(struct kvm_vcpu *vcpu) | |||
322 | /* this equals initial cpu reset in pop, but we don't switch to ESA */ | 322 | /* this equals initial cpu reset in pop, but we don't switch to ESA */ |
323 | vcpu->arch.sie_block->gpsw.mask = 0UL; | 323 | vcpu->arch.sie_block->gpsw.mask = 0UL; |
324 | vcpu->arch.sie_block->gpsw.addr = 0UL; | 324 | vcpu->arch.sie_block->gpsw.addr = 0UL; |
325 | vcpu->arch.sie_block->prefix = 0UL; | 325 | kvm_s390_set_prefix(vcpu, 0); |
326 | vcpu->arch.sie_block->ihcpu = 0xffff; | ||
327 | vcpu->arch.sie_block->cputm = 0UL; | 326 | vcpu->arch.sie_block->cputm = 0UL; |
328 | vcpu->arch.sie_block->ckc = 0UL; | 327 | vcpu->arch.sie_block->ckc = 0UL; |
329 | vcpu->arch.sie_block->todpr = 0; | 328 | vcpu->arch.sie_block->todpr = 0; |
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 | |||
62 | static 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 | |||
61 | int kvm_s390_handle_wait(struct kvm_vcpu *vcpu); | 68 | int kvm_s390_handle_wait(struct kvm_vcpu *vcpu); |
62 | enum hrtimer_restart kvm_s390_idle_wakeup(struct hrtimer *timer); | 69 | enum hrtimer_restart kvm_s390_idle_wakeup(struct hrtimer *timer); |
63 | void kvm_s390_tasklet(unsigned long parm); | 70 | void kvm_s390_tasklet(unsigned long parm); |
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index d02638959922..9c83b8a53843 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
@@ -56,8 +56,7 @@ static int handle_set_prefix(struct kvm_vcpu *vcpu) | |||
56 | goto out; | 56 | goto out; |
57 | } | 57 | } |
58 | 58 | ||
59 | vcpu->arch.sie_block->prefix = address; | 59 | kvm_s390_set_prefix(vcpu, address); |
60 | vcpu->arch.sie_block->ihcpu = 0xffff; | ||
61 | 60 | ||
62 | VCPU_EVENT(vcpu, 5, "setting prefix to %x", address); | 61 | VCPU_EVENT(vcpu, 5, "setting prefix to %x", address); |
63 | out: | 62 | out: |