Commit Graph

7936 Commits

Author SHA1 Message Date
Nikolay Shirokovskiy
66a85cb136 libvirt: add daemon itself as shutdown reason
This patch introduces a new shutdown reason "daemon" in order
to indicate that the daemon needed to force shutdown the domain
as the best course of action to take at the moment.

This action would occur during reconnection when processing
encounters an error once the monitor reconnection is successful.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2018-11-14 06:52:23 -05:00
Erik Skultety
25dde37373 conf: Move VFIO AP validation from post parse to QEMU validation code
VFIO AP has a limitation on a single device per domain, however, when
commit 11708641 added the support for vfio-ap, check for this limitation
was performed as part of the post parse code. Generally, checks like that
should be performed within the driver's validation callback to eliminate
any slight chance of failing in post parse, which could potentially
result in the domain XML config vanishing.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2018-11-13 12:42:16 +01:00
Erik Skultety
208d6e6f5a qemu: Extract MDEV VFIO PCI validation code into a separate helper
Since we'll need to validate other models apart from VFIO PCI too,
having a helper for each model should keep the code base cleaner.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2018-11-13 12:34:48 +01:00
Jiri Denemark
03abfd2a6e qemu: Drop priv->gotShutdown
The gotShutdown bool has been redundant since we started setting
VIR_DOMAIN_SHUTDOWN state after receiving SHUTDOWN event from QEMU.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-11-12 12:15:31 +01:00
Jiri Denemark
294397b63b qemu: Drop unreachable code from qemuProcessHandleStop
If gotShutdown is true, the domain state cannot be running because of
the following code in qemuProcessHandleShutdown:

    priv->gotShutdown = true;

    VIR_DEBUG("Transitioned guest %s to shutdown state",
              vm->def->name);
    virDomainObjSetState(vm,
                         VIR_DOMAIN_SHUTDOWN,
                         VIR_DOMAIN_SHUTDOWN_UNKNOWN);

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-11-12 12:15:31 +01:00
Wang Yechao
6b00f4f41c qemu: Fix segfault in qemuDomainPrimeVirtioDeviceAddresses
On aarch64, lauch vm with the follow configuration:

<interface type="hostdev" managed="yes">
  <mac address="fa:16:3e:14:41:00"/>
  <source>
    <address type="pci" domain="0x0000" bus="0x01" slot="0x0b" function="0x2"/>
  </source>
</interface>

libvirtd will crash when accessing net->model.

Signed-off-by: Wang Yechao <wang.yechao255@zte.com.cn>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2018-11-09 09:56:35 +01:00
Eric Blake
68b2596f83 snapshot: Don't hose list on deletion failure
If qemuDomainSnapshotDiscard() fails for any reason (rare,
but possible with an ill-timed ENOMEM or if
qemuDomainSnapshotForEachQcow2() has problems talking to the
qemu guest monitor), then an attempt to retry the snapshot
deletion API will crash because we didn't undo the effects
of virDomainSnapshotDropParent() temporarily rearranging the
internal list structures, and the second attempt to drop
parents will dereference NULL.  Fix it by instead noting that
there are only two callers to qemuDomainSnapshotDiscard(),
and only one of the two callers wants the parent to be updated;
thus we can move the call to virDomainSnapshotDropParent()
into a code path that only gets executed on success.

Signed-off-by: Eric Blake <eblake@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
2018-11-08 07:19:27 -06:00
Jiri Denemark
e47949357b qemu: Don't ignore resume events
Since commit v4.7.0-302-ge6d77a75c4 processing RESUME event is mandatory
for updating domain state. But the event handler explicitly ignored this
event in some cases. Thus the state would be wrong after a fake reboot
or when a domain was rebooted after it crashed.

BTW, the code to ignore RESUME event after SHUTDOWN didn't make sense
even before making RESUME event mandatory. Most likely it was there as a
result of careless copy&paste from qemuProcessHandleStop.

The corresponding debug message was clarified since the original state
does not have to be "paused" only and while we have a "resumed" event,
the state is called "running".

https://bugzilla.redhat.com/show_bug.cgi?id=1612943

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2018-11-08 09:08:58 +01:00
John Ferlan
8f0f8425d7 qemu: Narrow the shutdown reconnection failure reason window
The current qemuProcessReconnect logic paints a broad brush
determining that the shutdown reason must be crashed if it was
determined that the domain was started with -no-shutdown; however,
there's many other ways to get to the error label, so let's narrow
our reasoning window for using VIR_DOMAIN_SHUTOFF_CRASHED to the
period where we essentially know we've tried to create to the
monitor and before we were successful in opening the connection.

Failures that occur outside that window would thus be considered
as VIR_DOMAIN_SHUTOFF_UNKNOWN, at least for now.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
2018-11-07 07:41:47 -05:00
John Ferlan
296e05b54b qemu: Restore lost shutdown reason
When qemuProcessReconnectHelper was introduced (commit d38897a5d)
reconnection failure used VIR_DOMAIN_SHUTOFF_FAILED; however, that
was changed in commit bda2f17d to either VIR_DOMAIN_SHUTOFF_CRASHED
or VIR_DOMAIN_SHUTOFF_UNKNOWN.

