Skip to contentSkip to conversation

KVM/VMX: Avoid return error when flush tlb successfully in the hv_remote_flush_tlb_with_range()

PATCH Applied [email protected] 2 participants 2 messages Jan 4, 2019 – Jan 11, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM/VMX: Avoid return error when flush tlb successfully in the hv_remote_flush_tlb_with_range()

From: Lan Tianyu <[email protected]>

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.

Fix: a5c214da("KVM/VMX: Change hv flush logic when ept tables are mismatched.")

---
 arch/x86/kvm/vmx/vmx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/vmx/vmx.c +1 -1
index 59b98c76028d..384f4782afba 100644
@@ -467,7 +467,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);
 
Signature · 1 line
2.14.4
#1 lore raw

2019-01-04 15:20+0800, [email protected]:

Quoted 11 lines

From: Lan Tianyu <[email protected]>

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.

Fix: a5c214da("KVM/VMX: Change hv flush logic when ept tables are mismatched.")

---

Applied, thanks.