1. 08 2月, 2017 8 次提交
    • M
      qemuDomainNamespaceSetupDisk: Drop useless @src variable · 76d491ef
      Michal Privoznik 提交于
      Since its introduction in 81df2150 this variable was never
      used.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      76d491ef
    • M
      qemu_domain: Don't pass virDomainDeviceDefPtr to ns helpers · 8dc867e9
      Michal Privoznik 提交于
      There is no need for this. None of the namespace helpers uses it.
      Historically it was used when calling secdriver APIs, but we
      don't to that anymore.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      8dc867e9
    • M
      qemu_security: Drop qemuSecuritySetRestoreAllLabelData struct · 848dbe19
      Michal Privoznik 提交于
      This struct is unused after 095f042e.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      848dbe19
    • M
      qemuDomainAttachSCSIVHostDevice: manage /dev entry · 45599e40
      Michal Privoznik 提交于
      Again, one missed bit. This time without this commit there is no
      /dev entry in the namespace of the qemu process when attaching
      vhost SCSI device.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      45599e40
    • M
      qemuDomainAttachSCSIVHostDevice: Prefer qemuSecurity wrappers · 7d93a885
      Michal Privoznik 提交于
      Since we have qemuSecurity wrappers over
      virSecurityManagerSetHostdevLabel and
      virSecurityManagerRestoreHostdevLabel we ought to use them
      instead of calling secdriver APIs directly.  Without those
      wrappers the labelling won't be done in the correct namespace
      and thus won't apply to the nodes seen by qemu itself.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      7d93a885
    • L
      qemu: propagate bridge MTU into qemu "host_mtu" option · 2841e675
      Laine Stump 提交于
      libvirt was able to set the host_mtu option when an MTU was explicitly
      given in the interface config (with <mtu size='n'/>), set the MTU of a
      libvirt network in the network config (with the same named
      subelement), and would automatically set the MTU of any tap device to
      the MTU of the network.
      
      This patch ties that all together (for networks based on tap devices
      and either Linux host bridges or OVS bridges) by learning the MTU of
      the network (i.e. the bridge) during qemuInterfaceBridgeConnect(), and
      returning that value so that it can then be passed to
      qemuBuildNicDevStr(); qemuBuildNicDevStr() then sets host_mtu in the
      interface's commandline options.
      
      The result is that a higher MTU for all guests connecting to a
      particular network will be plumbed top to bottom by simply changing
      the MTU of the network (in libvirt's config for libvirt-managed
      networks, or directly on the bridge device for simple host bridges or
      OVS bridges managed outside of libvirt).
      
      One question I have about this - it occurred to me that in the case of
      migrating a guest from a host with an older libvirt to one with a
      newer libvirt, the guest may have *not* had the host_mtu option on the
      older machine, but *will* have it on the newer machine. I'm curious if
      this could lead to incompatibilities between source and destination (I
      guess it all depends on whether or not the setting of host_mtu has a
      practical effect on a guest that is already running - Maxime?)
      
      Likewise, we could run into problems when migrating from a newer
      libvirt to older libvirt - The guest would have been told of the
      higher MTU on the newer libvirt, then migrated to a host that didn't
      understand <mtu size='blah'/>. (If this really is a problem, it would
      be a problem with or without the current patch).
      2841e675
    • L
      util: add MTU arg to virNetDevTapCreateInBridgePort() · dd8ac030
      Laine Stump 提交于
      virNetDevTapCreateInBridgePort() has always set the new tap device to
      the current MTU of the bridge it's being attached to. There is one
      case where we will want to set the new tap device to a different
      (usually larger) MTU - if that's done with the very first device added
      to the bridge, the bridge's MTU will be set to the device's MTU. This
      patch allows for that possibility by adding "int mtu" to the arg list
      for virNetDevTapCreateInBridgePort(), but all callers are sending -1,
      so it doesn't yet have any effect.
      
      Since the requested MTU isn't necessarily what is used in the end (for
      example, if there is no MTU requested, the tap device will be set to
      the current MTU of the bridge), and the hypervisor may want to know
      the actual MTU used, we also return the actual MTU to the caller (if
      actualMTU is non-NULL).
      dd8ac030
    • A
      qemu: Forbid <memoryBacking><locked> without <memtune><hard_limit> · c2e60ad0
      Andrea Bolognani 提交于
      In order for memory locking to work, the hard limit on memory
      locking (and usage) has to be set appropriately by the user.
      
      The documentation mentions the requirement already: with this
      patch, it's going to be enforced by runtime checks as well,
      by forbidding a non-compliant guest from being defined as well
      as edited and started.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1316774
      c2e60ad0
  2. 07 2月, 2017 8 次提交
  3. 01 2月, 2017 2 次提交
  4. 31 1月, 2017 2 次提交
  5. 30 1月, 2017 5 次提交
  6. 26 1月, 2017 2 次提交
  7. 22 1月, 2017 1 次提交
  8. 20 1月, 2017 3 次提交
  9. 19 1月, 2017 1 次提交
  10. 18 1月, 2017 3 次提交
  11. 17 1月, 2017 3 次提交
  12. 13 1月, 2017 2 次提交
    • C
      qemu-capabilities: Fix query-cpu-model-expansion on s390 with older kernel · e8a43f19
      Collin L. Walling 提交于
      When running on s390 with a kernel that does not support cpu model checking and
      with a Qemu new enough to support query-cpu-model-expansion, the gathering of qemu
      capabilities will fail. Qemu responds to the query-cpu-model-expansion qmp
      command with an error because the needed kernel ioct does not exist. When this
      happens a guest cannot even be defined due to missing qemu capabilities data.
      
      This patch fixes the problem by silently ignoring generic errors stemming from
      calls to query-cpu-model-expansion.
      Reported-by: NFarhan Ali <alifm@linux.vnet.ibm.com>
      Signed-off-by: NCollin L. Walling <walling@linux.vnet.ibm.com>
      Signed-off-by: NJason J. Herne <jjherne@linux.vnet.ibm.com>
      e8a43f19
    • M
      qemu: Copy SELinux labels for namespace too · 93a062c3
      Michal Privoznik 提交于
      When creating new /dev/* for qemu, we do chown() and copy ACLs to
      create the exact copy from the original /dev. I though that
      copying SELinux labels is not necessary as SELinux will chose the
      sane defaults. Surprisingly, it does not leaving namespace with
      the following labels:
      
      crw-rw-rw-. root root system_u:object_r:tmpfs_t:s0     random
      crw-------. root root system_u:object_r:tmpfs_t:s0     rtc0
      drwxrwxrwt. root root system_u:object_r:tmpfs_t:s0     shm
      crw-rw-rw-. root root system_u:object_r:tmpfs_t:s0     urandom
      
      As a result, domain is unable to start:
      
      error: internal error: process exited while connecting to monitor: Error in GnuTLS initialization: Failed to acquire random data.
      qemu-kvm: cannot initialize crypto: Unable to initialize GNUTLS library: Failed to acquire random data.
      
      The solution is to copy the SELinux labels as well.
      Reported-by: NAndrea Bolognani <abologna@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      93a062c3