Emulating LWZU Instruction for e500 powerpc

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

 



Hi
I'm trying to emulate the lwzu instruction in e500 powerpc kvm for my project . 
I've removed the read and write privileges from the tlb entries of guest's 
certain pages . So when i'm trying to emulate lwzu instruction i'm getting a 
kernel panic while mounting the guest filesystem while booting .

attempt to access beyond end of device
ram0: rw=0, want=75703268, limit=262144

To make sure that the emulation is  faulty what i'm trying to do now is at the 
time of DATA STORAGE exit on a marked page by an lwzu instruction i'm patching 
the next instruction with an instruction which will raise an INTERRUPT PROGRAM 
EXCEPTION and will get trapped in kvm and then i'm reverting the old read and 
write privileges of this page and resuming the guest so that this LWZU 
instruction can run natively . I'm expecting the immediate next instruction to 
raise the INTERRUPT PROGRAM EXCEPTION but all i'm getting are DATA STORAGE Exits 
at other pages marked by me and DTLB and ITLB misses on other addresses .

I've made sure to flush the icache after i patch using the instruction 
flush_icache_range .

Error Log :
Emulating a lwzu instruction on pc 0xc00161ac && eaddr 0xc05742f0
Original Instruction is 0x90e60004 at pc: 0xc00161b0
Modified Instruction is 0x7ce000a6 at pc: 0xc00161b0 
Exit : Interrupt DATA STORAGE at pc 0xc000f210 on eaddr:0xc000f228 instruction: 
0x8085001c

Why i'm not getting any INTERRUPT PROGRAM EXCEPTION immediately in the next 
instruction ?

-- 
Thanks and regards
Aashish Mittal


--
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