diff options
author | Jason J. herne <jjherne@us.ibm.com> | 2012-05-15 12:15:28 (GMT) |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-05-18 00:06:03 (GMT) |
commit | 46a6dd1c87c4ff17202574127daf70cc0bb38d6d (patch) | |
tree | aa32b99750a38106918894e7e6e6164779a0d90e /arch/s390/kvm | |
parent | 29b7c71b5ecf2caaa4c2105ecc0094826db8a8a8 (diff) | |
download | linux-46a6dd1c87c4ff17202574127daf70cc0bb38d6d.tar.xz |
KVM: s390: onereg for timer related registers
Enhance the KVM ONE_REG capability within S390 to allow
getting/setting the following special cpu registers: clock comparator
and the cpu timer. These are needed for migration.
Signed-off-by: Jason J. herne <jjherne@us.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index cc4c013..664766d 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -454,6 +454,14 @@ static int kvm_arch_vcpu_ioctl_get_one_reg(struct kvm_vcpu *vcpu, r = put_user(vcpu->arch.sie_block->epoch, (u64 __user *)reg->addr); break; + case KVM_REG_S390_CPU_TIMER: + r = put_user(vcpu->arch.sie_block->cputm, + (u64 __user *)reg->addr); + break; + case KVM_REG_S390_CLOCK_COMP: + r = put_user(vcpu->arch.sie_block->ckc, + (u64 __user *)reg->addr); + break; default: break; } @@ -475,6 +483,14 @@ static int kvm_arch_vcpu_ioctl_set_one_reg(struct kvm_vcpu *vcpu, r = get_user(vcpu->arch.sie_block->epoch, (u64 __user *)reg->addr); break; + case KVM_REG_S390_CPU_TIMER: + r = get_user(vcpu->arch.sie_block->cputm, + (u64 __user *)reg->addr); + break; + case KVM_REG_S390_CLOCK_COMP: + r = get_user(vcpu->arch.sie_block->ckc, + (u64 __user *)reg->addr); + break; default: break; } |