aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2013-09-20 00:52:37 -0400
committerAlexander Graf <agraf@suse.de>2013-10-17 08:45:01 -0400
commit8b75cbbe647603f2b3c17ead35ee3cefa88397e7 (patch)
tree63bab4a2add9e330a118c2b5d44f89f0cae548d1 /arch/powerpc/kvm
parent8c2dbb79c62e9da4857b873435925d3654d9fccd (diff)
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')
-rw-r--r--arch/powerpc/kvm/booke.c6
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)
1479 case KVM_REG_PPC_DEBUG_INST: 1479 case KVM_REG_PPC_DEBUG_INST:
1480 val = get_reg_val(reg->id, KVMPPC_INST_EHPRIV); 1480 val = get_reg_val(reg->id, KVMPPC_INST_EHPRIV);
1481 break; 1481 break;
1482 case KVM_REG_PPC_VRSAVE:
1483 val = get_reg_val(reg->id, vcpu->arch.vrsave);
1484 break;
1482 default: 1485 default:
1483 r = kvmppc_get_one_reg(vcpu, reg->id, &val); 1486 r = kvmppc_get_one_reg(vcpu, reg->id, &val);
1484 break; 1487 break;
@@ -1552,6 +1555,9 @@ int kvm_vcpu_ioctl_set_one_reg(struct kvm_vcpu *vcpu, struct kvm_one_reg *reg)
1552 kvmppc_set_tcr(vcpu, tcr); 1555 kvmppc_set_tcr(vcpu, tcr);
1553 break; 1556 break;
1554 } 1557 }
1558 case KVM_REG_PPC_VRSAVE:
1559 vcpu->arch.vrsave = set_reg_val(reg->id, val);
1560 break;
1555 default: 1561 default:
1556 r = kvmppc_set_one_reg(vcpu, reg->id, &val); 1562 r = kvmppc_set_one_reg(vcpu, reg->id, &val);
1557 break; 1563 break;