]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
KVM: arm64: vgic-init: Remove vgic_ready() macro
authorKeir Fraser <keirf@google.com>
Tue, 9 Sep 2025 10:00:04 +0000 (10:00 +0000)
committerMarc Zyngier <maz@kernel.org>
Mon, 15 Sep 2025 09:55:22 +0000 (10:55 +0100)
It is now used only within kvm_vgic_map_resources(). vgic_dist::ready
is already written directly by this function, so it is clearer to
bypass the macro for reads as well.

Signed-off-by: Keir Fraser <keirf@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/vgic/vgic-init.c
include/kvm/arm_vgic.h

index 1e680ad6e86359c551a4e335d4cc3b58f9fb1cf0..3f207b5f80a5720da1b07d3533eb4462b7c38849 100644 (file)
@@ -554,7 +554,6 @@ int vgic_lazy_init(struct kvm *kvm)
  * Also map the virtual CPU interface into the VM.
  * v2 calls vgic_init() if not already done.
  * v3 and derivatives return an error if the VGIC is not initialized.
- * vgic_ready() returns true if this function has succeeded.
  */
 int kvm_vgic_map_resources(struct kvm *kvm)
 {
@@ -563,12 +562,12 @@ int kvm_vgic_map_resources(struct kvm *kvm)
        gpa_t dist_base;
        int ret = 0;
 
-       if (likely(vgic_ready(kvm)))
+       if (likely(dist->ready))
                return 0;
 
        mutex_lock(&kvm->slots_lock);
        mutex_lock(&kvm->arch.config_lock);
-       if (vgic_ready(kvm))
+       if (dist->ready)
                goto out;
 
        if (!irqchip_in_kernel(kvm))
index 404883c7af6e83523d24f59c3031045e9df8cad8..e7ffaf4bf2e70112b404b4afff378420460e7adc 100644 (file)
@@ -406,7 +406,6 @@ u64 vgic_v3_get_misr(struct kvm_vcpu *vcpu);
 
 #define irqchip_in_kernel(k)   (!!((k)->arch.vgic.in_kernel))
 #define vgic_initialized(k)    ((k)->arch.vgic.initialized)
-#define vgic_ready(k)          ((k)->arch.vgic.ready)
 #define vgic_valid_spi(k, i)   (((i) >= VGIC_NR_PRIVATE_IRQS) && \
                        ((i) < (k)->arch.vgic.nr_spis + VGIC_NR_PRIVATE_IRQS))