KVM with QEMU spawns 1 process per VM and one thread per core. The KVM code uses VMON, VMENTER etc but when Linux task switches these threads with threads of the host OS, how does that work? How does it know to switch between non root mode and normal ring 0 for instance? Is there a special register in the cpu that gets saved and restored that indicates VMX mode is on and indicates whether it is in root/non root mode? I was unable to find such a register.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.