1. 29 7月, 2014 2 次提交
  2. 28 7月, 2014 3 次提交
  3. 25 7月, 2014 1 次提交
  4. 24 7月, 2014 6 次提交
  5. 23 7月, 2014 2 次提交
    • 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
  6. 17 7月, 2014 6 次提交
  7. 09 7月, 2014 1 次提交
  8. 08 7月, 2014 1 次提交
  9. 04 7月, 2014 1 次提交
    • J
      Utilize virDomainDiskAuth for domain disk · 6887af39
      John Ferlan 提交于
      Replace the inline "auth" struct in virStorageSource with a pointer
      to a virStorageAuthDefPtr and utilize between the domain_conf, qemu_conf,
      and qemu_command sources for finding the auth data for a domain disk
      6887af39
  10. 03 7月, 2014 2 次提交
  11. 02 7月, 2014 2 次提交
  12. 26 6月, 2014 2 次提交
  13. 23 6月, 2014 1 次提交
    • L
      qemu: parse -device virtio-balloon · ef016226
      Laine Stump 提交于
      There are no options to parse here other than the name of the device,
      and all three possible device names have the same prefix
      ("virtio-balloon" with "-ccw", "-pci", or "-device" appended), so the
      code is fairly simple. It has been implemented such that it will be
      easier to add handling for other -device entries that aren't otherwise
      recognized - just add another "else if (STRPREFIX(opts, ....)" clause.
      
      qemuParseCommandLineString() previously would always add a <memballoon
      model='virtio'/> to every result (the comments erroneously say that it
      is adding a <memballoon model='none'/>) This has been changed to add
      model='none', and 84 test case xml's updated accordingly (so that
      qemuxml2argvtest won't fail).
      
      Now that the memballoon device is properly parsed, we can safely add a
      test for properly ignoring -nodefconfig and -nodefaults. Rather than
      adding an entire new test case for this (and memballoon), we just
      randomly pick the clock-utc test and modify it slightly to fulfill the
      purpose.
      ef016226
  14. 21 6月, 2014 1 次提交
  15. 09 6月, 2014 1 次提交
    • L
      qemu: ignore -nodefconfig and -nodefaults when parsing commandline · a7b0040a
      Laine Stump 提交于
      The qemu driver always adds these options to the qemu commandlines,
      but the commandline parser didn't recognize them, so sending a
      libvirt-generated qemu commandline to its own argvtoxml would always
      result in a warning message and a qemu namespace added to the
      xml. Since the options don't add any functionality to the domain, they
      should just be ignored (similar to -S).
      
      Note that we can't yet add a test for this to qemuargv2xmltest,
      because we would have to add QEMU_CAPS_NODEFCONFIG and
      QEMU_CAPS_DEVICE to the capabilities for any corresponding
      xml2argvtest, and QEMU_CAPS_DEVICE would necessitate having support
      for parsing a memballoon device in order for qemuargv2xmltest to
      pass. So we wait to add a test for -nodefconfig and -nodefaults until
      after adding support for parsing -device virtio-balloon-*.
      a7b0040a
  16. 06 6月, 2014 2 次提交
    • 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
  17. 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
  18. 26 5月, 2014 3 次提交
    • L
      qemu: fix <clock offset='variable' basis='localtime'/> · cde8ca2d
      Laine Stump 提交于
      For a clock element as above, libvirt simply converts current system
      time with localtime_r(), then starts qemu with a time string that
      doesn't contain any timezone information. So, from qemu's point of
      view, the -rtc string it gets for:
      
         <clock offset='variable' basis='utc' adjustment='10800'/>
      
      is identical to the -rtc string it gets for:
      
         <clock offset='variable' basis='localtime' adjustment='0'/>
      
      (assuming the host is in a timezone that is 10800 seconds ahead of
      UTC, as is the case on the machine where this message is being
      written).
      
      Since the commandlines are identical, qemu will behave identically
      after this point in either case.
      
      There are two problems in the case of basis='localtime' though:
      
      Problem 1) If the guest modifies its RTC, for example to add 20
      seconds, the RTC_CHANGE event from qemu will then contain offset:20 in
      both cases. But libvirt will have saved the original adjustment into
      adjustment0, and will add that value onto the offset in the
      event. This means that in the case of basis=;utc', it will properly
      emit an event with offset:10820, but in the case of basis='localtime'
      the event will contain offset:20, which is *not* the new offset of the
      RTC from UTC (as the event it documented to provide).
      
      Problem 2) If the guest is migrated to another host that is in a
      different timezone, or if it is migrated or saved/restored after the
      DST status has changed from what it was when the guest was originally
      started, the newly restarted guest will have a different RTC (since it
      will be based on the new localtime, which could have shifted by
      several hours).
      
      The solution to both of these problems is simple - rather than
      maintaining the original adjustment value along with
      "basis='localtime'" in the domain status, when the domain is started
      we convert the adjustment offset to one relative to UTC, and set the
      status to "basis='utc'". Thus, whatever the RTC offset was from UTC
      when it was initially started, that offset will be maintained when
      migrating across timezones and DST settings, and the RTC_CHANGE events
      will automatically contain the proper offset (which should by
      definition always be relative to UTC).
      
      This fixes a problem that was implied but not openly stated in:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=964177
      cde8ca2d
    • 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
  19. 23 5月, 2014 1 次提交
    • P
      storage: Add NONE protocol type for network disks · a01d9357
      Peter Krempa 提交于
      Currently the protocol type with index 0 was NBD which made it hard to
      distinguish whether the protocol type was actually assigned. Add a new
      protocol type with index 0 to distinguish it explicitly.
      a01d9357