Is that enough? What should I do with mappings (NPT in particular caused me questions), devices?
... you need to save and restore device state. Jacek Galowicz has implemented this already. For a short overview of what he did check: https://github.com/TUD-OS/seoul/issues/12
I understand that issue. But I do not understand how multiboot/vbios part works. Can you explain me what happens from handle_cpu_init (cpu.cc) to main function (or __start ) of munich. I.e. in range from message "reset CPU state" and first console message of Munich. I do not need full detailed description, just main idea. I stuck on very early stage of VM booting. I see intensive messaging of VBios, Lapic, RTC, Serial, I have got several traps (I count svm_invalid trap), but I seriously do not see the reason, the code that trigger traps.
I'm wrong. nvm
I understand the VMM-specific code will be published at some point.
What is the cpu state in receive function of vbios_multiboot? Is it a beginning state of VM, when the Munech is uploaded?
This function is called whenever some code issues int 19h to (re)start the BIOS boot procedure. Initially this is called by the vBIOS itself. I am not sure what you mean with your second question.