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

Re: [PATCH] libxl: Add missing libxl__virtio_devtype to device_type_tbl array


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>
  • Date: Thu, 27 Jul 2023 14:38:05 +0000
  • Accept-language: en-US, ru-RU
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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=K2xAfSTh3R/kPZWB06sj7/uK5e9SlxZ/UndJMccvw8w=; b=ilA7OY6UO+Vmofvzh9xlt/2wWEfITT71fSJQ4kuSizwpxwi93FJ1sM2hRpV6NyABlFzGYd39Xxge4utdsgBAhWF1C+IcVhNW44ZBgi0tyl8OtDSTG0remG5AbGrdJef8zF4bTx5Rke+yLUcpH2knz6LJZV71t83XRg99nOIY1rNv/LaGro6YEwwzPTyyInJ5gezrBNdq1Fj6z8AyXcfSZ6X5sfiRlSASu+Qb3CnCIzbmMRFxWWZjkuPEoGedzcJsczsKH6Q7wXSHEn2F9O7SluP+0zK2bKPvHdq6MGYY9Hk3jdotK95WADYXQfUKxmUMOJ4TIJy/8gDt7bDWSBdBLQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LVvKDOPxwknbMNaU8T25i3Wz/mkDGtVwHXyWFd+A3sXK2DflBgqZpGVzH0SFsbhrCdri/7FwH/K5AQ0reCikiTJuCOJrsdykXDaMuf0bIo83xbfiw+1b8ynMoGKrq8xwIFDNMlnuOcvs86PMmt9x5yQNS4BmVdh96ZINq/P2XiMiEpe89jysDEzgUHs/OsYLtErmBtuP4GMhGi769+l1ezMpHFKMZj+mr6YsqSCtC2590BJgyRJBU52eAWuTL0AdFVyhg/rtYjtjSgFm2ZL2NvOEzWO0NoZNY+E3MZ8JXLp7zjJcQMKCj9+S+4Xors5RShxLP9QGs7ZK64in/SGdDA==
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Oleksandr Tyshchenko <olekstysh@xxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Viresh Kumar <viresh.kumar@xxxxxxxxxx>
  • Delivery-date: Thu, 27 Jul 2023 14:38:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHZv8uYlQiykVHkhkC1aQss9HQu9q/NX+QAgAANWwCAADReAIAADrOA
  • Thread-topic: [PATCH] libxl: Add missing libxl__virtio_devtype to device_type_tbl array


On 27.07.23 16:45, Anthony PERARD wrote:


Hello Anthony

> On Thu, Jul 27, 2023 at 10:38:03AM +0000, Oleksandr Tyshchenko wrote:
>>
>>
>> On 27.07.23 12:50, Anthony PERARD wrote:
>>
>> Hello Anthony
>>
>>> On Wed, Jul 26, 2023 at 05:14:59PM +0300, Oleksandr Tyshchenko wrote:
>>>> From: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
>>>>
>>>> Without it being present it won't be possible to use some
>>>> libxl__device_type's callbacks for virtio devices as the common code
>>>> can only invoke these callbacks (by dereferencing a pointer) for valid
>>>> libxl__device_type's elements when iterating over device_type_tbl[].
>>>
>>> Did you notice an issue with it been missing from device_type_tbl[] ?
>>> Because to me it looks like all the functions that are using
>>> device_type_tbl will just skip over virtio devtype.
>>>
>>> domcreate_attach_devices:
>>>       skip virtio because ".skip_attach = 1"
>>>
>>> libxl__need_xenpv_qemu:
>>>       skip virtio because "dm_needed" is NULL
>>>
>>> retrieve_domain_configuration_end:
>>>       skip because "compare" is "libxl_device_virtio_compare" which is NULL
>>>
>>> libxl__update_domain_configuration:
>>>       skip because "update_config" is NULL.
>>>
>>> So, I think the patch is fine, adding virtio to the device_type_tbl
>>> array is good for completeness, but the patch description may be
>>> misleading.
>>>
>>> Did I miss something?
>>
>> No, you didn't.
>>
>> Just to be clear, there is no issue within *current* the code base, I am
>> experimenting with using device-model bits, so I implemented
>> libxl__device_virtio_dm_needed() locally and noticed that it didn't get
>> called at all, the reason was in absence of libxl__virtio_devtype in the
>> said array.
>>
>> Do you agree with the following addition to the commit description?
>>
>> "Please note, there is no issue within current the code base as virtio
>> devices don't use callbacks that depend on libxl__virtio_devtype
>> presence in device_type_tbl[]. The issue will appear as soon as we start
>> using these callbacks (for example, dm_needed)."
> 
> Yes, that would be fine. With that addition:
> Acked-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>


Thanks for the clarification and A-b.

> 
> Thanks,
> 

 


Rackspace

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