1. 28 2月, 2013 1 次提交
    • E
      qemu: -numa doesn't (yet) support disjoint range · 25dc8ba0
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=896092 mentions that
      qemu 1.4 and earlier only accept a simple start-stop range for
      the cpu=... argument of -numa.  Libvirt would attempt to use
      -numa cpu=1,3 for a disjoint range, which did not work as intended.
      
      Upstream qemu will be adding a new syntax for disjoint cpu ranges
      in 1.5; but the design for that syntax is still under discussion
      at the time of this patch.  So for libvirt 1.0.3, it is safest to
      just reject attempts to build an invalid qemu command line; in the
      future, we can add a capability bit and translate to the final
      accepted design for selecting a disjoint cpu range in numa.
      
      * src/qemu/qemu_command.c (qemuBuildNumaArgStr): Reject disjoint
      ranges.
      25dc8ba0
  2. 25 2月, 2013 2 次提交
    • P
      qemu: Implement support for EGD backend for virtio-rng · 820019fc
      Peter Krempa 提交于
      This patch adds a new capability bit QEMU_CAPS_OBJECT_RNG_EGD and code
      to support the egd backend for the VirtIO RNG device.
      
      The device is added by 3 qemu command line options:
      -chardev socket,id=charrng0,host=1.2.3.4,port=1234 (communication
                                                          backend)
      -object rng-egd,chardev=charrng0,id=rng0 (RNG protocol client)
      -device virtio-rng-pci,rng=rng0,bus=pci.0,addr=0x4 (the RNG device)
      820019fc
    • P
      qemu: Implement support for default 'random' backend for virtio-rng · 234a5560
      Peter Krempa 提交于
      This patch implements support for the virtio-rng-pci device and the
      rng-random backend in qemu.
      
      Two capabilities bits are added to track support for those:
      
      QEMU_CAPS_DEVICE_VIRTIO_RNG - for the device support and
      QEMU_CAPS_OBJECT_RNG_RANDOM - for the backend support.
      
      qemu is invoked with these additional parameters if the device is
      enabled:
      
      -object rng-random,id=rng0,filename=/test/phile (to add the backend)
      -device virtio-rng-pci,rng=rng0,bus=pci.0,addr=0x4 (to add the device)
      234a5560
  3. 20 2月, 2013 1 次提交
    • J
      qemu: switch PCI address alocation to use virDevicePCIAddress · bc28e56b
      Ján Tomko 提交于
      Some functions were using virDomainDeviceInfo where virDevicePCIAddress
      would suffice. Some were only using integers for slots and functions,
      assuming the bus numbers are always 0.
      
      Switch from virDomainDeviceInfoPtr to virDevicePCIAddressPtr:
      qemuPCIAddressAsString
      qemuDomainPCIAddressCheckSlot
      qemuDomainPCIAddressReserveAddr
      qemuDomainPCIAddressReleaseAddr
      
      Switch from int slot to virDevicePCIAddressPtr:
      qemuDomainPCIAddressReserveSlot
      qemuDomainPCIAddressReleaseSlot
      qemuDomainPCIAddressGetNextSlot
      
      Deleted functions (they would take the same parameters
      as ReserveAddr/ReleaseAddr do now.)
      qemuDomainPCIAddressReserveFunction
      qemuDomainPCIAddressReleaseFunction
      bc28e56b
  4. 09 2月, 2013 1 次提交
  5. 08 2月, 2013 3 次提交
  6. 05 2月, 2013 1 次提交
    • D
      Introduce a virQEMUDriverConfigPtr object · b090aa7d
      Daniel P. Berrange 提交于
      Currently the virQEMUDriverPtr struct contains an wide variety
      of data with varying access needs. Move all the static config
      data into a dedicated virQEMUDriverConfigPtr object. The only
      locking requirement is to hold the driver lock, while obtaining
      an instance of virQEMUDriverConfigPtr. Once a reference is held
      on the config object, it can be used completely lockless since
      it is immutable.
      
      NB, not all APIs correctly hold the driver lock while getting
      a reference to the config object in this patch. This is safe
      for now since the config is never updated on the fly. Later
      patches will address this fully.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      b090aa7d
  7. 25 1月, 2013 1 次提交
    • J
      qemu: escape ipv6 for rbd network disk hosts · c1509ab4
      Josh Durgin 提交于
      Hosts for rbd are ceph monitor daemons. These have fixed IP addresses,
      so they are often referenced by IP rather than hostname for
      convenience, or to avoid relying on DNS. Using IPv4 addresses as the
      host name works already, but IPv6 addresses require rbd-specific
      escaping because the colon is used as an option separator in the
      string passed to qemu.
      
      Escape these colons, and enclose the IPv6 address in square brackets
      so it is distinguished from the port, which is currently mandatory.
      Acked-by: NOsier Yang <jyang@redhat.com>
      Signed-off-by: NJosh Durgin <josh.durgin@inktank.com>
      c1509ab4
  8. 24 1月, 2013 1 次提交
    • V
      S390: Enhance memballoon handling for virtio-s390 · 053e813a
      Viktor Mihajlovski 提交于
      The way in that memory balloon suppression was handled for S390
      is flawed for a number or reasons.
      1. Just preventing the default balloon to be created in the case
         of VIR_ARCH_S390[X] is not sufficient. An explicit memballoon
         element in the guest definition will still be honored, resulting
         both in a -balloon option and the allocation of a PCI bus address,
         neither being supported.
      2. Prohibiting balloon for S390 altogether at a domain_conf level
         is no good solution either as there's work in progress on the QEMU
         side to implement a virtio-balloon device, although in
         conjunction with a new machine type. Suppressing the balloon
         should therefore be done at the QEMU driver level depending
         on the present capabilities.
      
      Therefore we remove the conditional suppression of the default
      balloon in domain_conf.c.
      Further, we are claiming the memballoon device for virtio-s390
      during device address assignment to prevent it from being considered
      as a PCI device.
      Finally, we suppress the generation of the balloon command line option
      if this is a virtio-s390 machine.
      Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      053e813a
  9. 23 1月, 2013 1 次提交
    • A
      qemu: Support ram bar size for qxl devices · 55bfd020
      Alon Levy 提交于
      Adds a "ram" attribute globally to the video.model element, that changes
      the resulting qemu command line only if video.type == "qxl".
      
      <video>
        <model type='qxl' ram='65536' vram='65536' heads='1'/>
      </video>
      
      That attribute gets a default value of 64*1024. The schema is unchanged
      for other video element types.
      
      The resulting qemu command line change is the addition of
      
      -global qxl-vga.ram_size=<ram>*1024
      
      or
      
      -global qxl.ram_size=<ram>*1024
      
      For the main and secondary qxl devices respectively.
      
      The default for the qxl ram bar is 64*1024 kilobytes (the same as the
      default qxl vram bar size).
      55bfd020
  10. 10 1月, 2013 1 次提交
    • G
      qemu: add usb-serial support · e3a04455
      Guannan Ren 提交于
      Add an optional 'type' attribute to <target> element of serial port
      device. There are two choices for its value, 'isa-serial' and
      'usb-serial'. For backward compatibility, when attribute 'type' is
      missing the 'isa-serial' will be chosen as before.
      
      Libvirt XML sample
      
          <serial type='pty'>
            <target type='usb-serial' port='0'/>
            <address type='usb' bus='0' port='1'/>
          </serial>
      
      qemu commandline:
      
      qemu ${other_vm_args}              \
          -chardev pty,id=charserial0    \
          -device usb-serial,chardev=charserial0,id=serial0,bus=usb.0,port=1
      e3a04455
  11. 08 1月, 2013 1 次提交
  12. 21 12月, 2012 7 次提交
  13. 19 12月, 2012 3 次提交
  14. 17 12月, 2012 1 次提交
    • G
      qemu: use newer -device video device in qemu commandline · aa51202b
      Guannan Ren 提交于
      '-device VGA' maps to '-vga std'
      '-device cirrus-vga' maps to '-vga cirrus'
      '-device qxl-vga' maps to '-vga qxl'
                   (there is also '-device qxl' for secondary devices)
      '-device vmware-svga' maps to '-vga vmware'
      
      For qemu(>=1.2), we can use -device to replace -vga for video
      device. For the primary video device, the patch tries to use 0x2
      slot for matching old qemu. If the 0x2 slot is allocated already,
      the addr property could help for using any available slot.
      For qemu(< 1.2), we keep using -vga for primary device.
      aa51202b
  15. 12 12月, 2012 1 次提交
    • M
      bandwidth: Create hierarchical shaping classes · 67159f1c
      Michal Privoznik 提交于
      These classes can borrow unused bandwidth. Basically,
      only egress qdsics can have classes, therefore we can
      do this kind of traffic shaping only on host's outgoing,
      that is domain's incoming traffic.
      67159f1c
  16. 10 12月, 2012 1 次提交
  17. 07 12月, 2012 1 次提交
  18. 29 11月, 2012 1 次提交
  19. 27 11月, 2012 3 次提交
    • H
      qemu: Add support for gluster protocol based network storage backend. · c33c36d2
      Harsh Prateek Bora 提交于
      Qemu accepts gluster protocol as supported storage backend beside others.
      Signed-off-by: NHarsh Prateek Bora <harsh@linux.vnet.ibm.com>
      c33c36d2
    • H
      Add Gluster protocol as supported network disk backend · a2d2b80f
      Harsh Prateek Bora 提交于
      This patch introduces the RNG schema and updates necessary data strucutures
      to allow various hypervisors to make use of Gluster protocol as one of the
      supported network disk backend. Next patch will add support to make use of
      this feature in Qemu since it now supports Gluster protocol as one of the
      network based storage backend.
      
      Two new optional attributes for <host> element are introduced - 'transport'
      and 'socket'. Valid transport values are tcp, unix or rdma. If none specified,
      tcp is assumed. If transport is unix, socket specifies path to unix socket.
      
      This patch allows users to specify disks on gluster backends like this:
      
          <disk type='network' device='disk'>
            <driver name='qemu' type='raw'/>
            <source protocol='gluster' name='Volume1/image'>
              <host name='example.org' port='6000' transport='tcp'/>
            </source>
            <target dev='vda' bus='virtio'/>
          </disk>
      
          <disk type='network' device='disk'>
            <driver name='qemu' type='raw'/>
            <source protocol='gluster' name='Volume2/image'>
              <host transport='unix' socket='/path/to/sock'/>
            </source>
            <target dev='vdb' bus='virtio'/>
          </disk>
      Signed-off-by: NHarsh Prateek Bora <harsh@linux.vnet.ibm.com>
      a2d2b80f
    • E
      build: avoid C99 for loop · 7e5aa78d
      Eric Blake 提交于
      Although we require various C99 features, we don't yet require a
      complete C99 compiler.  On RHEL 5, compilation complained:
      
      qemu/qemu_command.c: In function 'qemuBuildGraphicsCommandLine':
      qemu/qemu_command.c:4688: error: 'for' loop initial declaration used outside C99 mode
      
      * src/qemu/qemu_command.c (qemuBuildGraphicsCommandLine): Declare
      variable sooner.
      * src/qemu/qemu_process.c (qemuProcessInitPasswords): Likewise.
      7e5aa78d
  20. 22 11月, 2012 1 次提交
    • M
      conf: Report sensible error for invalid disk name · 03cd6e4a
      Martin Kletzander 提交于
      The error "... but the cause is unknown" appeared for XMLs similar to
      this:
      
       <disk type='file' device='cdrom'>
         <driver name='qemu' type='raw'/>
         <source file='/dev/zero'/>
         <target dev='sr0'/>
       </disk>
      
      Notice unsupported disk type (for the driver), but also no address
      specified. The first part is not a problem and we should not abort
      immediately because of that, but the combination with the address
      unknown was causing an unspecified error.
      
      While fixing this, I added an error to one place where this return
      value was not managed properly.
      03cd6e4a
  21. 21 11月, 2012 3 次提交
  22. 15 11月, 2012 1 次提交
  23. 14 11月, 2012 1 次提交
  24. 06 11月, 2012 2 次提交
    • M
      qemu: Add controllers in specified order · 0f720ab3
      Michal Privoznik 提交于
      qemu is sensitive to the order of arguments passed. Hence, if a
      device requires a controller, the controller cmd string must
      precede device cmd string. The same apply for controllers, when
      for instance ccid controller requires usb controller. So
      controllers create partial ordering in which they should be added
      to qemu cmd line.
      0f720ab3
    • M
      qemu: Wrap controllers code into dummy loop · 77b93dbc
      Michal Privoznik 提交于
      which just re-indent code and prepare it for next patch.
      77b93dbc