Is xen dom0 a guest or a host?

6.1k Views Asked by At

I always thought that xen dom0 is a host and hosts other domU s.

On the xen wiki page they mention xen dom0 as a Host OS.

However in one of the xen dev list threads, xen developer mentioned that dom0 is a PV guest.

In this thread the last reply on the thread is

"Yes. That is expected with HVM guests. Their syscall overhead and also memory bandwith will be faster than PV guests (which is what dom0 is). That is why PVH is such an intersting future direction - it is PV with HVM containers to lower the syscall overhead and memory page table operations. "

So my question is:

  1. Is xen dom0 a guest or host ?
  2. If it is a guest then is there a HVM dom0 ?
4

There are 4 best solutions below

0
On

Dom0 is a guest! Confirmed by Jugen Gross(Jürgen Groß ) who is a Xen guru.

Xen is a type 1 hypervisor, so dom0 is a guest. It has special privileges, but its ressources are controlled by the hypervisor.

0
On
  1. Is xen dom0 a guest or host ? It's a host.

  2. If it is a guest then is there a HVM dom0 ? No. It is the PV domain. Only domU can be HVM. Dom0 has to handle the management by using hypercall. If it's HVM, the performance will be affected.

0
On
  1. With Bare Metal Hypervisors like xen all domains are "Guests". They don't run the scheduler in their domain, the page table is managed by the hypervisor not the domain, etc. (unlike i.e. with KVM or Virtualbox)
  2. Dom0 cannot be HVM as a HVM requires certain features provided by Dom0

HVM means the Domain is not VM-aware, so you can install just about any OS and it will run without being tailored to be run as a VM. This requires some things which are not hardware-virtualized per se, i.e. soundcard, graphics card, network card, etc. to be emulated by Dom0. In Xen this is where QEMU comes into play - it emulates things that have no hardware virtualization like the CPU does. So a Operating System running as HVM will access the network/soundcard etc. like it would with a Physical Host. Dom0 emulates the hardware response and thus takes some performance for this.

A PV (Paravirtualized) Domain is, at least to some degree, aware that it is running in a Virtual Environment. You can for example use a Paravirtualized driver for the network, so it will use hypercalls instead of trying to talk directly to the hardware.

0
On

Dom0 is essentially a virtual machine running ontop of the bare metal hypervisor, it runs with higher privileges for management purposes.

Other domains run under the hypervisor coexisting with dom0, not ontop of it.