diff options
author | Paul Mackerras <paulus@samba.org> | 2013-09-20 08:52:37 +0400 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-10-17 16:45:01 +0400 |
commit | 8b75cbbe647603f2b3c17ead35ee3cefa88397e7 (patch) | |
tree | 63bab4a2add9e330a118c2b5d44f89f0cae548d1 /arch/powerpc/kvm/booke.c | |
parent | 8c2dbb79c62e9da4857b873435925d3654d9fccd (diff) | |
download | linux-8b75cbbe647603f2b3c17ead35ee3cefa88397e7.tar.xz |
KVM: PPC: BookE: Add GET/SET_ONE_REG interface for VRSAVE
This makes the VRSAVE register value for a vcpu accessible through
the GET/SET_ONE_REG interface on Book E systems (in addition to the
existing GET/SET_SREGS interface), for consistency with Book 3S.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/kvm/booke.c')
-rw-r--r-- | arch/powerpc/kvm/booke.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c index 17722d82f1d1..65fa7754b194 100644 --- a/arch/powerpc/kvm/booke.c +++ b/arch/powerpc/kvm/booke.c @@ -1479,6 +1479,9 @@ int kvm_vcpu_ioctl_get_one_reg(struct kvm_vcpu *vcpu, struct kvm_one_reg *reg) case KVM_REG_PPC_DEBUG_INST: val = get_reg_val(reg->id, KVMPPC_INST_EHPRIV); break; + case KVM_REG_PPC_VRSAVE: + val = get_reg_val(reg->id, vcpu->arch.vrsave); + break; default: r = kvmppc_get_one_reg(vcpu, reg->id, &val); break; @@ -1552,6 +1555,9 @@ int kvm_vcpu_ioctl_set_one_reg(struct kvm_vcpu *vcpu, struct kvm_one_reg *reg) kvmppc_set_tcr(vcpu, tcr); break; } + case KVM_REG_PPC_VRSAVE: + vcpu->arch.vrsave = set_reg_val(reg->id, val); + break; default: r = kvmppc_set_one_reg(vcpu, reg->id, &val); break; |