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>
This commit is contained in:
Christian Borntraeger
2012-01-11 11:20:30 +01:00
committed by Avi Kivity
parent 8d26cf7b40
commit b9e5dc8d45
6 changed files with 53 additions and 0 deletions

View File

@@ -321,4 +321,8 @@ struct kvm_xcrs {
__u64 padding[16];
};
/* definition of registers in kvm_run */
struct kvm_sync_regs {
};
#endif /* _ASM_X86_KVM_H */