All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Hypervisor, x86 emulation deprivileged
@ 2016-07-05 11:22 Anthony PERARD
  2016-07-05 12:58 ` George Dunlap
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Anthony PERARD @ 2016-07-05 11:22 UTC (permalink / raw)
  To: xen-devel, Jan Beulich, Andrew Cooper

Hi,

I've taken over the work from Ben to have a deprivileged mode in the
hypervisor, but I'm unsure about which direction to take.

First, after understanding what have been done, and fixing a few things,
I did some benchmark to compare a simple "device" running in ring0 to
the same one running in ring3 and also in QEMU. This "device" would call
'rdtsc' on 'outl' and return the value in 'inl' (I actually do not use
the value). The measurement is done from a kernel module in the guest
(simply rdtsc;inl;rdtsc multiple time). This is the result I've found:

    ring3 ~3.5x slower than ring0
    qemu   ~22x slower than ring0
          ~6.5x slower than ring3

So that would be the worst-case scenario, where an emulator barely do
anything.


There have been different methods proposed to do the depriv mode, in
<55A8D477.2060909@citrix.com>, one of which was to implement a per-vcpu
stack which could be more elegant.

So, would you suggest that I start working on a per-vcpu stack? Or
should I continue with the current direction?


Some of the code I have, including the code for the benchmark, can be
found here:
git://xenbits.xen.org/people/aperard/xen-unstable.git
branch: hvm-x86-deprivileged-mode-wip

Regards,

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-07-08  9:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-05 11:22 [RFC] Hypervisor, x86 emulation deprivileged Anthony PERARD
2016-07-05 12:58 ` George Dunlap
2016-07-05 17:20   ` Anthony PERARD
2016-07-05 13:02 ` Jan Beulich
2016-07-05 17:01   ` Anthony PERARD
2016-07-05 17:25 ` Andrew Cooper
2016-07-06  7:59   ` Paul Durrant
2016-07-08  9:07     ` Tim Deegan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.