]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - virt/kvm/arm/vgic/vgic-v2.c
KVM: arm/arm64: Remove struct vgic_irq pending field
[karo-tx-linux.git] / virt / kvm / arm / vgic / vgic-v2.c
index 834137e7b83ff0c37515a1c36300c24aeadb9925..b834ecdf322503c09bffc58c7af5609cd4b71e43 100644 (file)
@@ -104,7 +104,7 @@ void vgic_v2_fold_lr_state(struct kvm_vcpu *vcpu)
                /* Edge is the only case where we preserve the pending bit */
                if (irq->config == VGIC_CONFIG_EDGE &&
                    (val & GICH_LR_PENDING_BIT)) {
-                       irq->pending = true;
+                       irq->pending_latch = true;
 
                        if (vgic_irq_is_sgi(intid)) {
                                u32 cpuid = val & GICH_LR_PHYSID_CPUID;
@@ -120,9 +120,7 @@ void vgic_v2_fold_lr_state(struct kvm_vcpu *vcpu)
                 */
                if (irq->config == VGIC_CONFIG_LEVEL) {
                        if (!(val & GICH_LR_PENDING_BIT))
-                               irq->soft_pending = false;
-
-                       irq->pending = irq->line_level || irq->soft_pending;
+                               irq->pending_latch = false;
                }
 
                spin_unlock(&irq->irq_lock);
@@ -145,11 +143,11 @@ void vgic_v2_populate_lr(struct kvm_vcpu *vcpu, struct vgic_irq *irq, int lr)
 {
        u32 val = irq->intid;
 
-       if (irq->pending) {
+       if (irq_is_pending(irq)) {
                val |= GICH_LR_PENDING_BIT;
 
                if (irq->config == VGIC_CONFIG_EDGE)
-                       irq->pending = false;
+                       irq->pending_latch = false;
 
                if (vgic_irq_is_sgi(irq->intid)) {
                        u32 src = ffs(irq->source);
@@ -158,7 +156,7 @@ void vgic_v2_populate_lr(struct kvm_vcpu *vcpu, struct vgic_irq *irq, int lr)
                        val |= (src - 1) << GICH_LR_PHYSID_CPUID_SHIFT;
                        irq->source &= ~(1 << (src - 1));
                        if (irq->source)
-                               irq->pending = true;
+                               irq->pending_latch = true;
                }
        }