KVM: powerpc: beyond ARRAY_SIZE of vcpu->arch.guest_tlb
Subsystems (3)
PATCH 1/1 KVM: powerpc: beyond ARRAY_SIZE of vcpu->arch.guest_tlb
Do not go beyond ARRAY_SIZE of vcpu->arch.guest_tlb
Signed-off-by Roel Kluin <[email protected]>
---
arch/powerpc/kvm/emulate.c +1 -1
@@ -125,7 +125,7 @@ static int kvmppc_emul_tlbwe(struct kvm_vcpu *vcpu, u32 inst) ws =get_ws (inst); index = vcpu->arch.gpr[ra]; -if (index > PPC44x_TLB_SIZE) { +if (index >= PPC44x_TLB_SIZE) {printk ("%s: index %d\n" , __func__, index);kvmppc_dump_vcpu (vcpu);return EMULATE_FAIL ;
Quoted 10 lines · Roel Kluin
Do not go beyond
ARRAY_SIZEofvcpu->arch.guest_tlbSigned-off-by Roel Kluin <[email protected]>---
arch/powerpc/kvm/emulate.c +0
-0
arch/powerpc/kvm/emulate.c static int kvmppc_emul_tlbwe(struct kvm_vcpu *vcpu, u32 inst) · line 131
Quoted 8 lines
arch/powerpc/kvm/emulate.c +1
-1@@ -125,7 +125,7 @@ static int kvmppc_emul_tlbwe(struct kvm_vcpu *vcpu, u32 inst) ws =get_ws (inst); index = vcpu->arch.gpr[ra]; -if (index > PPC44x_TLB_SIZE) { +if (index >= PPC44x_TLB_SIZE) {printk ("%s: index %d\n" , __func__, index);kvmppc_dump_vcpu (vcpu);return EMULATE_FAIL ;
This code no longer exists in kvm.git.
Signature · 1 line
error compiling committee.c: too many arguments to function