When QEMU_CAPS_NO_SHUTDOWN checking was removed in commit fe35b1ad6
the conditional state was just left at VIR_DOMAIN_SHUTOFF_CRASHED.

So introduce qemuDomainIsUsingNoShutdown which will manage the
condition when the domain was started with -no-shutdown so that
when/if reconnection failure occurs we can restore the decision
point used to determine whether CRASHED or UNKNOWN is provided.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
2018-11-07 07:41:41 -05:00
Ján Tomko
e08e792493 qemuBuildChrChardevStr: increase scope of qemuBuildChrChardevStr
Make it avaiable to other chardev types.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-11-06 15:03:18 +01:00
Ján Tomko
4b8faeb9fe qemuBuildChrChardevStr: split attribute formatting
Remove repetition of the 'socket' device and its alias.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-11-06 15:03:18 +01:00
Ján Tomko
7c94eebfe2 qemuProcessPrepareDomain: pass xmlopt when creating monConfig
Pass the driver's xmlopt to allocate the chardev source private
data correctly.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-11-06 14:22:24 +01:00
Michal Privoznik
4de4e4bc99 qemu: Dissolve qemuBuildVhostuserCommandLine in qemuBuildInterfaceCommandLine
https://bugzilla.redhat.com/show_bug.cgi?id=1524230

The qemuBuildVhostuserCommandLine builds command line for
vhostuser type interfaces. It is duplicating some code of the
function it is called from (qemuBuildInterfaceCommandLine)
because of the way it's called. If we merge it into the caller
not only we save a few lines but we also enable checks that we
would have to duplicate otherwise (e.g. QoS availability).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2018-11-05 08:52:56 +01:00
Michal Privoznik
e7b7b61768 qemuBuildInterfaceCommandLine: Reorder VIR_FREE
When we have variables A, B, C then there are two ways to free
them. Either in the order they are declared or the reversed one.
Any other ordering is confusing. In this commit I'm reordering
calls to VIR_FREE in the reversed order.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2018-11-05 08:52:56 +01:00
Boris Fiuczynski
1170864198 qemu: vfio-ap device support
Adjusting domain format documentation, adding device address
support and adding command line generation for vfio-ap.
Since only one mediated hostdev with model vfio-ap is supported a check
disallows to define domains with more than one such hostdev device.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Chris Venteicher <cventeic@redhat.com>
2018-10-29 12:45:54 -04:00
Boris Fiuczynski
dc788d2540 qemu: add vfio-ap capability
Introduce vfio-ap capability.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Chris Venteicher <cventeic@redhat.com>
2018-10-29 12:45:54 -04:00
Jie Wang
58cfd0a135 qemu: Fix IOThread pids lost after qemuProcessReconnect
IOThread pids info will lost after libvirtd restart, then
if we call pinIOThread, sched_setaffinity will be called with
pid 0, not IOThread pid. So pinIOThread cannot work normally.

Signed-off-by: Jie Wang <wangjie88.huawei.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-10-19 14:01:58 -04:00
Eric Blake
ffac10c971 qemu: Avoid memleak on failure to format blockjobs
virXMLFormatElement() frees attrBuf on success, but not necessarily
on failure. Most other callers of this function take the time to
reset attrBuf afterwords, but qemuDomainObjPrivateXMLFormatBlockjobs()
was relying on it succeeding, and could thus result in a memory leak.

Signed-off-by: Eric Blake <eblake@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
2018-10-19 10:33:19 -05:00
Bjoern Walk
808e27a109 qemu: qemuProcessInit: Drop unused config variable
The QEMU @cfg config variable is unused in context of qemuProcessInit,
let's drop it.

Signed-off-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2018-10-18 11:37:55 +02:00
Michal Privoznik
641a95c9b6 qemu: Put format=raw onto cmd line for SCSI passthrough
https://bugzilla.redhat.com/show_bug.cgi?id=1632833

When doing a SCSI passthrough we don't put format= onto the
command line. This causes qemu to probe the format automatically
which ends up in a warning in the domain log and possible qemu
disabling writes to the first block (according to the warning
message).

Based-on-work-of: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-10-17 09:16:20 +02:00
John Ferlan
86a6cb13e9 qemu: Remove unused qemuProcessAutostartAll
The function was never defined in source, just the protoype.

Signed-off-by: John Ferlan <jferlan@redhat.com>
2018-10-11 18:26:00 -04:00
Ján Tomko
f4ccf1ecdc qemu: use "id" instead of deprecated "name" for -net
-net name= will be deprecated in QEMU 3.1:
commit 101625a4d4ac7e96227a156bc5f6d21a9cc383cd
    net: Deprecate the "name" parameter of -net
git describe: v3.0.0-791-g101625a4d4

