[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 <olekstysh@xxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Thu, 27 Jul 2023 10:50:14 +0100
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Viresh Kumar <viresh.kumar@xxxxxxxxxx>
  • Delivery-date: Thu, 27 Jul 2023 09:50:40 +0000
  • Ironport-data: A9a23:tokWpai6L3XT/KQtiwxfqN16X161hhAKZh0ujC45NGQN5FlHY01je htvDG2APPeKNjGmKNsnat7koBxQvJWHytZjHFM+qSAwEiwb9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrWCYmYpHlUMpB4J0XpLg/Q+jpNjne+3CgaMv cKai8DEMRqu1iUc3lg8sspvkzsx+qyr0N8klgZmP6sT4wWBzyB94K83fsldEVOpGuG4IcbiL wrz5OnR1n/U+R4rFuSknt7TGqHdauePVeQmoiM+t5mK2nCulARrukoIHKN0hXNsoyeIh7hMJ OBl7vRcf+uL0prkw4zxWzEAe8130DYvFLXveRBTuuTLp6HKnueFL1yDwyjaMKVBktubD12i+ tQxFw4dNwLbv97pza65FOB83Z8eMczSadZ3VnFIlVk1DN4jSJHHBa7L+cVZzHE7gcUm8fT2P pRDL2A1NVKZPkMJYw1MYH49tL7Aan3XejtEqFWTtOwv7nLa1gBZ27nxKtvFPNeNQK25m27B/ DqcozWlXExy2Nq3xiSE+1KcnLD2ryLAH4BMPYSztaVFjwjGroAUIEJPDgbqyRWjsWa5X99cM FAF4SoGoq079UjtRd74NzWorXjBshMCVt54F+wh9BrL2qfS+xyeBGUPUnhGctNOnMgySD8x3 1mFheT1FCdvu72YT3Ga3rqMpDb0Mi8QRUcdYQcUQA1D5MPsyKkxgQjIVc1LC7Oug5v+HjSY6 y6LtiUlh/MQkMsCzY2//FbOmTXqoYLGJiY8/gjNV3ipxh94boWiIYev7DDmAe1oddjDCAPb5 T5dxpbYtbpVZX2QqMCTaMwyIqHw9a69DGLRnVwxFol6rAmw/kf2KOi8/wpCyFdV3tcsIGG4O BSC4lMJuPe/L1PxM/YpPtvZ59ACiPG5SI+7Dq28gs9mOMAZSeORwM15iad8NUjJmVNkr6wwM IzznS2EXSdDUvQPINZbqo4gPV4XKsMWnzm7qWjTlUjP7FZnTCf9pU05GFWPdPsly6iPvR/Y9 d1SX+PTlUQHC7ygOHaGqtZMRbzvEZTdLcqowyCwXrfdSjeK5Ul7U6OBqV/fU9INc1tpehfgo SjmBx4wJKvXjnzbMwSaAk2Pm5u2NauTWUkTZHR2VX7xgihLXGpaxPtHH3fBVeV9pbMLID8dZ 6VtRvhs9dwWFW+cpmVCNcKmxGGgHTzy7T+z0+OeSGBXV/Zdq8bhobcIoiOHGPEyMxeK
  • Ironport-hdrordr: A9a23:9DRafq58yULtO2tNiQPXwAzXdLJyesId70hD6qkQc3Fom62j5q WTdZEgvyMc5wx/ZJhNo7690cq7MBHhHPxOgbX5VI3KNGXbUQOTR72KhrGSoAEIdReeygZcv5 0QCZSXCrfLfCVHZRCR2njFLz4iquP3j5xBnY3lvhNQpZkBUdAZ0+9+YDzrdXFedU19KrcSMo GT3cZDryrIQwVtUizqbkN1OdQqvrfw5evbXSI=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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?

Thanks,

-- 
Anthony PERARD



 


Rackspace

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