Hi ARM folks. I'm trying to rationalize the various ways pseudo instructions are done in KVM, fast models and native gem5 CPUs, and obviate the magical address range they sometimes use. KVM has turned out to be a very tricky case since there isn't really a great way to wrestle control out of the VM based on executing a particular instruction, specifically in a way that doesn't require external knowledge (magical address range) or potentially blow up the VM.
My best solution for 32 bit is to call a non-existent system call with the semihosting-ish immediate and a dummy semihosting call that just returns success. If it comes back as success, semihosting is how to call pseudo instructions. If it comes back -ENOSYS, then you're in KVM by process of elimination, and you should use a BRK or BKPT with an appropriate immediate which KVM does seem to have an exit for. For 64 bit, the semihosting instruction is actually HLT. I can't for the life of me find any documentation that says what will happen if you call HLT in KVM mode. Fire and brimstone? Nothing? A debug exit? The mechanism will likely be like in the 32 bit case but with slightly different instructions if this works out favorably. I'm trying to get something set up to determine what happens experimentally, but I figured it wouldn't hurt to ask at the source. So what happens when a KVM guest executes a HLT? Gabe _______________________________________________ gem5-dev mailing list gem5-dev@gem5.org http://m5sim.org/mailman/listinfo/gem5-dev