diff options
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r-- | arch/x86/kvm/vmx.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 661c6e199b4a..4dfb1dc09c88 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -412,6 +412,12 @@ static inline bool cpu_has_virtual_nmis(void) | |||
412 | return vmcs_config.pin_based_exec_ctrl & PIN_BASED_VIRTUAL_NMIS; | 412 | return vmcs_config.pin_based_exec_ctrl & PIN_BASED_VIRTUAL_NMIS; |
413 | } | 413 | } |
414 | 414 | ||
415 | static inline bool cpu_has_vmx_wbinvd_exit(void) | ||
416 | { | ||
417 | return vmcs_config.cpu_based_2nd_exec_ctrl & | ||
418 | SECONDARY_EXEC_WBINVD_EXITING; | ||
419 | } | ||
420 | |||
415 | static inline bool report_flexpriority(void) | 421 | static inline bool report_flexpriority(void) |
416 | { | 422 | { |
417 | return flexpriority_enabled; | 423 | return flexpriority_enabled; |
@@ -3397,7 +3403,7 @@ static int handle_invlpg(struct kvm_vcpu *vcpu) | |||
3397 | static int handle_wbinvd(struct kvm_vcpu *vcpu) | 3403 | static int handle_wbinvd(struct kvm_vcpu *vcpu) |
3398 | { | 3404 | { |
3399 | skip_emulated_instruction(vcpu); | 3405 | skip_emulated_instruction(vcpu); |
3400 | /* TODO: Add support for VT-d/pass-through device */ | 3406 | kvm_emulate_wbinvd(vcpu); |
3401 | return 1; | 3407 | return 1; |
3402 | } | 3408 | } |
3403 | 3409 | ||
@@ -4347,6 +4353,8 @@ static struct kvm_x86_ops vmx_x86_ops = { | |||
4347 | .rdtscp_supported = vmx_rdtscp_supported, | 4353 | .rdtscp_supported = vmx_rdtscp_supported, |
4348 | 4354 | ||
4349 | .set_supported_cpuid = vmx_set_supported_cpuid, | 4355 | .set_supported_cpuid = vmx_set_supported_cpuid, |
4356 | |||
4357 | .has_wbinvd_exit = cpu_has_vmx_wbinvd_exit, | ||
4350 | }; | 4358 | }; |
4351 | 4359 | ||
4352 | static int __init vmx_init(void) | 4360 | static int __init vmx_init(void) |