[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/6] libxl: add backend type to vkb
On Thu, Oct 05, 2017 at 12:07:08PM +0300, Oleksandr Grytsov wrote: > From: Oleksandr Grytsov <oleksandr_grytsov@xxxxxxxx> > > New field backend_type is added to vkb device > in order to have QEMU and user space backend > simultaneously. Each vkb backend shall read > appropriate XS entry and service only own > frontends. > > Signed-off-by: Oleksandr Grytsov <oleksandr_grytsov@xxxxxxxx> > --- > tools/libxl/libxl_create.c | 4 ++++ > tools/libxl/libxl_dm.c | 2 ++ > tools/libxl/libxl_types.idl | 7 +++++++ > tools/libxl/libxl_vkb.c | 10 +++++++++- > tools/xl/xl_parse.c | 4 ++++ > 5 files changed, 26 insertions(+), 1 deletion(-) > > diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c > index f813114..7268f7f 100644 > --- a/tools/libxl/libxl_create.c > +++ b/tools/libxl/libxl_create.c > @@ -1349,6 +1349,7 @@ static void domcreate_launch_dm(libxl__egc *egc, > libxl__multidev *multidev, > } > > libxl_device_vkb_init(&vkb); > + vkb.backend_type = LIBXL_VKB_BACKEND_QEMU; Hmm... See below. > libxl__device_add(gc, domid, &libxl__vkb_devtype, &vkb); > libxl_device_vkb_dispose(&vkb); > > @@ -1376,6 +1377,9 @@ static void domcreate_launch_dm(libxl__egc *egc, > libxl__multidev *multidev, > for (i = 0; i < d_config->num_vfbs; i++) { > libxl__device_add(gc, domid, &libxl__vfb_devtype, > &d_config->vfbs[i]); > + } > + > + for (i = 0; i < d_config->num_vkbs; i++) { > libxl__device_add(gc, domid, &libxl__vkb_devtype, > &d_config->vkbs[i]); > } > diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c > index 98f89a9..d8b0ee7 100644 > --- a/tools/libxl/libxl_dm.c > +++ b/tools/libxl/libxl_dm.c > @@ -1728,6 +1728,8 @@ static int > libxl__vfb_and_vkb_from_hvm_guest_config(libxl__gc *gc, > > vkb->backend_domid = 0; > vkb->devid = 0; > + vkb->backend_type = LIBXL_VKB_BACKEND_QEMU; > + > return 0; > } > > diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl > index cd0c06f..65cd81a 100644 > --- a/tools/libxl/libxl_types.idl > +++ b/tools/libxl/libxl_types.idl > @@ -240,6 +240,12 @@ libxl_checkpointed_stream = > Enumeration("checkpointed_stream", [ > (2, "COLO"), > ]) > > +libxl_vkb_backend = Enumeration("vkb_backend", [ > + (0, "UNKNOWN"), > + (1, "QEMU"), > + (2, "LINUX") > + ]) Originally this is only internal detail, but now you want to expose this. You need to set the default value for this; otherwise you could break migration. And then you also need to provide a setdefault function for libxl_device_vkb. Also I'm a bit confused because the LINUX type is not used in this series. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |