[PATCH] KVM: ARM: Fix walk_cp15() logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We need to exhaust both tables we're walking: without this fix, we would
not report all the CP15 registers for KVM_GET_VCPU_MSR_INDEX_LIST.

Signed-off-by: Rusty Russell <rusty.russell@xxxxxxxxxx>

diff --git a/arch/arm/kvm/coproc.c b/arch/arm/kvm/coproc.c
index b454335..5fb1248 100644
--- a/arch/arm/kvm/coproc.c
+++ b/arch/arm/kvm/coproc.c
@@ -850,7 +850,7 @@ static int walk_cp15(struct kvm_vcpu *vcpu, u64 __user *uind)
 	BUG_ON(i1 == end1 || i2 == end2);
 
 	/* Walk carefully, as both tables may refer to the same register. */
-	while (i1 && i2) {
+	while (i1 || i2) {
 		int cmp = cmp_reg(i1, i2);
 		/* target-specific overrides generic entry. */
 		if (cmp <= 0) {
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm


[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux