summaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm/kvm-s390.c
diff options
context:
space:
mode:
authorChristian Borntraeger2012-01-11 11:19:32 +0100
committerAvi Kivity2012-03-05 13:52:21 +0100
commit8d26cf7b40b1648c39e77a113dac07ad31363120 (patch)
tree90aae47b22f248740f8802f2fdc6e28bdca0341b /arch/s390/kvm/kvm-s390.c
parentKVM: SVM: Add support for AMD's OSVW feature in guests (diff)
downloadkernel-qcow2-linux-8d26cf7b40b1648c39e77a113dac07ad31363120.tar.gz
kernel-qcow2-linux-8d26cf7b40b1648c39e77a113dac07ad31363120.tar.xz
kernel-qcow2-linux-8d26cf7b40b1648c39e77a113dac07ad31363120.zip
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.c')
-rw-r--r--arch/s390/kvm/kvm-s390.c3
1 files changed, 1 insertions, 2 deletions
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)
/* this equals initial cpu reset in pop, but we don't switch to ESA */
vcpu->arch.sie_block->gpsw.mask = 0UL;
vcpu->arch.sie_block->gpsw.addr = 0UL;
- vcpu->arch.sie_block->prefix = 0UL;
- vcpu->arch.sie_block->ihcpu = 0xffff;
+ kvm_s390_set_prefix(vcpu, 0);
vcpu->arch.sie_block->cputm = 0UL;
vcpu->arch.sie_block->ckc = 0UL;
vcpu->arch.sie_block->todpr = 0;