summaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/kvm_emulate.h
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2010-03-18 15:20:03 +0200
committerAvi Kivity <avi@redhat.com>2010-05-17 12:15:54 +0300
commit52a4661737ecc918633f6b05c611a4af4b5eae5a (patch)
tree25bf976f23423db921b5edde6854f0dc8391eb1c /arch/x86/include/asm/kvm_emulate.h
parent6ce5a090a9a0ea4266a2cad058c69e2f27201e11 (diff)
downloadop-kernel-dev-52a4661737ecc918633f6b05c611a4af4b5eae5a.zip
op-kernel-dev-52a4661737ecc918633f6b05c611a4af4b5eae5a.tar.gz
KVM: Provide callback to get/set control registers in emulator ops.
Use this callback instead of directly call kvm function. Also rename realmode_(set|get)_cr to emulator_(set|get)_cr since function has nothing to do with real mode. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_emulate.h')
-rw-r--r--arch/x86/include/asm/kvm_emulate.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h
index 2666d7a..0c5caa4 100644
--- a/arch/x86/include/asm/kvm_emulate.h
+++ b/arch/x86/include/asm/kvm_emulate.h
@@ -108,7 +108,8 @@ struct x86_emulate_ops {
const void *new,
unsigned int bytes,
struct kvm_vcpu *vcpu);
-
+ ulong (*get_cr)(int cr, struct kvm_vcpu *vcpu);
+ void (*set_cr)(int cr, ulong val, struct kvm_vcpu *vcpu);
};
/* Type, address-of, and value of an instruction's operand. */
OpenPOWER on IntegriCloud