1. 10 11月, 2015 2 次提交
  2. 26 10月, 2015 2 次提交
  3. 21 10月, 2015 1 次提交
  4. 22 9月, 2015 1 次提交
    • P
      qemu: Make memory alignment helper more universal · 3fb08198
      Peter Krempa 提交于
      Extract the size determination into a separate function and reuse it
      across the memory device alignment functions. Since later we will need
      to decide the alignment size according to architecture let's pass def to
      the functions.
      3fb08198
  5. 18 9月, 2015 1 次提交
  6. 14 9月, 2015 1 次提交
  7. 04 9月, 2015 2 次提交
    • J
      qemu: Need to check for machine.os when using ADDRESS_TYPE_CCW · a39ab909
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1258361
      
      When attaching a disk, controller, or rng using an address type ccw
      or s390, we need to ensure the support is provided by both the machine.os
      and the emulator capabilities (corollary to unconditional setting when
      address was not provided for the correct machine.os and emulator.
      
      For an inactive guest, an addition followed by a start would cause the
      startup to fail after qemu_command builds the command line and attempts
      to start the guest. For an active guest, libvirtd would crash.
      a39ab909
    • J
      qemu: Introduce qemuDomainMachineIsS390CCW · d334c917
      John Ferlan 提交于
      Rather than have different usages of STR function in order to determine
      whether the domain is s390-ccw or s390-ccw-virtio, make a single API
      which will check the machine.os prefix. Then use the function.
      d334c917
  8. 02 9月, 2015 1 次提交
    • J
      qemu: add udp interface support · 5c668a78
      Jonathan Toppins 提交于
      Adds a new interface type using UDP sockets, this seems only applicable
      to QEMU but have edited tree-wide to support the new interface type.
      
      The interface type required the addition of a "localaddr" (local
      address), this then maps into the following xml and qemu call.
      
      <interface type='udp'>
        <mac address='52:54:00:5c:67:56'/>
        <source address='127.0.0.1' port='11112'>
          <local address='127.0.0.1' port='22222'/>
        </source>
        <model type='virtio'/>
        <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
      </interface>
      
      QEMU call:
      	-net socket,udp=127.0.0.1:11112,localaddr=127.0.0.1:22222
      
      Notice the xml "local" entry becomes the "localaddr" for the qemu call.
      
      reference:
      http://lists.gnu.org/archive/html/qemu-devel/2011-11/msg00629.htmlSigned-off-by: NJonathan Toppins <jtoppins@cumulusnetworks.com>
      Signed-off-by: NJán Tomko <jtomko@redhat.com>
      5c668a78
  9. 27 8月, 2015 2 次提交
    • L
      qemu: Emit correct audit message for memory hot unplug · 8f8031df
      Luyao Huang 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1226234#c3
      
      If the qemu monitor fails to remove the memory from the guest for
      any reason, the auditlog message will incorrectly use the current
      actual memory (via virDomainDefGetMemoryActual) instead of the
      value we were attempting to reduce to. The result is the 'new-mem'
      and 'old-mem' values for the auditlog message would be identical.
      
      This patch creates a local 'newmem' which accounts for the current
      memory size minus the memory which is being removed. NB, for the
      success case this results in the same value that would be returned
      by virDomainDefGetMemoryActual without the need to do the math. This
      follows the existing code which would subtract the size for cur_balloon.
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      8f8031df
    • L
      qemu: Emit correct audit message for memory hot plug · cb1fbda4
      Luyao Huang 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1226234#c3
      
      Prior to this patch, after successfully hot plugging memory
      the audit log indicated that the update failed, e.g.:
      
      type=VIRT_RESOURCE ... old-mem=1024000 new-mem=1548288 \
      exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=pts/2 res=failed
      
      This patch will adjust where virDomainAuditMemory is called to
      ensure the proper 'ret' value is used based on success or failure.
      
      Additionally, the audit message should include the size of the
      memory we were attempting to change to rather than the current
      actual size. On failure to add, the message showed the same value
      for old-mem and new-mem.
      
      In order to do this, introduce a 'newmem' local which will compute
      the new size based on the oldmem size plus the size of memory we
      are about to add. NB: This would be the same as calling the
      virDomainDefGetMemoryActual again on success, but avoids the
      overhead of recalculating. Plus cur_balloon is already adjusted
      by the same value, so this follows that.
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      cb1fbda4
  10. 24 8月, 2015 1 次提交
  11. 11 8月, 2015 1 次提交
  12. 10 7月, 2015 1 次提交
    • P
      qemu_hotplug: try harder to eject media · 28554080
      Pavel Hrdina 提交于
      Some guests lock the tray and QEMU eject command will simply fail to
      eject the media.  But the guest OS can handle this attempt to eject the
      media and can unlock the tray and open it. In this case, we should try
      again to actually eject the media.
      
      If the first attempt fails to detect a tray_open we will fail with
      error, from monitor.  If we receive that event, we know, that the guest
      properly reacted to the eject request, unlocked the tray and opened it.
      In this case, we need to run the command again to actually eject the
      media from the device.  The reason to call it again is, that QEMU
      doesn't wait for the guest to react and report an error, that the tray
      is locked.
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1147471Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      28554080
  13. 01 7月, 2015 4 次提交
  14. 23 6月, 2015 2 次提交
  15. 13 6月, 2015 1 次提交
  16. 09 6月, 2015 1 次提交
  17. 03 6月, 2015 2 次提交
  18. 21 5月, 2015 2 次提交
    • M
      qemuDomainDetachChrDevice: Fix chardev hot-unplug · 04695f48
      Michal Privoznik 提交于
      Not every chardev is plugged onto virtio-serial bus. However, the
      code introduced in 89e991a2 assumes that. Incorrectly.
      With previous patches we have three options where a chardev can
      be plugged: virtio-serial, USB and PCI. This commit fixes the
      detach part. However, since we are not auto allocating USB
      addresses yet, I'm just marking the place where appropriate code
      should go.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      04695f48
    • M
      qemuDomainAttachChrDevice: Fix chardev hotplug · 9807c471
      Michal Privoznik 提交于
      Not every chardev is plugged onto virtio-serial bus. However, the
      code introduced in 89e991a2 assumes that. Incorrectly.
      With previous patches we have three options where a chardev can
      be plugged: virtio-serial, USB and PCI. This commit fixes the
      attach part.  However, since we are not auto allocating USB
      addresses yet, I'm just marking the place where appropriate code
      should go.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      9807c471
  19. 16 5月, 2015 1 次提交
    • L
      qemu: fix exceptions in qemuAssignDeviceControllerAlias · 75cd7d9b
      Laine Stump 提交于
      There are a few extra exceptions that weren't being accounted for when
      creating the alias for a controller. This resulted in 1) incorrect
      status XML, and 2) exceptions/printfs of what *should* have been
      directly available in the controller alias when constructing device
      commandline arguments:
      
      1) The primary (and only) IDE controller on a 440FX machinetype is
      hardcoded to be "ide" in qemu.
      
      2) The primary SATA controller on a 440FX machinetype is also
      hardcoded to be "ide" in qemu.
      
      3) On machinetypes that don't support multiple PCI buses, the PCI bus
      is hardcoded in qemu to have the name "pci".
      
      4) The first usb master controller is "usb", all others are the normal
      "usb%d". (note that usb controllers that are not a "master" will have
      the same index, and thus alias, as the master).
      
      We needed to pass in the full domainDef and qemuCaps in order to
      properly make the decisions about these exceptions.
      75cd7d9b
  20. 11 5月, 2015 1 次提交
  21. 06 5月, 2015 2 次提交
    • J
      qemu: Resolve Coverity FORWARD_NULL · 75dfbb85
      John Ferlan 提交于
      Coverity notes that ->ifname is used after the VIR_FREE done in the
      code path after the call to virNetDevMacVLanDeleteWithVPortProfile
      by a call to virNetDevOpenvswitchRemovePort.
      
      Since the ->ifname will be VIR_FREE()'d eventually in virDomainNetDefFree
      just remove the extraneous VIR_FREE here.
      
      When originally added, the Openvswitch code wasn't present and checks
      were made for non NULL prior to use.
      75dfbb85
    • J
      qemu: Resolve Coverity IDENTICAL_BRANCHES · 9ad32e50
      John Ferlan 提交于
      Coverity complains that in the error paths both the < 0 condition and
      the success path after the qemuDomainObjExitMonitor failure will end
      up going to cleanup.  So just use ignore_value in this error path to
      resolve the complaint.
      9ad32e50
  22. 29 4月, 2015 2 次提交
  23. 22 4月, 2015 1 次提交
    • 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
  24. 15 4月, 2015 1 次提交
  25. 02 4月, 2015 3 次提交
  26. 23 3月, 2015 1 次提交