Use the id option instead, supported since QEMU 1.2:
commit 6687b79d636cd60ed9adb1177d0d946b58fa7717
    convert net_client_init() to OptsVisitor
git describe: v1.0-3564-g6687b79d63 contains: v1.2.0-rc0~142^2~8

Thankfully, libvirt only uses -net for non-PCI, non-virtio NICs
on ARM.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Laine Stump <laine@laine.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
2018-10-09 09:44:36 +02:00
Peter Krempa
0d981bcefc qemu: hotplug: Refactor qemuDomainAttachDeviceDiskLiveInternal
We now explicitly handle media change elsewhere so we can drop the
switch statement. This will also make it more intuitive once CDROM
device hotplug might be supported.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2018-10-08 15:35:18 +02:00
Peter Krempa
a1d3fc09f8 qemu: hotplug: Split out media change code from disk hotplug
Disk hotplug has slightly different semantics from media changing. Move
the media change code out and add proper initialization of the new
source object and proper cleanups if something fails.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2018-10-08 15:35:18 +02:00
Peter Krempa
a05bdd5533 qemu: conf: Export qemuAddSharedDisk
In cases where we know the device is a disk we can avoid using the full
device definition.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2018-10-08 15:35:18 +02:00
Peter Krempa
aa2be13674 qemu: hotplug: Add wrapper for disk hotplug code
The disk hotplug code also overloads media change which is not ideal.
This will allow splitting out of the media change code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2018-10-08 15:35:18 +02:00
Peter Krempa
49272e5162 qemu: hotplug: Prepare disk source for media changing
The disk storage source needs to be prepared if we want to use -blockdev
or secrets for the new media image. It does not hurt to do the same for
the legacy hotplug code as well.

Unfortunately helpers like qemuDomainPrepareDiskSource take
virDomainDiskDef as an argument and it would be hard to fix them to take
an explicit source, so the function also temporarily replaces disk->src
for the new source in this function.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2018-10-08 15:35:18 +02:00
Peter Krempa
f86993112a qemu: hotplug: Be explicit about old/new sources when changing media
Some functions require us to replace disk->src with the new source for
them to work properly. To avoid confusion all places which allow
explicit virStorageSource should get the appropriate definition.

The legacy code fortunately does not need anything from the old source
so that does not require modifications.

Blockdev does require the old definition so we'll pass it explicitly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2018-10-08 15:35:18 +02:00
Peter Krempa
50cb91dbc5 qemu: hotplug: Allow specifying explicit source for disk backend hotplug code
Since the code is also used when changing media we need to allow
specifying explicit source for which we are going to prepare. With this
change callers don't have to replace disk->src with the new source
definition for generating these.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2018-10-08 15:35:18 +02:00
Peter Krempa
7fec0e59d3 qemu: hotplug: Remove code handling possible missing disk source format
qemu media changing code tried to assume old media's format for the new
one if that was not specified. Since the format will always be present
it does not make sense to keep the code around.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2018-10-08 15:35:18 +02:00
Peter Krempa
6a84053789 qemu: hotplug: Don't pretend that we support secrets for media change
Old media changing code does not bother setting up the secrets for new
media or actually removing/adding of the corresponding objects.

Additionally it uses secrets setup for the old image to be removed as
the secret for the new image which is wrong.

Remove the support for secrets while changing media for the legacy
approach. The only reasonable way to fix it is when using blockdev.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2018-10-08 12:37:07 +02:00
Peter Krempa
f479b34245 Revert "qemu: hotplug: consolidate media change code paths"
While the idea was good the implementation not so much as we need to
take into account the old disk data and the new source. The code will be
consolidated later in a different way.

This reverts commit 663b1d55de.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2018-10-08 12:37:07 +02:00
Peter Krempa
9ac1969978 Revert "qemu: hotplug: Prepare disk source in qemuDomainAttachDeviceDiskLive"
Preparing the storage source prior to assigning the alias will not work
as the names of the certain objects depend on the alias for the legacy
hotplug case as we generate the object names for the secrets based on
the alias.

This reverts commit 192fdaa614.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2018-10-08 12:37:07 +02:00
Ján Tomko
e7730d196b qemu: fix comment in qemuSecurityChownCallback
s/chmod/chown/

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-10-04 10:01:08 +02:00
Ján Tomko
8ba65c4d95 qemu: fix up permissions for pre-created UNIX sockets
My commit d6b8838 fixed the uid:gid for the pre-created UNIX sockets
but did not account for the different umask of libvirtd and QEMU.
Since commit 0e1a1a8c we set umask to '0002' for the QEMU process.
Manually tune-up the permissions to match what we would have gotten
if QEMU had created the socket.

