Re: Emulating LWZU Instruction for e500 powerpc

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

 



On 19.08.2011, at 06:45, Aashish Mittal wrote:

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

Hrm. Are you sure you're actually modifying the instruction? This looks like you're running Linux, so you could try and just put a "b ." instruction right after the instruction you're trying to patch up and examine memory from Qemu :)


Alex

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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux