diff options
author | Thomas Huth <thuth@linux.vnet.ibm.com> | 2013-11-13 14:28:18 -0500 |
---|---|---|
committer | Cornelia Huck <cornelia.huck@de.ibm.com> | 2013-11-28 05:08:14 -0500 |
commit | 178bd789775ab29233e0553155253ec8d73af71f (patch) | |
tree | 36f0c7923321096b9a3f807da9afacb088f67bb5 /arch/s390/kvm | |
parent | e879892c725217a4af1012f31ae56be762473216 (diff) |
KVM: s390: Fix clock comparator field for STORE STATUS
Only the most 7 significant bytes of the clock comparator must be
saved to the status area, and the byte at offset 304 has to be zero.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index 55eb8dec2a77..1bb1ddaf93c0 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -877,6 +877,7 @@ int kvm_s390_store_status_unloaded(struct kvm_vcpu *vcpu, unsigned long addr) | |||
877 | { | 877 | { |
878 | unsigned char archmode = 1; | 878 | unsigned char archmode = 1; |
879 | int prefix; | 879 | int prefix; |
880 | u64 clkcomp; | ||
880 | 881 | ||
881 | if (addr == KVM_S390_STORE_STATUS_NOADDR) { | 882 | if (addr == KVM_S390_STORE_STATUS_NOADDR) { |
882 | if (copy_to_guest_absolute(vcpu, 163ul, &archmode, 1)) | 883 | if (copy_to_guest_absolute(vcpu, 163ul, &archmode, 1)) |
@@ -920,8 +921,9 @@ int kvm_s390_store_status_unloaded(struct kvm_vcpu *vcpu, unsigned long addr) | |||
920 | &vcpu->arch.sie_block->cputm, 8, prefix)) | 921 | &vcpu->arch.sie_block->cputm, 8, prefix)) |
921 | return -EFAULT; | 922 | return -EFAULT; |
922 | 923 | ||
924 | clkcomp = vcpu->arch.sie_block->ckc >> 8; | ||
923 | if (__guestcopy(vcpu, addr + offsetof(struct save_area, clk_cmp), | 925 | if (__guestcopy(vcpu, addr + offsetof(struct save_area, clk_cmp), |
924 | &vcpu->arch.sie_block->ckc, 8, prefix)) | 926 | &clkcomp, 8, prefix)) |
925 | return -EFAULT; | 927 | return -EFAULT; |
926 | 928 | ||
927 | if (__guestcopy(vcpu, addr + offsetof(struct save_area, acc_regs), | 929 | if (__guestcopy(vcpu, addr + offsetof(struct save_area, acc_regs), |