https://bugzilla.redhat.com/show_bug.cgi?id=1633389

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2018-10-03 16:26:08 +02:00
Marc Hartmayer
9f81dc1081 qemu: Introduce qemuDomainUpdateQEMUCaps()
This function updates the used QEMU capabilities of @vm by querying
the QEMU capabilities cache.

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-10-01 18:35:47 -04:00
Marc Hartmayer
a4c12a5096 qemu: Use VIR_STEAL_PTR macro
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Bjoern Walk <bwalk@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi@linux.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-10-01 18:35:32 -04:00
Michal Privoznik
466bea0117 qemu: Temporarily disable metadata locking
Turns out, there are couple of bugs that prevent this feature
from being operational. Given how close to the release we are
disable the feature temporarily. Hopefully, it can be enabled
back after all the bugs are fixed.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2018-09-27 16:22:44 +02:00
Lin Ma
79e0e62e78 qemu: Remove network type limitation for qemuARPGetInterfaces
Let's ignore the checking of interface type when we call the function
qemuARPGetInterfaces to get IP from host's arp table.

Signed-off-by: Lin Ma <lma@suse.com>
Reviewed-by: Chen Hanxiao <chenhanxiao@gmail.com>
2018-09-26 14:57:41 +02:00
Jiri Denemark
e6d77a75c4 qemu: Avoid duplicate resume events and state changes
The only place where VIR_DOMAIN_EVENT_RESUMED should be generated is the
RESUME event handler to make sure we don't generate duplicate events or
state changes. In the worse case the duplicity can revert or cover
changes done by other event handlers.

For example, after QEMU sent RESUME, BLOCK_IO_ERROR, and STOP events
we could happily mark the domain as running and report
VIR_DOMAIN_EVENT_RESUMED to registered clients.

https://bugzilla.redhat.com/show_bug.cgi?id=1612943

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-25 20:42:25 +02:00
Jiri Denemark
8ae9b49f5a qemu: Map running reason to resume event detail
Thanks to the previous commit the RESUME event handler knows what reason
should be used when changing the domain state to VIR_DOMAIN_RUNNING, but
the emitted VIR_DOMAIN_EVENT_RESUMED event still uses a generic
VIR_DOMAIN_EVENT_RESUMED_UNPAUSED detail. Luckily, the event detail can
be easily deduced from the running reason, which saves us from having to
pass one more value to the handler.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-25 20:42:25 +02:00
Jiri Denemark
5dab984ed0 qemu: Pass running reason to RESUME event handler
Whenever we get the RESUME event from QEMU, we change the state of the
affected domain to VIR_DOMAIN_RUNNING with VIR_DOMAIN_RUNNING_UNPAUSED
reason. This is fine if the domain is resumed unexpectedly, but when we
sent "cont" to QEMU we usually have a better reason for the state
change. The better reason is used in qemuProcessStartCPUs which also
sets the domain state to running if qemuMonitorStartCPUs reports
success. Thus we may end up with two state updates in a row, but the
final reason is correct.

This patch is a preparation for dropping the state change done in
qemuMonitorStartCPUs for which we need to pass the actual running reason
to the RESUME event handler and use it there instead of
VIR_DOMAIN_RUNNING_UNPAUSED.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-25 20:42:25 +02:00
Jiri Denemark
54b5b0ac39 qemu: Report more appropriate running reasons
This patch replaces some rather generic VIR_DOMAIN_RUNNING_UNPAUSED
reasons when changing domain state to running with more specific ones.
All of them are done when libvirtd reconnects to an existing domain
after being restarted and sees an unfinished migration or save.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-25 20:42:25 +02:00
Jiri Denemark
55af06187c qemu: Properly report VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT
VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT was defined but not used anywhere
in our event generation code. This fixes qemuDomainRevertToSnapshot to
properly report why the domain was resumed.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-25 20:42:25 +02:00
Pavel Hrdina
7b526ea57c vircgroup: introduce virCgroupAddThread
Once we introduce cgroup v2 support we need to handle processes and
threads differently.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2018-09-25 09:59:23 +02:00
Pavel Hrdina
0772c34685 vircgroup: rename virCgroupAdd.*Task to virCgroupAdd.*Process
In cgroup v2 we need to handle processes and threads differently,
following patch will introduce virCgroupAddThread.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2018-09-25 09:59:23 +02:00
Wu Zongyong
2f754b26cb qemu: Update hostdevs device lists before connecting qemu monitor
In a following case:

    virsh start $domain
    service libvirtd stop
    <shutdown> the guest from within the $domain
    service libvirtd start

Notice that PCI devices which have been assigned to the $domain will
still be bound to stub drivers instead rebound to host drivers.
In that case the call stack is like below:

    libvirtd start
        qemuProcessReconnect
            qemuProcessStop (because $domain was shutdown without
                             libvirtd event to process that)
                qemuHostdevReAttachDomainDevices
                    qemuHostdevReAttachPCIDevices
                        virHostdevReAttachPCIDevices

However, because qemuHostdevUpdateActiveDomainDevices was called
after the qemuConnectMonitor, the setup of the tracking of each
host device in the $domain on either the activePCIHostdevs list
or inactivePCIHostdev list will not occur in an orderly manner.
Therefore, virHostdevReAttachPCIDevices just neglects these host PCI
devices which are bound to stub drivers and doesn't rebind them to
host drivers.

