1. 29 7月, 2014 1 次提交
  2. 25 7月, 2014 1 次提交
  3. 24 7月, 2014 7 次提交
  4. 23 7月, 2014 4 次提交
    • C
    • J
      Introduce virTristateSwitch enum · 3227e17d
      Ján Tomko 提交于
      For the values "default", "on", "off"
      
      Replaces
      virDeviceAddressPCIMulti
      virDomainFeatureState
      virDomainIoEventFd
      virDomainVirtioEventIdx
      virDomainDiskCopyOnRead
      virDomainMemDump
      virDomainPCIRombarMode
      virDomainGraphicsSpicePlaybackCompression
      3227e17d
    • J
      Introduce virTristateBool enum type · bb018ce6
      Ján Tomko 提交于
      Replace all three-state (default/yes/no) enums with it:
      virDomainBIOSUseserial
      virDomainBootMenu
      virDomainPMState
      virDomainGraphicsSpiceClipboardCopypaste
      virDomainGraphicsSpiceAgentFileTransfer
      virNetworkDNSForwardPlainNames
      bb018ce6
    • C
      lxc: allow to keep or drop capabilities · 47e5b5ae
      Cédric Bosdonnat 提交于
      Added <capabilities> in the <features> section of LXC domains
      configuration. This section can contain elements named after the
      capabilities like:
      
        <mknod state="on"/>, keep CAP_MKNOD capability
        <sys_chroot state="off"/> drop CAP_SYS_CHROOT capability
      
      Users can restrict or give more capabilities than the default using
      this mechanism.
      47e5b5ae
  5. 18 7月, 2014 2 次提交
    • C
      lxc network configuration allows setting target container NIC name · 3ba0469c
      Cédric Bosdonnat 提交于
      LXC network devices can now be assigned a custom NIC device name on the
      container side. For example, this is configured with:
      
          <interface type='network'>
            <source network='default'/>
            <guest dev="eth1"/>
          </interface>
      
      In this example the network card will appear as eth1 in the guest.
      3ba0469c
    • R
      Fix build by dropping redefined typedefs · 479ef260
      Roman Bogorodskiy 提交于
      Commit 93e82727 introduced numatune_conf.h file that contains
      typedefs already defined in domain_conf.h, such as:
      
       - virDomainNumatune
       - virDomainNumatunePtr
       - virDomainDef
       - virDomainDefPtr
      
      As numatune_conf.h is included by domain_conf.h, clang
      complains about redefinition of typedef and the build fails.
      
      In order to fix it, drop typedefs already defined by numatume_conf.h
      from domain_conf.h.
      479ef260
  6. 17 7月, 2014 4 次提交
    • M
      numatune: Encapsulate numatune configuration in order to unify results · 93e82727
      Martin Kletzander 提交于
      There were numerous places where numatune configuration (and thus
      domain config as well) was changed in different ways.  On some
      places this even resulted in persistent domain definition not to be
      stable (it would change with daemon's restart).
      
      In order to uniformly change how numatune config is dealt with, all
      the internals are now accessible directly only in numatune_conf.c and
      outside this file accessors must be used.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      93e82727
    • M
      numatune: unify numatune struct and enum names · e764ec7a
      Martin Kletzander 提交于
      Since there was already public virDomainNumatune*, I changed the
      private virNumaTune to match the same, so all the uses are unified and
      public API is kept:
      
      s/vir\(Domain\)\?Numa[tT]une/virDomainNumatune/g
      
      then shrunk long lines, and mainly functions, that were created after
      that:
      
      sed -i 's/virDomainNumatuneMemPlacementMode/virDomainNumatunePlacement/g'
      
      And to cope with the enum name, I haad to change the constants as
      well:
      
      s/VIR_NUMA_TUNE_MEM_PLACEMENT_MODE/VIR_DOMAIN_NUMATUNE_PLACEMENT/g
      
      Last thing I did was at least a little shortening of already long
      name:
      
      s/virDomainNumatuneDef/virDomainNumatune/g
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      e764ec7a
    • M
      numatune: create new module for numatune · 293d5f21
      Martin Kletzander 提交于
      There are many places with numatune-related code that should be put
      into special numatune_conf and this patch creates a basis for that.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      293d5f21
    • M
      support for QEMU vhost-user · a14abd46
      Michele Paolino 提交于
      This patch adds support for the QEMU vhost-user feature to libvirt.
      vhost-user enables the communication between a QEMU virtual machine
      and other userspace process using the Virtio transport protocol.
      It uses a char dev (e.g. Unix socket) for the control plane,
      while the data plane based on shared memory.
      
      The XML looks like:
      
      <interface type='vhostuser'>
          <mac address='52:54:00:3b:83:1a'/>
          <source type='unix' path='/tmp/vhost.sock' mode='server'/>
          <model type='virtio'/>
      </interface>
      Signed-off-by: NMichele Paolino <m.paolino@virtualopensystems.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a14abd46
  7. 08 7月, 2014 1 次提交
  8. 02 7月, 2014 1 次提交
  9. 24 6月, 2014 1 次提交
  10. 20 6月, 2014 1 次提交
  11. 06 6月, 2014 3 次提交
    • E
      conf: store mirroring information in virStorageSource · 7b7bf001
      Eric Blake 提交于
      The current implementation of 'virsh blockcopy' (virDomainBlockRebase)
      is limited to copying to a local file name.  But future patches want
      to extend it to also copy to network disks.  This patch converts over
      to a virStorageSourcePtr, although it should have no semantic change
      visible to the user, in anticipation of those future patches being
      able to use more fields for non-file destinations.
      
      * src/conf/domain_conf.h (_virDomainDiskDef): Change type of
      mirror information.
      * src/conf/domain_conf.c (virDomainDiskDefParseXML): Localize
      mirror parsing into new object.
      (virDomainDiskDefFormat): Adjust clients.
      * src/qemu/qemu_domain.c (qemuDomainDeviceDefPostParse):
      Likewise.
      * src/qemu/qemu_driver.c (qemuDomainBlockPivot)
      (qemuDomainBlockJobImpl, qemuDomainBlockCopy): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      7b7bf001
    • E
      conf: store disk source as pointer, for easier manipulation · c123ef71
      Eric Blake 提交于
      As part of the work on backing chains, I'm finding that it would
      be easier to directly manipulate chains of pointers (adding a
      snapshot merely adjusts pointers to form the correct list) rather
      than copy data from one struct to another.  This patch converts
      domain disk source to be a pointer.
      
      In this patch, the pointer is ALWAYS allocated (thanks in part to
      the previous patch forwarding all disk def allocation through a
      common point), and all other changse are just mechanical fallout of
      the new type; there should be no functional change.  It is possible
      that we may want to leave the pointer NULL for a cdrom with no
      medium in a later patch, but as that requires a closer audit of the
      source to ensure we don't fault on a null dereference, I didn't do
      it here.
      
      * src/conf/domain_conf.h (_virDomainDiskDef): Change type of src.
      * src/conf/domain_conf.c: Adjust all clients.
      * src/security/security_selinux.c: Likewise.
      * src/qemu/qemu_domain.c: Likewise.
      * src/qemu/qemu_command.c: Likewise.
      * src/qemu/qemu_conf.c: Likewise.
      * src/qemu/qemu_process.c: Likewise.
      * src/qemu/qemu_migration.c: Likewise.
      * src/qemu/qemu_driver.c: Likewise.
      * src/lxc/lxc_driver.c: Likewise.
      * src/lxc/lxc_controller.c: Likewise.
      * tests/securityselinuxlabeltest.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      c123ef71
    • E
      conf: consolidate disk def allocation · bc3f5f19
      Eric Blake 提交于
      A future patch wants to create disk definitions with non-zero
      default contents; to avoid crashes, all callers that allocate
      a disk definition should go through a common point.
      
      I found allocation points by looking for any code that increments
      ndisks, as well as any matches for ALLOC.*disk.  Most places that
      modified ndisks were covered by the parse from XML to domain/device
      definition by initial domain creation or device hotplug; I also
      hand-checked all drivers that generate a device struct on the
      fly during getXMLDesc.
      
      * src/conf/domain_conf.h (virDomainDiskDefNew): New prototype.
      * src/conf/domain_conf.c (virDomainDiskDefNew): New function.
      (virDomainDiskDefParseXML): Use it.
      * src/parallels/parallels_driver.c (parallelsAddHddInfo):
      Likewise.
      * src/qemu/qemu_command.c (qemuParseCommandLine): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainGetXMLDesc): Likewise.
      * src/vmx/vmx.c (virVMXParseDisk): Likewise.
      * src/xenxs/xen_sxpr.c (xenParseSxprDisks, xenParseSxpr):
      Likewise.
      * src/xenxs/xen_xm.c (xenParseXM): Likewise.
      * src/libvirt_private.syms (domain_conf.h): Export it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      bc3f5f19
  12. 03 6月, 2014 2 次提交
    • J
      conf: more enum cleanups in "src/conf/domain_conf.h" · 5a2bd4c9
      Julio Faracco 提交于
      In "src/conf/domain_conf.h" there are many enum declarations. The
      cleanup in this header filer was started, but it wasn't enough and
      there are many other files that has enum variables declared. So, the
      commit was starting to be big. This commit finish the cleanup in this
      header file and in other files that has enum variables, parameters,
      or functions declared.
      Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      5a2bd4c9
    • J
      conf: enum cleanups in "src/conf/domain_conf.h" · d4dad162
      Julio Faracco 提交于
      In "src/conf/domain_conf.h" there are many enumerations (enum)
      declarations to be converted as a typedef too. As mentioned before,
      it's better to use a typedef for variable types, function types and
      other usages. I think this file has most of those enum declarations
      at "src/conf/". So, me and Eric Blake plan to keep the cleanups all
      over the source code. This time, most of the files changed in this
      commit are related to part of one file: "src/conf/domain_conf.h".
      Signed-off-by: NJulio Faracco <jcfaracco@gmail.com>
      d4dad162
  13. 26 5月, 2014 2 次提交
    • L
      qemu: fix RTC_CHANGE event for <clock offset='variable' basis='utc'/> · b62d67da
      Laine Stump 提交于
      commit e31b5cf3 attempted to fix libvirt's
      VIR_DOMAIN_EVENT_ID_RTC_CHANGE, which is documentated to always
      provide the new offset of the domain's real time clock from UTC. The
      problem was that, in the case that qemu is provided with an "-rtc
      base=x" where x is an absolute time (rather than "utc" or
      "localtime"), the offset sent by qemu's RTC_CHANGE event is *not* the
      new offset from UTC, but rather is the sum of all changes to the
      domain's RTC since it was started with base=x.
      
      So, despite what was said in commit e31b5cf3, if we assume that
      the original value stored in "adjustment" was the offset from UTC at
      the time the domain was started, we can always determine the current
      offset from UTC by simply adding the most recent (i.e. current) offset
      from qemu to that original adjustment.
      
      This patch accomplishes that by storing the initial adjustment in the
      domain's status as "adjustment0". Each time a new RTC_CHANGE event is
      received from qemu, we simply add adjustment0 to the value sent by
      qemu, store that as the new adjustment, and forward that value on to
      any event handler.
      
      This patch (*not* e31b5cf3, which should be reverted prior to
      applying this patch) fixes:
      
      https://bugzilla.redhat.com/show_bug.cgi?id=964177
      
      (for the case where basis='utc'. It does not fix basis='localtime')
      b62d67da
    • L
      Revert "qemu: Report the offset from host UTC for RTC_CHANGE event" · b8efa6f2
      Laine Stump 提交于
      This reverts commit e31b5cf3.
      
      This commit attempted to work around a bug in the offset value
      reported by qemu's RTC_CHANGE event in the case that a variable base
      date was given on the qemu commandline. The patch mixed up the math
      involved in arriving at the corrected offset to report, and in the
      process added an unnecessary private attribute to the clock
      element. Since that element is private/internal and not used by anyone
      else, it makes sense to simplify things by removing it.
      b8efa6f2
  14. 16 5月, 2014 1 次提交
    • E
      maint: shorten 'TypeType' function names · ab517818
      Eric Blake 提交于
      The VIR_ENUM_DECL/VIR_ENUM_IMPL helper macros already append 'Type'
      to the enum name being converted; it looks silly to have functions
      with 'TypeType' in their name.  Even though some of our enums have
      to have a 'Type' suffix, the corresponding string conversion
      functions do not.
      
      * src/conf/secret_conf.h (VIR_ENUM_DECL): Rename virSecretUsageType.
      * src/conf/storage_conf.h (VIR_ENUM_DECL): Rename
      virStoragePoolAuthType, virStoragePoolSourceAdapterType,
      virStoragePartedFsType.
      * src/conf/domain_conf.c (virDomainDiskDefParseXML)
      (virDomainFSDefParseXML, virDomainFSDefFormat): Update callers.
      * src/conf/secret_conf.c (virSecretDefParseUsage)
      (virSecretDefFormatUsage): Likewise.
      * src/conf/storage_conf.c (virStoragePoolDefParseAuth)
      (virStoragePoolDefParseSource, virStoragePoolSourceFormat):
      Likewise.
      * src/lxc/lxc_controller.c (virLXCControllerSetupLoopDevices):
      Likewise.
      * src/storage/storage_backend_disk.c
      (virStorageBackendDiskPartFormat): Likewise.
      * src/util/virstorageencryption.c (virStorageEncryptionSecretParse)
      (virStorageEncryptionSecretFormat): Likewise.
      * tools/virsh-secret.c (cmdSecretList): Likewise.
      * src/libvirt_private.syms (secret_conf.h, storage_conf.h): Export
      corrected names.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ab517818
  15. 15 5月, 2014 2 次提交
  16. 24 4月, 2014 2 次提交
  17. 22 4月, 2014 2 次提交
  18. 09 4月, 2014 1 次提交
  19. 08 4月, 2014 2 次提交