1. 25 7月, 2017 2 次提交
  2. 13 10月, 2016 1 次提交
    • M
      src: Treat PID as signed · b7d2d4af
      Michal Privoznik 提交于
      This initially started as a fix of some debug printing in
      virCgroupDetect. However it turned out that other places suffer
      from the similar problem. While dealing with pids, esp. in cases
      where we cannot use pid_t for ABI stability reasons, we often
      chose an unsigned integer type. This makes no sense as pid_t is
      signed.
      Also, new syntax-check rule is introduced so we won't repeat this
      mistake.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      b7d2d4af
  3. 26 9月, 2016 2 次提交
  4. 24 5月, 2016 1 次提交
    • K
      lxc: completely rework reference counting · 306b3a85
      Katerina Koukiou 提交于
      This patch follows the pattern used in qemu driver regarding
      reference counting.
      It changes lxcDomObjFromDomain() to ref the domain (using
      virDomainObjListFindByUUIDRef()) and adds virDomainObjEndAPI() which
      should be the only function in which the return value of
      virObjectUnref() is checked.  This makes all reference counting
      deterministic and makes the code a bit clearer.
      Signed-off-by: NKaterina Koukiou <k.koukiou@gmail.com>
      306b3a85
  5. 20 5月, 2016 2 次提交
  6. 09 3月, 2016 1 次提交
    • P
      conf: refactor checking for unsupported memory devices · 185d13b1
      Peter Krempa 提交于
      Introduce a helper to check supported device and domain config and move
      the memory hotplug checks to it.
      
      The advantage of this approach is that by default all new features are
      considered unsupported by all hypervisors unless specifically changed
      rather than the previous approach where every hypervisor would need to
      declare that a given feature is unsupported.
      185d13b1
  7. 11 1月, 2016 1 次提交
  8. 26 8月, 2015 1 次提交
    • I
      lxc: Inherit namespace feature · c27553b6
      ik.nitk 提交于
      This patch adds feature for lxc containers to inherit namespaces.
      This is very similar to what lxc-tools or docker provides.  Look
      for "man lxc-start" and you will find that you can pass command
      args as [ --share-[net|ipc|uts] name|pid ]. Or check out docker
      networking option in which you can give --net=container:NAME_or_ID
      as an option for sharing +namespace.
      
      >From this patch you can add extra libvirt option to share
      namespace in following way.
      
       <lxc:namespace>
         <lxc:sharenet type='netns' value='red'/>
         <lxc:shareipc type='pid' value='12345'/>
         <lxc:shareuts type='name' value='container1'/>
       </lxc:namespace>
      
      The netns option is specific to sharenet. It can be used to
      inherit from existing network namespace.
      
      Co-authored: Daniel P. Berrange <berrange@redhat.com>
      c27553b6
  9. 13 8月, 2015 1 次提交
  10. 19 6月, 2015 1 次提交
  11. 23 3月, 2015 2 次提交
    • P
      conf: Add interface to parse and format memory device information · 3e4230d2
      Peter Krempa 提交于
      This patch adds code that parses and formats configuration for memory
      devices.
      
      A simple configuration would be:
      <memory model='dimm'>
        <target>
          <size unit='KiB'>524287</size>
          <node>0</node>
        </target>
      </memory>
      
      A complete configuration of a memory device:
      <memory model='dimm'>
        <source>
          <pagesize unit='KiB'>4096</pagesize>
          <nodemask>1-3</nodemask>
        </source>
        <target>
          <size unit='KiB'>524287</size>
          <node>1</node>
        </target>
      </memory>
      
      This patch preemptively forbids use of the <memory> device in individual
      drivers so the users are warned right away that the device is not
      supported.
      3e4230d2
    • P
      conf: Add support for parsing and formatting max memory and slot count · bffb9163
      Peter Krempa 提交于
      Add a XML element that will allow to specify maximum supportable memory
      and the count of memory slots to use with memory hotplug.
      
      To avoid possible confusion and misuse of the new element this patch
      also explicitly forbids the use of the maxMemory setting in individual
      drivers's post parse callbacks. This limitation will be lifted when the
      support is implemented.
      bffb9163
  12. 18 3月, 2014 1 次提交
  13. 14 3月, 2014 1 次提交
    • L
      conf: eliminate hardcoded indent from domain xml · ca6dc7b5
      Laine Stump 提交于
      Many of the domain xml format functions (including all of the device
      format functions) had hard-coded spaces, which made for incorrect
      indentation when those functions were called in a different context
      (for example, commit 2122cf39 added <interface> XML into the document
      provided to a network hook script, and in this case it should have
      been indented by 2 spaces, but was instead indented by 6 spaces).
      
      To make it possible to insert a properly indented device anywhere into
      an XML document, this patch removes hardcoded spaces from the
      formatting functions, and calls virBufferAdjustIndent() at appropriate
      places instead. (a regex search of domain_conf.c was done to assure
      that all occurrences of hardcoded spaces were removed).
      
      virDomainDiskSourceDefFormatInternal() is also called from
      snapshot_conf.c, so two virBufferAdjustIndent() calls were temporarily
      added around that call - those functions will have hardcoded spaces
      removed in a separate patch.
      
      This could cause some conflicts when backporting future changes to the
      formatting functions to older branches, but fortunately the changes
      are almost all trivial, so conflict resolution will be obvious.
      ca6dc7b5
  14. 15 10月, 2013 1 次提交
    • E
      maint: avoid 'const fooPtr' in domain_conf · d2467709
      Eric Blake 提交于
      'const fooPtr' is the same as 'foo * const' (the pointer won't
      change, but it's contents can).  But in general, if an interface
      is trying to be const-correct, it should be using 'const foo *'
      (the pointer is to data that can't be changed).
      
      Fix up offenders in src/conf/domain_conf, and their fallout.
      
      Several things to note: virObjectLock() requires a non-const
      argument; if this were C++, we could treat the locking field
      as 'mutable' and allow locking an otherwise 'const' object, but
      that is a more invasive change, so I instead dropped attempts
      to be const-correct on domain lookup.  virXMLPropString and
      friends require a non-const xmlNodePtr - this is because libxml2
      is not a const-correct library.  We could make the src/util/virxml
      wrappers cast away const, but I figured it was easier to not
      try to mark xmlNodePtr as const.  Finally, virDomainDeviceDefCopy
      was a rather hard conversion - it calls virDomainDeviceDefPostParse,
      which in turn in the xen driver was actually modifying the domain
      outside of the current device being visited.  We should not be
      adding a device on the first per-device callback, but waiting until
      after all per-device callbacks are complete.
      
      * src/conf/domain_conf.h (virDomainObjListFindByID)
      (virDomainObjListFindByUUID, virDomainObjListFindByName)
      (virDomainObjAssignDef, virDomainObjListAdd): Drop attempt at
      const.
      (virDomainDeviceDefCopy): Use intended type.
      (virDomainDeviceDefParse, virDomainDeviceDefPostParseCallback)
      (virDomainVideoDefaultType, virDomainVideoDefaultRAM)
      (virDomainChrGetDomainPtrs): Make const-correct.
      * src/conf/domain_conf.c (virDomainObjListFindByID)
      (virDomainObjListFindByUUID, virDomainObjListFindByName)
      (virDomainDeviceDefCopy, virDomainObjListAdd)
      (virDomainObjAssignDef, virDomainHostdevSubsysUsbDefParseXML)
      (virDomainHostdevSubsysPciOrigStatesDefParseXML)
      (virDomainHostdevSubsysPciDefParseXML)
      (virDomainHostdevSubsysScsiDefParseXML)
      (virDomainControllerModelTypeFromString)
      (virDomainTPMDefParseXML, virDomainTimerDefParseXML)
      (virDomainSoundCodecDefParseXML, virDomainSoundDefParseXML)
      (virDomainWatchdogDefParseXML, virDomainRNGDefParseXML)
      (virDomainMemballoonDefParseXML, virDomainNVRAMDefParseXML)
      (virSysinfoParseXML, virDomainVideoAccelDefParseXML)
      (virDomainVideoDefParseXML, virDomainHostdevDefParseXML)
      (virDomainRedirdevDefParseXML)
      (virDomainRedirFilterUsbDevDefParseXML)
      (virDomainRedirFilterDefParseXML, virDomainIdMapEntrySort)
      (virDomainIdmapDefParseXML, virDomainVcpuPinDefParseXML)
      (virDiskNameToBusDeviceIndex, virDomainDeviceDefCopy)
      (virDomainVideoDefaultType, virDomainHostdevAssignAddress)
      (virDomainDeviceDefPostParseInternal, virDomainDeviceDefPostParse)
      (virDomainChrGetDomainPtrs, virDomainControllerSCSINextUnit)
      (virDomainSCSIDriveAddressIsUsed)
      (virDomainDriveAddressIsUsedByDisk)
      (virDomainDriveAddressIsUsedByHostdev): Fix fallout.
      * src/openvz/openvz_driver.c (openvzDomainDeviceDefPostParse):
      Likewise.
      * src/libxl/libxl_domain.c (libxlDomainDeviceDefPostParse):
      Likewise.
      * src/qemu/qemu_domain.c (qemuDomainDeviceDefPostParse)
      (qemuDomainDefaultNetModel): Likewise.
      * src/lxc/lxc_domain.c (virLXCDomainDeviceDefPostParse):
      Likewise.
      * src/uml/uml_driver.c (umlDomainDeviceDefPostParse): Likewise.
      * src/xen/xen_driver.c (xenDomainDeviceDefPostParse): Split...
      (xenDomainDefPostParse): ...since per-device callback is not the
      time to be adding a device.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d2467709
  15. 16 4月, 2013 1 次提交
  16. 05 4月, 2013 2 次提交
    • P
      virCaps: get rid of defaultConsoleTargetType callback · 482e5f15
      Peter Krempa 提交于
      This patch refactors various places to allow removing of the
      defaultConsoleTargetType callback from the virCaps structure.
      
      A new console character device target type is introduced -
      VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_NONE - to mark that no type was
      specified in the XML. This type is at the end converted to the standard
      VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL. Other types that are
      different from this default have to be processed separately in the
      device post parse callback.
      482e5f15
    • P
      virCaps: get rid of emulatorRequired · b5def001
      Peter Krempa 提交于
      This patch removes the emulatorRequired field and associated
      infrastructure from the virCaps object. Instead the driver specific
      callbacks are used as this field isn't enforced by all drivers.
      
      This patch implements the appropriate callbacks in the qemu and lxc
      driver and moves to check to that location.
      b5def001
  17. 13 3月, 2013 1 次提交
    • P
      virCaps: conf: start splitting out irrelevat data · 27cf98e2
      Peter Krempa 提交于
      The virCaps structure gathered a ton of irrelevant data over time that.
      The original reason is that it was propagated to the XML parser
      functions.
      
      This patch aims to create a new data structure virDomainXMLConf that
      will contain immutable data that are used by the XML parser. This will
      allow two things we need:
      
      1) Get rid of the stuff from virCaps
      
      2) Allow us to add callbacks to check and add driver specific stuff
      after domain XML is parsed.
      
      This first attempt removes pointers to private data allocation functions
      to this new structure and update all callers and function that require
      them.
      27cf98e2
  18. 21 12月, 2012 3 次提交
  19. 28 11月, 2012 1 次提交
    • D
      Store initpid in the domain status XML for LXC · ea2fec86
      Daniel P. Berrange 提交于
      The initpid will be required long term to enable LXC to
      implement various hotplug operations. Thus it needs to be
      persisted in the domain status XML. LXC has not used the
      domain status XML before, so this introduces use of the
      helpers.
      ea2fec86
  20. 21 9月, 2012 1 次提交
  21. 30 7月, 2012 2 次提交
  22. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  23. 19 7月, 2012 1 次提交
  24. 10 3月, 2010 1 次提交
  25. 21 9月, 2009 1 次提交
    • D
      Move LXC driver into src/lxc/ · c93125b1
      Daniel P. Berrange 提交于
      * src/lxc_conf.c, src/lxc_conf.h, src/lxc_container.c,
        src/lxc_container.h, src/lxc_controller.c, src/lxc_driver.c,
        src/lxc_driver.h, src/veth.c, src/veth.h: Move to src/lxc/
      * src/opennebula/one_driver.c: Remove bogus veth.h include
      * src/Makefile.am: Adjust for lxc paths
      * daemon/qemud.c: Adjust include for lxc
      c93125b1
  26. 21 8月, 2008 1 次提交
  27. 11 4月, 2008 1 次提交
  28. 21 3月, 2008 1 次提交
    • D
      Initial Linux containers work · f1638952
      Daniel Veillard 提交于
      * configure.in include/libvirt/virterror.h src/Makefile.am
        src/driver.h src/lxc_conf.[ch] src/lxc_driver.[ch] src/virterror.c:
        Applied 3 patches from Dave Leskovec for intial support of
        Linux containers, configured off by default, work in progress.
      * src/libvirt.c: improve virDomainCreateLinux xmlDesc description
      Daniel
      f1638952
  29. 30 1月, 2008 1 次提交
    • J
      Enable the <config.h>-requiring test; fix violations · a3781881
      Jim Meyering 提交于
      Use <config.h>, not "config.h", per autoconf documentation.
      * Makefile.cfg (local-checks-to-skip) [sc_require_config_h]: Enable.
      * .x-sc_require_config_h: New file, to list exempted files.
      * Makefile.am (EXTRA_DIST): Add .x-sc_require_config_h.
      a3781881
  30. 26 11月, 2007 1 次提交
  31. 29 6月, 2007 1 次提交
  32. 27 6月, 2007 1 次提交