[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 4/5] x86/xen: acpi registers gsi for xen pvh
- To: Huang Rui <ray.huang@xxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Wed, 15 Mar 2023 15:00:38 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uOFoSjsc7ejNROHwp3UOXc9UCLRpiccauiYtgZGAyGA=; b=huxa02xbA4GJf0OdJ7uOXbC7kn4Op0ieLjjXVLQPHU9ReUnLrk8jDTtwcsnLVLPswRk1wl66wqa5V8F/Mo+lKrq52+cC7hNxhlzXjoKB9fCyVANiTHB+3g1v/jgtiPe3EUq7+qJsZTP7f6cAHdYWBa4HRW+Xpyf0PVZ7uNnfnkrBH52404Hb8MPPGZaMP+UAf1i3j4p7gaSyKzQ1+aQGxiHL+hf46Im6DZVHMfTniQnaozHS/qEeZ4/2lLXRpsOIIePqILF0OCcFC3FFQmzUNF6Inqru5Zg2D7u4+PE+vmD+TktMuBUG79kefc+iBDqlW0I/b9EKE1spmobjjVso/A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TzpeOmBgt7g0wCxIsjTciNZM2QeO0vynpj9RQj9PA/fJuyhKCQr75dwVcZGRuEYl5QLJGk2lZLE6H3UWvUhwJERoKolktNfjUBZsMH4NxUONLPlMWO5LuTUCSrE3JNVVArelAgm16v3GUyduC4jHviWideZaMUJ0BPwihIsMxq+d29rEmhRahN7Fco+Bc1By8mZCJR30o83vR60g13H7lm/PS/BEP0TfTAu6kPW6ZLTlcrGtW2HLA1aUfAyd8p8W0LZhPRXzEw/OFl5L8y43jJ9BjVDSdFbjwCaacJkt4SRIPHTAKzgeX/PfcR7bujWYSkMnKo0Z8K/o0I1/KZ6zEA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, amd-gfx@xxxxxxxxxxxxxxxxxxxxx, Alex Deucher <alexander.deucher@xxxxxxx>, Christian König <christian.koenig@xxxxxxx>, Stewart Hildebrand <Stewart.Hildebrand@xxxxxxx>, Xenia Ragiadakou <burzalodowa@xxxxxxxxx>, Honglei Huang <honglei1.huang@xxxxxxx>, Julia Zhang <julia.zhang@xxxxxxx>, Chen Jiqian <Jiqian.Chen@xxxxxxx>
- Delivery-date: Wed, 15 Mar 2023 14:01:39 +0000
- Ironport-data: A9a23:ZvBX0azWg5TuoBAyrHl6t+ewxirEfRIJ4+MujC+fZmUNrF6WrkUFy jAcCjrXbq2DNmGhKNt1b4/i90NTuZXSzoJnQQNsqyAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTrafYEidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw//F+UMHUMja4mtC5QRlPK0T5TcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAG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PTvytHUuQ+Up00dKz2CEJsQjDuR0zzranGekjM2fqYEKA ==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Sun, Mar 12, 2023 at 08:01:56PM +0800, Huang Rui wrote:
> From: Chen Jiqian <Jiqian.Chen@xxxxxxx>
>
> Add acpi_register_gsi_xen_pvh() to register gsi for PVH mode.
> In addition to call acpi_register_gsi_ioapic(), it also setup
> a map between gsi and vector in hypervisor side. So that,
> when dgpu create an interrupt, hypervisor can correctly find
> which guest domain to process interrupt by vector.
The term 'dgpu' needs clarifying or replacing by a more generic
naming.
Also, I would like to be able to get away from requiring dom0 to
register the GSIs in this way. If you take a look at Xen, there's
code in the emulated IO-APIC available to dom0 that already does this
registering (see vioapic_hwdom_map_gsi() in Xen).
I think the problem here is that the GSI used by the device you want
to passthrough has never had it's pin unmasked in the IO-APIC, and
hence hasn't been registered.
It would be helpful if you could state in the commit message what
issue you are trying to solve by doing this registering here, I assume
it is done in order to map the IRQ to a PIRQ, so later calls by the
toolstack to bind it succeed.
Would it be possible instead to perform the call to PHYSDEVOP_map_pirq
in the toolstack itself if the PIRQ cannot be found?
Thanks, Roger.
|