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

Re: [RFC XEN PATCH 6/6] tools/libs/light: pci: translate irq to gsi


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 20 Mar 2023 16:29:25 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=u/YNcxkdmj2cYMt1tizAh8QzH4XEYfIO9XVNzW1J/f4=; b=KmSckM+8zUUmt3RdrLzOxWZiXfPS+xUK/JfPyAL18y7EHBeWhWv/k1+QJbhKaTrWkBZdJe5Bn6/oNHcZOO26klKaeqa4dpcmi75pcFW3PWdYeZuVvApRFfrEefyE+fgFERamb9ZguYWBk0GONJxpzoLqAS6x3j4936Qaz95V5c0F7v6d+BbChqUgHpzLuIJSQK3a2+JuJx6LanSmcO3kqubQFAoUMp4QcFHnnUbNhdC9RkaXcA/gioLiRYRA18bw2P0NqsQIwQmmVOLCFPkaMa5Z5k9BKLJaCzrtRncORDYAdZFJYSjBkm2A/960Apu/wiClvCrAs6+NdwdNdn4uTQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bsl1RPgsPprnc9mBxD6sZRz4caoSLb3hMNS2UmaGg9bi56+IM/BK4XAdByKc02ysYCVgnfjgTJrZmhbcCPd2j4C3QNs6BX5PRJ6Kp6w5h7/bcaEeRhm99ze1Qqwz9FIiwU1iz0JA1cKHBgLAVEe/zdvSyvJMxZFgTiXLyczgrcRd2BvtGpL+LuHeWMeTkOhXtt25RktXn3MHQUiZeCC+K/L+0SclXX+MIbIPmgmIX54ZxhzvrxSpeO8KpgSLIIpn4NMBGWlVPAW8KWKxp3INJxhD5hFNqH1xpFgSYeQ1f36fw8cXRRQBzpqB/aND/o8bwVFTDzZUXgmzHBBu5335sA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Huang Rui <ray.huang@xxxxxxx>, 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>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Mon, 20 Mar 2023 15:29:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 20.03.2023 16:16, Roger Pau Monné wrote:
> @@ -244,12 +242,18 @@ static void vioapic_write_redirent(
>      }
>      else
>      {
> +        int ret;
> +
>          unmasked = ent.fields.mask;
>          /* Remote IRR and Delivery Status are read-only. */
>          ent.bits = ((ent.bits >> 32) << 32) | val;
>          ent.fields.delivery_status = 0;
>          ent.fields.remote_irr = pent->fields.remote_irr;
>          unmasked = unmasked && !ent.fields.mask;
> +        ret = mp_register_gsi(gsi, ent.fields.trig_mode, 
> ent.fields.polarity);
> +        if ( ret && ret !=  -EEXIST )
> +            gprintk(XENLOG_WARNING, "vioapic: error registering GSI %u: 
> %d\n",
> +                    gsi, ret);
>      }

I assume this is only meant to be experimental, as I'm missing confinement
to Dom0 here. I also question this when the mask bit as set, as in that
case neither the trigger mode bit nor the polarity one can be relied upon.
At which point it would look to me as if it was necessary for Dom0 to use
a hypercall instead (which naturally would then be PHYSDEVOP_setup_gsi).

Jan



 


Rackspace

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