On Fri, 2009-03-06 at 17:47 -0500, Christoffer Dall wrote: > Hi. > > We are a small group trying to port KVM to ARM and taking inspiration > in the work done for PowerPC. > > We are just beginning to understand KVM, so bear with us for noob > questions. We are willing to put a lot of work into this though. Sounds like fun. > When going through the code in booke_interrupts.S, I can see that the > execution of code is performed by the rfi instruction, which jumps to > the location stored in the vcpu struct, but I cannot see how the > actual code to run is ever loaded in that place. > > I have tried going through the userspace code as well, but I am unsure > if loading the code for execution happens through mmap, a page fault > signal or ...? Guest code is just copied into place by userspace. Probably the easiest example of this is in user/main-ppc.c, which just loads a flat binary. (Qemu has loaders for ELF and uImages.) Userspace allocates memory, then tells the kernel where that is (look for memslot registration). -- Hollis Blanchard IBM Linux Technology Center -- 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