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

Re: [RFC PATCH 5/5] xen/privcmd: add IOCTL_PRIVCMD_GSI_FROM_IRQ


  • To: Huang Rui <ray.huang@xxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 15 Mar 2023 15:26:17 +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=P8Ln+wRfhrINjyA6imnJhPYRQ4u9OKDbnJqG04xkOiQ=; b=YPM87aSrq1bETSWxeniwjt2SEhboXh9/GGIfxFn3IKP7z4U36C53pBwOCcfIR9J6onPmRhbvzGl1oyQEFo6lvnQlUoyD1Nt0hzcgsyGptl5SpQGCxiLgq6t0+VrV4faj+DkzMlrdZQ55jWHzvQggqGoGZL49kCwrEgldX73eWmISvfz1R9m6MtaaboItmcKIvK4SI1jdlS/xMLNxu6k9ux8nMc/CzHCM9RcUR+G9gSVNjBODKYRLrQ8Prceod9UO0L1MpoGcktaW2e0FAyG/wpVYxGI6B68St/mGaqhedLmSB0FXOYQI2mDRxKS746ZVShaCSc9jcPDaifah2bTU2w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A553x65u8wykC4HFnZ6lRzqBSb7gBu9Y2AFLco26gSbof+fKT+2J8kEAKPLQkt9dddgPsxjNMkhq968oFwM4P25HTN/U6Ne8C08WZGg3sOwYmpEZMgYUuoBDX8qKzFo2ZGJa60D9ChM1jgqK2dZpw9j2Ztp3kF/8vCDdd+jhLeCZWTtImYSKllR3ttmjagI2JHQehbqaoPZpDH7DhcdohpfrVHm4lUgg6EGONaNREv7y/mtLuo7LbbK4/Fd0naA2XumXyIArFq6MhN0OwV7tc9gYLLit3VPgPEd7GpXLLY5Y6r/VnSojpDKJopNs3pGJM1LGEXldTp9Heq7sIPezsw==
  • 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:26:41 +0000
  • Ironport-data: A9a23:FSuMA6hkoJHLmbrR62vZfR1mX1615xAKZh0ujC45NGQN5FlHY01je htvDD+GPfbfYmXzfY92b9vkpBwAu5eDzdNqT1Y9pS9gFSsb9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrWCYmYpHlUMpB4J0XpLg/Q+jpNjne+3CgaMv cKai8DEMRqu1iUc3lg8sspvkzsy+qWi0N8klgZmP6sT5waDzyB94K83fsldEVOpGuG4IcbiL wrz5OnR1n/U+R4rFuSknt7TGqHdauePVeQmoiM+t5mK2nCulARrukoIHKN0hXNsoyeIh7hMJ OBl7vRcf+uL0prkw4zxWzEAe8130DYvFLXveRBTuuTLp6HKnueFL1y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AUNDSzNzhHZK3BkW6F+rgbsb+6GWOT6ds2DU0BceinUc5dBs5CZDqmLg==
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Sun, Mar 12, 2023 at 08:01:57PM +0800, Huang Rui wrote:
> From: Chen Jiqian <Jiqian.Chen@xxxxxxx>
> 
> When hypervisor get an interrupt, it needs interrupt's
> gsi number instead of irq number. Gsi number is unique
> in xen, but irq number is only unique in one domain.
> So, we need to record the relationship between irq and
> gsi when dom0 initialized pci devices, and provide syscall
> IOCTL_PRIVCMD_GSI_FROM_IRQ to translate irq to gsi. So
> that, we can map pirq successfully in hypervisor side.

GSI is not only unique in Xen, it's an ACPI provided value that's
unique in the platform.  The text above make it look like GSI is some
kind of internal Xen reference to an interrupt, but it's not.

How does a PV domain deal with this? I would assume there Linux will
also end up with IRQ != GSI, and hence will need some kind of
translation?

Thanks, Roger.



 


Rackspace

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