diff mbox

[1/2] KVM: PPC: Book3S HV: Add missing break statements in ONE_REG switches

Message ID 1380887104-805-2-git-send-email-paulus@samba.org
State New, archived
Headers show

Commit Message

Paul Mackerras Oct. 4, 2013, 11:45 a.m. UTC
This adds break statements after the KVM_REG_PPC_PPR case in
kvmppc_get_one_reg() and kvmppc_set_one_reg().  The error was
introduced in commit d3ecc54390 ("KVM: PPC: Book3S HV: Support POWER6
compatibility mode on POWER7").  That commit also forgot to update
Documentation/virtual/kvm/api.txt with the new one_reg identifier,
so we do that here too.

Signed-off-by: Paul Mackerras <paulus@samba.org>
---
 Documentation/virtual/kvm/api.txt | 1 +
 arch/powerpc/kvm/book3s_hv.c      | 2 ++
 2 files changed, 3 insertions(+)
diff mbox

Patch

diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
index 34a32b6..4e68169 100644
--- a/Documentation/virtual/kvm/api.txt
+++ b/Documentation/virtual/kvm/api.txt
@@ -1837,6 +1837,7 @@  registers, find a list below:
   PPC   | KVM_REG_PPC_VRSAVE	| 32
   PPC   | KVM_REG_PPC_LPCR	| 64
   PPC   | KVM_REG_PPC_PPR	| 64
+  PPC   | KVM_REG_PPC_ARCH_COMPAT 32
   PPC   | KVM_REG_PPC_TM_GPR0	| 64
           ...
   PPC   | KVM_REG_PPC_TM_GPR31	| 64
diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
index 0a50051..d3dc183 100644
--- a/arch/powerpc/kvm/book3s_hv.c
+++ b/arch/powerpc/kvm/book3s_hv.c
@@ -854,6 +854,7 @@  int kvmppc_get_one_reg(struct kvm_vcpu *vcpu, u64 id, union kvmppc_one_reg *val)
 		break;
 	case KVM_REG_PPC_PPR:
 		*val = get_reg_val(id, vcpu->arch.ppr);
+		break;
 	case KVM_REG_PPC_ARCH_COMPAT:
 		*val = get_reg_val(id, vcpu->arch.vcore->arch_compat);
 		break;
@@ -966,6 +967,7 @@  int kvmppc_set_one_reg(struct kvm_vcpu *vcpu, u64 id, union kvmppc_one_reg *val)
 		break;
 	case KVM_REG_PPC_PPR:
 		vcpu->arch.ppr = set_reg_val(id, *val);
+		break;
 	case KVM_REG_PPC_ARCH_COMPAT:
 		r = kvmppc_set_arch_compat(vcpu, set_reg_val(id, *val));
 		break;