Skip to contentSkip to conversation

KVM: PPC: Only WARN on invalid emulation

PATCH New Alexander Graf 1 participant 1 message Dec 14, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: PPC: Only WARN on invalid emulation

When we hit an emulation result that we didn't expect, that is an error, but it's nothing that warrants a BUG(), because it can be guest triggered.

So instead, let's only WARN() the user that this happened.

arch/powerpc/kvm/powerpc.c +2 -1
index be83fca..e2225e5 100644
@@ -237,7 +237,8 @@ int kvmppc_emulate_mmio(struct kvm_run *run, struct kvm_vcpu *vcpu)
 		r = RESUME_HOST;
 		break;
 	default:
-		BUG();
+		WARN_ON(1);
+		r = RESUME_GUEST;
 	}
 
 	return r;