[Spice-devel] [PATCH v4] libxl: usb2 and usb3 controller support for upstream qemu
Ian Campbell
Ian.Campbell at citrix.com
Fri Sep 13 04:59:01 PDT 2013
On Mon, 2013-07-15 at 11:11 +0200, Fabio Fantoni wrote:
Stefano or Anthony -- your input as qemu-xen types would be appreciated
here on this patch.
> > + case 2:
> > + flexarray_vappend(dm_args, "-device","ich9-usb-ehci1,id=usb,"
> > + "bus=pci.0,addr=0x1d.0x7", NULL);
> > + for (i = 1; i < 4; i++)
> > + flexarray_vappend(dm_args, "-device", libxl__sprintf(gc,
> > + "ich9-usb-uhci%d,masterbus=usb.0,firstport=%d,"
> > + "bus=pci.0%s,addr=0x1d.%#x", i, 2*(i-1), i == 1 ?
> > + ",multifunction=on" : "", i-1), NULL);
> > + break;
Please format this in some sort of halfway readable style.
Using GCSPRINTF might help, as would putting newlines in more logical
places.
Also you don't need _vappend, _append_pair would do.
> > diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
> > index d218a2d..100f36c 100644
> > --- a/tools/libxl/libxl_types.idl
> > +++ b/tools/libxl/libxl_types.idl
> > @@ -325,6 +325,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
> > ("serial", string),
> > ("boot", string),
> > ("usb", libxl_defbool),
> > + ("usbversion", integer),
Some sort of whitepace damage?
> > # usbdevice:
> > # - "tablet" for absolute mouse,
> > # - "mouse" for PS/2 protocol relative mouse
> > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
> > index 8a478ba..a618ede 100644
> > --- a/tools/libxl/xl_cmdimpl.c
> > +++ b/tools/libxl/xl_cmdimpl.c
> > @@ -1495,6 +1495,8 @@ skip_vfb:
> > xlu_cfg_replace_string (config, "serial", &b_info->u.hvm.serial, 0);
> > xlu_cfg_replace_string (config, "boot", &b_info->u.hvm.boot, 0);
> > xlu_cfg_get_defbool(config, "usb", &b_info->u.hvm.usb, 0);
> > + if (!xlu_cfg_get_long (config, "usbversion", &l, 0))
> > + b_info->u.hvm.usbversion = l;
and again.
> > switch (xlu_cfg_get_list_as_string_list(config, "usbdevice",
> > &b_info->u.hvm.usbdevice_list,
> > 1))
>
More information about the Spice-devel
mailing list