Re: Paravirt KVM capabilities

Ingo Molnar
2007-01-10T11:14:42Z

* Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:

> For i386 Xen does not switch cr3 IIRC. [...]

correct.

> [...] Perhaps even not for x86_64 if it can use the segment limits
> which AMD re-added (I think it does?)

i'm not sure. Older ones definitely used cr3 switching and on Intel
there's no segment limits on 64-bit AFAIK.

> I think for i386 Xen does not go through the hypervisor at all: it
> hacks int 0x80 to trap directly to ring 1. So there's still the
> overhead of using int rather than sysenter, but not much more. [...]

that alone is already ~100-200 cycles overhead, it essentially doubles
the null syscall overhead. It matters at millions of syscalls per second
workloads, 100 cycles overhead at 1 million syscalls a second means 5%
performance difference at 2GHz.

and longer-term, the cost of VM exit due to IRQs is expected to get
cheaper. The cost of int $0x80 versus SYSENTER will stay constant, or
will get worse.

Ingo