1. 09 1月, 2013 2 次提交
  2. 08 1月, 2013 4 次提交
    • M
      qemu: Relax hard RSS limit · 3c83df67
      Michal Privoznik 提交于
      Currently, if there's no hard memory limit defined for a domain,
      libvirt tries to calculate one, based on domain definition and magic
      equation and set it upon the domain startup. The rationale behind was,
      if there's a memory leak or exploit in qemu, we should prevent the
      host system trashing. However, the equation was too tightening, as it
      didn't reflect what the kernel counts into the memory used by a
      process. Since many hosts do have a swap, nobody hasn't noticed
      anything, because if hard memory limit is reached, process can
      continue allocating memory on a swap. However, if there is no swap on
      the host, the process gets killed by OOM killer. In our case, the qemu
      process it is.
      
      To prevent this, we need to relax the hard RSS limit. Moreover, we
      should reflect more precisely the kernel way of accounting the memory
      for process. That is, even the kernel caches are counted within the
      memory used by a process (within cgroups at least). Hence the magic
      equation has to be changed:
      
        limit = 1.5 * (domain memory + total video memory) + (32MB for cache
                per each disk) + 200MB
      3c83df67
    • J
      S390: Enable SCLP Console in QEMU driver · db2b6861
      J.B. Joret 提交于
      This is the QEMU backend code for the SCLP console support.
      It includes SCLP capability detection, QEMU command line generation
      and a test case.
      Signed-off-by: NJ.B. Joret <jb@linux.vnet.ibm.com>
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      db2b6861
    • D
      Speed up fallback to legacy non-QMP probing · 198c992d
      Daniel P. Berrange 提交于
      Since we daemonized QEMU for capabilities probing there is a long
      time if QEMU fails to launch. This is because we're not passing in
      any virDomainObjPtr instance and thus the monitor code can not
      check to see if the PID is still alive.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      198c992d
    • D
      Only initialize capabilities after setting dir permissions · 038cffd8
      Daniel P. Berrange 提交于
      The current code is initializing capabilities before setting
      directory permissions. Thus the QEMU binaries being run may
      not have the ability to create the UNIX monitor socket on
      the first run of libvirtd.
      038cffd8
  3. 07 1月, 2013 3 次提交
    • O
      qemu: Check if the shared disk's cdbfilter conflicts with others · 1279e421
      Osier Yang 提交于
      This prevents domain starting and disk attaching if the shared disk's
      setting conflicts with other active domain(s), E.g. A domain with
      "sgio" set as "filtered", however, another active domain is using
      it set as "unfiltered".
      1279e421
    • O
      qemu: set unpriv_sgio when starting domain and attaching disk · 278f87c4
      Osier Yang 提交于
      This ignores the default "filtered" if unpriv_sgio is not supported
      by kernel, but for explicit request "filtered", it error out for
      domain starting.
      278f87c4
    • O
      qemu: Add a hash table for the shared disks · d7ead3e1
      Osier Yang 提交于
      This introduces a hash table for qemu driver, to store the shared
      disk's info as (@major:minor, @ref_count). @ref_count is the number
      of domains which shares the disk.
      
      Since we only care about if the disk support unprivileged SG_IO
      commands, and the SG_IO commands only make sense for block disk,
      this patch only manages (add/remove hash entry) the shared disk for
      block disk.
      
      * src/qemu/qemu_conf.h: (Add member 'sharedDisks' of type
                               virHashTablePtr; Declare helpers
                               qemuGetSharedDiskKey, qemuAddSharedDisk
                               and qemuRemoveSharedDisk)
      * src/qemu/qemu_conf.c (Implement the 3 helpers)
      * src/qemu/qemu_process.c (Update 'sharedDisks' when domain
                                 starting and shutdown)
      * src/qemu/qemu_driver.c (Update 'sharedDisks' when attaching
                                or detaching disk).
      d7ead3e1
  4. 05 1月, 2013 7 次提交
  5. 04 1月, 2013 2 次提交
    • M
      qemu: Detect VGA_QXL capability correctly · 632c60ed
      Michal Privoznik 提交于
      Since 4c993d8a we failed to set this important capability, which
      allows starting a domain with QXL video card. We set DEVICE_QXL
      capability bit instead, which is not necessary wrong. Anyway, if
      qemu supports the new '-device qxl' it supports older '-vga qxl'
      as well. The latter is used for the primary (the first) qxl video
      card, the former for other video cards.
      632c60ed
    • J
      qemu: fix a segfault in qemuProcessWaitForMonitor · b7a443fc
      Ján Tomko 提交于
      Commit b3f2b4ca left buf unallocated in
      the case of QMP capability probing being used, leading to a segfault in
      strlen in the cleanup path.
      
      This patch opens the log and allocates the buffer if QMP probing was
      used, so we can display the helpful error message.
      b7a443fc
  6. 03 1月, 2013 1 次提交
    • M
      qemu: Don't parse log output when starting up a domain · b3f2b4ca
      Michal Privoznik 提交于
      Despite our great effort we still parsed qemu log output.
      We wouldn't notice unless upcoming qemu 1.4 changed the
      format of the logs slightly. Anyway, now we should gather
      all interesting knobs like pty paths from monitor. Moreover,
      since for historical reasons the first console can be just
      an alias to the first serial port, we need to check this and
      copy the pty path if that's the case to the first console.
      b3f2b4ca
  7. 02 1月, 2013 1 次提交
  8. 30 12月, 2012 1 次提交
    • M
      qemu: Adapt to new log format · 28224c4d
      Michal Privoznik 提交于
      Since 586502189edf9fd0f89a83de96717a2ea826fdb0 qemu commit, the log
      lines reporting chardev's path has changed from:
      
      $ ./x86_64-softmmu/qemu-system-x86_64 -serial pty -serial pty -monitor pty
      char device redirected to /dev/pts/5
      char device redirected to /dev/pts/6
      char device redirected to /dev/pts/7
      
      to:
      
      $ ./x86_64-softmmu/qemu-system-x86_64 -serial pty -serial pty -monitor pty
      char device compat_monitor0 redirected to /dev/pts/5
      char device serial0 redirected to /dev/pts/6
      char device serial1 redirected to /dev/pts/7
      
      However, with current code we are not prepared for such change, which
      results in us being unable to start any domain.
      28224c4d
  9. 24 12月, 2012 2 次提交
  10. 22 12月, 2012 2 次提交
    • V
      S390: Re-enable capability probing for virtio devices. · fec9822e
      Viktor Mihajlovski 提交于
      Since we switched to QMP probing, the object types are spelled out
      explicitly, i.e. virtio-net-pci. This has effectively disabled
      the capability detection of s390 virtio devices. The trivial fix
      is to add the s390 virtio types explicitly to qemuCapsObjectProps.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      fec9822e
    • E
      blockjob: fix memleak that prevented block pivot · 08230dbd
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=888426
      
      The code for doing a block-copy was supposed to track the destination
      file in drive->mirror, but was set up to do all mallocs prior to
      starting the copy so that OOM wouldn't leave things partially started.
      However, the wrong variable was being written; later in the code we
      silently did 'disk->mirror = mirror' which was still NULL, and thus
      leaking memory and leaving libvirt to think that the mirror job was
      never started, which prevented a pivot operation after a copy.
      Problem introduced in commit 35c7701c.
      
      * src/qemu/qemu_driver.c (qemuDomainBlockCopy): Initialize correct
      variable.
      08230dbd
  11. 21 12月, 2012 15 次提交