public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Userspace hypercalls?
@ 2007-08-27 15:27 Anthony Liguori
  2007-08-27 16:16 ` Avi Kivity
  0 siblings, 1 reply; 14+ messages in thread
From: Anthony Liguori @ 2007-08-27 15:27 UTC (permalink / raw)
  To: kvm-devel

I've never really thought much about them until now.  What's the case
for supporting userspace hypercalls?

The current way the code works is a little scary.  Hypercalls that
aren't handled by kernelspace are deferred to userspace.  Of course,
kernelspace has no idea whether userspace is actually using a given
hypercall so if kernelspace needs another one, the two may clash.

AFAICT, the primary reason to use hypercalls is performance.  A vmcall
is a few hundred cycles faster than a PIO exit.  In the light-weight
exit path, this may make a significant different.  However, when going
to userspace, it's not only a heavy-weight exit but it's also paying the
cost of a ring transition.  The few hundred cycle savings is small in
comparison to the total cost so I don't think performance is a real
benefit here.

The hypercall namespace is much smaller than the PIO namespace, and
there's no "plug-and-play" like mechanism to resolve conflict.  PIO/MMIO
has this via PCI and it seems like any userspace device ought to be
either a PCI device or use a static PIO port.  Plus, paravirtual devices
that use PCI/PIO/MMIO are much more likely to be reusable by other VMMs
(Xen, QEMU, even VMware).

In the future, if we decide a certain hypercall could be done better in
userspace, and we have guests using those hypercalls, it makes sense to
plumb the hypercalls down.

My question is, should we support userspace hypercalls until that point?

Regards,

Anthony Liguori


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

^ permalink raw reply	[flat|nested] 14+ messages in thread
[parent not found: <46D326020200005A00029BFF@mcclure.wal.novell.com>]

end of thread, other threads:[~2007-08-29 21:24 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-27 15:27 Userspace hypercalls? Anthony Liguori
2007-08-27 16:16 ` Avi Kivity
     [not found]   ` <46D2F8FA.6050104-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-27 16:19     ` Avi Kivity
2007-08-27 16:33     ` Avi Kivity
     [not found]       ` <46D2FCE1.7020605-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-27 16:47         ` Avi Kivity
     [not found]           ` <46D3001A.9070706-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-27 17:32             ` Anthony Liguori
2007-08-27 17:36               ` Avi Kivity
     [not found]                 ` <46D30BAE.4080705-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-27 17:47                   ` Anthony Liguori
     [not found]                     ` <46D30F15.6050601@qumranet.com>
     [not found]                       ` <46D30F15.6050601-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-27 19:58                         ` Luca
     [not found]                           ` <68676e00708271258o278de93ek8a051619dd03fb6a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-08-27 20:01                             ` Avi Kivity
     [not found]                               ` <46D32DA8.1080900-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-27 21:06                                 ` Anthony Liguori
2007-08-29  6:59         ` Dor Laor
     [not found]           ` <64F9B87B6B770947A9F8391472E032160D6558D8-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-08-29 21:24             ` Avi Kivity
     [not found] <46D326020200005A00029BFF@mcclure.wal.novell.com>
     [not found] ` <46D326080200005A00029C02-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-08-27 23:29   ` Gregory Haskins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox