1. 29 4月, 2015 2 次提交
  2. 28 4月, 2015 8 次提交
    • Z
      qemu: make qemuMonitorChardevInfoFree non-static · 6f5d29f4
      Zhang Bo 提交于
      It would be used in qemumonitorjsontest, thus we make it non-static.
      Signed-off-by: NZhang Bo <oscar.zhangbo@huawei.com>
      Signed-off-by: NZhou Yimin <zhouyimin@huawei.com>
      6f5d29f4
    • J
      qemu: Remove need for qemuMonitorIOThreadInfoFree · b515339f
      John Ferlan 提交于
      Replace with just VIR_FREE.
      b515339f
    • J
      qemu: qemuProcessDetectIOThreadPIDs invert checks · 69b16513
      John Ferlan 提交于
      If we received zero iothreads from the monitor, but were perhaps
      expecting to receive something, then the code was skipping the check
      to ensure what's in the monitor matches our expectations.  So invert
      the checks to check that what we get back matches expectations and
      then check there are zero iothreads returned.
      69b16513
    • 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: Resolve Coverity DEADCODE · d8082d2d
      John Ferlan 提交于
      Coverity notes that the switch() used to check 'connected' values has
      two DEADCODE paths (_DEFAULT & _LAST).  Since 'connected' is a boolean
      it can only be one or the other (CONNECTED or DISCONNECTED), so it just
      seems pointless to use a switch to get "all" values.  Convert to if-else
      d8082d2d
    • J
      qemu: Add support to Add/Delete IOThreads · a27ed6e7
      John Ferlan 提交于
      Add qemuDomainAddIOThread and qemuDomainDelIOThread in order to add or
      remove an IOThread to/from the host either for live or config optoins
      
      The implementation for the 'live' option will use the iothreadpids list
      in order to make decision, while the 'config' option will use the
      iothreadids list.  Additionally, for deletion each may have to adjust
      the iothreadpin list.
      
      IOThreads are implemented by qmp objects, the code makes use of the existing
      qemuMonitorAddObject or qemuMonitorDelObject APIs.
      Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
      a27ed6e7
    • J
      Move iothreadspin information into iothreadids · b266486f
      John Ferlan 提交于
      Remove the iothreadspin array from cputune and replace with a cpumask
      to be stored in the iothreadids list.
      
      Adjust the test output because our printing goes in order of the iothreadids
      list now.
      b266486f
    • 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
  3. 27 4月, 2015 4 次提交
  4. 26 4月, 2015 5 次提交
  5. 24 4月, 2015 8 次提交
  6. 23 4月, 2015 1 次提交
  7. 22 4月, 2015 4 次提交
    • P
      qemu: migration: Refactor hostdev validation in migration check · bd579773
      Peter Krempa 提交于
      The hostdev check can error out right away.
      bd579773
    • M
      processNicRxFilterChangedEvent: Take appropriate actions for NET_TYPE_NETWORK too · 74acc4ca
      Michal Privoznik 提交于
      Because packets going through the egress from a bridge (where our
      bandwidth limiting takes place) have no information about which
      interface they came from, the QoS rules that we create instead
      use the source MAC address of the packets to make their decisions
      about which QDisc the packet should be in.
      
      One flaw in this is that when a guest changed the MAC address it
      used, packets from the guest would no longer be put into the
      correct QDisc, but would instead be put in an "unprivileged"
      class, resulting in the bandwidth "floor" (minimum guaranteed)
      being no longer honored.
      
      Now that libvirt has infrastructure to capture and respond to
      RX_FILTER_CHANGE events from qemu (sent whenever a guest
      interface modifies its MAC address, among other things), we can
      notice when a guest MAC address changes, and update the QoS rules
      accordingly, so that bandwidth floor is honored even after a
      guest MAC address change.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      74acc4ca
    • L
      qemu: Fix issues with maxMemory in qemuDomainSetMemoryFlags() · d1743941
      Luyao Huang 提交于
      qemuDomainSetMemoryFlags() would allow to set the initial memory greater
      than the <maxMemory> field. While the configuration would not work as
      memory hotplug requires NUMA to be enabled and the
      qemuDomainSetMemoryFlags() API does not work on NUMA guests this just
      fixes a corner case.
      
      The fix is still worth though as it allows to induce an invalid
      configuration and make the VM vanish on libvirt restart.
      
      Additionally this tweaks error message to be more accurate.
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
      d1743941
    • L
      qemu: set macvtap physdevs online when macvtap is set online · 38172ed8
      Laine Stump 提交于
      A further fix for:
      
        https://bugzilla.redhat.com/show_bug.cgi?id=1113474
      
      Since there is no possibility that any type of macvtap will work if
      the parent physdev it's attached to is offline, we should bring the
      physdev online at the same time as the macvtap. When taking the
      macvtap offline, it's also necessary to take the physdev offline for
      macvtap passthrough mode (because the physdev has the same MAC address
      as the macvtap device, so could potentially cause problems with
      misdirected packets during migration, as outlined in commits 829770
      and 879c13). We can't set the physdev offline for other macvtap modes
      1) because there may be other macvtap devices attached to the same
      physdev (and/or the host itself may be using the device) in the other
      modes whereas passthrough mode is exclusive to one macvtap at a time,
      and 2) there's no practical reason to do so anyway.
      38172ed8
  8. 21 4月, 2015 6 次提交
  9. 17 4月, 2015 2 次提交
    • M
      domcaps: Check for architecture more wisely · 0af9325e
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1209948
      
      So we have this bug. The virConnectGetDomainCapabilities() API
      performs a couple of checks before it produces any result. One of
      the checks is if the architecture requested by user can be run by
      the binary (again user provided). However, the check is pretty
      dumb. It merely compares if the default binary architecture
      matches the one provided by user. However, a qemu binary can run
      multiple architectures. For instance: qemu-system-ppc64 can run:
      ppc, ppcle, ppc64, ppc64le and ppcemb. The default is ppc64, so
      if user requested something else, like ppc64le, the check would
      have failed without obvious reason.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      0af9325e
    • Z
      qemuDomainShutdownFlags: Set fakeReboot more frequently · 8be502fd
      zhang bo 提交于
      When a qemu domain is to be rebooted, from outside, at libvirt
      level it looks like regular shutdown. To really restart the
      domain, libvirt needs to issue reset command on the monitor once
      SHUTDOWN event appeared. So, in order to differentiate bare
      shutdown and reboot libvirt uses a variable within domain private
      data. It's called fakeReboot. When the reboot API is called, the
      variable is set, but when the shutdown API is called it must be
      cleared out. But it was not for every possible case. So if user
      called virDomainReboot(), and there was no ACPI daemon running
      inside the guest (so guest didn't initiated shutdown sequence)
      and then virDomainShutdown(mode=agent) was called bad thing
      happened. We remembered the fakeReboot and instead of shutting
      the domain down, we just rebooted it.
      Signed-off-by: NZhang Bo <oscar.zhangbo@huawei.com>
      Signed-off-by: NWang Yufei <james.wangyufei@huawei.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      8be502fd