1. 07 11月, 2017 19 次提交
  2. 06 11月, 2017 1 次提交
    • J
      conf: Don't inline virDomainNetTypeSharesHostView · bce925da
      Jiri Denemark 提交于
      When coverage build is enabled, gcc complains about it:
      
      In file included from qemu/qemu_agent.h:29:0,
                       from qemu/qemu_driver.c:47:
      qemu/qemu_driver.c: In function 'qemuDomainSetInterfaceParameters':
      ./conf/domain_conf.h:3397:1: error: inlining failed in call to
      'virDomainNetTypeSharesHostView': call is unlikely and code size would
      grow [-Werror=inline]
       virDomainNetTypeSharesHostView(const virDomainNetDef *net)
       ^
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      bce925da
  3. 04 11月, 2017 9 次提交
    • D
      domain: Allow 'model' attribute for ide controller · 1ed22398
      Dawid Zamirski 提交于
      The optional values are 'piix3', 'piix4' or 'ich6'. Those will be
      needed to allow setting IDE controller model in VirtualBox driver.
      1ed22398
    • D
      vbox: Add more IStorageController API mappings · 06c4fd10
      Dawid Zamirski 提交于
      This patch exposes additional methods of the native VBOX API to the
      libvirt 'unified' vbox API to deal with IStorageController. The exposed
      methods are:
      
      * IStorageController->GetStorageControllerType()
      * IStorageController->SetStorageControllerType()
      * IMachine->GetStorageControllers()
      06c4fd10
    • D
      vbox: Support empty removable drives. · 1bf7e977
      Dawid Zamirski 提交于
      Original code was checking for non empty disk source before proceeding
      to actually attach disk device to VM. This prevented from creating
      empty removable devices like DVD or floppy. Therefore, this patch
      re-organizes the loop work-flow to allow such configurations as well as
      makes the code follow better libvirt practices. Additionally, adjusted
      debug logs to be more helpful - removed old ones and added new which
      give more valuable info for troubleshooting.
      1bf7e977
    • D
      vbox: Errors in vboxAttachDrives are now critical · e3ecf4b8
      Dawid Zamirski 提交于
      Previously, if one tried to define a VBOX VM and the API failed to
      perform the requested actions for some reason, it would just log the
      error and move on to process remaining disk definitions. This is not
      desired as it could result in incorrectly defined VM without the caller
      even knowing about it. So now all the code paths that call
      virReportError are now treated as hard failures as they should have
      been.
      e3ecf4b8
    • D
      vbox: Remove unused mediumEmpty · 60227fd5
      Dawid Zamirski 提交于
      Remove the setting since it's unused as of commit 34364df3 which should
      have never copied it in from the old code which ended up getting removed
      as part of commit c7c286c6.
      60227fd5
    • D
      vbox: Cleanup vboxAttachDrives implementation · ff67685b
      Dawid Zamirski 提交于
      This commit primes vboxAttachDrives for further changes so when they
      are made, the diff is less noisy:
      
      * move variable declarations to the top of the function
      * add disk variable to replace all the def->disks[i] instances
      * add cleanup at the end of the loop body, so it's all in one place
        rather than scattered through the loop body. It's purposefully
        called 'cleanup' rather than 'skip' or 'continue' because future
        commit will treat errors as hard-failures.
      ff67685b
    • D
      vbox: vboxAttachDrives now relies on address info · c739a6bd
      Dawid Zamirski 提交于
      Previously, the driver was computing VBOX's devicePort/deviceSlot values
      based on device name and max port/slot values. While this worked, it
      completely ignored <address> values. Additionally, libvirt's built-in
      virDomainDiskDefAssignAddress already does a good job  setting default
      values on virDomainDeviceDriveAddress struct which we can use to set
      devicePort and deviceSlot and accomplish the same result while allowing
      the customizing those via XML. Also, this allows to remove some code
      which will make further patches smaller.
      c739a6bd
    • D
      vbox: Close media when undefining domains · 7651debb
      Dawid Zamirski 提交于
      When registering a VM we call OpenMedium on each disk image which adds it
      to vbox's global media registry. Therefore, we should make sure to call
      Close when unregistering VM so we cleanup the media registry entries
      after ourselves - this does not remove disk image files. This follows
      the behaviour of the VBoxManage unregistervm command.
      7651debb
    • D
      vbox: Update ATTRIBUTE_UNUSED usage · 6f8ddbb8
      Dawid Zamirski 提交于
      Since the removal of VBOX <= 3x, the function arguments are actually
      used so they should not be marked with ATTRIBUTE_UNUSED anymore.
      6f8ddbb8
  4. 03 11月, 2017 11 次提交
    • A
      Remove backslash alignment attempts · 3e7db8d3
      Andrea Bolognani 提交于
      Right-aligning backslashes when defining macros or using complex
      commands in Makefiles looks cute, but as soon as any changes is
      required to the code you end up with either distractingly broken
      alignment or unnecessarily big diffs where most of the changes
      are just pushing all backslashes a few characters to one side.
      
      Generated using
      
        $ git grep -El '[[:blank:]][[:blank:]]\\$' | \
          grep -E '*\.([chx]|am|mk)$$' | \
          while read f; do \
            sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \
          done
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      3e7db8d3
    • P
      qemu: domain: skip chain detection to end of backing chain · a92c4f75
      Peter Krempa 提交于
      When a user provides the backing chain, we will not need to re-detect
      all the backing stores again, but should move to the end of the user
      specified chain. Additionally if a user provides a full terminated chain
      we should not attempt any further detection.
      a92c4f75
    • P
      qemu: domain: Prepare TLS data for the whole backing chain · b0a46b60
      Peter Krempa 提交于
      Iterate through the backing chain when setting up TLS for disks.
      b0a46b60
    • P
      qemu: domain: Remove pointless alias check · beb1661f
      Peter Krempa 提交于
      When attaching the disks, aliases are always generated.
      beb1661f
    • P
      d5658773
    • P
      qemu: domain: Extract setup for disk source secrets · e53a42f0
      Peter Krempa 提交于
      Separate it so that it deals only with single virStorageSource, so that
      it can later be reused for full backing chain support.
      
      Two aliases are passed since authentication is more relevant to the
      'storage backend' whereas encryption is more relevant to the protocol
      layer. When using node names, the aliases will be different.
      e53a42f0
    • P
      qemu: domain: Simplify using DAC permissions of top of backing chain · 2b757b96
      Peter Krempa 提交于
      qemuDomainGetImageIds and qemuDomainStorageFileInit are helpful when
      trying to access a virStorageSource from the qemu driver since they
      figure out the correct uid and gid for the image.
      
      When accessing members of a backing chain the permissions for the top
      level would be used. To allow using specific permissions per backing
      chain level but still allow inheritance from the parent of the chain we
      need to add a new parameter to the image ID APIs.
      2b757b96
    • P
      security: selinux: Take parent security label into account · cc16fa2a
      Peter Krempa 提交于
      Until now we ignored user-provided backing chains and while detecting
      the code inherited labels of the parent device. With user provided
      chains we should keep this functionality, so label of the parent image
      in the backing chain will be applied if an image-specific label is not
      present.
      cc16fa2a
    • P
      security: dac: Take parent security label into account · 2742dfee
      Peter Krempa 提交于
      Until now we ignored user-provided backing chains and while detecting
      the code inherited labels of the parent device. With user provided
      chains we should keep this functionality, so label of the parent image
      in the backing chain will be applied if an image-specific label is not
      present.
      2742dfee
    • P
      security: selinux: Pass parent storage source into image labeling helper · 023da7dd
      Peter Krempa 提交于
      virSecuritySELinuxSetImageLabelInternal assigns different labels to
      backing chain members than to the parent image. This was done via the
      'first' flag. Convert it to passing in pointer to the parent
      virStorageSource. This will allow us to use the parent virStorageSource
      in further changes.
      023da7dd
    • P
      storage: Extract error reporting for broken chains · b4daf6af
      Peter Krempa 提交于
      Simplify reporting the error if backing chain is broken for further
      callers by extracting it into a separate function.
      b4daf6af