Does the QEMU Architectural View Accurately Represent QEMU/KVM Relationships?

  • Thread starter Thread starter cianfa72
  • Start date Start date
Click For Summary
SUMMARY

The discussion centers on the accuracy of the QEMU architectural view in representing the relationships between QEMU and KVM. It highlights that while QEMU operates effectively without hardware acceleration using TCG dynamic translation, the integration of KVM utilizes CPU virtualization support, such as Intel VT-x. This introduces distinct operational modes, specifically VMX root and VMX non-root modes, which complicate the representation of the guest and host relationship in diagrams. The participants agree that while the diagram may be useful, it can also lead to confusion regarding the actual operational dynamics.

PREREQUISITES
  • Understanding of QEMU architecture and its components
  • Familiarity with KVM (Kernel-based Virtual Machine) and its functionalities
  • Knowledge of CPU virtualization technologies, specifically Intel VT-x
  • Concepts of TCG (Tiny Code Generator) and dynamic translation in virtualization
NEXT STEPS
  • Research the differences between QEMU and KVM architectures
  • Explore Intel VT-x and its role in CPU virtualization
  • Learn about TCG dynamic translation and its implications for performance
  • Investigate best practices for visualizing complex virtualization architectures
USEFUL FOR

This discussion is beneficial for virtualization engineers, system architects, and developers working with QEMU and KVM, as well as anyone interested in understanding the complexities of CPU virtualization and its architectural representations.

cianfa72
Messages
2,953
Reaction score
308
TL;DR
About the QEMU/KVM virtualization architectural view
Hi,

I've a doubt about the QEMU architectural view as depicted in the following (and similar) pictures -- e.g. https://www.redhat.com/en/blog/introduction-virtio-networking-and-vhost-net.

2019-09-10-virtio-intro-fig1.jpg


To me this view makes sense for 'plane QEMU' only since it has not any homework acceleration (i.e. KVM). In fact, without any homework acceleration, QEMU employs TCG dynamic translation even if the emulated CPU (vCPU) is the same as the host physical CPU.

On the other hand QEMU/KVM leverages on CPU virtualization support (e.g. Intel VT-x) that provide root and non-root (guest) modes (e.g. VMX root vs VMX non-root mode). In that case CPU guest mode (VMX non-root) has got its own User and Kernel mode (Ring 3 vs Ring 0) so I believe that picture actually does not make sense -- since the Guest is not inside the the Host User mode.

What do you think about ?

p.s. same question is posted on other forum.
 
Technology news on Phys.org
Any feedback about it ?
 
These are complicated relationships which cannot be completely expressed in a diagram, even with pretty colours.

I think the diagram is fine, but if it is confusing you then just ignore it.