[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/IRQ: make internally used IRQs also honor the pending EOI stack


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 28 Nov 2019 15:28:33 +0000
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=andrew.cooper3@xxxxxxxxxx; spf=Pass smtp.mailfrom=Andrew.Cooper3@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Autocrypt: addr=andrew.cooper3@xxxxxxxxxx; prefer-encrypt=mutual; keydata= mQINBFLhNn8BEADVhE+Hb8i0GV6mihnnr/uiQQdPF8kUoFzCOPXkf7jQ5sLYeJa0cQi6Penp VtiFYznTairnVsN5J+ujSTIb+OlMSJUWV4opS7WVNnxHbFTPYZVQ3erv7NKc2iVizCRZ2Kxn srM1oPXWRic8BIAdYOKOloF2300SL/bIpeD+x7h3w9B/qez7nOin5NzkxgFoaUeIal12pXSR Q354FKFoy6Vh96gc4VRqte3jw8mPuJQpfws+Pb+swvSf/i1q1+1I4jsRQQh2m6OTADHIqg2E ofTYAEh7R5HfPx0EXoEDMdRjOeKn8+vvkAwhviWXTHlG3R1QkbE5M/oywnZ83udJmi+lxjJ5 YhQ5IzomvJ16H0Bq+TLyVLO/VRksp1VR9HxCzItLNCS8PdpYYz5TC204ViycobYU65WMpzWe LFAGn8jSS25XIpqv0Y9k87dLbctKKA14Ifw2kq5OIVu2FuX+3i446JOa2vpCI9GcjCzi3oHV e00bzYiHMIl0FICrNJU0Kjho8pdo0m2uxkn6SYEpogAy9pnatUlO+erL4LqFUO7GXSdBRbw5 gNt25XTLdSFuZtMxkY3tq8MFss5QnjhehCVPEpE6y9ZjI4XB8ad1G4oBHVGK5LMsvg22PfMJ ISWFSHoF/B5+lHkCKWkFxZ0gZn33ju5n6/FOdEx4B8cM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/7tvG3euCklmkn9Sl9IAKFu29RSo d5bD8kMSCYsTqtTfT6W4A3qHGvIDta3ptLYpIAOD2sY3GYq2nf3Bbzx81wZK14JdDDHUX2Rs 6+ahAA==
  • Cc: Juergen Gross <jgross@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, WeiLiu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Thu, 28 Nov 2019 15:28:47 +0000
  • Ironport-sdr: FGqv0A6l4+1KoC7dekIO/36T+Xhw+VrqoLPQrOkB4D7FXBAoTx15O+jIeCqQtSANRK1k2HMmOd Fnmoq5R1uX3KeldN9bz9Fp39EV4ll+vOp3w+2QCRIYaHAG3Zu3puD6j6etcyVeaYg+zvp5Mkng 3+0itADu007+yZ+ZWeA+ed/hudkJu93ehwrub0CC2ea2W4rbESRjjppU9Kobe9rv+1x60G5On1 Kusc1nY7Pl3E0QQH8ejGJ8qKAYfDwc+xisvxxNMtChT7ohdUQLcN3tO+1RVZ2I0GXUc7o5JByi w+g=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Openpgp: preference=signencrypt

On 28/11/2019 14:00, Jan Beulich wrote:
> On 28.11.2019 14:53, Andrew Cooper wrote:
>> On 28/11/2019 12:10, Andrew Cooper wrote:
>>> On 28/11/2019 11:03, Jan Beulich wrote:
>>>> Notes:
>>>>
>>>> - In principle we could get away without the check_eoi_deferral flag.
>>>>   I've introduced it just to make sure there's as little change as
>>>>   possible to unaffected paths.
>>>> - Similarly the cpu_has_pending_apic_eoi() check in do_IRQ() isn't
>>>>   strictly necessary.
>>> I don't think the cpu_has_pending_apic_eoi() check is necessary.  It is
>>> checked at the head of end_nonmaskable_irq() as well.
>>>
>>> Similarly, I'm not sure that check_eoi_deferral is something that we'd
>>> want to introduce.
>>>
>>> I'll drop both of these and test, seeing as I have a repro of the problem.
>> Dropping cpu_has_pending_apic_eoi() wasn't possible in a trivial way (so
>> I didn't), and dropping just check_eoi_deferral on its own definitely
>> breaks things.
>>
>> Given the 4.13 timeline, lets go with it in this form, seeing as it is
>> the version which had all of last night's worth of testing.
>>
>> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>> Tested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Thanks! I've taken note to produce a patch (if possible at all, given
> the results of your attempt) to remove the extra pieces again, ideally
> to go in pretty soon after the branching.

Just for morbid curiosity, this is what happens without the
check_eoi_deferral check:

[  383.845620] dracut-initqueue[302]: Warning: Could not boot.
[  383.892655] dracut-initqueue[302]: Warning:
/dev/disk/by-label/root-qomhwa does not exist
         Starting Dracut Emergency Shell...
....
dracut:/# [  439.282461] BUG: unable to handle kernel NULL pointer
dereference at 00000000000009a0
[  439.282773] PGD 0 P4D 0
[  439.282928] Oops: 0000 [#1] SMP NOPTI
[  439.283088] CPU: 0 PID: 281 Comm: systemd-udevd Tainted: G          
O      4.19.0+1 #1
[  439.283337] Hardware name: Dell Inc. PowerEdge R415/0GXH08, BIOS
2.0.2 10/22/2012
[  439.283591] RIP: e030:mptscsih_remove+0x5b/0xb0 [mptscsih]
[  439.283751] Code: ff 74 1e 8b 83 9c 01 00 00 44 8d 2c c5 00 00 00 00
e8 c9 4d e9 c0 48 c7 83 c0 0c 00 00 00 00 00 00 f6 83 c8 00 00 00 01 75
34 <48> 8b bd a0
[  439.284153] RSP: e02b:ffffc900404b7b50 EFLAGS: 00010246
[  439.284312] RAX: 0000000000000049 RBX: ffff88809a7d9000 RCX:
0000000000000006
[  439.284477] RDX: 0000000000000000 RSI: 0000000000000001 RDI:
0000000000000000
[  439.284644] RBP: 0000000000000000 R08: 0000000000000000 R09:
0000000000000384
[  439.284810] R10: 0000000000000004 R11: 0000000000000000 R12:
ffff88809a7cc000
[  439.284975] R13: 0000000000000000 R14: ffffffffc038b180 R15:
ffffc900404b7e98
[  439.285149] FS:  00007ff0922a38c0(0000) GS:ffff8880a3600000(0000)
knlGS:0000000000000000
[  439.285428] CS:  e033 DS: 0000 ES: 0000 CR0: 0000000080050033
[  439.285590] CR2: 00000000000009a0 CR3: 0000000004012000 CR4:
0000000000000660
[  439.285765] Call Trace:
[  439.285924]  mptsas_probe+0x384/0x530 [mptsas]
[  439.286133]  pci_device_probe+0xc9/0x140
[  439.286297]  really_probe+0x238/0x3e0
[  439.286455]  driver_probe_device+0x115/0x130
[  439.286622]  __driver_attach+0x103/0x110
[  439.286805]  ? driver_probe_device+0x130/0x130
[  439.286964]  bus_for_each_dev+0x67/0xc0
[  439.287120]  bus_add_driver+0x41/0x260
[  439.287274]  ? 0xffffffffc038f000
[  439.287426]  driver_register+0x5b/0xe0
[  439.287578]  ? 0xffffffffc038f000
[  439.287732]  mptsas_init+0x114/0x1000 [mptsas]
[  439.287890]  do_one_initcall+0x4e/0x1d4
[  439.288045]  ? _cond_resched+0x15/0x30
[  439.288232]  ? kmem_cache_alloc_trace+0x15f/0x1c0
[  439.288392]  do_init_module+0x5a/0x21b
[  439.288546]  load_module+0x2270/0x2800
[  439.288700]  ? m_show+0x1c0/0x1c0
[  439.288854]  __do_sys_finit_module+0x94/0xe0
[  439.289012]  do_syscall_64+0x4e/0x100
[  439.289168]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[  439.289326] RIP: 0033:0x7ff090ef9ec9
[  439.289482] Code: 01 00 48 81 c4 80 00 00 00 e9 f1 fe ff ff 0f 1f 00
48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f
05 <48> 3d 01 f8
[  439.289871] RSP: 002b:00007ffd96d355d8 EFLAGS: 00000246 ORIG_RAX:
0000000000000139
[  439.290120] RAX: ffffffffffffffda RBX: 00005581851f9f70 RCX:
00007ff090ef9ec9
[  439.290287] RDX: 0000000000000000 RSI: 00007ff09181a099 RDI:
000000000000000c
[  439.290458] RBP: 00007ff09181a099 R08: 0000000000000000 R09:
00005581851f6670
[  439.290625] R10: 000000000000000c R11: 0000000000000246 R12:
0000000000000000
[  439.290792] R13: 00005581851f6240 R14: 0000000000020000 R15:
0000000000000000
[  439.290993] Modules linked in: ata_generic pata_acpi ohci_pci ahci
serio_raw pata_atiixp libahci mptsas(+) scsi_transport_sas ehci_pci
bnx2(O) libata mptscst
[  439.291484] CR2: 00000000000009a0
[  439.291665] ---[ end trace 519b6f631d8509d1 ]---
[  439.295635] RIP: e030:mptscsih_remove+0x5b/0xb0 [mptscsih]
[  439.295804] Code: ff 74 1e 8b 83 9c 01 00 00 44 8d 2c c5 00 00 00 00
e8 c9 4d e9 c0 48 c7 83 c0 0c 00 00 00 00 00 00 f6 83 c8 00 00 00 01 75
34 <48> 8b bd a0
[  439.296180] RSP: e02b:ffffc900404b7b50 EFLAGS: 00010246
[  439.296340] RAX: 0000000000000049 RBX: ffff88809a7d9000 RCX:
0000000000000006
[  439.296539] RDX: 0000000000000000 RSI: 0000000000000001 RDI:
0000000000000000
[  439.296707] RBP: 0000000000000000 R08: 0000000000000000 R09:
0000000000000384
[  439.296874] R10: 0000000000000004 R11: 0000000000000000 R12:
ffff88809a7cc000
[  439.297044] R13: 0000000000000000 R14: ffffffffc038b180 R15:
ffffc900404b7e98
[  439.297216] FS:  00007ff0922a38c0(0000) GS:ffff8880a3600000(0000)
knlGS:0000000000000000
[  439.297468] CS:  e033 DS: 0000 ES: 0000 CR0: 0000000080050033
[  439.297630] CR2: 00000000000009a0 CR3: 0000000004012000 CR4:
0000000000000660

Whatever else is going on with interrupts, it is clear that the mptsas
driver has some poor error handling in it.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.