1. 11 7月, 2017 1 次提交
  2. 07 6月, 2017 1 次提交
  3. 26 5月, 2017 1 次提交
  4. 09 5月, 2017 1 次提交
  5. 26 4月, 2017 2 次提交
  6. 19 4月, 2017 1 次提交
    • J
      network: Introduce virnetworkobj · bddbda99
      John Ferlan 提交于
      Move all the virNetworkObj related API/data structures into their own
      modules virnetworkobj.{c,h} from the network_conf.{c,h}
      
      Purely code motion at this point plus adjustments to cleanly build
      bddbda99
  7. 08 4月, 2017 1 次提交
    • D
      hyperv: add support for Hyper-V 2012 and newer · 3372f8fb
      Dawid Zamirski 提交于
      This patch reworks the Hyper-V driver structs and the code generator
      to provide seamless support for both Hyper-V 2008 and 2012 or newer.
      This does not implement any new libvirt APIs, it just adapts existing
      2008-only driver to also handle 2012 and newer by sharing as much
      driver code as possible (currently it's all of it :-)). This is needed
      to set the foundation before we can move forward with implementing the
      rest of the driver APIs.
      
      With the 2012 release, Microsoft introduced "v2" version of Msvm_* WMI
      classes. Those are largely the same as "v1" (used in 2008) but have some
      new properties as well as need different wsman request URIs. To
      accomodate those differences, most of work went into the code generator
      so that it's "aware" of possibility of multiple versions of the same WMI
      class and produce C code accordingly.
      
      To accomplish this the following changes were made:
      
       * the abstract hypervObject struct's data member was changed to a union
         that has "common", "v1" and "v2" members. Those are structs that
         represent WMI classes that we get back from wsman response. The
         "common" struct has members that are present in both "v1" and "v2"
         which the driver API callbacks can use to read the data from in
         version-independent manner (if version-specific member needs to be
         accessed the driver can check priv->wmiVersion and read from "v1" or
         "v2" as needed). Those structs are guaranteed to be  memory aligned
         by the code generator (see the align_property_members implementation
         that takes care of that)
       * the generator produces *_WmiInfo for each WMI class "family" that
         holds an array of hypervWmiClassInfoPtr each providing information
         as to which request URI to use for each "version" of given WMI class
         as well as XmlSerializerInfo struct needed to unserilize WS-MAN
         responsed into the data structs. The driver uses those to make proper
         WS-MAN request depending on which version it's connected to.
       * the generator no longer produces "helper" functions such as
         hypervGetMsvmComputerSystemList as those were originally just simple
         wrappers around hypervEnumAndPull, instead those were hand-written
         now (to keep driver changes minimal). The reason is that we'll have
         more code coming implementing missing libvirt APIs and surely code
         patterns will emerge that would warrant more useful "utility" functions
         like that.
       * a hypervInitConnection was added to the driver which "detects"
         Hyper-V version by testing simple wsman request using v2 then falling
         back to v1, obviously if both fail, the we're erroring out.
      
      To express how the above translates in code:
      
      void
      hypervImplementSomeLibvirtApi(virConnectPtr conn, ...)
      {
          hypervPrivate *priv = conn->privateData;
          virBuffer query = VIR_BUFFER_INITIALIZER;
          hypervWqlQuery wqlQuery = HYPERV_WQL_QUERY_INITIALIZER;
          Msvm_ComputerSystem *list = NULL; /* typed hypervObject instance */
      
          /* the WmiInfo struct has the data needed for wsman request and
           * response handling for both v1 and v2 */
          wqlQuery.info = Msvm_ComputerSystem_WmiInfo;
          wqlQuery.query = &query;
      
          virBufferAddLit(&query, "select * from Msvm_ComputerSystem");
      
          if (hypervEnumAndPull(priv, &wqlQuery, (hypervObject **) &list) < 0) {
              goto cleanup;
          }
      
          if (list == NULL) {
              /* none found */
              goto cleanup;
          }
      
          /* works with v1 and v2 */
          char *vmName = list->data.common->Name;
      
          /* access property that is in v2 only */
          if (priv->wmiVersion == HYPERV_WMI_VERSION_V2)
              char *foo = list->data.v2->V2Property;
          else
              char *foo = list->data.v1->V1Property;
      
       cleanup:
          hypervFreeObject(priv, (hypervObject *)list);
      }
      3372f8fb
  8. 06 4月, 2017 1 次提交
  9. 28 3月, 2017 1 次提交
  10. 27 3月, 2017 5 次提交
    • E
      util: Introduce new module virmdev · e1ec4f88
      Erik Skultety 提交于
      Beside creation, disposal, getter, and setter methods the module exports
      methods to work with lists of mediated devices.
      Signed-off-by: NErik Skultety <eskultet@redhat.com>
      e1ec4f88
    • M
      Remove src/nodeinfo · 26ae4e48
      Martin Kletzander 提交于
      There is no "node driver" as there was before, drivers have to do
      their own ACL checking anyway, so they all specify their functions and
      nodeinfo is basically just extending conf/capablities.  Hence moving
      the code to src/conf/ is the right way to go.
      
      Also that way we can de-duplicate some code that is in virsysfs and/or
      virhostcpu that got duplicated during the virhostcpu.c split.  And
      Some cleanup is done throughout the changes, like adding the vir*
      prefix etc.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      26ae4e48
    • M
      Move src/fdstream to src/util/virfdstream · bdcb1995
      Martin Kletzander 提交于
      There is no reason for it not to be in the utils, all global symbols
      under that file already have prefix vir* and there is no reason for it
      to be part of DRIVER_SOURCES because that is just a leftover from
      older days (pre-driver modules era, I believe).
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      bdcb1995
    • M
      util: Add virsysfs for handling sysfs files · a7b902c0
      Martin Kletzander 提交于
      By using this we are able to easily switch the sysfs path being
      used (fake it).  This will not only help tests in the future but can
      be also used from files where the code is duplicated currently.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      a7b902c0
    • P
      qemu: block: Add code to allow detection of auto-allocated node names · dbad8f8a
      Peter Krempa 提交于
      qemu for some time already sets node names automatically for the block
      nodes. This patch adds code that attempts a best-effort detection of the
      node names for the backing chain from the output of
      'query-named-block-nodes'. The only drawback is that the data provided
      by qemu needs to be matched by the filename as seen by qemu and thus
      if two disks share a single backing store file the detection won't work.
      
      This will allow us to use qemu commands such as
      'block-set-write-threshold' which only accepts node names.
      
      In this patch only the detection code is added, it will be used later.
      dbad8f8a
  11. 18 3月, 2017 1 次提交
  12. 16 3月, 2017 1 次提交
  13. 15 3月, 2017 1 次提交
    • R
      bhyve: add config file support · 32b67545
      Roman Bogorodskiy 提交于
      Introduce config file support for the bhyve driver. The only available
      setting at present is 'firmware_dir' for specifying a directory with
      UEFI firmware files.
      32b67545
  14. 08 3月, 2017 1 次提交
    • J
      conf: Introduce virnwfilterobj · 079747a3
      John Ferlan 提交于
      Move all the NWFilterObj API's into their own module virnwfilterobj
      from the nwfilter_conf
      
      Purely code motion at this point, plus adjustments to cleanly build.
      079747a3
  15. 07 3月, 2017 2 次提交
  16. 06 3月, 2017 1 次提交
    • J
      conf: Introduce virinterfaceobj · eabeff8e
      John Ferlan 提交于
      Move all the InterfaceObj API's into their own module virinterfaceobj
      from the interface_conf
      
      Purely code motion at this point.
      eabeff8e
  17. 04 3月, 2017 1 次提交
    • J
      conf: Introduce virnodedeviceobj · bc20200e
      John Ferlan 提交于
      Move all the NodeDeviceObj API's into their own module virnodedeviceobj
      from the node_device_conf
      
      Purely code motion at this point, plus adjustments to cleanly build.
      bc20200e
  18. 22 2月, 2017 1 次提交
    • P
      storage: Turn storage backends into dynamic modules · 0a6d3e51
      Peter Krempa 提交于
      If driver modules are enabled turn storage driver backends into
      dynamically loadable objects. This will allow greater modularity for
      binary distributions, where heavyweight dependencies as rbd and gluster
      can be avoided by selecting only a subset of drivers if the rest is not
      necessary.
      
      The storage modules are installed into 'LIBDIR/libvirt/storage-backend/'
      and users can override the location by using
      'LIBVIRT_STORAGE_BACKEND_DIR' environment variable.
      
      rpm based distros will at this point install all the backends when
      libvirt-daemon-driver-storage package is installed.
      0a6d3e51
  19. 21 2月, 2017 1 次提交
  20. 20 2月, 2017 1 次提交
    • P
      Disallow inclusion of files from src/conf into src/utils · b4c73106
      Peter Krempa 提交于
      The utils code should stay separated from other code (except for very
      well justified cases). Unfortunately commit 272769be
      made it trivial to break the separation (and not get slapped by the
      syntax-check rule) by adding -I src/conf to the CFLAGS for utils.
      
      Remove this shortcut and except the two offenders from the syntax check
      so that the codebase can be kept separated.
      b4c73106
  21. 19 2月, 2017 2 次提交
    • J
      util: Move scsi_host specific functions from virutil · 03346def
      John Ferlan 提交于
      Create a virscsihost.c and place the functions there. That removes the
      last #ifdef __linux__ from virutil.c.
      
      Take the opporunity to also change the function names and in one case
      the parameters slightly
      03346def
    • J
      util: Create a new virvhba module and move/rename API's · 16416816
      John Ferlan 提交于
      Rather than have them mixed in with the virutil apis, create a separate
      virvhba.c module and move the vHBA related calls into there. Soon there
      will be more added.
      
      Also modify the names of the functions and some arguments to be more
      indicative of what is really happening. Adjust the callers respectively.
      
      While I was changing fchosttest, rather than the non-descriptive names
      test1...test6, rename them to match what the test is doing.
      16416816
  22. 26 1月, 2017 1 次提交
  23. 19 1月, 2017 2 次提交
  24. 11 1月, 2017 2 次提交
    • C
      libxl: define a per-domain logger. · a30b08b7
      Cédric Bosdonnat 提交于
      libxl doesn't provide a way to write one log for each domain. Thus
      we need to demux the messages. If our logger doesn't know to which
      domain to attribute a message, then it will write it to the default
      log file.
      
      Starting with Xen 4.9 (commit f9858025 and following), libxl will
      write the domain ID in an easy to grab manner. The logger introduced
      by this commit will use it to demux the libxl log messages.
      
      Thanks to the default log file, this logger will also work with older
      versions of Xen.
      a30b08b7
    • D
      vbox: remove SDK header files for vbox 3 and older. · 7f10ac33
      Dawid Zamirski 提交于
      * delete SDK header files for vbox older than 4.0
      * delete .c files for vbox older than 4.0
      * update vbox_XPCOMCGlue to use oldest supported header file, that is 4.0
        going forward.
      * remove deleted files from Makefile.am
      7f10ac33
  25. 09 1月, 2017 1 次提交
  26. 02 1月, 2017 1 次提交
  27. 21 12月, 2016 3 次提交
  28. 15 12月, 2016 2 次提交
    • M
      qemu: Enter the namespace on relabelling · eadaa975
      Michal Privoznik 提交于
      Instead of trying to fix our security drivers, we can use a
      simple trick to relabel paths in both namespace and the host.
      I mean, if we enter the namespace some paths are still shared
      with the host so any change done to them is visible from the host
      too.
      Therefore, we can just enter the namespace and call
      SetAllLabel()/RestoreAllLabel() from there. Yes, it has slight
      overhead because we have to fork in order to enter the namespace.
      But on the other hand, no complexity is added to our code.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      eadaa975
    • M
      virfile: Introduce ACL helpers · 654b4d48
      Michal Privoznik 提交于
      Namely, virFileGetACLs, virFileSetACLs, virFileFreeACLs and
      virFileCopyACLs. These functions are going to be required when we
      are creating /dev for qemu. We have copy anything that's in
      host's /dev exactly as is. Including ACLs.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      654b4d48