1. 20 8月, 2014 1 次提交
  2. 08 8月, 2014 2 次提交
  3. 29 7月, 2014 1 次提交
  4. 17 7月, 2014 2 次提交
  5. 04 7月, 2014 2 次提交
    • P
      qemu: caps: Add capability for change-backing-file command · b20fb93c
      Peter Krempa 提交于
      This command allows to change the backing file name recorded in the
      metadata of a qcow (or other) image. The capability also notifies that
      the "block-stream" and "block-commit" commands understand the
      "backing-file" attribute.
      b20fb93c
    • E
      blockjob: turn on qemu capability bit for active commit · 40ad7160
      Eric Blake 提交于
      Use the probing functionality added in the last patch to turn on
      a capability bit when active commit is present, and gate active
      commit on that capability.
      
      For my own reference: the difference between BLOCKJOB_SYNC and
      BLOCKJOB_ASYNC is whether qemu generated an event at the
      conclusion of blockpull; basically, RHEL 6.2 was the only release
      of qemu that has the sync semantics and lacks the event.  RHEL
      6.3 added blockcopy, but also picked up on the upstream style
      of qemu generating events.  As no one is likely to backport
      active commit to RHEL 6.2, it's safe for blockcommit to always
      require async blockjob support.
      
      Modifying qemucapabilitiestest is painful; the .replies files would
      be so much easier if they had comments correlating which command
      generated the given reply.  Maybe I'll fix that up later...
      
      * src/qemu/qemu_capabilities.h (QEMU_CAPS_ACTIVE_COMMIT): New
      capability.
      * src/qemu/qemu_driver.c (qemuDomainBlockCommit): Use the new bit
      * src/qemu/qemu_capabilities.c (virQEMUCaps): Name the new bit.
      (virQEMUCapsProbeQMPCommands): Set it.
      * tests/qemucapabilitiesdata/caps_1.3.1-1.replies: Update.
      * tests/qemucapabilitiesdata/caps_1.4.2-1.replies: Likewise.
      * tests/qemucapabilitiesdata/caps_1.5.3-1.replies: Likewise.
      * tests/qemucapabilitiesdata/caps_1.6.0-1.replies: Likewise.
      * tests/qemucapabilitiesdata/caps_1.6.50-1.replies: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      40ad7160
  6. 03 7月, 2014 4 次提交
  7. 25 6月, 2014 1 次提交
    • J
      qemu: enum cleanups in "src/qemu/*" · aa990efe
      Julio Faracco 提交于
      As we are doing with the enum structures, a cleanup in "src/qemu/"
      directory was done now. All the enums that were defined in the
      header files were converted to typedefs in this directory. This
      patch includes all the adjustments to remove conflicts when you do
      this kind of change. "Enum-to-typedef"'s conversions were made in
      "src/qemu/qemu_{capabilities, domain, migration, hotplug}.h".
      Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      aa990efe
  8. 07 5月, 2014 1 次提交
    • J
      Add support for timestamping QEMU logs · f3be5f0c
      Ján Tomko 提交于
      QEMU commit 5e2ac51 added a boolean '-msg timestamp=[on|off]'
      option, which can enable timestamps on errors:
      $ qemu-system-x86_64 -msg timestamp=on zghhdorf
      2014-04-09T13:25:46.779484Z qemu-system-x86_64: -msg timestamp=on: could
      not open disk image zghhdorf: Could not open 'zghhdorf': No such file or
      directory
      
      Enable this timestamp if the QEMU binary supports it.
      
      Add a 'log_timestamp' option to qemu.conf for disabling this behavior.
      f3be5f0c
  9. 06 5月, 2014 1 次提交
    • L
      qemu: add host-pci-multidomain capability · 17133e37
      Laine Stump 提交于
      Quite a long time ago, (apparently between qemu 0.12 and 0.13) qemu
      quietly began supporting the optional specification of a domain in the
      host-side address of all pci passthrough commands (by simply
      prepending it to the bus:slot.function format, as
      "dddd:bb:ss.f"). Since machines with multiple PCI domains are very
      rare, this never came up in practice, so libvirt was never updated to
      support it.
      
      This patch takes the first step to supporting specification of a non-0
      domain in the host-side address of PCI devices being assigned to a
      domain, by adding a capability bit to indicate support
      "QEMU_CAPS_HOST_PCI_MULTIDOMAIN", and detect it. Since this support
      was added in a version prior to the minimum version required for
      QMP-style capabilities detection, the capability is always enabled for
      any qemu that uses QMP for capabilities detection. For older qemus,
      the only clue that a domain can be specified in the host pci address
      is the presence of the string "[seg:]" in the help string for
      -pcidevice. (Ironically, libvirt will not be modified to support
      specification of domain for -pcidevice, since any qemu new enough for
      us to care about also supports "-device pci-assign" or "-device
      vfio-pci", which are greatly preferred).
      17133e37
  10. 24 4月, 2014 1 次提交
    • D
      Fix pci bus naming for PPC · 27b2b987
      Daniel P. Berrange 提交于
      Recent discussions around naming of 'pci' vs 'pci.0' for PPC
      made me go back and look at the PPC emulator in every historical
      version of QEMU since 1.0. The results were worse than I imagined.
      This patch adds the logic required to make libvirt work with PPC
      correctly with naming variations across all versions & machine
      types.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      27b2b987
  11. 26 3月, 2014 1 次提交
  12. 11 3月, 2014 1 次提交
    • D
      Cache result of QEMU capabilities extraction · cbde3589
      Daniel P. Berrange 提交于
      Extracting capabilities from QEMU takes a notable amount of time
      when all QEMU binaries are installed. Each system emulator
      needs about 200-300ms multiplied by 26 binaries == ~5-8 seconds.
      
      This change causes the QEMU driver to save an XML file containing
      the content of the virQEMUCaps object instance in the cache
      dir eg /var/cache/libvirt/qemu/capabilities/$SHA256(binarypath).xml
      or $HOME/.cache/libvirt/qemu/cache/capabilities/$SHA256(binarypath).xml
      
      We attempt to load this and only if it fails, do we fallback to
      probing the QEMU binary. The ctime of the QEMU binary and libvirtd
      are stored in the cached file and its data discarded if either
      of them change.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      cbde3589
  13. 19 2月, 2014 1 次提交
  14. 11 2月, 2014 1 次提交
    • M
      qemu: introduce spiceport chardev backend · d27e6bc4
      Martin Kletzander 提交于
      Add a new backend for any character device.  This backend uses channel
      in spice connection.  This channel is similar to spicevmc, but
      all-purpose in contrast to spicevmc.
      
      Apart from spicevmc, spiceport-backed chardev will not be formatted
      into the command-line if there is no spice to use (with test for that
      as well).  For this I moved the def->graphics counting to the start
      of the function so its results can be used in rest of the code even in
      the future.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      d27e6bc4
  15. 21 1月, 2014 1 次提交
  16. 18 12月, 2013 1 次提交
    • E
      qemu: ask for -enable-fips when FIPS is required · a21cfb0f
      Eric Blake 提交于
      On a system that is enforcing FIPS, most libraries honor the
      current mode by default.  Qemu, on the other hand, refused to
      honor FIPS mode unless you add the '-enable-fips' command
      line option; worse, this option is not discoverable via QMP,
      and is only present on binaries built for Linux.  So, if we
      detect FIPS mode, then we unconditionally ask for FIPS; either
      qemu is new enough to have the option and then correctly
      cripple insecure VNC passwords, or it is so old that we are
      correctly avoiding a FIPS violation by preventing qemu from
      starting.  Meanwhile, if we don't detect FIPS mode, then
      omitting the argument is safe whether the qemu has the option
      (but it would do nothing because FIPS is disabled) or whether
      qemu lacks the option (including in the case where we are not
      running on Linux).
      
      The testsuite was a bit interesting: we don't want our test
      to depend on whether it is being run in FIPS mode, so I had
      to tweak things to set the capability bit outside of our
      normal interaction with capability parsing.
      
      This fixes https://bugzilla.redhat.com/show_bug.cgi?id=1035474
      
      * src/qemu/qemu_capabilities.h (QEMU_CAPS_ENABLE_FIPS): New bit.
      * src/qemu/qemu_capabilities.c (virQEMUCapsInitQMP): Conditionally
      set capability according to detection of FIPS mode.
      * src/qemu/qemu_command.c (qemuBuildCommandLine): Use it.
      * tests/qemucapabilitiestest.c (testQemuCaps): Conditionally set
      capability to test expected output.
      * tests/qemucapabilitiesdata/caps_1.2.2-1.caps: Update list.
      * tests/qemucapabilitiesdata/caps_1.6.0-1.caps: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a21cfb0f
  17. 13 12月, 2013 1 次提交
  18. 03 12月, 2013 1 次提交
    • L
      qemu: add "-boot strict" to commandline whenever possible · 96fddee3
      Laine Stump 提交于
      This resolves:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=888635
      
      (which was already closed as CANTFIX because the qemu "-boot strict"
      commandline option wasn't available at the time).
      
      Problem: you couldn't have a domain that used PXE to boot, but also
      had an un-bootable disk device *even if that disk wasn't listed in the
      boot order*, because if PXE timed out (e.g. due to the bridge
      forwarding delay), the BIOS would move on to the next target, which
      would be the unbootable disk device (again - even though it wasn't
      given a boot order), and get stuck at a "BOOT DISK FAILURE, PRESS ANY
      KEY" message until a user intervened.
      
      The solution available since sometime around QEMU 1.5, is to add
      "-boot strict=on" to *every* qemu command. When this is done, if any
      devices have a boot order specified, then QEMU will *only* attempt to
      boot from those devices that have an explicit boot order, ignoring the
      rest.
      96fddee3
  19. 05 11月, 2013 1 次提交
  20. 01 10月, 2013 1 次提交
  21. 25 9月, 2013 1 次提交
  22. 03 9月, 2013 2 次提交
    • C
      qemu: Support virtio-mmio transport for virtio on ARM · 4fa17221
      Cole Robinson 提交于
      Starting with qemu 1.6, the qemu-system-arm vexpress-a9 model has a
      hardcoded virtio-mmio transport which enables attaching all virtio
      devices.
      
      On the command line, we have to use virtio-XXX-device rather than
      virtio-XXX-pci, thankfully s390 already set the precedent here so
      it's fairly straight forward.
      
      At the XML level, this adds a new device address type virtio-mmio.
      The controller and addressing don't have any subelements at the
      moment because we they aren't needed for this usecase, but could
      be added later if needed.
      
      Add a test case for an ARM guest with one of every virtio device
      enabled.
      4fa17221
    • C
      qemu: Fix specifying char devs for ARM · 3a2beaee
      Cole Robinson 提交于
      QEMU ARM boards don't give us any way to explicitly wire in
      a -chardev, so use the old style -serial options.
      
      Unfortunately this isn't as simple as just turning off the CHARDEV flag
      for qemu-system-arm, as upcoming virtio support _will_ use device/chardev.
      3a2beaee
  23. 02 9月, 2013 2 次提交
  24. 27 8月, 2013 1 次提交
    • J
      Build QEMU command line for pcihole64 · 63ee776f
      Ján Tomko 提交于
      QEMU commit 3984890 introduced the "pci-hole64-size" property,
      to i440FX-pcihost and q35-pcihost with a default setting of 2 GB.
      
      Translate <pcihole64>x<pcihole64/> to:
      -global q35-pcihost.pci-hole64-size=x for q35 machines and
      -global i440FX-pcihost.pci-hole64-size=x for i440FX-based machines.
      
      Error out on other machine types or if the size was specified
      but the pcihost device lacks 'pci-hole64-size' property.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=990418
      63ee776f
  25. 06 8月, 2013 1 次提交
    • L
      qemu: add dmi-to-pci-bridge controller · 62ac6b43
      Laine Stump 提交于
      This PCI controller, named "dmi-to-pci-bridge" in the libvirt config,
      and implemented with qemu's "i82801b11-bridge" device, connects to a
      PCI Express slot (e.g. one of the slots provided by the pcie-root
      controller, aka "pcie.0" on the qemu commandline), and provides 31
      *non-hot-pluggable* PCI (*not* PCIe) slots, numbered 1-31.
      
      Any time a machine is defined which has a pcie-root controller
      (i.e. any q35-based machinetype), libvirt will automatically add a
      dmi-to-pci-bridge controller if one doesn't exist, and also add a
      pci-bridge controller. The reasoning here is that any useful domain
      will have either an immediate (startup time) or eventual (subsequent
      hot-plug) need for a standard PCI slot; since the pcie-root controller
      only provides PCIe slots, we need to connect a dmi-to-pci-bridge
      controller to it in order to get a non-hot-plug PCI slot that we can
      then use to connect a pci-bridge - the slots provided by the
      pci-bridge will be both standard PCI and hot-pluggable.
      
      Since pci-bridge devices themselves can not be hot-plugged into a
      running system (although you can hot-plug other devices into a
      pci-bridge's slots), any new pci-bridge controller that is added can
      (and will) be plugged into the dmi-to-pci-bridge as long as it has
      empty slots available.
      
      This patch is also changing the qemuxml2xml-pcie test from a "DO_TEST"
      to a "DO_DIFFERENT_TEST". This is so that the "before" xml can omit
      the automatically added dmi-to-pci-bridge and pci-bridge devices, and
      the "after" xml can include it - this way we are testing if libvirt is
      properly adding these devices.
      62ac6b43
  26. 18 7月, 2013 1 次提交
  27. 01 7月, 2013 1 次提交
  28. 06 6月, 2013 1 次提交
  29. 22 5月, 2013 1 次提交
  30. 17 5月, 2013 1 次提交
  31. 15 5月, 2013 2 次提交
    • O
      qemu: Support discard for disk · a7c4202c
      Osier Yang 提交于
      QEMU introduced "discard" option for drive since commit a9384aff53,
      
      <...>
      @var{discard} is one of "ignore" (or "off") or "unmap" (or "on") and
      controls whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
      requests are ignored or passed to the filesystem.  Some machine types
      may not support discard requests.
      </...>
      
      This patch exposes the support in libvirt.
      
      QEMU supported "discard" for "-drive" since v1.5.0-rc0:
      
      % git tag --contains a9384aff53
      contains
      v1.5.0-rc0
      v1.5.0-rc1
      
      So this only detects the capability bit using virQEMUCapsProbeQMPCommandLine.
      a7c4202c
    • M
      qemu: Add VNC WebSocket support · 85ec7ff6
      Martin Kletzander 提交于
      Adding a VNC WebSocket support for QEMU driver.  This functionality is
      in upstream qemu from commit described as v1.3.0-982-g7536ee4, so the
      capability is being recognized based on QEMU version for now.
      85ec7ff6