1. 17 2月, 2016 2 次提交
  2. 16 2月, 2016 1 次提交
  3. 08 2月, 2016 7 次提交
  4. 17 12月, 2015 4 次提交
  5. 15 12月, 2015 1 次提交
    • L
      qemu: add bootindex option to hostdev network interface commandline · a8e3247e
      Laine Stump 提交于
      when appropriate, of course. If the config for a domain specifies boot
      order with <boot dev='blah'/> elements, e.g.:
      
           <os>
             ...
             <boot dev='hd'/>
             <boot dev='network'/>
           </os>
      
      Then the first disk device in the config will have ",bootindex=1"
      appended to its qemu commandline -device options, and the first (and
      *only* the first) network interface device will get ",bootindex=2".
      
      However, if the first network interface device is a "hostdev" device
      (an SRIOV Virtual Function (VF) being assigned to the domain with
      vfio), then the bootindex option will *not* be appended. This happens
      because the bootindex=n option corresponding to the order of "<boot
      dev='network'/>" is added to the -device for the first network device
      when network device commandline args are constructed, but if it's a
      hostdev network device, its commandline arg is instead constructed in
      the loop for hostdevs.
      
      This patch fixes that omission by noticing (in bootHostdevNet) if the
      first network device was a hostdev, and if so passing on the proper
      bootindex to the commandline generator for hostdev devices - the
      result is that ",bootindex=2" will be properly appended to the first
      "network" device in the config even if it is really a hostdev
      (including if it is assigned from a libvirt network pool). (note that
      this is only the case if there is no <bootmenu enabled='yes'/> element
      in the config ("-boot menu-on" in qemu) , since the two are mutually
      exclusive - when the bootmenu is enabled, the individual per-device
      bootindex options can't be used by qemu, and we revert to using "-boot
      order=xyz" instead).
      
      If a greater level of control over boot order is desired (e.g., more
      than one network device should be tried, or a network device other
      than the first one encountered in the config), then <boot
      dev='network'/> in the <os> element should not be used; instead, the
      individual device elements in the config should be given a "<boot
      order='n'/>
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1278421
      a8e3247e
  6. 11 12月, 2015 1 次提交
  7. 05 12月, 2015 1 次提交
  8. 23 11月, 2015 1 次提交
  9. 20 11月, 2015 1 次提交
    • A
      qemu: Use qemuDomainRequiresMlock() when attaching PCI hostdev · 79b8c97e
      Andrea Bolognani 提交于
      The function is used everywhere else to check whether the locked
      memory limit should be set / updated, and it should be used here
      as well.
      
      Moreover, qemuDomainGetMlockLimitBytes() expects the hostdev to
      have already been added to the domain definition, but we only do
      that at the end of qemuDomainAttachHostPCIDevice(). Work around
      the issue by adding the hostdev before adjusting the locked memory
      limit and removing it immediately afterwards.
      79b8c97e
  10. 18 11月, 2015 2 次提交
  11. 10 11月, 2015 6 次提交
  12. 26 10月, 2015 2 次提交
  13. 21 10月, 2015 1 次提交
  14. 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
  15. 18 9月, 2015 1 次提交
  16. 14 9月, 2015 1 次提交
  17. 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
  18. 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
  19. 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
  20. 24 8月, 2015 1 次提交
  21. 11 8月, 2015 1 次提交