From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Stefano Stabellini" <sstabellini@kernel.org>,
"Huang Rui" <ray.huang@amd.com>,
"Anthony PERARD" <anthony.perard@citrix.com>,
xen-devel@lists.xenproject.org,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Stewart Hildebrand" <Stewart.Hildebrand@amd.com>,
"Xenia Ragiadakou" <burzalodowa@gmail.com>,
"Honglei Huang" <honglei1.huang@amd.com>,
"Julia Zhang" <julia.zhang@amd.com>,
"Chen Jiqian" <Jiqian.Chen@amd.com>
Subject: Re: [RFC XEN PATCH 6/6] tools/libs/light: pci: translate irq to gsi
Date: Fri, 17 Mar 2023 10:51:08 +0100 [thread overview]
Message-ID: <ZBQ4DKJ8ZAroyPIQ@Air-de-Roger> (raw)
In-Reply-To: <4edb59db-d2b8-122a-fc10-59001857bee0@suse.com>
On Fri, Mar 17, 2023 at 09:39:52AM +0100, Jan Beulich wrote:
> On 17.03.2023 00:19, Stefano Stabellini wrote:
> > On Thu, 16 Mar 2023, Jan Beulich wrote:
> >> So yes, it then all boils down to that Linux-
> >> internal question.
> >
> > Excellent question but we'll have to wait for Ray as he is the one with
> > access to the hardware. But I have this data I can share in the
> > meantime:
> >
> > [ 1.260378] IRQ to pin mappings:
> > [ 1.260387] IRQ1 -> 0:1
> > [ 1.260395] IRQ2 -> 0:2
> > [ 1.260403] IRQ3 -> 0:3
> > [ 1.260410] IRQ4 -> 0:4
> > [ 1.260418] IRQ5 -> 0:5
> > [ 1.260425] IRQ6 -> 0:6
> > [ 1.260432] IRQ7 -> 0:7
> > [ 1.260440] IRQ8 -> 0:8
> > [ 1.260447] IRQ9 -> 0:9
> > [ 1.260455] IRQ10 -> 0:10
> > [ 1.260462] IRQ11 -> 0:11
> > [ 1.260470] IRQ12 -> 0:12
> > [ 1.260478] IRQ13 -> 0:13
> > [ 1.260485] IRQ14 -> 0:14
> > [ 1.260493] IRQ15 -> 0:15
> > [ 1.260505] IRQ106 -> 1:8
> > [ 1.260513] IRQ112 -> 1:4
> > [ 1.260521] IRQ116 -> 1:13
> > [ 1.260529] IRQ117 -> 1:14
> > [ 1.260537] IRQ118 -> 1:15
> > [ 1.260544] .................................... done.
>
> And what does Linux think are IRQs 16 ... 105? Have you compared with
> Linux running baremetal on the same hardware?
So I have some emails from Ray from he time he was looking into this,
and on Linux dom0 PVH dmesg there is:
[ 0.065063] IOAPIC[0]: apic_id 33, version 17, address 0xfec00000, GSI 0-23
[ 0.065096] IOAPIC[1]: apic_id 34, version 17, address 0xfec01000, GSI 24-55
So it seems the vIO-APIC data provided by Xen to dom0 is at least
consistent.
> > And I think Ray traced the point in Linux where Linux gives us an IRQ ==
> > 112 (which is the one causing issues):
> >
> > __acpi_register_gsi->
> > acpi_register_gsi_ioapic->
> > mp_map_gsi_to_irq->
> > mp_map_pin_to_irq->
> > __irq_resolve_mapping()
> >
> > if (likely(data)) {
> > desc = irq_data_to_desc(data);
> > if (irq)
> > *irq = data->irq;
> > /* this IRQ is 112, IO-APIC-34 domain */
> > }
Could this all be a result of patch 4/5 in the Linux series ("[RFC
PATCH 4/5] x86/xen: acpi registers gsi for xen pvh"), where a different
__acpi_register_gsi hook is installed for PVH in order to setup GSIs
using PHYSDEV ops instead of doing it natively from the IO-APIC?
FWIW, the introduced function in that patch
(acpi_register_gsi_xen_pvh()) seems to unconditionally call
acpi_register_gsi_ioapic() without checking if the GSI is already
registered, which might lead to multiple IRQs being allocated for the
same underlying GSI?
As I commented there, I think that approach is wrong. If the GSI has
not been mapped in Xen (because dom0 hasn't unmasked the respective
IO-APIC pin) we should add some logic in the toolstack to map it
before attempting to bind.
Thanks, Roger.
next prev parent reply other threads:[~2023-03-17 9:51 UTC|newest]
Thread overview: 75+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-12 7:54 [RFC XEN PATCH 0/6] Introduce VirtIO GPU and Passthrough GPU support on Xen PVH dom0 Huang Rui
2023-03-12 7:54 ` [RFC XEN PATCH 1/6] x86/pvh: report ACPI VFCT table to dom0 if present Huang Rui
2023-03-13 11:55 ` Andrew Cooper
2023-03-13 12:21 ` Roger Pau Monné
2023-03-13 12:27 ` Andrew Cooper
2023-03-21 6:26 ` Huang Rui
2023-03-12 7:54 ` [RFC XEN PATCH 2/6] vpci: accept BAR writes if dom0 is PVH Huang Rui
2023-03-13 7:23 ` Christian König
2023-03-13 7:26 ` Christian König
2023-03-13 8:46 ` Jan Beulich
2023-03-13 8:55 ` Huang Rui
2023-03-14 23:42 ` Stefano Stabellini
2023-03-14 16:02 ` Jan Beulich
2023-03-21 9:36 ` Huang Rui
2023-03-21 9:41 ` Jan Beulich
2023-03-21 10:14 ` Huang Rui
2023-03-21 10:20 ` Jan Beulich
2023-03-21 11:49 ` Huang Rui
2023-03-21 12:20 ` Roger Pau Monné
2023-03-21 12:25 ` Jan Beulich
2023-03-21 12:59 ` Huang Rui
2023-03-21 12:27 ` Jan Beulich
2023-03-21 13:03 ` Huang Rui
2023-03-22 7:28 ` Huang Rui
2023-03-22 7:45 ` Jan Beulich
2023-03-22 9:34 ` Roger Pau Monné
2023-03-22 12:33 ` Huang Rui
2023-03-22 12:48 ` Jan Beulich
2023-03-23 10:26 ` Huang Rui
2023-03-23 14:16 ` Jan Beulich
2023-03-23 10:43 ` Roger Pau Monné
2023-03-23 13:34 ` Huang Rui
2023-03-23 16:23 ` Roger Pau Monné
2023-03-24 4:37 ` Huang Rui
2023-03-12 7:54 ` [RFC XEN PATCH 3/6] x86/pvh: shouldn't check pirq flag when map pirq in PVH Huang Rui
2023-03-14 16:27 ` Jan Beulich
2023-03-15 15:57 ` Roger Pau Monné
2023-03-16 0:22 ` Stefano Stabellini
2023-03-21 10:09 ` Huang Rui
2023-03-21 10:17 ` Jan Beulich
2023-03-12 7:54 ` [RFC XEN PATCH 4/6] x86/pvh: PVH dom0 also need PHYSDEVOP_setup_gsi call Huang Rui
2023-03-14 16:30 ` Jan Beulich
2023-03-15 17:01 ` Andrew Cooper
2023-03-16 0:26 ` Stefano Stabellini
2023-03-16 0:39 ` Stefano Stabellini
2023-03-16 8:51 ` Jan Beulich
2023-03-16 9:18 ` Roger Pau Monné
2023-03-16 7:05 ` Jan Beulich
2023-03-21 12:42 ` Huang Rui
2023-03-21 12:22 ` Huang Rui
2023-03-12 7:54 ` [RFC XEN PATCH 5/6] tools/libs/call: add linux os call to get gsi from irq Huang Rui
2023-03-14 16:36 ` Jan Beulich
2023-03-12 7:54 ` [RFC XEN PATCH 6/6] tools/libs/light: pci: translate irq to gsi Huang Rui
2023-03-14 16:39 ` Jan Beulich
2023-03-15 16:35 ` Roger Pau Monné
2023-03-16 0:44 ` Stefano Stabellini
2023-03-16 8:54 ` Roger Pau Monné
2023-03-16 8:55 ` Jan Beulich
2023-03-16 9:27 ` Roger Pau Monné
2023-03-16 9:42 ` Jan Beulich
2023-03-16 23:19 ` Stefano Stabellini
2023-03-17 8:39 ` Jan Beulich
2023-03-17 9:51 ` Roger Pau Monné [this message]
2023-03-17 18:15 ` Stefano Stabellini
2023-03-17 19:48 ` Roger Pau Monné
2023-03-17 20:55 ` Stefano Stabellini
2023-03-20 15:16 ` Roger Pau Monné
2023-03-20 15:29 ` Jan Beulich
2023-03-20 16:50 ` Roger Pau Monné
2023-07-31 16:40 ` Chen, Jiqian
2023-08-23 8:57 ` Roger Pau Monné
2023-08-31 8:56 ` Chen, Jiqian
2023-03-13 7:24 ` [RFC XEN PATCH 0/6] Introduce VirtIO GPU and Passthrough GPU support on Xen PVH dom0 Christian König
2023-03-21 10:26 ` Huang Rui
2023-03-20 16:22 ` Huang Rui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZBQ4DKJ8ZAroyPIQ@Air-de-Roger \
--to=roger.pau@citrix.com \
--cc=Jiqian.Chen@amd.com \
--cc=Stewart.Hildebrand@amd.com \
--cc=alexander.deucher@amd.com \
--cc=anthony.perard@citrix.com \
--cc=burzalodowa@gmail.com \
--cc=christian.koenig@amd.com \
--cc=honglei1.huang@amd.com \
--cc=jbeulich@suse.com \
--cc=julia.zhang@amd.com \
--cc=ray.huang@amd.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.