1. 22 5月, 2017 2 次提交
  2. 11 5月, 2017 1 次提交
  3. 27 4月, 2017 3 次提交
    • E
      qemu: Remove extra messages for vhost-scsi hotplug · 6ff38cee
      Eric Farman 提交于
      As with virtio-scsi, the "internal error" messages after
      preparing a vhost-scsi hostdev overwrites more meaningful
      error messages deeper in the callchain.  Remove it too.
      Signed-off-by: NEric Farman <farman@linux.vnet.ibm.com>
      6ff38cee
    • E
      qemu: Remove extra messages from virtio-scsi hotplug · 33c1fc43
      Eric Farman 提交于
      I tried to attach a SCSI LUN to two different guests, and forgot
      to specify "shareable" in the hostdev XML.  Attaching the device
      to the second guest failed, but the message was not helpful in
      telling me what I was doing wrong:
      
        $ cat scsi_scratch_disk.xml
          <hostdev mode='subsystem' type='scsi'>
            <source>
              <adapter name='scsi_host3'/>
              <address bus='0' target='15' unit='1074151456'/>
            </source>
          </hostdev>
      
        $ virsh attach-device dasd_sles_d99c scsi_scratch_disk.xml
        Device attached successfully
      
        $ virsh attach-device dasd_fedora_0e1e scsi_scratch_disk.xml
        error: Failed to attach device from scsi_scratch_disk.xml
        error: internal error: Unable to prepare scsi hostdev: scsi_host3:0:15:1074151456
      
      I eventually discovered my error, but thought it was weird that
      Libvirt doesn't provide something more helpful in this case.
      Looking over the code we had just gone through, I commented out
      the "internal error" message, and got something more useful:
      
        $ virsh attach-device dasd_fedora_0e1e scsi_scratch_disk.xml
        error: Failed to attach device from scsi_scratch_disk.xml
        error: Requested operation is not valid: SCSI device 3:0:15:1074151456 is already in use by other domain(s) as 'non-shareable'
      
      Looking over the error paths here, we seem to issue better
      messages deeper in the callchain so these "internal error"
      messages overwrite any of them.  Remove them, so that the
      more detailed errors are seen.
      Signed-off-by: NEric Farman <farman@linux.vnet.ibm.com>
      33c1fc43
    • E
      2dc94c3c
  4. 25 4月, 2017 1 次提交
  5. 20 4月, 2017 2 次提交
  6. 18 4月, 2017 1 次提交
    • P
      qemu: refactor qemuDomainMachine* functions · ac97658d
      Pavel Hrdina 提交于
      Introduce new wrapper functions without *Machine* in the function
      name that take the whole virDomainDef structure as argument and
      call the existing functions with *Machine* in the function name.
      
      Change the arguments of existing functions to *machine* and *arch*
      because they don't need the whole virDomainDef structure and they
      could be used in places where we don't have virDomainDef.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      ac97658d
  7. 04 4月, 2017 5 次提交
  8. 27 3月, 2017 1 次提交
    • E
      conf: Introduce new hostdev device type mdev · ec783d7c
      Erik Skultety 提交于
      A mediated device will be identified by a UUID (with 'model' now being
      a mandatory <hostdev> attribute to represent the mediated device API) of
      the user pre-created mediated device. We also need to make sure that if
      user explicitly provides a guest address for a mdev device, the address
      type will be matching the device API supported on that specific mediated
      device and error out with an incorrect XML message.
      
      The resulting device XML:
      <devices>
        <hostdev mode='subsystem' type='mdev' model='vfio-pci'>
          <source>
            <address uuid='c2177883-f1bb-47f0-914d-32a22e3a8804'>
          </source>
        </hostdev>
      </devices>
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      ec783d7c
  9. 25 3月, 2017 1 次提交
  10. 16 3月, 2017 1 次提交
  11. 15 3月, 2017 4 次提交
  12. 10 3月, 2017 2 次提交
  13. 09 3月, 2017 6 次提交
  14. 06 3月, 2017 1 次提交
    • M
      qemu: Enforce qemuSecurity wrappers · 4da534c0
      Michal Privoznik 提交于
      Now that we have some qemuSecurity wrappers over
      virSecurityManager APIs, lets make sure everybody sticks with
      them. We have them for a reason and calling virSecurityManager
      API directly instead of wrapper may lead into accidentally
      labelling a file on the host instead of namespace.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      4da534c0
  15. 01 3月, 2017 1 次提交
  16. 22 2月, 2017 1 次提交
  17. 21 2月, 2017 1 次提交
  18. 08 2月, 2017 4 次提交
    • M
      qemuDomainNamespace{Setup,Teardown}Disk: Don't pass pointer to full disk · 18ce9d13
      Michal Privoznik 提交于
      These functions do not need to see the whole virDomainDiskDef.
      Moreover, they are going to be called from places where we don't
      have access to the full disk definition. Sticking with
      virStorageSource is more than enough.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      18ce9d13
    • 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
  19. 07 2月, 2017 1 次提交
    • M
      qemuDomainPrepareDisk: Fix ordering · 0a465238
      Michal Privoznik 提交于
      The current ordering is as follows:
      1) set label
      2) create the device in namespace
      3) allow device in the cgroup
      
      While this might work for now, it will definitely not work if the
      security driver would use transactions as in that case there
      would be no device to relabel in the domain namespace as the
      device is created in the second step.
      Swap steps 1) and 2) to allow security driver to use more
      transactions.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      0a465238
  20. 30 1月, 2017 1 次提交