Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux

Pull arm64 fixes from Will Deacon:
"Hot on the heels of our last set of fixes are a few more for -rc7.

Two of them are fixing issues with our virtual interrupt controller
implementation in KVM/arm, while the other is a longstanding but
straightforward kallsyms fix which was been acked by Masami and
resolves an initialisation failure in kprobes observed on arm64.

- Fix GICv2 emulation bug (KVM)

- Fix deadlock in virtual GIC interrupt injection code (KVM)

- Fix kprobes blacklist init failure due to broken kallsyms lookup"

* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
KVM: arm/arm64: vgic-v2: Handle SGI bits in GICD_I{S,C}PENDR0 as WI
KVM: arm/arm64: vgic: Fix potential deadlock when ap_list is long
kallsyms: Don't let kallsyms_lookup_size_offset() fail on retrieving the first symbol

+37 -4
+4 -2
kernel/kallsyms.c
··· 263 263 { 264 264 char namebuf[KSYM_NAME_LEN]; 265 265 266 - if (is_ksym_addr(addr)) 267 - return !!get_symbol_pos(addr, symbolsize, offset); 266 + if (is_ksym_addr(addr)) { 267 + get_symbol_pos(addr, symbolsize, offset); 268 + return 1; 269 + } 268 270 return !!module_address_lookup(addr, symbolsize, offset, NULL, namebuf) || 269 271 !!__bpf_address_lookup(addr, symbolsize, offset, namebuf); 270 272 }
+18
virt/kvm/arm/vgic/vgic-mmio.c
··· 211 211 vgic_irq_set_phys_active(irq, true); 212 212 } 213 213 214 + static bool is_vgic_v2_sgi(struct kvm_vcpu *vcpu, struct vgic_irq *irq) 215 + { 216 + return (vgic_irq_is_sgi(irq->intid) && 217 + vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V2); 218 + } 219 + 214 220 void vgic_mmio_write_spending(struct kvm_vcpu *vcpu, 215 221 gpa_t addr, unsigned int len, 216 222 unsigned long val) ··· 228 222 229 223 for_each_set_bit(i, &val, len * 8) { 230 224 struct vgic_irq *irq = vgic_get_irq(vcpu->kvm, vcpu, intid + i); 225 + 226 + /* GICD_ISPENDR0 SGI bits are WI */ 227 + if (is_vgic_v2_sgi(vcpu, irq)) { 228 + vgic_put_irq(vcpu->kvm, irq); 229 + continue; 230 + } 231 231 232 232 raw_spin_lock_irqsave(&irq->irq_lock, flags); 233 233 if (irq->hw) ··· 281 269 282 270 for_each_set_bit(i, &val, len * 8) { 283 271 struct vgic_irq *irq = vgic_get_irq(vcpu->kvm, vcpu, intid + i); 272 + 273 + /* GICD_ICPENDR0 SGI bits are WI */ 274 + if (is_vgic_v2_sgi(vcpu, irq)) { 275 + vgic_put_irq(vcpu->kvm, irq); 276 + continue; 277 + } 284 278 285 279 raw_spin_lock_irqsave(&irq->irq_lock, flags); 286 280
+4 -1
virt/kvm/arm/vgic/vgic-v2.c
··· 184 184 if (vgic_irq_is_sgi(irq->intid)) { 185 185 u32 src = ffs(irq->source); 186 186 187 - BUG_ON(!src); 187 + if (WARN_RATELIMIT(!src, "No SGI source for INTID %d\n", 188 + irq->intid)) 189 + return; 190 + 188 191 val |= (src - 1) << GICH_LR_PHYSID_CPUID_SHIFT; 189 192 irq->source &= ~(1 << (src - 1)); 190 193 if (irq->source) {
+4 -1
virt/kvm/arm/vgic/vgic-v3.c
··· 167 167 model == KVM_DEV_TYPE_ARM_VGIC_V2) { 168 168 u32 src = ffs(irq->source); 169 169 170 - BUG_ON(!src); 170 + if (WARN_RATELIMIT(!src, "No SGI source for INTID %d\n", 171 + irq->intid)) 172 + return; 173 + 171 174 val |= (src - 1) << GICH_LR_PHYSID_CPUID_SHIFT; 172 175 irq->source &= ~(1 << (src - 1)); 173 176 if (irq->source) {
+7
virt/kvm/arm/vgic/vgic.c
··· 254 254 bool penda, pendb; 255 255 int ret; 256 256 257 + /* 258 + * list_sort may call this function with the same element when 259 + * the list is fairly long. 260 + */ 261 + if (unlikely(irqa == irqb)) 262 + return 0; 263 + 257 264 raw_spin_lock(&irqa->irq_lock); 258 265 raw_spin_lock_nested(&irqb->irq_lock, SINGLE_DEPTH_NESTING); 259 266