diff options
author | Gleb Natapov <gleb@redhat.com> | 2010-03-18 15:20:03 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-05-17 12:15:54 +0300 |
commit | 52a4661737ecc918633f6b05c611a4af4b5eae5a (patch) | |
tree | 25bf976f23423db921b5edde6854f0dc8391eb1c /arch/x86/include/asm/kvm_emulate.h | |
parent | 6ce5a090a9a0ea4266a2cad058c69e2f27201e11 (diff) | |
download | lwn-52a4661737ecc918633f6b05c611a4af4b5eae5a.tar.gz lwn-52a4661737ecc918633f6b05c611a4af4b5eae5a.zip |
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.h | 3 |
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 2666d7ac3229..0c5caa469eb8 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. */ |