KVM: provide synchronous registers in kvm_run
authorChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 11 Jan 2012 10:20:30 +0000 (11:20 +0100)
committerAvi Kivity <avi@redhat.com>
Mon, 5 Mar 2012 12:52:22 +0000 (14:52 +0200)
commitb9e5dc8d4511e6a00862a795319569e7fe7f60f4
tree1be01a8d13e2e5023c22db4a7dd87518f14af5b3
parent8d26cf7b40b1648c39e77a113dac07ad31363120
KVM: provide synchronous registers in kvm_run

On some cpus the overhead for virtualization instructions is in the same
range as a system call. Having to call multiple ioctls to get set registers
will make certain userspace handled exits more expensive than necessary.
Lets provide a section in kvm_run that works as a shared save area
for guest registers.
We also provide two 64bit flags fields (architecture specific), that will
specify
1. which parts of these fields are valid.
2. which registers were modified by userspace

Each bit for these flag fields will define a group of registers (like
general purpose) or a single register.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Documentation/virtual/kvm/api.txt
arch/ia64/include/asm/kvm.h
arch/powerpc/include/asm/kvm.h
arch/s390/include/asm/kvm.h
arch/x86/include/asm/kvm.h
include/linux/kvm.h