[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: Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Thu, 27 Jul 2023 14:45:28 +0100
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • 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 13:45:49 +0000
  • Ironport-data: A9a23:+wqk46yKiHw826Cl8dZ6t+fRxirEfRIJ4+MujC+fZmUNrF6WrkUAz GIYDGvUbv6NMTSne4pxYY23oRhSuMKEmtdlSwRtqCAxQypGp/SeCIXCJC8cHc8wwu7rFxs7s ppEOrEsCOhuExcwcz/0auCJQUFUjP3OHfykTrafYEidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw/zF8EoHUMja4mtC5QRhP68T5jcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KTBlt uESNSxVVyHZrvmw26uwF7R8of12eaEHPKtH0p1h5TTQDPJgSpHfWaTao9Rf2V/chOgXQ6yYP ZBAL2MyMlKZOUYn1lQ/UfrSmM+hgGX/dDtJ7kqYv6Mt70DYzRBr0airO93QEjCPbZwMwRvC+ zmarwwVBDk5M9OF5Bekykj3n6jMtjL4WpIZE+aBo6sCbFq7mTVIVUx+uUGAid69h02lUtRTM Xso6zEupqg/8k+sZtTlVhj+q3mB1jYMVtwVH+Ak5QWlzqvP/x3fFmUCViRGatEtqIkxXzNC/ kCNt8PkA3poqrL9YXWZ+7SPsSKpOQAaKGYDYWkPSg5ty9vsuoYolTrUU81uVqWyi7XdBzDqz iuK6isjgrwJpcoK0ayh+hbAmT3EjpHRQxQ8/An/QmOv5QQ/b4mgD7FE8nCCs6wGdtzACADc4 j5dwZP2AP0y4Y+lxQfOXe8QAOmQ1qysKzvHmFUyQokGzmH4k5K8Rry88A2SNW8wbJdcIm6yM BeP0e9CzMQNZSX3NMebd6r0Up13lva4SLwJQ9iONrJzjo5NmBhrFc2ETWqZxCjTnUclisnT0 r/LIJ/3XR725UmKpQdaptvxMpdxnEjSPUuJGfjGI+2PiNJynkK9R7YfK0epZesk9q6Cqwi92 48BZpPRmksFD7ylOna/HWsvwbYidyZT6Xfe8pI/SwJ+ClA+RDFJ5wH5n9vNhLCJb4wKz7yVr xlRq2dTyUblhG2vFOl5QikLVV8bZr4m9ShTFXV1bT6VN40LPd7HAFE3K8FmItHKNYVLkZZJc hXyU57aX64UE22Yp2l1gFuUhNUKSSlHTDmmZ0KNCAXTtbY7L+AV0rcIpjfSyRQ=
  • Ironport-hdrordr: A9a23:YgexKqPNAT8HnsBcTv6jsMiBIKoaSvp037Dk7TEJdfU1SL3hqy nKpp4mPHDP+VMssR0b6LK90ey7MBDhHP1OgLX5X43SODUO0VHAROpfBMnZowEIcBeOkdK1u5 0QFZSWy+edMbG5t6vHCcWDfOrICePozJyV
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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,

-- 
Anthony PERARD



 


Rackspace

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