This patch fixs that by moving qemuHostdevUpdateActiveDomainDevices before
qemuConnectMonitor during libvirtd reconnection processing.

Signed-off-by: Wu Zongyong <cordius.wu@huawei.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-22 07:22:36 -04:00
Wang Yechao
fad65432ce qemu: Fix deadlock if create qemuProcessReconnect thread failed
Use the new qemuDomainRemoveInactiveJobLocked to remove the
@obj during the virDomainObjListForEach call which holds a
lock on the domain object list.

Signed-off-by: Wang Yechao <wang.yechao255@zte.com.cn>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-22 07:11:22 -04:00
Wang Yechao
a7b236345b qemu: Introduce qemuDomainRemoveInactiveJobLocked
Create a qemuDomainRemoveInactiveJobLocked which copies
qemuDomainRemoveInactiveJob except of course calling
another new helper qemuDomainRemoveInactiveLocked.

The qemuDomainRemoveInactiveLocked is a copy of
qemuDomainRemoveInactive except that instead of calling
virDomainObjListRemove it calls virDomainObjListRemoveLocked.

Signed-off-by: Wang Yechao <wang.yechao255@zte.com.cn>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-22 07:11:22 -04:00
Wang Yechao
6901a9321d qemu: Split up qemuDomainRemoveInactive
Introduce qemuDomainRemoveInactiveJobCommon to handle what will
be the common parts of the code with a new function that will
be used to call virDomainObjListRemoveLocked instead of the
unlocked variant.

Signed-off-by: Wang Yechao <wang.yechao255@zte.com.cn>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-22 07:11:22 -04:00
Andrea Bolognani
5095394e1e qemu: Drop QEMU_CAPS_DEVICE_SCSI_GENERIC
It was already available in 1.5.0, so we can assume it's
present and avoid checking for it at runtime.

This commit is best viewed with 'git show -w'.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-09-21 16:50:46 +02:00
Andrea Bolognani
1a3de67001 qemu: Prefer qemu-system-* binaries
We already prefer them in capabilities, and domcapabilities
should be consistent with that.

This commit is best viewed with 'git show -w'.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-09-21 15:54:03 +02:00
Andrea Bolognani
7948ad4129 qemu: Refactor virQEMUCapsCacheLookupByArch()
The new implementation contains less duplicated code and
is easier to extend.

This commit is best viewed with 'git show -w'.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-09-21 15:54:01 +02:00
Andrea Bolognani
e9e3a3c0fe qemu: Rename qemubinCaps => qemuCaps
The latter is used throughout libvirt, so use it here as
well for consistency.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-09-21 15:53:59 +02:00
Andrea Bolognani
3df264080e qemu: Simplify QEMU binary search
Now that we have reduced the number of sensible options down
to either the native QEMU binary or RHEL's qemu-kvm, we can
make virQEMUCapsInitGuest() a bit simpler.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-09-21 15:53:57 +02:00
Andrea Bolognani
ed5efee914 qemu: Don't look for "qemu-kvm" and "kvm" binaries
Both Fedora's qemu-kvm and Debian's/Ubuntu's kvm are nothing
more than paper-thin wrappers around the native QEMU binary,
so we gain nothing by looking for them.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-09-21 15:53:55 +02:00
Andrea Bolognani
9f01f9b4e4 qemu: Remove unnecessary variables
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-09-21 15:53:53 +02:00
Andrea Bolognani
943f2d53c6 qemu: Expect a single binary in virQEMUCapsInitGuest()
We're only ever passing a single binary when calling this
function, so we can remove all code dealing with the
possibility of a second binary being specified.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-09-21 15:53:50 +02:00
Andrea Bolognani
83d86e348e qemu: Stop looking after finding the first binary
When the guest is native, we are currently looking at
potential KVM binaries regardless of whether or not we have
already located a QEMU binary suitable to run the guest.

This made sense back when KVM support was not part of QEMU
proper, but these days the KVM binaries are in most cases
just trivial wrapper scripts around the native QEMU binary
so it doesn't make sense to poke at them unless they're
the only binaries on the system, such as when running on
RHEL.

This will allow us to simplify both virQEMUCapsInitGuest()
and virQEMUCapsInitGuestFromBinary().

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-09-21 15:53:48 +02:00
Andrea Bolognani
0d131d3893 qemu: Move armv7l-on-aarch64 special case
When running an armv7l guest on an aarch64 hosts, the
qemu-system-aarch64 binary should be our first choice instead
of qemu-system-arm since the former can take advantage of KVM
acceleration.

Move the special case to virQEMUCapsFindBinaryForArch() so
that it's handled along with all other cases rather than on
its own later on.

Doing so will also make further refactoring easier.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-09-21 15:53:45 +02:00
Andrea Bolognani
b37b41f868 qemu: Don't duplicate binary name in capabilities
virCapabilitiesAddGuestDomain() takes an optional binary
name: this is intended for cases where a certain domain
type can't use the default one registered for the guest
architecture, but has to use a special binary instead.

The current code, however, will pass 'binary' again when
'kvmbin' is not defined, which is unnecessary as 'binary'
has been registered as default earlier, and will result
in capabilities output such as

  <emulator>/usr/bin/qemu-system-x86_64</emulator>
  <domain type='qemu'/>
  <domain type='kvm'>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
  </domain>

with the second <emulator> element providing no additional
information.

Change it so that, when 'kvmbin' is not defined, NULL is
passed and so the default emulator will be used instead.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-09-21 15:53:42 +02:00
Andrea Bolognani
99d5a516d0 qemu: Move comments to virQEMUCapsGuestIsNative()
The function performing the checks, rather than its callers,
should contain comments explaining the rationale behind said
checks.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-09-21 15:53:35 +02:00
Michal Privoznik
c88ef717c8 qemu_hotplug: Fetch vhostuser ifname on hotplug
https://bugzilla.redhat.com/show_bug.cgi?id=1630164

Since 2a13a0a103 we are querying the vhostuser's interface name
when building qemu command line. However, we forgot to do so on
hotplug.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2018-09-21 14:59:35 +02:00
John Ferlan
e3a42028af Remove ignore_value or void from unlink calls
There seems to be no need to add the ignore_value wrapper or
caste with (void) to the unlink() calls, so let's just remove
them. I assume at one point in time Coverity complained. So,
let's just be consistent - those that care to check the return
status can and those that don't can just have the naked unlink.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2018-09-20 13:45:56 -04:00
John Ferlan
9e52c64966 qemu: Ignore nwfilter binding instantiation issues during reconnect
https://bugzilla.redhat.com/show_bug.cgi?id=1607202

It's essentially stated in the nwfilterBindingDelete that we
will allow the admin to shoot themselves in the foot by deleting
the nwfilter binding which then allows them to undefine the
nwfilter that is in use for the running guest...

However, by allowing this we cause a problem for libvirtd
restart reconnect processing which would then try to recreate
the missing binding attempting to use the deleted filter
resulting in an error and thus shutting the guest down.

So rather than keep adding virDomainConfNWFilterInstantiate
flags to "ignore" specific error conditions, modify the logic
to ignore, but VIR_WARN errors other than ignoreExists. This
will at least allow the guest to not shutdown for only nwfilter
binding errors that we can now perhaps recover from since we
have the binding create/delete capability.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
2018-09-20 07:31:55 -04:00
Erik Skultety
5165ff0971 src: More cleanup of some system headers already contained in internal.h
All of the ones being removed are pulled in by internal.h. The only
exception is sanlock which expects the application to include <stdint.h>
before sanlock's headers, because sanlock prototypes use fixed width
int, but they don't include stdint.h themselves, so we have to leave
that one in place.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Acked-by: Michal Privoznik <mprivozn@redhat.com>
2018-09-20 10:16:39 +02:00
Erik Skultety
9403b63102 internal: Move <stdio.h> include to internal.h
It doesn't really make sense for us to have stdlib.h and string.h but
not stdio.h in the internal.h header.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Acked-by: Michal Privoznik <mprivozn@redhat.com>
2018-09-20 10:16:38 +02:00
Jiri Denemark
1468536d42 qemu: Fix error reporting in qemuDomainSaveImageStartVM
When restoring a domain from a compressed image, we launch an
intermediate process for decompressing the saved data. If QEMU fails to
load the data for some reason, we force close the stdin/stdout file
descriptors of the intermediate process and wait for it to die. However,
virCommandWait can report various errors which would overwrite the real
error from QEMU. Thus instead of getting something useful:

    internal error: process exited while connecting to monitor:
    2018-09-17T15:17:29.998910Z qemu-system-x86_64: can't apply global
    Skylake-Client-x86_64-cpu.osxsave=off: Property '.osxsave' not found

we could get an irrelevant error message:

    internal error: Child process (lzop -dc --ignore-warn) unexpected
    fatal signal 13

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-19 14:05:59 +02:00
Michal Privoznik
3e26b476b5 security_manager: Load lock plugin on init
Now that we know what metadata lock manager user wishes to use we
can load it when initializing security driver. This is achieved
by adding new argument to virSecurityManagerNewDriver() and
subsequently to all functions that end up calling it.

The cfg.mk change is needed in order to allow lock_manager.h
inclusion in security driver without 'syntax-check' complaining.
This is safe thing to do as locking APIs will always exist (it's
only backend implementation that changes). However, instead of
allowing the include for all other drivers (like cpu, network,
and so on) allow it only for security driver. This will still
trigger the error if including from other drivers.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-18 17:12:53 +02:00
Michal Privoznik
8b8aefb3d6 qemu_conf: Introduce metadata_lock_manager
This config option allows users to set and enable lock manager
for domain metadata. The lock manager is going to be used by
security drivers to serialize each other when changing a file
ownership or changing the SELinux label. The only supported lock
manager is 'lockd' for now.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-18 17:12:53 +02:00
Andrea Bolognani
2f8b91ee74 qemu: Don't check for /dev/kvm presence
The file being present doesn't necessarily mean anything these
days, as it's created independently of whether the kvm module
has been loaded[1]; moreover, we're already gathering all the
information we need through QMP, so poking the filesystem at
all is entirely unnecessary.

