[libvirt] [PATCH 09/10] device: cleanup input device code
Jiri Denemark
jdenemar at redhat.com
Fri Jan 8 14:41:42 UTC 2016
On Fri, Jan 08, 2016 at 15:34:17 +0100, Peter Krempa wrote:
> > @@ -22247,32 +22202,6 @@ virDomainDefFormatInternal(virDomainDefPtr def,
> > }
> >
> > if (def->ngraphics > 0) {
> > - /* If graphics is enabled, add the implicit mouse/keyboard */
> > - if ((ARCH_IS_X86(def->os.arch)) || def->os.arch == VIR_ARCH_NONE) {
> > - virDomainInputDef autoInput = {
> > - .type = VIR_DOMAIN_INPUT_TYPE_MOUSE,
> > - .info = { .alias = NULL },
> > - };
> > -
> > - if (def->os.type == VIR_DOMAIN_OSTYPE_HVM)
> > - autoInput.bus = VIR_DOMAIN_INPUT_BUS_PS2;
> > - else if (def->os.type == VIR_DOMAIN_OSTYPE_EXE &&
> > - (def->virtType == VIR_DOMAIN_VIRT_VZ ||
> > - def->virtType == VIR_DOMAIN_VIRT_PARALLELS))
> > - autoInput.bus = VIR_DOMAIN_INPUT_BUS_PARALLELS;
> > - else
> > - autoInput.bus = VIR_DOMAIN_INPUT_BUS_XEN;
> > -
> > - if (virDomainInputDefFormat(buf, &autoInput, flags) < 0)
> > - goto error;
> > -
> > - if (!(flags & VIR_DOMAIN_DEF_FORMAT_MIGRATABLE)) {
> > - autoInput.type = VIR_DOMAIN_INPUT_TYPE_KBD;
> > - if (virDomainInputDefFormat(buf, &autoInput, flags) < 0)
> > - goto error;
>
> Hmm, this looks problematic though. In case when the XML will be used
> for migration after this patch the XML will start to contain the
> keyboard input definition. Jiri might be able to chime in to quantify
> the extent of things this might break.
Right, formatting keyboard into a migratable XML would break migration
to an old libvirt which did not support keyboards.
Jirka
More information about the libvir-list
mailing list