Hi Everyone,

I've just pushed my kvm+x86 patches to github. The KVM patches are in the 'kvm-x86' branch [1]. I have rebased them onto the current gem5 master. I have made sure that they build and run, but haven't done any extensive testing after rebasing.

The kvm+x86 branch provides basic functionality, such as interfacing with gem'5 device models and checkpointing. CPU switching works, but will be unstable due to missing/broken x87/SSE support (mainly missing fxsave/fxrstor). I have a bunch of x87 in the fixes-x87 [2] branch that add support for fxsave/fxrstor and fix the load/store instructions. This is needed for stable switching.

I have tested both normal CPU switching and CPU switching by loading checkpoints from simulated CPUs directly into the KVM-based CPU. Both used to work, but I suspect that the latter might be broken due to TLB checkpointing. Loading the checkpoint is likely to work, but switching back to a simulated CPU will probably break since the TLB will be stale.

Another issue is the current lack of pseudo inst support. We should support this without requiring a patched host kernel and preferably without a patched guest kernel. The approach taken by other KVM-based software is to use virtual PCI devices. We could do that, but it would be unnecessarily complicated (requiring PCI interaction in the guest and potentially making a mess out of the gem5 memory system). The approach I'm currently using is by (ab)using the support for memory mapped IPRs. I have a proof-of-concept implementation in the mem-pseudo [3] branch. On x86, I simply map 0xFFFF0000-0xFFFFFFFF to a magic range of IPRs. A 64-bit read from 0xFFFFxxyy returns the result of a call to m5op function xx and subfunction.

Both the kvm-x86 branch and the fixes-x87 branch depend on support for the __float80 type in gcc. I plan to fix that before submitting the affected changesets for review.

//Andreas

[1] https://github.com/andysan/gem5/tree/kvm-x86
[2] https://github.com/andysan/gem5/tree/fixes-x87
[3] https://github.com/andysan/gem5/tree/mem-pseudo
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to