All of lore.kernel.org
 help / color / mirror / Atom feed
* KVM exit on UD interception
@ 2014-05-05 15:56 Alexandru Duţu
  2014-05-05 17:34 ` Nakajima, Jun
  2014-05-06 16:56 ` Paolo Bonzini
  0 siblings, 2 replies; 9+ messages in thread
From: Alexandru Duţu @ 2014-05-05 15:56 UTC (permalink / raw)
  To: kvm

Dear all,

It seems that currently, on UD interception KVM does not exit
completely. Virtualized execution finishes, KVM executes
ud_intercept() after which it enters virtualized execution again.

I am working on accelerating with virtualized execution a simulator
that emulates system calls. Essentially doing virtualized execution
without a OS kernel. In order to make this work, I had to modify my
the KVM kernel module such that ud_intercept() return 0 and not 1
which break KVM __vcpu_run loop. This is necessary as I need to trap
syscall instructions, exit virtualized execution with UD exception,
emulate the system call in the simulator and after the system call is
done enter back in virtualized mode and start execution with the help
of KVM.

So by modifying ud_intercept() to return 0, I got all this to work. Is
it possible to achieve the same effect (exit on undefined opcode)
without modifying ud_intercept()?

It seems that re-entering virtualized execution on UD interception
gives the user the flexibility of running binaries with newer
instructions on older hardware, if kvm is able to emulate the newer
instructions. I do not fully understand the details of this scenario,
is there such a scenario or is it likely that ud_interception() will
change?

Thank you in advance!

Best regards,
Alex

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

end of thread, other threads:[~2014-05-08  3:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-05 15:56 KVM exit on UD interception Alexandru Duţu
2014-05-05 17:34 ` Nakajima, Jun
2014-05-05 18:48   ` Alexandru Duţu
2014-05-06  0:07     ` Nakajima, Jun
2014-05-06  0:47       ` Alexandru Duţu
2014-05-06 16:56 ` Paolo Bonzini
2014-05-06 20:11   ` Alexandru Duţu
2014-05-07  6:55     ` Paolo Bonzini
2014-05-08  3:30       ` Alexandru Duţu

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.