diff options
author | Lan Tianyu <Tianyu.Lan@microsoft.com> | 2019-01-04 08:20:44 +0100 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2019-01-11 18:38:07 +0100 |
commit | b7c1c226f9403c52bf58b0bceef24501429c7351 (patch) | |
tree | 74031c2b9bde92b36b3ed6922c0226ece43837b8 /arch | |
parent | kvm: sev: Fail KVM_SEV_INIT if already initialized (diff) | |
download | linux-b7c1c226f9403c52bf58b0bceef24501429c7351.tar.xz linux-b7c1c226f9403c52bf58b0bceef24501429c7351.zip |
KVM/VMX: Avoid return error when flush tlb successfully in the hv_remote_flush_tlb_with_range()
The "ret" is initialized to be ENOTSUPP. The return value of
__hv_remote_flush_tlb_with_range() will be Or with "ret" when ept
table potiners are mismatched. This will cause return ENOTSUPP even if
flush tlb successfully. This patch is to fix the issue and set
"ret" to 0.
Fixes: a5c214dad198 ("KVM/VMX: Change hv flush logic when ept tables are mismatched.")
Signed-off-by: Lan Tianyu <Tianyu.Lan@microsoft.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/vmx/vmx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index e344dc8626d0..f6915f10e584 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -453,7 +453,7 @@ static int hv_remote_flush_tlb_with_range(struct kvm *kvm, struct kvm_tlb_range *range) { struct kvm_vcpu *vcpu; - int ret = -ENOTSUPP, i; + int ret = 0, i; spin_lock(&to_kvm_vmx(kvm)->ept_pointer_lock); |