Le jeu. 1 févr. 2024 à 13:30, Sébastien Chaumat <euidz...@gmail.com> a
écrit :

> I spotted the following warning for IRQ7 (along with IRQ6 and 10)
>>
>> [    0.686073] fedora kernel: __irq_set_trigger: genirq: No set_type
>> function for IRQ 7 (IR-IO-APIC)
>>
>> This comes from kernel/irq/manage.c
>>
>>
>> int __irq_set_trigger(struct irq_desc *desc, unsigned long flags)
>> {
>> struct irq_chip *chip = desc->irq_data.chip;
>> int ret, unmask = 0;
>>
>> if (!chip || !chip->irq_set_type) {
>> /*
>> * IRQF_TRIGGER_* but the PIC does not support multiple
>> * flow-types?
>> */
>> pr_debug("No set_type function for IRQ %d (%s)\n",
>> irq_desc_get_irq(desc),
>> chip ? (chip->name ? : "unknown") : "unknown");
>> return 0;
>> }
>> Could this have a role in the IRQ misconfiguration by xen ?
>>
>
>  Things are getting even weirder :
>
> xen 4.18.1-pre (vanilla, no patching of pci_xen_initial_domain()), kernel
> 6.8.0-rc2) :
>
> checking /sys/kernel/irq/7 :
>
> actions: pinctrl_amd
> chip_name: xen-pirq
> hwirq:
> name: ioapic-edge
> per_cpu_count: 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0
> type: edge
> wakeup: disabled
>
> now checking  xen with xl debug-key i
>
> (XEN)    IRQ:   7 vec:51 IO-APIC-level   status=030 aff:{13}/{13}
> in-flight=0 d0:  7(---)
> (XEN)     IRQ  7 Vec 81:
> (XEN)       Apic 0x00, Pin  7: vec=51 delivery=Fixed dest=P status=1
> polarity=1 irr=1 trig=L mask=0 dest_id:0000510d
>
> So even after dom0 is set up, the kernel considers  IRQ7 is of type edge
> while xen has it registered as IO-APIC-level.
>
> Reasoning backward  (using a  kernel without the pinctrl_amd driver to
ensure xen only is at stake) :
 checking the diff in IOAPIC  between bare metal and xen  (IRQ7 is on pin07
on APIC )

using kernel argument : apic=debug

bare metal :
[    0.715330] fedora kernel: ... APIC VERSION: 81050010
...
[    0.715433] fedora kernel:  pin07, disabled, edge , high, V(00), IRR(0),
S(0), physical, D(0000), M(0)

xen :
[    2.249582] fedora kernel: ... APIC VERSION: 00000014
...
[    2.249730] fedora kernel:  pin07, disabled, level, low , V(60), IRR(0),
S(0), physical, D(0000), M(0)

So the APIC table is not the same.

As strange as it looks the  (IOAPIC 0) pin07 is correctly described by the
APIC in xen but yet differently than in baremetal.
But the APIC message comes long after the
[    1.833145] fedora kernel: xen: registering gsi 7 triggering 0 polarity 1

so I wonder if the APIC pin07 info had any influence.

Reply via email to