Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2019-08-13 11:04:46 +0200
committerJoerg Roedel <jroedel@suse.de>2019-08-13 13:25:27 +0200
commit625012a81be1801d44092274c6134ba84fae55ab (patch)
tree9dbaee61c66aeacd6ac6e2b5395d215dbe944761
parent935d8c4e48301e6f8ae3786b59d8468e755ceb1d (diff)
KVM: nVMX: allow setting the VMFUNC controls MSR (bsc#1145389).
-rw-r--r--arch/x86/kvm/vmx.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 30dba903f06d..6ca42d0f21f6 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3341,6 +3341,11 @@ static int vmx_set_vmx_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data)
case MSR_IA32_VMX_VMCS_ENUM:
vmx->nested.nested_vmx_vmcs_enum = data;
return 0;
+ case MSR_IA32_VMX_VMFUNC:
+ if (data & ~vmx->nested.nested_vmx_vmfunc_controls)
+ return -EINVAL;
+ vmx->nested.nested_vmx_vmfunc_controls = data;
+ return 0;
default:
/*
* The rest of the VMX capability MSRs do not support restore.