Skip to content

Commit

Permalink
KVM/VMX: Avoid return error when flush tlb successfully in the hv_rem…
Browse files Browse the repository at this point in the history
…ote_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: a5c214d ("KVM/VMX: Change hv flush logic when ept tables are mismatched.")
Signed-off-by: Lan Tianyu <[email protected]>
Signed-off-by: Radim Krčmář <[email protected]>
  • Loading branch information
Lan Tianyu authored and rkrcmar committed Jan 11, 2019
1 parent 3f14a89 commit b7c1c22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/vmx/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit b7c1c22

Please sign in to comment.