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

Re: [RFC XEN PATCH 3/6] x86/pvh: shouldn't check pirq flag when map pirq in PVH


  • To: Huang Rui <ray.huang@xxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 15 Mar 2023 16:57:45 +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=XsYSFHUasSuNuC26UpMbcWO9DLN9A8a3twVVvPb95Ks=; b=PWBldA1kcwOHQAjEPIL3UFEgI6n/LPazVP9JWFZU3CGUchC28oNSankcp5m0LPEKPjQc+KBQ9d3/JLKsjLR9a8588ViApL7Vqo4PLvvYHliveUJ4K5iekI7Vpr1Gg2LFDI5YFrqBukp1wflsG7WtNncDxG5Il9nLPkV/pPMxu5AVR9a/69awPeb02i0aagTj/fg8qvwY/2DGcoZGmbBrpUvw0RgwxkYRGOHoz7bl+b4dSR8hJMcI1svwJ6ilHWpCyXiq9CA0ni8BlQfQ37BMfH+wIQvHmWgSkoCsfTbHNGXs4EVdIRORTZJYln3QFmStpscAexDB0gL1oxZK6LY/OA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lt1G0FAccYGZlCM4odROC8SR0aSErAcu/AcFlm4QHdFi7lgiEleHkUQmJTvq2RSiHpJg5Gcu2ckyyHYOL0PnBPxLvH35ORAduVcfRxwTjdKGjrHM5a/pcFc63issf8Mzmr4xqw5bdpkwUWA3Qlhelj4EKF47xF4Dss8ltPdNd7oB6RDSFpjdlouUATN0qblE0DMlAxGwVLD2lEI3b67BnoS6psHOUHOEXCqGqUN2d3tvgNfeKYl/DsbH+xYqcQWXmQj9JY2g8zxK4yxWw4XFAQsfU7xg84RyPIzvcqQFYzgH5sZ3E+2++4eYU2Mc2grnAP0s8tnpMnhe0p78QK4DDQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Jan Beulich <jbeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, 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 15:58:17 +0000
  • Ironport-data: A9a23:JgbQi6+tNs7WmaWhUsqeDrUD7n6TJUtcMsCJ2f8bNWPcYEJGY0x3y WceDGGPOfffNzemKtojboqw9EpTvpOEyYQxT1RqqCA8E34SpcT7XtnIdU2Y0wF+jCHgZBk+s 5hBMImowOQcFCK0SsKFa+C5xZVE/fjUAOG6UKicYXoZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ire7kI/1BjOkGlA5AdmPqkW5AW2e0Q9V/rzG4ngdxMUfaEMdgKKb 76r5K20+Grf4yAsBruN+losWhRXKlJ6FVHmZkt+A8BOsDAbzsAB+v9T2M4nQVVWk120c+VZk 72hg3ASpTABZcUgkMxFO/VR/roX0aduoNcrKlDn2SCfItGvn9IBDJyCAWlvVbD09NqbDklc/ NkAJgoycCu9oMe34u2gQdZpu8E8eZyD0IM34hmMzBn/JNN+G9X4ZfyP4tVVmjAtmspJAPDSI dIDbiZiZwjBZBsJPUoLDJU5n6GjgXyXnz9w8QrJ4/ZopTWMilAsuFTuGIO9ltiiX8Jak1zev mvb12/4HgsbJJqUzj/tHneE37eXzHOhCdJCfFG+3sU13EKDnHIQMk09b0aQ/7qL1Re7Yt0Kf iT4/QJr98De7neDVNDsGR2lqXiLlhcZV5xbFOhSwAOHx7fQ4g2ZLnMZVTMHY9sj3OctXiAj3 FKNm9LvBBRsvaeTRHbb8a2bxRuiNC5QIWIcaCssSQoe/8KlsIw1lgjITNtoDOiylNKdMTj0z iCDqiQznfMfgNMA16ih1VnCj3SnoZ2hZgU1/ATMQmOs6EV6Y4OjZoOA4F3Xq/1HKe6xdUWMo 3Eeh46+7eQCAJuXnSqBaOwIEPei4PPtGDfBm0xmG54t8Cuk03GmdIFUpjp5IS9BMsECdjvkY RaVuR5Y4pB7NX6mK6RwZuqZCdkuzKGmB9TsUP/8Z99CJJN2cWev3iB3ZEeWmUvtnU4EmKQzf 5ycdK6R4W0yDK1myH+tQb4b2LpznCQmnzuPGNb80git1qeYaDiNU7AZPVCSb+c/qqSZvAHS9 NUZPMyPo/lCbNDDjuDs2dZ7BTg3wbITXPgad+Q/mja/Hzdb
  • Ironport-hdrordr: A9a23:H0FJlqhRgTtDEcxtAeeaLcvTYnBQXiwji2hC6mlwRA09TyX5ra 2TdTogtSMc6QxhPk3I/OrrBEDuexzhHPJOj7X5eI3SPjUO21HYS72Kj7GSoAEIcheWnoJgPO VbAs1D4bXLZmSS5vyKhDVQfexA/DGGmprY+ts3zR1WPH9Xg3cL1XYJNu6ZeHcGNDWvHfACZe OhDlIsnUvcRZwQBP7LfkUtbqz4iPDgsonpWhICDw5P0njzsdv5gISKaCRxx30lIkly/Ys=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Sun, Mar 12, 2023 at 03:54:52PM +0800, Huang Rui wrote:
> From: Chen Jiqian <Jiqian.Chen@xxxxxxx>
> 
> PVH is also hvm type domain, but PVH hasn't X86_EMU_USE_PIRQ
> flag. So, when dom0 is PVH and call PHYSDEVOP_map_pirq, it
> will fail at check has_pirq();
> 
> Signed-off-by: Chen Jiqian <Jiqian.Chen@xxxxxxx>
> Signed-off-by: Huang Rui <ray.huang@xxxxxxx>
> ---
>  xen/arch/x86/hvm/hypercall.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/xen/arch/x86/hvm/hypercall.c b/xen/arch/x86/hvm/hypercall.c
> index 405d0a95af..16a2f5c0b3 100644
> --- a/xen/arch/x86/hvm/hypercall.c
> +++ b/xen/arch/x86/hvm/hypercall.c
> @@ -89,8 +89,6 @@ long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) 
> arg)
>      case PHYSDEVOP_eoi:
>      case PHYSDEVOP_irq_status_query:
>      case PHYSDEVOP_get_free_pirq:
> -        if ( !has_pirq(currd) )
> -            return -ENOSYS;

Since I've taken a look at the Linux side of this, it seems like you
need PHYSDEVOP_map_pirq and PHYSDEVOP_setup_gsi, but the later is not
in this list because has never been available to HVM type guests.

I would like to better understand the usage by PVH dom0 for GSI
passthrough before deciding on what to do here.  IIRC QEMU also uses
PHYSDEVOP_{un,}map_pirq in order to allocate MSI(-X) interrupts.

Thanks, Roger.



 


Rackspace

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