All of lore.kernel.org
 help / color / mirror / Atom feed
* Emulating LWZU Instruction for e500 powerpc
@ 2011-08-19 11:45 Aashish Mittal
  2011-08-24 22:34   ` Alexander Graf
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Aashish Mittal @ 2011-08-19 11:45 UTC (permalink / raw)
  To: kvm-ppc

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, wantu703268, limit&2144

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-08-25 16:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-19 11:45 Emulating LWZU Instruction for e500 powerpc Aashish Mittal
2011-08-24 22:34 ` Alexander Graf
2011-08-24 22:34   ` Alexander Graf
     [not found]   ` <CAAonZCFpf9Nv1deAafSagDPjRoLWa3haAuH4Puz1Dksmnd62ng@mail.gmail.com>
2011-08-25 14:44     ` Alexander Graf
2011-08-25 14:44       ` Alexander Graf
2011-08-25  9:31 ` Aashish Mittal
2011-08-25 16:44 ` Scott Wood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.