Bug 2255625 - With XEN only, Framework 13 AMD Touchpad (amd_gpio/i2c_hid_acpi) does not work
Summary: With XEN only, Framework 13 AMD Touchpad (amd_gpio/i2c_hid_acpi) does not work
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel-xen
Version: 39
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Xen Maintainance List
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-12-22 14:29 UTC by Sébastien Chaumat
Modified: 2024-11-27 22:28 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-11-27 22:28:04 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
dmesg from dom0 (121.15 KB, text/plain)
2023-12-22 14:31 UTC, Sébastien Chaumat
no flags Details
xl dmesg (23.03 KB, text/plain)
2023-12-22 14:32 UTC, Sébastien Chaumat
no flags Details
/proc/interrupts from dom0 (36.49 KB, text/plain)
2023-12-22 14:32 UTC, Sébastien Chaumat
no flags Details
/sys/kernel/debug/gpio from dom0 (19.10 KB, text/plain)
2023-12-22 14:33 UTC, Sébastien Chaumat
no flags Details
dmesg from baremetal (116.14 KB, text/plain)
2023-12-22 14:34 UTC, Sébastien Chaumat
no flags Details
/proc/interrupts from bare metal (15.58 KB, text/plain)
2023-12-22 14:34 UTC, Sébastien Chaumat
no flags Details
/syr/kernel/debug/gpio from bare metal (19.10 KB, text/plain)
2023-12-22 14:35 UTC, Sébastien Chaumat
no flags Details

Description Sébastien Chaumat 2023-12-22 14:29:30 UTC
Without xen the Touchpad works perfectly.

Once the laptop is running under XEN it is no more working in dom0.

One possible part of the issue :

The IRQ7 (pinctrl_amd) , natively fasteoi on baremetal, is converted to edge instead of level once in xen (dom0).

/proc/interrupts :

Without xen

   7: .... IR-IO-APIC    7-fasteoi   pinctrl_amd
and we see the IRQ73 counter increasing when touching the touchpad :
   73:          0          0          0          0          0        891   ...  amd_gpio    8  PIXA3854:00

With xen : 
 7:   xen-pirq     -ioapic-edge  pinctrl_amd
the counter for IRQ73 
 176:          0          0          0          0          0          0          1           ...  amd_gpio    8  PIXA3854:00

plus we got the message :
[    2.411715] amd_gpio AMDI0030:00: failed to enable wake-up interrupt

Simply forcing IRQ7 to -ioapic-level under xen does not solve the issue.

(see our debugging at https://lists.xenproject.org/archives/html/xen-devel/2023-12/msg02023.html)

tested with xen 4.17.3-pre, even 4.18.
kernel up to 6.7.0-rc6

Reproducible: Always

Steps to Reproduce:
1. Install xen package
2. reboot 
3. select xen option in grub
4. test the touchpad in graphical session
Actual Results:  
Touchpad detected  in evtest but not event registered

Expected Results:  
Touchpad working both on baremetal and in PV dom0

Comment 1 Sébastien Chaumat 2023-12-22 14:31:49 UTC
Created attachment 2005445 [details]
dmesg from dom0

Comment 2 Sébastien Chaumat 2023-12-22 14:32:16 UTC
Created attachment 2005446 [details]
xl dmesg

Comment 3 Sébastien Chaumat 2023-12-22 14:32:56 UTC
Created attachment 2005447 [details]
/proc/interrupts from dom0

Comment 4 Sébastien Chaumat 2023-12-22 14:33:25 UTC
Created attachment 2005448 [details]
/sys/kernel/debug/gpio from dom0

Comment 5 Sébastien Chaumat 2023-12-22 14:34:02 UTC
Created attachment 2005449 [details]
dmesg from baremetal

Comment 6 Sébastien Chaumat 2023-12-22 14:34:48 UTC
Created attachment 2005450 [details]
/proc/interrupts from bare metal

Comment 7 Sébastien Chaumat 2023-12-22 14:35:22 UTC
Created attachment 2005451 [details]
/syr/kernel/debug/gpio from bare metal

Comment 8 mattwork 2024-01-03 22:31:49 UTC
Any thoughts on this one @mario.limonciello - appreciate any insights you might have. 

Thanks

Comment 9 Mario Limonciello 2024-01-17 02:09:54 UTC
I did suggest a patch that could clear interrupts at startup in pinctrl-amd to Sebastien over email, but this doesn't help the behavior.

There's something wrong with how xen maps the interrupts for the GPIO controller compared to how it is done in bare metal.
Sebastien has raised an email thread on xen-devel about it here:

https://lore.kernel.org/xen-devel/e83e7254-0c90-4912-ae63-ea7221a10071@suse.com/T/#m115e24224b5a54a836cad5c1125435de174b5be8

I expect that the action here is for Xen developers to find the problem and fix it.

Comment 10 Aoife Moloney 2024-11-13 10:19:18 UTC
This message is a reminder that Fedora Linux 39 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 39 on 2024-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '39'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 39 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 11 Aoife Moloney 2024-11-27 22:28:04 UTC
Fedora Linux 39 entered end-of-life (EOL) status on 2024-11-26.

Fedora Linux 39 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.