]> xenbits.xensource.com Git - libvirt.git/commit
vmx: do not treat controllers as implicit devices
authorJán Tomko <jtomko@redhat.com>
Mon, 21 Aug 2017 14:44:42 +0000 (16:44 +0200)
committerJán Tomko <jtomko@redhat.com>
Thu, 24 Aug 2017 07:46:56 +0000 (09:46 +0200)
commitd9fc08d103ff3b6346fa663ca2ca13d5ea6f5e84
treeb79d4429158af2d906d635ac5f8bc4b223f4df74
parentc22f02cfdffd97d7f05ebdb78bf607f1d5a43c1e
vmx: do not treat controllers as implicit devices

When parsing the config, we look for the SCSI controllers one by one,
remembering their models, then let virDomainDefAddImplicitDevices
add them if any SCSI disk is using them.

Since these controllers are not really implicit (they are present
in the source config), add them explicitly.

This patch maintains the behavior of not adding a controller
if it was present in the config, but no disk was using it.

This also resolves the memory leak of virVMXParseConfig overwriting
the video device added by calling virDomainDefAddImplicitDevices
before the parsing is finished.

Reported-by: Michal Privoznik <mprivozn@redhat.com>
src/vmx/vmx.c