Re: Query about SPE operation fault in e500v2 KVM. thanks.

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

 



On 31.01.2013, at 13:17, Gao Guanhua-B22826 wrote:

> Hello all,
> 
> I met a problem of SPE operation in PowerPC e500v2 KVM, could anyone help to check or provide some suggestions? Thank you.
> 
> Test platform: P1024RDB (e500v2)
> Kernel version: Linux p1024rdb 3.0.51-rt75
> Test case description:
> Use SPE to handle data that not aligned in guest. When I execute the case, host will report call_trace and guest will be hung.
> 
> Test log:
> 
> Host:
> root@p1024rdb:/media/ram# qemu-system-ppc -enable-kvm -nographic -M ppce500v2 -kernel uImage.ppce500v2-kvm -initrd /media/ram/fsl-image-core-p1024rdb.ext2.gz -append "root=/dev/ram rw console=ttyS0,115200" -serial tcp::4444,server,telnet -dtb /usr/share/qemu/ppce500v2.dtb -m 256 -net nic,macaddr=52:54:00:12:34:66 -net tap,script=qemu-ifup -monitor /dev/null & [1] 2264 Created kernel irqchip root@p1024rdb:/media/ram# test for existing bridge br0 BusyBox v1.19.4 (2013-01-26 00:01:45 CST) multi-call binary.
> 
> Usage: brctl COMMAND [BRIDGE [INTERFACE]]
> 
> need to create bridge br0
> br0: port 1(eth0) entering forwarding state
> brctl: bridge br0: File exists
> br0: port 1(eth0) entering forwarding state
> br0: port 1(eth0) entering forwarding state
> brctl: bridge br0: Device or resource busy created bridge br0
> bridge name     bridge id               STP enabled     interfaces
> br0             8000.00e00c00de00       no              eth0
> device tap0 entered promiscuous mode
> br0: port 2(tap0) entering forwarding state
> br0: port 2(tap0) entering forwarding state QEMU waiting for connection on: telnet:0.0.0.0:4444,server
> PHY: mdio@ffe24000:02 - Link is Up - 1000/Full
> eth0: no IPv6 routers present
> tap0: no IPv6 routers present
> br0: port 1(eth0) entering forwarding state
> br0: port 2(tap0) entering forwarding state
> 
> root@p1024rdb:/media/ram# exit_nr 5
> ------------[ cut here ]------------
> kernel BUG at arch/powerpc/kvm/booke.c:1273!

That means we don't handle ALIGNMENT exits. Could you please check whether the below (completely untested) patch makes this work?


Alex

diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
index d2f502d..38a62ef 100644
--- a/arch/powerpc/kvm/booke.c
+++ b/arch/powerpc/kvm/booke.c
@@ -182,6 +182,14 @@ static void kvmppc_core_queue_inst_storage(struct kvm_vcpu *vcpu,
 	kvmppc_booke_queue_irqprio(vcpu, BOOKE_IRQPRIO_INST_STORAGE);
 }
 
+static void kvmppc_core_queue_alignment(struct kvm_vcpu *vcpu, ulong dear_flags,
+					ulong esr_flags)
+{
+	vcpu->arch.queued_dear = dear_flags;
+	vcpu->arch.queued_esr = esr_flags;
+	kvmppc_booke_queue_irqprio(vcpu, BOOKE_IRQPRIO_ALIGNMENT);
+}
+
 void kvmppc_core_queue_program(struct kvm_vcpu *vcpu, ulong esr_flags)
 {
 	vcpu->arch.queued_esr = esr_flags;
@@ -971,6 +979,12 @@ int kvmppc_handle_exit(struct kvm_run *run, struct kvm_vcpu *vcpu,
 		r = RESUME_GUEST;
 		break;
 
+	case BOOKE_INTERRUPT_ALIGNMENT:
+		kvmppc_core_queue_alignment(vcpu, vcpu->arch.fault_dear,
+		                            vcpu->arch.fault_esr);
+		r = RESUME_GUEST;
+		break;
+
 #ifdef CONFIG_KVM_BOOKE_HV
 	case BOOKE_INTERRUPT_HV_SYSCALL:
 		if (!(vcpu->arch.shared->msr & MSR_PR)) {

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux