For simple workloads it can even be faster than native unless you dynamically load something that uses bigger pages for your native program, eg. https://easyperf.net/blog/2022/09/01/Utilizing-Huge-Pages-Fo...
And none of that accounts for the increased context switch time.
What context switch time? It takes 5 micros to enter and leave the guest. The rest is just "workload".
The point is: KVM is native speed if you never have to leave. I don't need to prove this for anyone to understand it has to be true.
The guest has it's own page tables above the nested guest phys->host phys tables.
> What context switch time? It takes 5 micros to enter and leave the guest. The rest is just "workload".
And then the kernel doesn't know what to do with nearly every guest exit on KVM, so then you trap out to host user space, which then probably can't do much without the host kernel so you transition back to kernel space to actually perform whatever IO is needed, then back to host user, then back to host kernel to restart the guest, then back from host kernel to guest. So six total context swaps on a good day guest->host_kern->host_user->host_kern->host_user->host_kern->guest.
The topic of this thread is about Blink, which happens to be a userspace emulator. Hence my comment.