|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] libxl: Use vkb=[] for HVMs
On Tue, Jan 09, 2024 at 12:16:31PM -0500, Jason Andryuk wrote:
> xl/libxl only applies vkb=[] to PV & PVH guests. HVM gets only a single
> vkb by default, but that can be disabled by the vkb_device boolean.
> Notably the HVM vkb cannot be configured, so feature-abs-pointer or the
> backend-type cannot be specified.
>
> Re-arrange the logic so that vkb=[] is handled regardless of domain
> type. If vkb is empty or unspecified, follow the vkb_device boolean for
> HVMs. Nothing changes for PVH & PV. HVMs can now get a configured vkb
> instead of just the default one.
>
> The chance for regression is an HVM config with
> vkb=["$something"]
> vkb_device=false
>
> Which would now get a vkb.
>
> This is useful for vGlass which provides a VKB to HVMs. vGlass wants to
> specify feature-abs-pointer, but that is racily written by vGlass
> instead of coming through the xl.cfg. Unhelpfully, Linux xen-kbdfront
> reads the backend nodes without checking that the backend is in
> InitWait.
>
> Signed-off-by: Jason Andryuk <jandryuk@xxxxxxxxx>
I guess we would want an entry in the CHANGELOG about "vkb=[]" been
available on HVM guests.
> diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_create.c
> index ce1d431103..39c50b3711 100644
> --- a/tools/libs/light/libxl_create.c
> +++ b/tools/libs/light/libxl_create.c
> @@ -1771,24 +1771,31 @@ static void domcreate_launch_dm(libxl__egc *egc,
> libxl__multidev *multidev,
> libxl__device_add(gc, domid, &libxl__virtio_devtype,
> &d_config->virtios[i]);
>
> + if (d_config->num_vkbs) {
> + for (i = 0; i < d_config->num_vkbs; i++) {
> + libxl__device_add(gc, domid, &libxl__vkb_devtype,
> + &d_config->vkbs[i]);
While there, could you check the return value of that function? That
would be having:
ret = libxl__device_add();
if (ret) goto error_out;
With that: Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Thanks,
--
Anthony PERARD
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |