[Libguestfs] [PATCH v4 3/9] v2v: linux: Replace 'ki_supports_virtio' field.
Pino Toscano
ptoscano at redhat.com
Thu Apr 6 15:06:08 UTC 2017
On Thursday, 6 April 2017 12:04:21 CEST Richard W.M. Jones wrote:
> Previously the kernel_info field 'ki_supports_virtio' really meant
> that the kernel supports virtio-net. That was used as a proxy to mean
> the kernel supports virtio in general.
>
> This change splits the field so we explicitly test for both virtio-blk
> and virtio-net drivers, and store the results as separate fields.
>
> The patch is straightforward, except for the change to the
> 'rebuild_initrd' function. Instead of making the module list
> conditional on whether virtio-net is available and using the old
> (probably wrong) fallback if it happens to be unavailable, this now
> tries to enable the common virtio kernel modules (just the ones needed
> for virtio-blk and virtio-net to work). The fallback is only used if
> none of the common virtio modules can be found.
> ---
> [...]
> let best_kernel =
> let compare_best_kernels k1 k2 =
> - let i = compare k1.ki_supports_virtio k2.ki_supports_virtio in
> + let i = compare k1.ki_supports_virtio_net k2.ki_supports_virtio_net in
Should this consider both virtio-net+virtio-blk to determine that a
kernel "supports virtio"?
> -let string_of_kernel_info ki =
> - sprintf "(%s, %s, %s, %s, %s, %s, virtio=%b, xen=%b, debug=%b)"
> - ki.ki_name ki.ki_version ki.ki_arch ki.ki_vmlinuz
> - (match ki.ki_initrd with None -> "None" | Some f -> f)
> - (match ki.ki_config_file with None -> "None" | Some f -> f)
> - ki.ki_supports_virtio ki.ki_is_xen_pv_only_kernel ki.ki_is_debug
> +let print_kernel_info chan prefix ki =
Can you please expose this function (as interface in linux_kernels.mli)
in this patch already (instead of patch #9)?
Thanks,
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20170406/60378fe2/attachment.sig>
More information about the Libguestfs
mailing list