Hi Zenghui, On 17/09/2019 09:10, Zenghui Yu wrote: > Hi Marc, > > I've run this patch on my box and got the following messages: > > ---8< > > [ 2258.490030] BUG: sleeping function called from invalid context at > kernel/irq/manage.c:138 > [ 2258.490034] in_atomic(): 1, irqs_disabled(): 0, pid: 59278, name: CPU > 0/KVM > [ 2258.490039] CPU: 32 PID: 59278 Comm: CPU 0/KVM Kdump: loaded Tainted: > G W 5.3.0+ #26 > [ 2258.490041] Hardware name: Huawei TaiShan 2280 /BC11SPCD, BIOS 1.58 > 10/29/2018 > [ 2258.490043] Call trace: > [ 2258.490056] dump_backtrace+0x0/0x188 > [ 2258.490060] show_stack+0x24/0x30 > [ 2258.490066] dump_stack+0xb0/0xf4 > [ 2258.490072] ___might_sleep+0x10c/0x130 > [ 2258.490074] __might_sleep+0x58/0x90 > [ 2258.490078] synchronize_irq+0x58/0xd8 > [ 2258.490079] disable_irq+0x2c/0x38 > [ 2258.490083] vgic_v4_load+0x9c/0xc0 > [ 2258.490084] vgic_v3_load+0x94/0x170 > [ 2258.490088] kvm_vgic_load+0x3c/0x60 > [ 2258.490092] kvm_arch_vcpu_load+0xd4/0x1d0 > [ 2258.490095] vcpu_load+0x50/0x70 > [ 2258.490097] kvm_arch_vcpu_ioctl_run+0x94/0x978 > [ 2258.490098] kvm_vcpu_ioctl+0x3d8/0xa28 > [ 2258.490104] do_vfs_ioctl+0xc4/0x8e8 > [ 2258.490106] ksys_ioctl+0x8c/0xa0 > [ 2258.490108] __arm64_sys_ioctl+0x28/0x58 > [ 2258.490112] el0_svc_common.constprop.0+0x7c/0x188 > [ 2258.490114] el0_svc_handler+0x34/0xb8 > [ 2258.490117] el0_svc+0x8/0xc > [ 2259.497070] BUG: sleeping function called from invalid context at > kernel/irq/manage.c:138 Thanks for reporting this. [...] > The logic of disabling the doorbell interrupt in vgic_v4_load() might > need a fix? The logic itself looks OK, but doing a full blown disable_irq() is both counter productive (if we race against a doorbell, there is not much we can do about it and waiting for it to end is pointless) and wrong (despite the comment that this can be called in IRQ context, it is pretty unsafe to do so). Can you try turning it into a disable_irq_nosync() and let me know if that helps? Thanks, M. -- Jazz is not dead, it just smells funny... _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm