[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] xen: Remove dependency between pciback and privcmd
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
- Date: Thu, 10 Oct 2024 08:41:09 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=pg6wvMKY4j5BZkgnHX7n7GYoZI23XClvF+KHkBr8r1E=; b=uuQG3HwA0kxVWJZJkzpNl+z6Txh3chKkAfQrlxaEMSu7XiGrcR7KFbElTVFpOA1W/47fd+FMF6TOMFFzdXJi1AbLmadD1RgOcvBu3kCTyxkJGz7uFkRJQmv6PqajNNtIkpWv340HcL4MvrXgqCemq6ktsyz/m88xPScchHgWsU4zmY7rRwoNTKaa4M+0LY6i+ZZIQLxUMu5/1SwFs1IPwSQPWTQM1jB4t80QoXMhUibGOqmiRGhqLaRuFkHrzcSdoTU9dh39PSgXLvwkSmJ2dDOHzBzbpUnQNVETMsQnfuBOUmxvnGxj8Ii1DKtgARa3XZM5eZTpvUQZQ7l6wp598A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=DYmIST2+zVl7POHU/TB8rEBaT/p48d5aJ+Z2NORcTc0y7fYuuG3/pknNGB7BlCDdLcu4K7VvJ3CXrthuo9fwWjzqLb49CZrx0eifBGRXhXdlFEdERfpfAFUfZKHOpRxDh2viLO+qVkwlvMtv1kpxr9cSplMuEvaLsjUPyrQptMZ4xo194UC9Q+Z087GnBSQuOLd34WzwA8yfDgNn3GFfKwBsIt6OeyWQ4WVRpVpxXb0ErmUULbQ32X4UOAIUHG4VeKYYQhC1lcaoMLM+eN2Chn3Gb3BOGgyFznqgZXtdUae80fu24OoySsYBTCvAn3U+08jlYlpoyFhxzy3kQyFInA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
- Delivery-date: Thu, 10 Oct 2024 08:41:17 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHbGupfp7VkZjmg5kywfP9O2WdcyLJ/o+wAgACL5oA=
- Thread-topic: [PATCH v2] xen: Remove dependency between pciback and privcmd
On 2024/10/10 16:17, Jan Beulich wrote:
> On 10.10.2024 09:58, Jiqian Chen wrote:
>> --- a/drivers/xen/acpi.c
>> +++ b/drivers/xen/acpi.c
>> @@ -125,3 +125,20 @@ int xen_acpi_get_gsi_info(struct pci_dev *dev,
>> return 0;
>> }
>> EXPORT_SYMBOL_GPL(xen_acpi_get_gsi_info);
>> +
>> +get_gsi_from_sbdf_t get_gsi_from_sbdf = NULL;
>> +
>> +void xen_acpi_register_get_gsi_func(get_gsi_from_sbdf_t func)
>> +{
>> + get_gsi_from_sbdf = func;
>> +}
>> +EXPORT_SYMBOL_GPL(xen_acpi_register_get_gsi_func);
>> +
>> +int xen_acpi_get_gsi_from_sbdf(u32 sbdf)
>> +{
>> + if (get_gsi_from_sbdf)
>> + return get_gsi_from_sbdf(sbdf);
>> +
>> + return -EINVAL;
>
> Perhaps better -EOPNOTSUPP?
OK, will change.
>
>> +}
>> +EXPORT_SYMBOL_GPL(xen_acpi_get_gsi_from_sbdf);
>> \ No newline at end of file
>
> Can you please take care of this as well while touching the file? Or
> maybe you are doing so, but the diff doesn't show it properly?
Yes, will change.
>
>> @@ -484,6 +483,7 @@ static int pcistub_init_device(struct pcistub_device
>> *psdev)
>> if (err)
>> goto config_release;
>> psdev->gsi = gsi;
>> + xen_acpi_register_get_gsi_func(pcistub_get_gsi_from_sbdf);
>> }
>> #endif
>
> Why here rather than directly in xen_pcibk_init()? And why no change to
> xen_pcibk_cleanup() to remove the hook again on unload? Which will then
> raise the question of possible race conditions.
You are right, will change in next version.
>
> Jan
--
Best regards,
Jiqian Chen.
|