[PATCH 05/10] KVM: ARM: VGIC: Inject an undefined instruction exception to VM while the mmio access len overlap 4.

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

 



It will be better to tell guest that there is something wrong with the instruction,
than that there is something wrong with the vgic address area.

Signed-off-by: wanghaibin <wanghaibin.wang@xxxxxxxxxx>
---
 virt/kvm/arm/vgic.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/virt/kvm/arm/vgic.c b/virt/kvm/arm/vgic.c
index d6a6c05..ec2192d 100644
--- a/virt/kvm/arm/vgic.c
+++ b/virt/kvm/arm/vgic.c
@@ -1057,7 +1057,8 @@ bool vgic_handle_mmio(struct kvm_vcpu *vcpu, struct kvm_run *run,
 
 	/* We don't support ldrd / strd or ldm / stm to the emulated vgic */
 	if (mmio->len > 4) {
-		kvm_inject_dabt(vcpu, mmio->phys_addr);
+		kvm_err("VGIC: Don't support the ldrd / strd or ldm / stm instructions \n");
+		kvm_inject_undefined(vcpu);
 		return true;
 	}
 
-- 
1.7.1


_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/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