From: Sean Christopherson <seanjc@google.com> To: Paolo Bonzini <pbonzini@redhat.com>, Joerg Roedel <joro@8bytes.org> Cc: Sean Christopherson <seanjc@google.com>, Vitaly Kuznetsov <vkuznets@redhat.com>, Wanpeng Li <wanpengli@tencent.com>, Jim Mattson <jmattson@google.com>, Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>, kvm@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Maxim Levitsky <mlevitsk@redhat.com> Subject: [PATCH v3 25/26] KVM: x86: Drop NULL check on kvm_x86_ops.check_apicv_inhibit_reasons Date: Wed, 8 Dec 2021 01:52:35 +0000 [thread overview] Message-ID: <20211208015236.1616697-26-seanjc@google.com> (raw) In-Reply-To: <20211208015236.1616697-1-seanjc@google.com> Drop the useless NULL check on kvm_x86_ops.check_apicv_inhibit_reasons when handling an APICv update, both VMX and SVM unconditionally implement the helper and leave it non-NULL even if APICv is disabled at the module level. The latter is a moot point now that __kvm_request_apicv_update() is called if and only if enable_apicv is true. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.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 c804cc39c90d..fc52b97d6aa1 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -9564,8 +9564,7 @@ void __kvm_request_apicv_update(struct kvm *kvm, bool activate, ulong bit) lockdep_assert_held_write(&kvm->arch.apicv_update_lock); - if (!kvm_x86_ops.check_apicv_inhibit_reasons || - !static_call(kvm_x86_check_apicv_inhibit_reasons)(bit)) + if (!static_call(kvm_x86_check_apicv_inhibit_reasons)(bit)) return; old = new = kvm->arch.apicv_inhibit_reasons; -- 2.34.1.400.ga245620fadb-goog
WARNING: multiple messages have this Message-ID (diff)
From: Sean Christopherson via iommu <iommu@lists.linux-foundation.org> To: Paolo Bonzini <pbonzini@redhat.com>, Joerg Roedel <joro@8bytes.org> Cc: Wanpeng Li <wanpengli@tencent.com>, kvm@vger.kernel.org, Sean Christopherson <seanjc@google.com>, linux-kernel@vger.kernel.org, Maxim Levitsky <mlevitsk@redhat.com>, iommu@lists.linux-foundation.org, Vitaly Kuznetsov <vkuznets@redhat.com>, Jim Mattson <jmattson@google.com> Subject: [PATCH v3 25/26] KVM: x86: Drop NULL check on kvm_x86_ops.check_apicv_inhibit_reasons Date: Wed, 8 Dec 2021 01:52:35 +0000 [thread overview] Message-ID: <20211208015236.1616697-26-seanjc@google.com> (raw) In-Reply-To: <20211208015236.1616697-1-seanjc@google.com> Drop the useless NULL check on kvm_x86_ops.check_apicv_inhibit_reasons when handling an APICv update, both VMX and SVM unconditionally implement the helper and leave it non-NULL even if APICv is disabled at the module level. The latter is a moot point now that __kvm_request_apicv_update() is called if and only if enable_apicv is true. No functional change intended. Signed-off-by: Sean Christopherson <seanjc@google.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 c804cc39c90d..fc52b97d6aa1 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -9564,8 +9564,7 @@ void __kvm_request_apicv_update(struct kvm *kvm, bool activate, ulong bit) lockdep_assert_held_write(&kvm->arch.apicv_update_lock); - if (!kvm_x86_ops.check_apicv_inhibit_reasons || - !static_call(kvm_x86_check_apicv_inhibit_reasons)(bit)) + if (!static_call(kvm_x86_check_apicv_inhibit_reasons)(bit)) return; old = new = kvm->arch.apicv_inhibit_reasons; -- 2.34.1.400.ga245620fadb-goog _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2021-12-08 1:56 UTC|newest] Thread overview: 96+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-08 1:52 [PATCH v3 00/26] KVM: x86: Halt and APICv overhaul Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 01/26] KVM: fix avic_set_running for preemptable kernels Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 02/26] KVM: nVMX: Ensure vCPU honors event request if posting nested IRQ fails Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 03/26] KVM: VMX: Clean up PI pre/post-block WARNs Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 04/26] KVM: VMX: Handle PI wakeup shenanigans during vcpu_put/load Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 05/26] KVM: Drop unused kvm_vcpu.pre_pcpu field Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 06/26] KVM: Move x86 VMX's posted interrupt list_head to vcpu_vmx Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 07/26] KVM: VMX: Move preemption timer <=> hrtimer dance to common x86 Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2023-03-29 12:34 ` Tudor Ambarus 2023-03-29 13:47 ` Paolo Bonzini 2023-03-29 15:22 ` Tudor Ambarus 2023-03-30 7:12 ` Tudor Ambarus 2021-12-08 1:52 ` [PATCH v3 08/26] KVM: x86: Unexport LAPIC's switch_to_{hv,sw}_timer() helpers Sean Christopherson 2021-12-08 1:52 ` [PATCH v3 08/26] KVM: x86: Unexport LAPIC's switch_to_{hv, sw}_timer() helpers Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 09/26] KVM: x86: Remove defunct pre_block/post_block kvm_x86_ops hooks Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 10/26] KVM: SVM: Signal AVIC doorbell iff vCPU is in guest mode Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 11/26] KVM: SVM: Don't bother checking for "running" AVIC when kicking for IPIs Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 12/26] KVM: SVM: Remove unnecessary APICv/AVIC update in vCPU unblocking path Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 13/26] KVM: SVM: Use kvm_vcpu_is_blocking() in AVIC load to handle preemption Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 14/26] KVM: SVM: Skip AVIC and IRTE updates when loading blocking vCPU Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 15/26] iommu/amd: KVM: SVM: Use pCPU to infer IsRun state for IRTE Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 16/26] KVM: VMX: Don't do full kick when triggering posted interrupt "fails" Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 17/26] KVM: VMX: Wake vCPU when delivering posted IRQ even if vCPU == this vCPU Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 18/26] KVM: VMX: Pass desired vector instead of bool for triggering posted IRQ Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 19/26] KVM: VMX: Fold fallback path into triggering posted IRQ helper Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 20/26] KVM: VMX: Don't do full kick when handling posted interrupt wakeup Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 21/26] KVM: SVM: Drop AVIC's intermediate avic_set_running() helper Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 14:43 ` Paolo Bonzini 2021-12-08 14:43 ` Paolo Bonzini 2021-12-08 15:03 ` Maxim Levitsky 2021-12-08 15:03 ` Maxim Levitsky 2021-12-08 15:43 ` Sean Christopherson 2021-12-08 15:43 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 22/26] KVM: SVM: Move svm_hardware_setup() and its helpers below svm_x86_ops Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 23/26] KVM: SVM: Nullify vcpu_(un)blocking() hooks if AVIC is disabled Sean Christopherson via iommu 2021-12-08 1:52 ` Sean Christopherson 2021-12-08 1:52 ` [PATCH v3 24/26] KVM: x86: Skip APICv update if APICv is disable at the module level Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 1:52 ` Sean Christopherson [this message] 2021-12-08 1:52 ` [PATCH v3 25/26] KVM: x86: Drop NULL check on kvm_x86_ops.check_apicv_inhibit_reasons Sean Christopherson via iommu 2021-12-08 1:52 ` [PATCH v3 26/26] KVM: x86: Unexport __kvm_request_apicv_update() Sean Christopherson 2021-12-08 1:52 ` Sean Christopherson via iommu 2021-12-08 9:04 ` [PATCH v3 00/26] KVM: x86: Halt and APICv overhaul Paolo Bonzini 2021-12-08 9:04 ` Paolo Bonzini 2021-12-08 14:51 ` Paolo Bonzini 2021-12-08 14:51 ` Paolo Bonzini 2021-12-08 23:00 ` Maxim Levitsky 2021-12-08 23:00 ` Maxim Levitsky 2021-12-08 23:16 ` Maxim Levitsky 2021-12-08 23:16 ` Maxim Levitsky 2021-12-08 23:34 ` Maxim Levitsky 2021-12-08 23:34 ` Maxim Levitsky 2021-12-09 0:04 ` Sean Christopherson 2021-12-09 0:04 ` Sean Christopherson via iommu 2021-12-09 6:36 ` Maxim Levitsky 2021-12-09 6:36 ` Maxim Levitsky 2021-12-09 0:02 ` Sean Christopherson 2021-12-09 0:02 ` Sean Christopherson via iommu 2021-12-09 14:29 ` Paolo Bonzini 2021-12-09 14:29 ` Paolo Bonzini 2021-12-09 14:48 ` Maxim Levitsky 2021-12-09 14:48 ` Maxim Levitsky 2021-12-09 15:45 ` Sean Christopherson 2021-12-09 15:45 ` Sean Christopherson via iommu 2021-12-09 16:03 ` Maxim Levitsky 2021-12-09 16:03 ` Maxim Levitsky 2021-12-09 1:37 ` Sean Christopherson 2021-12-09 1:37 ` Sean Christopherson via iommu 2021-12-09 6:31 ` Maxim Levitsky 2021-12-09 6:31 ` Maxim Levitsky 2021-12-08 23:43 ` Sean Christopherson 2021-12-08 23:43 ` Sean Christopherson via iommu 2021-12-09 6:34 ` Maxim Levitsky 2021-12-09 6:34 ` Maxim Levitsky
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211208015236.1616697-26-seanjc@google.com \ --to=seanjc@google.com \ --cc=iommu@lists.linux-foundation.org \ --cc=jmattson@google.com \ --cc=joro@8bytes.org \ --cc=kvm@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mlevitsk@redhat.com \ --cc=pbonzini@redhat.com \ --cc=suravee.suthikulpanit@amd.com \ --cc=vkuznets@redhat.com \ --cc=wanpengli@tencent.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.