1. 26 4月, 2013 9 次提交
    • L
      qemu: use vfio-pci on commandline when appropriate · 731b0f36
      Laine Stump 提交于
      The device option for vfio-pci is nearly identical to that for
      pci-assign - only the configfd parameter isn't supported (or needed).
      
      Checking for presence of the bootindex parameter is done separately
      from constructing the commandline, similar to how it is done for
      pci-assign.
      
      This patch contains tests to check for proper commandline
      construction. It also includes tests for parser-formatter-parser
      roundtrips (xml2xml), because those tests use the same data files, and
      would have failed had they been included before now.
      
      qemu: xml/args tests for VFIO hostdev and <interface type='hostdev'/>
      
      These should be squashed in with the patch that adds commandline
      handling of vfio (they would fail at any earlier time).
      731b0f36
    • L
      conf: formatter/parser/RNG/docs for hostdev <driver name='kvm|vfio'/> · c4f63ef0
      Laine Stump 提交于
      A domain's <interface> or <hostdev>, as well as a <network>'s
      <forward>, can now have an optional <driver name='kvm|vfio'/>
      element. As of this patch, there is no functionality behind this new
      knob - this patch adds support to the domain and network
      formatter/parser, and to the RNG and documentation.
      
      When the backend is added, legacy KVM PCI device assignment will
      continue to be used when no driver name is specified (or if <driver
      name='kvm'/> is specified), but if driver name is 'vfio', the new UEFI
      Secure Boot compatible VFIO device assignment will be used.
      
      Note that the parser doesn't automatically insert the current default
      value of this setting. This is done on purpose because the two
      possibilities are functionally equivalent from the guest's point of
      view, and we want to be able to automatically start using vfio as the
      default (even for existing domains) at some time in the future. This
      is similar to what was done with the "vhost" driver option in
      <interface>.
      c4f63ef0
    • L
      conf: put hostdev pci address in a struct · 9f80fc1b
      Laine Stump 提交于
      There will soon be other items related to pci hostdevs that need to be
      in the same part of the hostdevsubsys union as the pci address (which
      is currently a single member called "pci". This patch replaces the
      single member named pci with a struct named pci that contains a single
      member named "addr".
      9f80fc1b
    • L
      qemu: detect vfio-pci device and its bootindex parameter · 5b90ef08
      Laine Stump 提交于
      QEMU_CAPS_DEVICE_VFIO_PCI is set if the device named "vfio-pci" is
      supported in the qemu binary.
      
      QEMU_CAPS_VFIO_PCI_BOOTINDEX is set if the vfio-pci device supports
      the "bootindex" parameter;  for some reason, the bootindex parameter
      wasn't included in early versions of vfio support (qemu 1.4) so we
      have to check for it separately from vfio itself.
      5b90ef08
    • E
      build: avoid unsafe functions in libgen.h · 1fbf1905
      Eric Blake 提交于
      POSIX says that both basename() and dirname() may return static
      storage (aka they need not be thread-safe); and that they may but
      not must modify their input argument.  Furthermore, <libgen.h>
      is not available on all platforms.  For these reasons, you should
      never use these functions in a multi-threaded library.
      
      Gnulib instead recommends a way to avoid the portability nightmare:
      gnulib's "dirname.h" provides useful thread-safe counterparts.  The
      obvious dir_name() and base_name() are GPL (because they malloc(),
      but call exit() on failure) so we can't use them; but the LGPL
      variants mdir_name() (malloc's or returns NULL) and last_component
      (always points into the incoming string without modifying it,
      differing from basename semantics only on corner cases like the
      empty string that we shouldn't be hitting in the first place) are
      already in use in libvirt.  This finishes the swap over to the safe
      functions.
      
      * cfg.mk (sc_prohibit_libgen): New rule.
      * src/util/vircgroup.c: Fix offenders.
      * src/parallels/parallels_storage.c (parallelsPoolAddByDomain):
      Likewise.
      * src/parallels/parallels_network.c (parallelsGetBridgedNetInfo):
      Likewise.
      * src/node_device/node_device_udev.c (udevProcessSCSIHost)
      (udevProcessSCSIDevice): Likewise.
      * src/storage/storage_backend_disk.c
      (virStorageBackendDiskDeleteVol): Likewise.
      * src/util/virpci.c (virPCIGetDeviceAddressFromSysfsLink):
      Likewise.
      * src/util/virstoragefile.h (_virStorageFileMetadata): Avoid false
      positive.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      1fbf1905
    • C
      Fix VIR_DOMAIN_EVENT_ID_PMSUSPEND capitalization in API doc · 09c9395a
      Christophe Fergeau 提交于
      It was written VIR_DOMAIN_EVENT_ID_PMSuspend
      09c9395a
    • C
      Improve /domainsnapshot/disks/disk@snapshot doc · cc6d19f3
      Christophe Fergeau 提交于
      The previous description was a bit confusing.
      cc6d19f3
    • E
      qemu: fix build error with older platforms · b121584f
      Eric Blake 提交于
      Jim Fehlig reported on IRC that older gcc/glibc triggers this warning:
      
      cc1: warnings being treated as errors
      qemu/qemu_domain.c: In function 'qemuDomainDefFormatBuf':
      qemu/qemu_domain.c:1297: error: declaration of 'remove' shadows a global declaration [-Wshadow]
      /usr/include/stdio.h:157: error: shadowed declaration is here [-Wshadow]
      make[3]: *** [libvirt_driver_qemu_impl_la-qemu_domain.lo] Error 1
      
      Fix it like we have done in the past (such as commit 2e6322a7).
      
      * src/qemu/qemu_domain.c (qemuDomainDefFormatBuf): Avoid shadowing
      a function name.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b121584f
    • J
      docs: fix memballoon examples · caf659a8
      Ján Tomko 提交于
      Use a pair of 'memballoon' tags instead of single 'watchdog' one.
      Add a few missing colons.
      caf659a8
  2. 25 4月, 2013 18 次提交
  3. 24 4月, 2013 13 次提交