Hi Marc and Christoffer, When we issue "system_reset" from qemu monitor to a running VM,
guest Linux will occasionally get "Unexpected interrupt" after
rebooting, with kernel message at the bottom. After some investigation, we found it might be caused by the preservation of virtual LPI during system reset: it seems the virtual LPI remains in the ap_list during VM reset, as well as its "enabled" and "pending_latch" status, and this causes the virtual LPI to be injected wrongly after VCPU reboots and enables interrupt. We propose to clear "enabled" flag of virtual LPI when PROPBASER
(or GICR_CTRL) of virtual GICR is written to 0, and update virtual
LPI properties when GICR_CTRL.enableLPIs is set to 1 again. Any advice? Or did we miss something? Thanks, Heyi
[
0.130746] Detected VIPT I-cache on CPU21 [
0.130870] GICv3: CPU21: found redistributor 105 region
0:0x0000000008340000 [
0.131043] ------------[ cut here ]------------ [
0.131044] Unexpected interrupt received! [
0.131075] WARNING: CPU: 21 PID: 0 at
drivers/irqchip/irq-gic-v3.c:364
gic_handle_irq+0x184/0x18c [
0.131076] Modules linked in: [
0.131080] CPU: 21 PID: 0 Comm: swapper/21 Not tainted
4.19.5-1.2.32.aarch64 #1 [
0.131083] pstate: 60000085 (nZCv daIf -PAN -UAO) [
0.131084] pc : gic_handle_irq+0x184/0x18c [
0.131085] lr : gic_handle_irq+0x184/0x18c [
0.131086] sp : ffff00000a0d3fc0 [
0.131087] x29: ffff00000a0d3fc0 x28: ffff800bc7660f80 [
0.131090] x27: ffff800bf8b67c00 x26: ffff00000a0d4000 [
0.131092] x25: ffff00000a0d0000 x24: ffff0000097f8000 [
0.131094] x23: ffff00000977b62b x22: ffff00000a463b00 [
0.131096] x21: ffff000009595fe0 x20: 0000000000002022 [
0.131098] x19: 0000000000002022 x18: ffffffffffffffff [
0.131100] x17: 0000000000000000 x16: 0000000000000000 [
0.131102] x15: ffff000009589748 x14: ffff000009e75d78 [
0.131104] x13: ffff000009e759db x12: ffff0000095c3000 [
0.131106] x11: 0000000000000000 x10: ffff000009e74000 [
0.131108] x9 : 0000000000000000 x8 : ffff000009e7b970 [
0.131110] x7 : 0000000000000000 x6 : 0000003f2c309e0d [
0.131112] x5 : 00ffffffffffffff x4 : 0000000000000000 [
0.131114] x3 : 0000000000000000 x2 : ffffffffffffffff [
0.131116] x1 : 4b4ae7b874baf900 x0 : 0000000000000000 [
0.131119] Call trace: [
0.131121]
gic_handle_irq+0x184/0x18c [
0.131122] el1_irq+0xb0/0x140 [
0.131125]
allocate_slab+0x44/0x548 [
0.131126] new_slab+0x64/0xc8 [
0.131128]
___slab_alloc+0x3e4/0x538 [ 0.131129] __slab_alloc+0x50/0x68 [
0.131131]
kmem_cache_alloc_trace+0x20c/0x238 [
0.131135]
efi_mem_reserve_persistent+0x50/0x140 [
0.131139]
its_cpu_init_lpis+0x2bc/0x300 [
0.131141] its_cpu_init+0x78/0x1e0 [
0.131143] gic_starting_cpu+0x24/0x38 [
0.131146]
cpuhp_invoke_callback+0xa0/0x640 [
0.131148]
notify_cpu_starting+0x7c/0xb0 [
0.131150]
secondary_start_kernel+0x114/0x1d8 [
0.131152] ---[ end trace e69195ff3b29c43f ]--- [
0.131178] GICv3: CPU21: using allocated LPI pending
table
@0x0000000c3f6a0000 [
0.131217] CPU21: Booted secondary processor
0x0000000105 [0x480fd010] |
_______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm