Did the "TCG" emulation mode has a full capability compare with the "KVM" emulation mode?
Hello folks:
I have a puzzle on qemu major two emuation implentions on whole system emulation, that is ,except the emuation speed, did the TCG work mode has any weakness than "KVM" work mode on whole system emulations(including kernek and user-space)? is there any work that kvm can do but TCG cant?
of course kvm is much faster than TCG, but my question just about the funtion, not care about speed.
thanks for your kindly help!
BRs
zilong.
Quoted 4 lines · tugouxp
Hello folks:
I have a puzzle on qemu major two emuation implentions on whole system emulation, that is ,except the emuation speed,
did the TCG work mode has any weakness than "KVM" work mode on whole system emulations(including kernek and user-space)?
It depends on the guest architecture. Some are more complete than others. The x86 emulation for example doesn't cover all the modern x86 extensions although there have been some improvements to its vector handling recently.
One thing TCG can do that KVM can't is emulate code running at higher priority than kernel-mode. For example for ARM we can emulate the EL3/Root domain and secure and confidential realms. In KVM you can only run a guest EL1 kernel and its user space.
Quoted 7 lines
is there any work that kvm can do but TCG cant?
of course kvm is much faster than TCG, but my question just about the funtion, not care about speed.
thanks for your kindly help!
BRs
zilong.
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
Thank you!
BTW, TCG also has two backends implemention, 1. Native host arch tranlation. and 2. TCI byte code interpreter. The difference is that the first one will tranlation the target arch code to host arch instrtions and then executed in host cpu. but the latter is a high level interperation. compare these two backends, Are there any capability difference on the system emulation about the two backends? thank you.
Quoted 28 lines · Alex Bennée
Quoted 4 lines · tugouxp
Hello folks:
I have a puzzle on qemu major two emuation implentions on whole system emulation, that is ,except the emuation speed,
did the TCG work mode has any weakness than "KVM" work mode on whole system emulations(including kernek and user-space)?It depends on the guest architecture. Some are more complete than others. The x86 emulation for example doesn't cover all the modern x86 extensions although there have been some improvements to its vector handling recently.
One thing TCG can do that KVM can't is emulate code running at higher priority than kernel-mode. For example for ARM we can emulate the EL3/Root domain and secure and confidential realms. In KVM you can only run a guest EL1 kernel and its user space.
Quoted 7 lines
is there any work that kvm can do but TCG cant?
of course kvm is much faster than TCG, but my question just about the funtion, not care about speed.
thanks for your kindly help!
BRs
zilong.Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
Quoted 6 lines · tugouxp
Thank you!
BTW, TCG also has two backends implemention, 1. Native host arch tranlation. and 2. TCI byte code interpreter. The difference is that the first one will tranlation the target arch code to host arch instrtions and then executed in host cpu. but the latter is a high level interperation. compare these two backends, Are there any capability difference on the system emulation about the two backends? thank you.
No - TCI is just a slower fallback to interpret TCG ops directly compared to executing JITed code.
Quoted 30 lines
Quoted 28 lines · Alex Bennée
Quoted 4 lines · tugouxp
Hello folks:
I have a puzzle on qemu major two emuation implentions on whole system emulation, that is ,except the emuation speed,
did the TCG work mode has any weakness than "KVM" work mode on whole system emulations(including kernek and user-space)?It depends on the guest architecture. Some are more complete than others. The x86 emulation for example doesn't cover all the modern x86 extensions although there have been some improvements to its vector handling recently.
One thing TCG can do that KVM can't is emulate code running at higher priority than kernel-mode. For example for ARM we can emulate the EL3/Root domain and secure and confidential realms. In KVM you can only run a guest EL1 kernel and its user space.
Quoted 7 lines
is there any work that kvm can do but TCG cant?
of course kvm is much faster than TCG, but my question just about the funtion, not care about speed.
thanks for your kindly help!
BRs
zilong.Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro