[<prev] [next>] [day] [month] [year] [list]
Message-ID: <1331267212.6033.rusty@rustcorp.com.au>
Date: Fri, 09 Mar 2012 14:56:52 +1030
From: Rusty Russell <rusty@...tcorp.com.au>
To: Russell King <linux@....linux.org.uk>,
linux-arm-kernel@...ts.infradead.org
CC: linux-kernel@...r.kernel.org
Subject: [PATCH 8/8] ARM: KVM: don't BUG() if guest executes smc.
From: Rusty Russell <rusty@...tcorp.com.au>
In this case, we just kill the guest.
Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>
---
arch/arm/kvm/arm.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c
index 1724657..9ef5bdb 100644
--- a/arch/arm/kvm/arm.c
+++ b/arch/arm/kvm/arm.c
@@ -367,6 +367,13 @@ static int handle_hvc(struct kvm_vcpu *vcpu, struct kvm_run *run)
return 0;
}
+static int handle_smc(struct kvm_vcpu *vcpu, struct kvm_run *run)
+{
+ /* We don't support SMC; don't do that. */
+ kvm_debug("smc: at %08x", vcpu->arch.regs.pc);
+ return -EINVAL;
+}
+
static int handle_dabt_hyp(struct kvm_vcpu *vcpu, struct kvm_run *run)
{
/* The hypervisor should never cause aborts */
@@ -386,6 +393,7 @@ static int (*arm_exit_handlers[])(struct kvm_vcpu *vcpu, struct kvm_run *r) = {
[HSR_EC_CP10_ID] = kvm_handle_cp10_id,
[HSR_EC_SVC_HYP] = handle_svc_hyp,
[HSR_EC_HVC] = handle_hvc,
+ [HSR_EC_SMC ] = handle_smc,
[HSR_EC_IABT] = kvm_handle_guest_abort,
[HSR_EC_DABT] = kvm_handle_guest_abort,
[HSR_EC_DABT_HYP] = handle_dabt_hyp,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists