summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/kvm_emulate.h
diff options
context:
space:
mode:
authorStephan Bärwolf <stephan.baerwolf@tu-ilmenau.de>2012-01-12 16:43:03 +0100
committerAvi Kivity <avi@redhat.com>2012-02-01 11:43:33 +0200
commitbdb42f5afebe208eae90406959383856ae2caf2b (patch)
treee58d3b8aedf30b9f42689a7d0ee752600be3f938 /arch/x86/include/asm/kvm_emulate.h
parent50e92b3c971129c96a5fffb51dd42691e2ee4004 (diff)
KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid"
In order to be able to proceed checks on CPU-specific properties within the emulator, function "get_cpuid" is introduced. With "get_cpuid" it is possible to virtually call the guests "cpuid"-opcode without changing the VM's context. [mtosatti: cleanup/beautify code] Signed-off-by: Stephan Baerwolf <stephan.baerwolf@tu-ilmenau.de> 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, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h
index ab4092e3214e..c8b28689eeeb 100644
--- a/arch/x86/include/asm/kvm_emulate.h
+++ b/arch/x86/include/asm/kvm_emulate.h
@@ -190,6 +190,9 @@ struct x86_emulate_ops {
int (*intercept)(struct x86_emulate_ctxt *ctxt,
struct x86_instruction_info *info,
enum x86_intercept_stage stage);
+
+ bool (*get_cpuid)(struct x86_emulate_ctxt *ctxt,
+ u32 *eax, u32 *ebx, u32 *ecx, u32 *edx);
};
typedef u32 __attribute__((vector_size(16))) sse128_t;