diff options
author | Stephan Bärwolf <stephan.baerwolf@tu-ilmenau.de> | 2012-01-12 10:43:03 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-02 12:27:13 -0400 |
commit | 0f06e7442a9d2035742189d05c3cdfd2b9dc47fd (patch) | |
tree | dd33cfd92067f76ecc81832e70758b81e5f607ed /arch/x86/include/asm | |
parent | 07ef0938d89b3c5af9d3ff23e482b26202bd012c (diff) |
KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid"
commit bdb42f5afebe208eae90406959383856ae2caf2b upstream.
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>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/kvm_emulate.h | 3 |
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 0049211959c..18e54f1ec4e 100644 --- a/arch/x86/include/asm/kvm_emulate.h +++ b/arch/x86/include/asm/kvm_emulate.h | |||
@@ -189,6 +189,9 @@ struct x86_emulate_ops { | |||
189 | int (*intercept)(struct x86_emulate_ctxt *ctxt, | 189 | int (*intercept)(struct x86_emulate_ctxt *ctxt, |
190 | struct x86_instruction_info *info, | 190 | struct x86_instruction_info *info, |
191 | enum x86_intercept_stage stage); | 191 | enum x86_intercept_stage stage); |
192 | |||
193 | bool (*get_cpuid)(struct x86_emulate_ctxt *ctxt, | ||
194 | u32 *eax, u32 *ebx, u32 *ecx, u32 *edx); | ||
192 | }; | 195 | }; |
193 | 196 | ||
194 | typedef u32 __attribute__((vector_size(16))) sse128_t; | 197 | typedef u32 __attribute__((vector_size(16))) sse128_t; |