[1] https://github.com/systemd/systemd/commit/d35d6249d5a7ed3228

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2018-09-17 15:08:48 +02:00
Andrea Bolognani
c3be8bb423 qemu: Clarify QEMU_CAPS_KVM
This capability is documented as having one meaning (whether
KVM is enabled by default) but is actually assigned two other
meanings over its life: whether the query-kvm QMP command is
available at first, and later on whether KVM is usable / was
used during probing.

Since the query-kvm QMP command was available in 1.5.0, we
can avoid probing for it; additionally, we can simplify the
logic by setting the flag when it applies instead of initially
setting it and then clearing it when it doesn't.

The flag's description is also updated to reflect reality.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2018-09-17 14:52:41 +02:00
Andrea Bolognani
55e5eb9478 qemu: Avoid probing non-native binaries all the time
A side effect of recent changes is that we would always try
to regenerate the capabilities cache for non-native QEMU
binaries based on /dev/kvm availability, which is of course
complete nonsense. Make sure that doesn't happen.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2018-09-17 14:52:38 +02:00
Andrea Bolognani
88983855d5 qemu: Drop QEMU_CAPS_ENABLE_KVM
It was already available in 1.5.0.

Moreover, we're not even formatting it on the QEMU command
line, ever: we just use it as part of some logic that decides
whether KVM support should be advertised, and as it turns out
that logic is actually buggy and dropping this capability
fixes it.

https://bugzilla.redhat.com/show_bug.cgi?id=1628469

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2018-09-17 14:52:34 +02:00
Shi Lei
c9ed87a610 src: remove blank first line in function body
Signed-off-by: Shi Lei <shi_lei@massclouds.com>
2018-09-17 13:29:01 +02:00
Shi Lei
ab9a145926 src: fix incorrect indentation in function body by checking first line
Signed-off-by: Shi Lei <shi_lei@massclouds.com>
2018-09-17 13:29:00 +02:00
Michal Privoznik
37131adada qemu_security: Run transactions more frequently
Now that committing transactions using pid == -1 means that we're
not fork()-ing to run the transaction in a specific namespace, we
can utilize the transaction processing semantics in order to
start, run a or multiple commands, and then commit the
transaction without being concerned with other interactions or
transactions interrupting the processing.  This will eventually
allow us to have a single place where all the paths can be
locked, followed by relabeling and unlocking again.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-17 10:58:17 +02:00
Michal Privoznik
ccafaacd61 qemu_security: Require full wrappers for APIs that might touch a file
In the future, the transactions are not going to be optional and
they will be run regardless of domain using namespace to collect
list of paths to be relabeled.

To make sure there won't be an API that goes behind transaction
code back update the comment that serves as decision manual
whether an API must be fully implemented or plain #define is
sufficient.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-17 10:58:17 +02:00
Michal Privoznik
e2c23982dd qemu_security: Fully implement qemuSecurity{Set,Restore}SavedStateLabel
Even though the current use of the functions does not require full
implementation with transactions (none of the callers passes a path
somewhere under /dev), it doesn't hurt either. Moreover, in
future patches the paradigm is going to shift so that any API
that touches a file is required to use transactions.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-17 10:58:17 +02:00
Michal Privoznik
da24db2d30 qemu_security: Fully implement qemuSecurityDomainSetPathLabel
Even though the current use of the function does not require full
implementation with transactions (none of the callers pass a path
somewhere under /dev), it doesn't hurt either. Moreover, in
future patches the paradigm is going to shift so that any API
that touches a file is required to use transactions.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-17 10:58:17 +02:00
Martin Kletzander
b907fd75fa qemu: Report less errors on driver startup
It is not a problem at all if the `tss` user/group does not exist, the code
fallbacks to the `root` user/group.  However we report a warning for no reason
on every start-up.  Fix this by checking if the user/group actually exists.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2018-09-13 16:19:25 +02:00
Nikolay Shirokovskiy
30f9a64cbd qemu: fix typo in vnc port releasing
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-13 14:05:17 +03:00
Ján Tomko
51c02bd4f9 qemu: remove unnecessary virQEMUCapsFreeHostCPUModel
After removing the host CPU model re-computation,
this function is no longer necessary.

This reverts commits:
commit d0498881a0
  virQEMUCapsFreeHostCPUModel: Don't always free host cpuData
commit 5276ec712a
  testUpdateQEMUCaps: Don't leak host cpuData

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-09-12 21:12:22 +02:00
John Ferlan
61d340a27d conf: Move hypervisor specific nhugepage checks
Commit 82327038 moved a couple of checks out of the XML parser
into the domain validation; however, those checks seem to be more
useful as hypervisor specific checks rather than the more general
domain conf checks (nothing in the docs indicate a specific error).

