loongson-dune
loongson-dune copied to clipboard
:zap: Process virtualization based on KVM. More useable, stable and practical than Stanford Dune.
The most tricky part is about CSR initialization, which we can refer to Stanford dune.
``` [182208.357867] kvm [22087]: kvm_mips_handle_exit : cause register = 40008000 exit_reason=0 [182208.357926] kvm [22087]: kvm_mips_handle_exit: cause: 0x10804000, PC: 1200018c8, kvm_run: 00000000a3f95d25, kvm_vcpu: 000000001c3b428a cause=40008000 [182208.357931] kvm [22087]: [0]EXCCODE_INT @ 1200018c8...
从 vcpu_load 的位置切换到 kvm_vz_vcpu_run 大大的减少了发生错误的情况,但是还是存在一些这种情况。 - 至少说明,现在这些情况的确是由于 timerid 的刷新导致的 - 既然 vcpu_load 的实现总是正确的,那么这种同步为什么出错?
- [ ] find the book : Dynamic Binary Modification - [ ] how x86 dune take advantage of minimal loader, why not create a similar project for this? -...
- [ ] how we set up GPR and csr of new process?
- [ ] a special syscall to escape to host - [ ] a setjmp and long jump to just to where issue the syscall.
- https://stackoverflow.com/questions/18863199/gcc-inline-asm-jump-to-a-label-with-crossing-throwing-an-exception - [ ] in `savereg.c`, we should use `m` instead of `r`, so we will not pollute the regsiter