1. 09 12月, 2016 3 次提交
  2. 08 12月, 2016 6 次提交
    • C
      lxc: monitor now holds a reference to the domain · 3cd556d4
      Cédric Bosdonnat 提交于
      If the monitor doesn't hold a reference to the domain object
      the object may be destroyed before the monitor actually stops.
      3cd556d4
    • M
      security: Drop virSecurityManagerSetHugepages · ce937d37
      Michal Privoznik 提交于
      Since its introduction in 2012 this internal API did nothing.
      Moreover we have the same API that does exactly the same:
      virSecurityManagerDomainSetPathLabel.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      ce937d37
    • M
      qemu: Create hugepage path on per domain basis · f55afd83
      Michal Privoznik 提交于
      If you've ever tried running a huge page backed guest under
      different user than in qemu.conf, you probably failed. Problem is
      even though we have corresponding APIs in the security drivers,
      there's no implementation and thus we don't relabel the huge page
      path. But even if we did, so far all of the domains share the
      same path:
      
         /hugepageMount/libvirt/qemu
      
      Our only option there would be to set 0777 mode on the qemu dir
      which is totally unsafe. Therefore, we can create dir on
      per-domain basis, i.e.:
      
         /hugepageMount/libvirt/qemu/domainName
      
      and chown domainName dir to the user that domain is configured to
      run under.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      f55afd83
    • M
      virDomainObjGetShortName: take virDomainDef · 7ed6934f
      Michal Privoznik 提交于
      So far this function takes virDomainObjPtr which:
      1) is an overkill,
      2) might be not available in all the places we will use it.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      7ed6934f
    • M
      conf: Make scheduler formatting simpler · dc18766b
      Martin Kletzander 提交于
      Since the great rework of how we store vcpu- and iothread-related
      data, we have overly complex part of code that is trying to format the
      scheduler tuning data in as less lines as possible by grouping
      settings for multiple threads.  That was designed as an input syntax
      sugar for users, but we don't need to also use that when formatting
      the XML.  Switching to simple enumeration makes the code nicer,
      shorter and more welcoming to future changes.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      dc18766b
    • D
      test: fix screenshot API impl · 0be9cea1
      Daniel P. Berrange 提交于
      When redoing the website we deleted the libvirtLogo.png file
      not remembering that the test driver screenshot API impl
      relied on it.
      
      Rather than having the test driver use the logo as a side
      effect, give it its own dedicated image to use. This is
      installed in /usr/share/libvirt/test-screenshot.png and
      is taken from a NeXT Cube running WorldWideWeb[1]. The
      very first web browser in existance, running on the
      hardware it was originally written on.
      
      [1] https://en.wikipedia.org/wiki/WorldWideWebSigned-off-by: NDaniel P. Berrange <berrange@redhat.com>
      0be9cea1
  3. 07 12月, 2016 5 次提交
  4. 06 12月, 2016 16 次提交
  5. 05 12月, 2016 5 次提交
  6. 02 12月, 2016 1 次提交
  7. 01 12月, 2016 4 次提交
    • G
      qemuDomainAttachNetDevice: pass mq and vectors for vhost-user with multiqueue · f81b33b5
      gaohaifeng 提交于
      Two reasons:
      1.in none hotplug, we will pass it. We can see from libvirt function
      qemuBuildVhostuserCommandLine
      2.qemu will use this vetcor num to init msix table. If we don't pass, qemu
      will use default value, this will cause VM can only use default value
      interrupts at most.
      Signed-off-by: Ngaohaifeng <gaohaifeng.gao@huawei.com>
      f81b33b5
    • E
      qemu: Prevent detaching SCSI controller used by hostdev · 655429a0
      Eric Farman 提交于
      Consider the following XML snippets:
      
        $ cat scsicontroller.xml
            <controller type='scsi' model='virtio-scsi' index='0'/>
        $ cat scsihostdev.xml
            <hostdev mode='subsystem' type='scsi'>
              <source>
                <adapter name='scsi_host0'/>
                <address bus='0' target='8' unit='1074151456'/>
              </source>
            </hostdev>
      
      If we create a guest that includes the contents of scsihostdev.xml,
      but forget the virtio-scsi controller described in scsicontroller.xml,
      one is silently created for us.  The same holds true when attaching
      a hostdev before the matching virtio-scsi controller.
      (See qemuDomainFindOrCreateSCSIDiskController for context.)
      
      Detaching the hostdev, followed by the controller, works well and the
      guest behaves appropriately.
      
      If we detach the virtio-scsi controller device first, any associated
      hostdevs are detached for us by the underlying virtio-scsi code (this
      is fine, since the connection is broken).  But all is not well, as the
      guest is unable to receive new virtio-scsi devices (the attach commands
      succeed, but devices never appear within the guest), nor even be
      shutdown, after this point.
      
      While this is not libvirt's problem, we can prevent falling into this
      scenario by checking if a controller is being used by any hostdev
      devices.  The same is already done for disk elements today.
      
      Applying this patch and then using the XML snippets from earlier:
      
        $ virsh detach-device guest_01 scsicontroller.xml
        error: Failed to detach device from scsicontroller.xml
        error: operation failed: device cannot be detached: device is busy
      
        $ virsh detach-device guest_01 scsihostdev.xml
        Device detached successfully
      
        $ virsh detach-device guest_01 scsicontroller.xml
        Device detached successfully
      Signed-off-by: NEric Farman <farman@linux.vnet.ibm.com>
      Reviewed-by: NBjoern Walk <bwalk@linux.vnet.ibm.com>
      Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
      655429a0
    • L
      qemu: assign VFIO devices to PCIe addresses when appropriate · 70249927
      Laine Stump 提交于
      Although nearly all host devices that are assigned to guests using
      VFIO ("<hostdev>" devices in libvirt) are physically PCI Express
      devices, until now libvirt's PCI address assignment has always
      assigned them addresses on legacy PCI controllers in the guest, even
      if the guest's machinetype has a PCIe root bus (e.g. q35 and
      aarch64/virt).
      
      This patch tries to assign them to an address on a PCIe controller
      instead, when appropriate. First we do some preliminary checks that
      might allow setting the flags without doing any extra work, and if
      those conditions aren't met (and if libvirt is running privileged so
      that it has proper permissions), we perform the (relatively) time
      consuming task of reading the device's PCI config to see if it is an
      Express device. If this is successful, the connect flags are set based
      on the result, but if we aren't able to read the PCI config (most
      likely due to the device not being present on the system at the time
      of the check) we assume it is (or will be) an Express device, since
      that is almost always the case anyway.
      70249927
    • L
      qemu: propagate virQEMUDriver object to qemuDomainDeviceCalculatePCIConnectFlags · 9b0848d5
      Laine Stump 提交于
      If libvirtd is running unprivileged, it can open a device's PCI config
      data in sysfs, but can only read the first 64 bytes. But as part of
      determining whether a device is Express or legacy PCI,
      qemuDomainDeviceCalculatePCIConnectFlags() will be updated in a future
      patch to call virPCIDeviceIsPCIExpress(), which tries to read beyond
      the first 64 bytes of the PCI config data and fails with an error log
      if the read is unsuccessful.
      
      In order to avoid creating a parallel "quiet" version of
      virPCIDeviceIsPCIExpress(), this patch passes a virQEMUDriverPtr down
      through all the call chains that initialize the
      qemuDomainFillDevicePCIConnectFlagsIterData, and saves the driver
      pointer with the rest of the iterdata so that it can be used by
      qemuDomainDeviceCalculatePCIConnectFlags(). This pointer isn't used
      yet, but will be used in an upcoming patch (that detects Express vs
      legacy PCI for VFIO assigned devices) to examine driver->privileged.
      9b0848d5