Fortunately only QEMU was processing the memoryBacking, thus
add the changes to qemuDomainDefValidateMemory and change the
code a bit to make usage of the similar deref to def->mem and
the mem->nhugepages filter.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2018-09-12 12:21:05 -04:00
Andrea Bolognani
36504033ae qemu: Drop redundant version checks
We require QEMU 1.5.0 these days, so checking for versions
older than that is pointless.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2018-09-12 15:36:54 +02:00
Andrea Bolognani
b38a85a321 qemu: Drop QEMU_CAPS_CHARDEV_SPICEPORT
The capability was introduced in QEMU 1.5.0, which is our
minimum supported QEMU version these days.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2018-09-12 15:36:46 +02:00
Andrea Bolognani
d6a1d0af62 qemu: Drop QEMU_CAPS_VNC_WEBSOCKET
The capability was introduced in QEMU 1.3.1 and we require
QEMU 1.5.0 these days.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2018-09-12 15:35:58 +02:00
Ján Tomko
cc786a8fd6 qemu: free SEV caps in virQEMUCapsDispose
Commit 77f51ab5 started parsing an copying the SEV capabilities,
but omitted the free call.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-09-12 14:38:32 +02:00
Michal Privoznik
e7d9a8f1f0 qemu_domain: Drop namespace check from top level functions
In some cases we are checking if the mount namespace is enabled
at two places: one is at the beginning of exported function (e.g.
qemuDomainNamespaceSetupDisk()) and the other is at the beginning
of qemuDomainNamespaceMknodPaths() which is called from the
former function anyway. Then we have some other functions which
rely on the later check solely.

In order to compensate for possibly needless function call,
qemuDomainNamespaceMknodPaths() returns early if @npaths is zero.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-09-12 10:59:09 +02:00
John Ferlan
9ed175fbc2 qemu: Remove duplicated qemuAgentCheckError
Commit 5b3492fadb moved qemuAgentCheckError calls into
qemuAgentCommand for various reasons; however, subsequent
commit 0977b8aa0 adding a new command made call again
So let's just remove the duplicitous call from
qemuAgentGetInterfaces.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
2018-09-11 10:32:01 -04:00
John Ferlan
2cfc000f70 qemu: Remove duplicated qemuAgentCheckError
Commit 5b3492fadb moved qemuAgentCheckError calls into
qemuAgentCommand for various reasons; however, subsequent
commit b1aa91e14 restored the call. So let's just remove
the duplicitous call from qemuAgentSetVCPUsCommand.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
2018-09-11 10:31:36 -04:00
Ján Tomko
4168e33755 qemu: remove leftover property probing
Previous commits removed all capabilities from per-device property
probing for:

  pci-assign
  kvm-pci-assign
  usb-host
  scsi-generic

Remove them from the virQEMUCapsDeviceProps list and get rid of the
redundant device-list-properties QMP calls.

Note that 'pci-assign' was already useless, because the QMP version
of the device is called 'kvm-pci-assign', see libvirt commit 7257480
from 2012.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2018-09-07 17:26:17 +02:00
Ján Tomko
9b17c9392a qemu: always assume QEMU_CAPS_DEVICE_SCSI_GENERIC_BOOTINDEX
Introduced by QEMU commit 28b77657 in v1.0-rc4~21^2~8.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2018-09-07 17:26:17 +02:00
Ján Tomko
b5acaaae36 qemu: always assume QEMU_CAPS_VFIO_PCI_BOOTINDEX
Introduced by QEMU commit c29029d which was included in 1.5.0

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2018-09-07 17:26:17 +02:00
Ján Tomko
8a741a8e31 qemu: always assume QEMU_CAPS_USB_HOST_BOOTINDEX
Added by QEMU commit 65bb3a5 contained in v1.1.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2018-09-07 17:26:17 +02:00
Ján Tomko
40f3c23c0f qemu: always assume QEMU_CAPS_USB_REDIR_BOOTINDEX
Added by QEMU commit 65bb3a5 contained in v1.1.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2018-09-07 17:26:17 +02:00
Ján Tomko
9eae152fcb qemu: always assume QEMU_CAPS_PCI_BOOTINDEX
At the time of the addition of 'pci-assign' in QEMU commit
v1.3.0-rc0~572^2 the bootindex argument was already supported.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2018-09-07 17:26:17 +02:00
Ján Tomko
e30b5d6b89 qemu: always assume QEMU_CAPS_PCI_CONFIGFD
At the time of the addition of 'pci-assign' in QEMU commit
v1.3.0-rc0~572^2 the configfd argument was already supported.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2018-09-07 17:26:17 +02:00
Ján Tomko
c2d739a747 qemu: drop unused QEMU_CAPS_DEVICE_USB_NET
Added by commit fc66c1603c and not used since.

Also, the device was present in QEMU 1.5.0 so this capability
will not be needed if we ever decide to implement usb-net support.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2018-09-07 17:26:17 +02:00