1. 03 4月, 2017 1 次提交
    • A
      qemu: Enforce ACPI, UEFI requirements · 396ca36c
      Andrea Bolognani 提交于
      Depending on the architecture, requirements for ACPI and UEFI can
      be different; more specifically, while on x86 UEFI requires ACPI,
      on aarch64 it's the other way around.
      
      Enforce these requirements when validating the domain, and make
      the error message more accurate by mentioning that they're not
      necessarily applicable to all architectures.
      
      Several aarch64 test cases had to be tweaked because they would
      have failed the validation step otherwise.
      396ca36c
  2. 28 3月, 2017 2 次提交
    • A
      qemu: Remove qemuDomainRequiresMemLock() · 1f7661af
      Andrea Bolognani 提交于
      Instead of having a separate function, we can simply return
      zero from the existing qemuDomainGetMemLockLimitBytes() to
      signal the caller that the memory locking limit doesn't need
      to be set for the guest.
      
      Having a single function instead of two makes it less likely
      that we will use the wrong value, which is exactly what
      happened when we started applying the limit that was meant
      for VFIO-using guests to <memoryBacking><locked>-using
      guests.
      1f7661af
    • J
      qemu: Add support for setting TSC frequency · 7373c4e4
      Jiri Denemark 提交于
      QEMU allows for TSC frequency to be explicitly set to enable migration
      with invtsc (migration fails if the destination QEMU cannot set the
      exact same frequency used when starting the domain on the source host).
      
      Libvirt already supports setting the TSC frequency in the XML using
      
          <clock>
            <timer name='tsc' frequency='1234567890'/>
          </clock>
      
      which will be transformed into
      
          -cpu Model,tsc-frequency=1234567890
      
      QEMU command line.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      7373c4e4
  3. 27 3月, 2017 1 次提交
  4. 17 3月, 2017 4 次提交
  5. 15 3月, 2017 8 次提交
  6. 12 3月, 2017 1 次提交
    • F
      bhyve: add video support · 04664327
      Fabian Freyer 提交于
      bhyve supports 'gop' video device that allows clients to connect
      to VMs using VNC clients. This commit adds support for that to
      the bhyve driver:
      
       - Introducr 'gop' video device type
       - Add capabilities probing for the 'fbuf' device that's
         responsible for graphics
       - Update command builder routines to let users configure
         domain's VNC via gop graphics.
      Signed-off-by: NRoman Bogorodskiy <bogorodskiy@gmail.com>
      04664327
  7. 10 3月, 2017 1 次提交
  8. 09 3月, 2017 1 次提交
  9. 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
  10. 04 3月, 2017 1 次提交
  11. 02 3月, 2017 1 次提交
  12. 24 2月, 2017 1 次提交
  13. 23 2月, 2017 2 次提交
    • A
      qemu: Allow multiple bridges when pci-bridges is not available · 011d5465
      Andrea Bolognani 提交于
      qemuDomainAssignPCIAddresses() hardcoded the assumption
      that the only way to support devices on a non-zero bus is
      to add one or more pci-bridges; however, since we now
      support a large selection of PCI controllers that can be
      used instead, the assumption is no longer true.
      
      Moreover, this check was always redundant, because the
      only sensible time to check for the availability of
      pci-bridge is when building the QEMU command line, and
      such a check is of course already in place.
      
      In fact, there were *two* such checks, but since one of
      the two was relying on the incorrect assumption explained
      above, and it was redundant anyway, it has been dropped.
      011d5465
    • A
      qemu: Make switch statements more strict · 50d35953
      Andrea Bolognani 提交于
      When switching over the values in the virDomainControllerModelPCI
      enumeration, make sure the proper cast is in place so that the
      compiler can warn us when the coverage is not exaustive.
      
      For the same reason, fold some unstructured checks (performed by
      comparing directly against some values in the enumeration) inside
      an existing switch statement.
      50d35953
  14. 22 2月, 2017 1 次提交
  15. 21 2月, 2017 2 次提交
  16. 17 2月, 2017 1 次提交
  17. 09 2月, 2017 3 次提交
  18. 08 2月, 2017 1 次提交
    • 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. 30 1月, 2017 1 次提交
    • M
      qemuBuildChrChardevStr: Don't leak @charAlias · a5cae75a
      Michal Privoznik 提交于
      ==12618== 110 bytes in 10 blocks are definitely lost in loss record 269 of 295
      ==12618==    at 0x4C2AE5F: malloc (vg_replace_malloc.c:297)
      ==12618==    by 0x1CFC6DD7: vasprintf (vasprintf.c:73)
      ==12618==    by 0x1912B2FC: virVasprintfInternal (virstring.c:551)
      ==12618==    by 0x1912B411: virAsprintfInternal (virstring.c:572)
      ==12618==    by 0x50B1FF: qemuAliasChardevFromDevAlias (qemu_alias.c:638)
      ==12618==    by 0x518CCE: qemuBuildChrChardevStr (qemu_command.c:4973)
      ==12618==    by 0x522DA0: qemuBuildShmemBackendChrStr (qemu_command.c:8674)
      ==12618==    by 0x523209: qemuBuildShmemCommandLine (qemu_command.c:8789)
      ==12618==    by 0x526135: qemuBuildCommandLine (qemu_command.c:9843)
      ==12618==    by 0x48B4BA: qemuProcessCreatePretendCmd (qemu_process.c:5897)
      ==12618==    by 0x4378C9: testCompareXMLToArgv (qemuxml2argvtest.c:498)
      ==12618==    by 0x44D5A6: virTestRun (testutils.c:180)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a5cae75a
  20. 26 1月, 2017 1 次提交
  21. 07 1月, 2017 2 次提交
  22. 06 1月, 2017 1 次提交
  23. 04 1月, 2017 1 次提交
    • J
      qemu: Don't assume secret provided for LUKS encryption · 7f7d9904
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1405269
      
      If a secret was not provided for what was determined to be a LUKS
      encrypted disk (during virStorageFileGetMetadata processing when
      called from qemuDomainDetermineDiskChain as a result of hotplug
      attach qemuDomainAttachDeviceDiskLive), then do not attempt to
      look it up (avoiding a libvirtd crash) and do not alter the format
      to "luks" when adding the disk; otherwise, the device_add would
      fail with a message such as:
      
         "unable to execute QEMU command 'device_add': Property 'scsi-hd.drive'
          can't find value 'drive-scsi0-0-0-0'"
      
      because of assumptions that when the format=luks that libvirt would have
      provided the secret to decrypt the volume.
      
      Access to unlock the volume will thus be left to the application.
      7f7d9904
  24. 08 12月, 2016 1 次提交
    • 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