[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/8] vpci/header: Emulate legacy capability list for host
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
- Date: Tue, 15 Apr 2025 10:23:53 +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=wLC6A8T5ZtkHX5tkyLa2QuC5hT2TVObbHEjLESTidjM=; b=g8YqCrjBTSGVDN4IgeSaUFSBD4g9NzMSpUC3/1D1/PKYX8H6UJIhr8ZH+4kBe+Cmjq0LicKzMUC3e0HXOkEPDT9qcKj4Gfi+z3W37to11A8PMy4k/WLYOqSnSVo8bftj2IoH5frWFcIiTDgSKJypZ5b7Y+xrSTk9vAEV3NxMFT1zq7hwzeRjpdHz9sObK/tH0o48NbtXgCRvygLwAk1A8K5X3zInprWO/5YuJ6Si8B37DTrH+qS0xBtQVrIH+AYl/eGOus3ztN6pPVOceY7oIskGCWXwmtBfmO6OE6AYSEZ6UutMyLCGJo3Z1123aFjMptXyv2xcy30D+iX5/pVZPA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ocXSyALyKkipIPDB7Ih5U7zEMPUfNIieCVFtxculrN5qUpubG+zzCCOnnfQMHyHSxNKk/U+7j0gZHhtmShzTXHfPWeI5LvbqFnUOhRkWXHCiYiW2mRPMsaj12XHGwl922zhunpwkvTHIfZA3pzGYfE4rhBqnmGO1D/7TiKjXoYl3iL3UPg/8nyjZZaMVBPniJt5bBRAi8kdd1NnQXlo2VN7S+kV9cS9JCpnUOf7AB8BjUTDPZmF7lKtJALDkxPluJ99JK4kZWY25nb2C+l9BoTZS8z+Wtt5q0XgACBQJAsLU7+Yvt7FyJBPFhol80cLf0bMMtw1QwRsQ7w4EkquW5w==
- 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>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "Huang, Ray" <Ray.Huang@xxxxxxx>, "Chen, Jiqian" <Jiqian.Chen@xxxxxxx>
- Delivery-date: Tue, 15 Apr 2025 10:24:05 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHbqRsaTINnyZcO4ESL6xMBZUfUtLOkfmYAgACPYID//3zKAIAAiTCA
- Thread-topic: [PATCH v2 2/8] vpci/header: Emulate legacy capability list for host
On 2025/4/15 18:08, Jan Beulich wrote:
> On 15.04.2025 12:07, Chen, Jiqian wrote:
>> On 2025/4/15 17:25, Roger Pau Monné wrote:
>>> On Wed, Apr 09, 2025 at 02:45:22PM +0800, Jiqian Chen wrote:
>>>> --- a/xen/drivers/vpci/header.c
>>>> +++ b/xen/drivers/vpci/header.c
>>>> @@ -745,6 +745,76 @@ static int bar_add_rangeset(const struct pci_dev
>>>> *pdev, struct vpci_bar *bar,
>>>> return !bar->mem ? -ENOMEM : 0;
>>>> }
>>>>
>>>> +/* These capabilities can be exposed to the guest, that vPCI can handle.
>>>> */
>>>> +static const unsigned int guest_supported_caps[] = {
>>>> + PCI_CAP_ID_MSI,
>>>> + PCI_CAP_ID_MSIX,
>>>> +};
>>>
>>> Is there a reason this needs to be defined outside of the function
>>> scope? So far it's only used by vpci_init_capability_list().
>> Because, for dom0 I don't need to pass this array, so I need to set below
>> parameter "caps" to be NULL or guest_supported_caps according to the type of
>> domain.
>> If inside the function, I can't to do that since "caps" is const, I think.
>
> Why would the more narrow scope of the array affect how it can be used?
Sorry, I have thought about it again and it can be put it inside the function.
I will change in the next version.
>
> Jan
--
Best regards,
Jiqian Chen.
|