Messages in this thread Patch in this message | | | From | linmiaohe <> | Subject | [PATCH] KVM: X86: avoid meaningless kvm_apicv_activated() check | Date | Tue, 25 Feb 2020 10:21:19 +0800 |
| |
From: Miaohe Lin <linmiaohe@huawei.com>
After test_and_set_bit() for kvm->arch.apicv_inhibit_reasons, we will always get false when calling kvm_apicv_activated() because it's sure apicv_inhibit_reasons do not equal to 0.
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> --- arch/x86/kvm/x86.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index ddcc51b89e2c..fa62dcb0ed0c 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -8018,8 +8018,7 @@ void kvm_request_apicv_update(struct kvm *kvm, bool activate, ulong bit) !kvm_apicv_activated(kvm)) return; } else { - if (test_and_set_bit(bit, &kvm->arch.apicv_inhibit_reasons) || - kvm_apicv_activated(kvm)) + if (test_and_set_bit(bit, &kvm->arch.apicv_inhibit_reasons)) return; } -- 2.19.1
| |