1. 12 5月, 2015 2 次提交
    • L
      qemu: eliminate duplicated code in qemuBuildDriveDevStr() · e27c5c8f
      Laine Stump 提交于
      The code to add device type to the commandline was identical for lsi
      and other models of SCSI controllers, but was duplicated (with the
      exception of a minor ordering difference of the if-else clauses) for
      the two cases. This patch replaces those two with a single instance of
      the code just before the if().
      e27c5c8f
    • L
      qemu: use qemuDomainMachineIsI440FX() in appropriate place · da558e72
      Laine Stump 提交于
      This patch makes qemuValideDevicePCISlotsChipsets() more consistent in
      appearance by replacing several clauses of an if with the equivalent
      call to qemuDomainMachineIsI440FX. The if was checking exactly the
      same items, just in a slightly different order.
      da558e72
  2. 06 5月, 2015 2 次提交
  3. 05 5月, 2015 1 次提交
  4. 04 5月, 2015 2 次提交
  5. 01 5月, 2015 1 次提交
  6. 30 4月, 2015 1 次提交
  7. 29 4月, 2015 2 次提交
  8. 28 4月, 2015 2 次提交
    • J
      qemu: Remove need for qemuDomainParseIOThreadAlias · 4c2ca566
      John Ferlan 提交于
      Rather than have a separate routine to parse the alias of an iothread
      returned from qemu in order to get the iothread_id value, parse the alias
      when returning and just return the iothread_id in qemuMonitorIOThreadInfoPtr
      
      This set of patches removes the function, changes the "char *name" to
      "unsigned int" and handles all the fallout.
      4c2ca566
    • J
      qemu: Use domain iothreadids to IOThread's 'thread_id' · 8d4614a5
      John Ferlan 提交于
      Add 'thread_id' to the virDomainIOThreadIDDef as a means to store the
      'thread_id' as returned from the live qemu monitor data.
      
      Remove the iothreadpids list from _qemuDomainObjPrivate and replace with
      the new iothreadids 'thread_id' element.
      
      Rather than use the default numbering scheme of 1..number of iothreads
      defined for the domain, use the iothreadid's list for the iothread_id
      
      Since iothreadids list keeps track of the iothread_id's, these are
      now used in place of the many places where a for loop would "know"
      that the ID was "+ 1" from the array element.
      
      The new tests ensure usage of the <iothreadid> values for an exact number
      of iothreads and the usage of a smaller number of <iothreadid> values than
      iothreads that exist (and usage of the default numbering scheme).
      8d4614a5
  9. 27 4月, 2015 1 次提交
  10. 21 4月, 2015 3 次提交
  11. 14 4月, 2015 1 次提交
  12. 10 4月, 2015 1 次提交
    • D
      conf: add VIR_DOMAIN_VIDEO_TYPE_PARALLELS video type · 0d572b69
      Dmitry Guryanov 提交于
      We support VNC for containers to have the same
      interface with VMs. At this moment it just renders
      linux text console.
      
      Of course we don't pass any physical devices and
      don't emulate virtual devices. Our VNC server
      renders text from terminal master and sends
      input events from VNC client to terminal.
      
      So add special video type VIR_DOMAIN_VIDEO_TYPE_PARALLELS
      for these pseudo-devices.
      Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
      0d572b69
  13. 08 4月, 2015 1 次提交
    • M
      virQEMUDriverGetConfig: Fix memleak · 225aa802
      Michal Privoznik 提交于
      ==19015== 968 (416 direct, 552 indirect) bytes in 1 blocks are definitely lost in loss record 999 of 1,049
      ==19015==    at 0x4C2C070: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==19015==    by 0x52ADF14: virAllocVar (viralloc.c:560)
      ==19015==    by 0x5302FD1: virObjectNew (virobject.c:193)
      ==19015==    by 0x1DD9401E: virQEMUDriverConfigNew (qemu_conf.c:164)
      ==19015==    by 0x1DDDF65D: qemuStateInitialize (qemu_driver.c:666)
      ==19015==    by 0x53E0823: virStateInitialize (libvirt.c:777)
      ==19015==    by 0x11E067: daemonRunStateInit (libvirtd.c:905)
      ==19015==    by 0x53201AD: virThreadHelper (virthread.c:206)
      ==19015==    by 0xA1EE1F2: start_thread (in /lib64/libpthread-2.19.so)
      ==19015==    by 0xA4EFC8C: clone (in /lib64/libc-2.19.so)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      225aa802
  14. 02 4月, 2015 2 次提交
  15. 26 3月, 2015 4 次提交
    • L
      qemu: command: Fix property name for start address of a pc-dimm module · a0bbdcd7
      Luyao Huang 提交于
      Starting a qemu VM with a memory module that has the base address
      specified results in the following error:
      
       error: internal error: early end of file from monitor: possible problem:
       2015-03-26T03:45:52.338891Z qemu-kvm: -device pc-dimm,node=0,memdev=memdimm0,
       id=dimm0,slot=0,base=4294967296: Property '.base' not found
      
      The correct property name for the base address is 'addr'.
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      a0bbdcd7
    • J
      qemu: Give hint about -noTSX CPU model · 53c8062f
      Jiri Denemark 提交于
      Because of the microcode update to Haswell/Broadwell CPUs, existing
      domains using these CPUs may fail to start even though they used to run
      just fine. To help users solve this issue we try to suggest switching to
      -noTSX variant of the CPU model:
      
          virsh # start cd
          error: Failed to start domain cd
          error: unsupported configuration: guest and host CPU are not
          compatible: Host CPU does not provide required features: rtm, hle;
          try using 'Haswell-noTSX' CPU model
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      53c8062f
    • P
      qemu: command: Check for empty network source when formatting drive cmd · 82f349a3
      Peter Krempa 提交于
      Use the virStorageSourceIsEmpty helper to determine whether the drive
      source is empty rather than checking for src->path. This will fix start
      of VM with empty network cdrom that would not report any error.
      82f349a3
    • P
      qemu: command: Report error when formatting network source with protocol _NONE · df936185
      Peter Krempa 提交于
      The function that formats the string for network drives would return
      error code but did not set the error message when called on storage
      source with VIR_STORAGE_NET_PROTOCOL_LAST or _NONE.
      
      Report an error in this case if it would ever be called in that way.
      df936185
  16. 25 3月, 2015 2 次提交
    • L
      qemu: Report better error when memory device source has wrong NUMA node · 726072f0
      Luyao Huang 提交于
      When starting a VM with hotpluggable memory devices the user may specify
      an invalid source NUMA node. Libvirt would pass through the error from
      qemu:
      
       # virsh start test3
       error: Failed to start domain test3
       error: internal error: process exited while connecting to monitor:
       2015-03-25T01:12:17.205913Z qemu-kvm: -object memory-backend-ram,id=memdimm0
       ,size=536870912,host-nodes=1-3,policy=bind: cannot bind memory to host NUMA nodes:
       Invalid argument
      
      This patch adds a check that allows to report better error:
      
       # virsh start test3
       error: Failed to start domain test3
       error: configuration unsupported: NUMA node 1 is unavailable
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      726072f0
    • J
      Fix typo in error message · 68545ea6
      Ján Tomko 提交于
      by rewriting it completely from:
      error: unsupported configuration: virtio only support device address
      type 'PCI'
      
      to:
      
      error: unsupported configuration: virtio disk cannot have an address of type
      drive
      
      Since we now support CCW addresses as well.
      68545ea6
  17. 23 3月, 2015 4 次提交
  18. 19 3月, 2015 1 次提交
  19. 17 3月, 2015 1 次提交
  20. 16 3月, 2015 3 次提交
    • P
      qemu: command: Add helper to align memory sizes · 57b215ab
      Peter Krempa 提交于
      The memory sizes in qemu are aligned up to 1 MiB boundaries. There are
      two places where this was done once for the total size and then for
      individual NUMA cell sizes.
      
      Add a function that will align the sizes in one place so that it's clear
      where the sizes are aligned.
      57b215ab
    • P
      conf: Replace access to def->mem.max_balloon with accessor functions · 4f9907cd
      Peter Krempa 提交于
      As there are two possible approaches to define a domain's memory size -
      one used with legacy, non-NUMA VMs configured in the <memory> element
      and per-node based approach on NUMA machines - the user needs to make
      sure that both are specified correctly in the NUMA case.
      
      To avoid this burden on the user I'd like to replace the NUMA case with
      automatic totaling of the memory size. To achieve this I need to replace
      direct access to the virDomainMemtune's 'max_balloon' field with
      two separate getters depending on the desired size.
      
      The two sizes are needed as:
      1) Startup memory size doesn't include memory modules in some
      hypervisors.
      2) After startup these count as the usable memory size.
      
      Note that the comments for the functions are future aware and document
      state that will be present after a few later patches.
      4f9907cd
    • E
      qemu: Check for negative port values in network drive configuration · 84646165
      Erik Skultety 提交于
      We interpret port values as signed int (convert them from char *),
      so if a negative value is provided in network disk's configuration,
      we accept it as valid, however there's an 'unknown cause' error raised later.
      This error is only accidental because we return the port value in the return code.
      This patch adds just a minor tweak to the already existing check so we
      reject negative values the same way as we reject non-numerical strings.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1163553
      84646165
  21. 12 3月, 2015 1 次提交
  22. 11 3月, 2015 1 次提交
  23. 10 3月, 2015 1 次提交
    • L
      qemu: don't fill in nicindexes for session mode libvirtd · 705242f8
      Laine Stump 提交于
      Commit 4bbe1029 fixed a problem in commit f7afeddc by moving the call
      to virNetDevGetIndex() to a location common to all interface types (so
      that the nicindex array would be filled in for macvtap as well as tap
      interfaces), but the location was *too* common, as the original call
      to virNetDevGetIndex() had been in a section qualified by "if
      (cfg->privileged)". The result was that the "fixed" libvirtd would try
      to call virNetDevGetIndex() even for session mode libvirtd, and end up
      failing with the log message:
      
        Unable to open control socket: Operation not permitted
      
      To remedy that, this patch qualifies the call to virNetDevGetIndex()
      in its new location with cfg->privileged.
      
      This resolves https://bugzilla.redhat.com/show_bug.cgi?id=1198244
      705242f8