1. 07 1月, 2010 1 次提交
    • A
      qemu: Always enable the virtio balloon driver · 7a90f216
      Adam Litke 提交于
      The behavior for the qemu balloon device has changed.  Formerly, a virtio
      balloon device was provided by default.  Now, '-balloon virtio' must be
      specified on the command line to enable it.  This patch causes libvirt to
      add '-balloon virtio' to the command line whenever the -balloon option is
      available.
      * src/qemu/qemu_conf.c src/qemu/qemu_conf.h: check for the new flag and
        add "-baloon vitio" to qemu command when needed
      * tests/qemuhelptest.c: add the new flag for detection
      7a90f216
  2. 22 12月, 2009 2 次提交
  3. 18 12月, 2009 1 次提交
  4. 16 12月, 2009 1 次提交
  5. 14 12月, 2009 1 次提交
    • M
      Make QEMU driver use -chardev everywhere if available · a8eb010e
      Matthew Booth 提交于
      Change -monitor, -serial and -parallel output to use -chardev if it is
      available.
      * src/qemu/qemu_conf.c: Update qemudBuildCommandLine to use -chardev where
        available.
      * tests/qemuxml2argvtest.c tests/qemuxml2argvdata/: Add -chardev equivalents
        for all current serial and parallel tests.
      a8eb010e
  6. 10 12月, 2009 1 次提交
    • M
      Add virBufferFreeAndReset() and replace free() · 1b9d0744
      Matthias Bolte 提交于
      Replace free(virBufferContentAndReset()) with virBufferFreeAndReset().
      Update documentation and replace all remaining calls to free() with
      calls to VIR_FREE(). Also add missing calls to virBufferFreeAndReset()
      and virReportOOMError() in OOM error cases.
      1b9d0744
  7. 08 12月, 2009 1 次提交
    • D
      Support for JSON mode monitor · 3a4f172f
      Daniel P. Berrange 提交于
      Initial support for the new QEMU monitor protocol  using JSON
      as the data encoding format instead of plain text
      
      * po/POTFILES.in: Add src/qemu/qemu_monitor_json.c
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Hack to turn on QMP
        mode. Replace with a version number check on >= 0.12 later
      * src/qemu/qemu_monitor.c: Delegate to json monitor if enabled
      * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h: Add
        impl of QMP protocol
      * src/Makefile.am: Add src/qemu/qemu_monitor_json.{c,h}
      3a4f172f
  8. 24 11月, 2009 1 次提交
  9. 23 11月, 2009 1 次提交
    • D
      Support QEMU's virtual FAT block device driver · e7c78b0a
      Daniel P. Berrange 提交于
      Introduce a new type="dir"  mode for <disks> that allows use of
      QEMU's  virtual FAT block device driver. eg
      
          <disk type='dir' device='floppy'>
            <source dir='/tmp/test'/>
            <target dev='fda' bus='fdc'/>
            <readonly/>
          </disk>
      
      gets turned into
      
        -drive file=fat:floppy:/tmp/test,if=floppy,index=0
      
      Only read-only disks are supported with virtual FAT mode
      
      * src/conf/domain_conf.c, src/conf/domain_conf.h: Add type="dir"
      * docs/schemas/domain.rng: Document new disk type
      * src/xen/xend_internal.c, src/xen/xm_internal.c: Raise error for
        unsupported disk types
      * tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.args: Fix
        empty disk file handling
      * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.args,
        tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml,
        tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.args,
        tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml
        tests/qemuxml2argvtest.c: Test QEMU vitual FAT driver
      * src/qemu/qemu_conf.c: Support generating fat:/some/dir type
        disk args
      * src/security/security_selinux.c: Temporarily skip labelling
        of directory based disks
      e7c78b0a
  10. 20 11月, 2009 1 次提交
    • S
      qemu-kvm needs -enable-kvm flag for VT optimization · b827338a
      Steve Yarmie 提交于
      Recent qemu releases require command option '-enable-qemu' in order
      for the kvm functionality be activated. Libvirt needs to pass this flag
      to qemu when starting a domain. Note that without the option,
      even if both the kernel and qemu support KVM, KVM will not be activated
      and VMs will be very slow.
      
      * src/qemu/qemu_conf.h src/qemu/qemu_conf.c: parse the extra command
        line option from help and add it when running kvm
      * tests/qemuhelptest.c: this modified the flags output for qemu-0.10.5
        and qemu-kvm-0.11.0-rc2 regression tests
      b827338a
  11. 13 11月, 2009 1 次提交
  12. 12 11月, 2009 1 次提交
    • P
      Support for SATA Disks in virDomainDiskBus · 2e236074
      pritesh 提交于
      * src/conf/domain_conf.h src/conf/domain_conf.c: add the new entry in
        the enum and lists of virDomainDiskBus
      * src/qemu/qemu_conf.c: same for virDomainDiskQEMUBus
      2e236074
  13. 11 11月, 2009 1 次提交
  14. 10 11月, 2009 1 次提交
  15. 06 11月, 2009 2 次提交
  16. 05 11月, 2009 3 次提交
    • M
      Support for <channel> in domain and QEmu backend · af249ea4
      Matthew Booth 提交于
      allows the following to be specified in a domain:
      <channel type='pipe'>
        <source path='/tmp/guestfwd'/>
        <target type='guestfwd' address='10.0.2.1' port='4600'/>
      </channel>
      
      * proxy/Makefile.am: add network.c as dep of domain_conf.c
      * docs/schemas/domain.rng src/conf/domain_conf.[ch]: extend the domain
        schemas and the parsing/serialization side for the new construct
      
      QEmu support will add the following on the qemu command line:
       -chardev pipe,id=channel0,path=/tmp/guestfwd
       -net user,guestfwd=tcp:10.0.2.1:4600-chardev:channel0
      
      * src/qemu/qemu_conf.c: Add argument output for channel
      * tests/qemuxml2(argv|xml)test.c: Add test for <channel> domain syntax
      af249ea4
    • M
      Detect availability of QEMU -chardev CLI option · 74003968
      Matthew Booth 提交于
      * src/qemu/qemu_conf.h: defines a new QEMUD_CMD_FLAG_CHARDEV flag
      * src/qemu/qemu_conf.c: parse the output for -chardev and set flag
        appropriately
      74003968
    • M
      Allow character devices to have different target types · 89d549c3
      Matthew Booth 提交于
      A character device's target (it's interface in the guest) had only a
      single property: port. This patch is in preparation for adding targets
      which require other properties.
      Since this changes the conf type for character devices this affects
      a number of drivers:
      
      * src/conf/domain_conf.[ch] src/esx/esx_vmx.c src/qemu/qemu_conf.c
        src/qemu/qemu_driver.c src/uml/uml_conf.c src/uml/uml_driver.c
        src/vbox/vbox_tmpl.c src/xen/xend_internal.c src/xen/xm_internal.c:
        target properties are moved into a union in virDomainChrDef, and a
        targetType field is added to identify which union member should be
        used. All current code which touches a virDomainChrDef is updated both
        to use the new union field, and to populate targetType if necessary.
      89d549c3
  17. 04 11月, 2009 2 次提交
    • G
      add MAC address based port filtering to qemu · 0aa72ac6
      Gerhard Stenzel 提交于
      * src/qemu/qemu.conf src/qemu/qemu_conf.c src/qemu/qemu_conf.h: there is
        a new config type option for mac filtering
      * src/qemu/qemu_bridge_filter.[ch]: new module for the ebtable entry points
      * src/qemu/qemu_driver.c: plug the MAC filtering at the right places
        in the domain life cycle
      * src/Makefile.am po/POTFILES.in: add the new module
      0aa72ac6
    • C
      Various error reporting fixes · 4c44cdcc
      Cole Robinson 提交于
      - Don't duplicate SystemError
      - Use proper error code in domain_conf
      - Fix a broken error call in qemu_conf
      - Don't use VIR_ERR_ERROR in security driver (isn't a valid code in this case)
      4c44cdcc
  18. 03 11月, 2009 1 次提交
    • D
      Annotate many methods with ATTRIBUTE_RETURN_CHECK & fix problems · 46992453
      Daniel P. Berrange 提交于
      Nearly all of the methods in src/util/util.h have error codes that
      must be checked by the caller to correct detect & report failure.
      Add ATTRIBUTE_RETURN_CHECK to ensure compile time validation of
      this
      
      * daemon/libvirtd.c: Add explicit check on return value of virAsprintf
      * src/conf/domain_conf.c: Add missing check on virParseMacAddr return
        value status & report error
      * src/network/bridge_driver.c: Add missing OOM check on virAsprintf
        and report error
      * src/qemu/qemu_conf.c: Add missing check on virParseMacAddr return
        value status & report error
      * src/security/security_selinux.c: Remove call to virRandomInitialize
        that's done in libvirt.c already
      * src/storage/storage_backend_logical.c: Add check & log on virRun
        return status
      * src/util/util.c: Add missing checks on virAsprintf/Run status
      * src/util/util.h: Annotate all methods with ATTRIBUTE_RETURN_CHECK
        if they return an error status code
      * src/vbox/vbox_tmpl.c: Add missing check on virParseMacAddr
      * src/xen/xm_internal.c: Add missing checks on virAsprintf
      * tests/qemuargv2xmltest.c: Remove bogus call to virRandomInitialize()
      46992453
  19. 27 10月, 2009 1 次提交
  20. 21 10月, 2009 1 次提交
  21. 15 10月, 2009 1 次提交
    • M
      Don't copy old machines from a domain which has none · 2210f8a3
      Mark McLoughlin 提交于
      If the the qemu and kvm binaries are the same, we don't include machine
      types in the kvm domain info.
      
      However, the code which refreshes the machine types info from the
      previous capabilities structure first looks at the kvm domain's info,
      finds it matches and then copies the empty machine types list over
      for the top-level qemu domain.
      
      That doesn't make sense, we shouldn't copy an empty machin types list.
      
      * src/qemu/qemu_conf.c: qemudGetOldMachinesFromInfo(): don't copy an
        empty machine types list.
      2210f8a3
  22. 30 9月, 2009 1 次提交
  23. 29 9月, 2009 3 次提交
    • D
      Allow control over QEMU audio backend · b08e6d38
      Daniel P. Berrange 提交于
      When using VNC for graphics + keyboard + mouse, we shouldn't
      then use the host OS for audio. Audio should go back over
      VNC.
      
      When using SDL for graphics, we should use the host OS for
      audio since that's where the display is. We need to allow
      certain QEMU env variables to be passed through to guest
      too to allow choice of QEMU audio backend.
      
      * qemud/libvirtd.sysconf: Mention QEMU/SDL audio env vars
      * src/qemu_conf.c: Passthrough QEMU/SDL audio env for SDL display,
        disable host audio for VNC display
      b08e6d38
    • D
      Add API for issuing 'host_net_add' monitor command · 4c10127b
      Daniel P. Berrange 提交于
      * src/qemu/qemu_conf.h, src/qemu/qemu_conf.c: Remove prefix arg
        from qemuBuildHostNetStr which is no longer required
      * src/qemu/qemu_driver.c: Refactor to use qemuMonitorAddHostNetwork()
        API for adding host network
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new
        qemuMonitorAddHostNetwork() method for adding host networks
      4c10127b
    • D
      Add API for issuing 'pci_add nic' monitor command · f8d54e7c
      Daniel P. Berrange 提交于
      * src/qemu/qemu_conf.c: Remove separator from qemuBuildNicStr()
        args, and remove hardcoded 'nic' prefix. Leave it upto callers
        instead
      * src/qemu/qemu_driver.c: Switch over to using the new
        qemuMonitorAddPCINetwork() method for NIC hotplug
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add new
        qemuMonitorAddPCINetwork API for PCI network device hotplug
      f8d54e7c
  24. 23 9月, 2009 1 次提交
    • C
      Introduce virStrncpy. · 03d777f3
      Chris Lalancette 提交于
      Add the virStrncpy function, which takes a dst string, source string,
      the number of bytes to copy and the number of bytes available in the
      dest string.  If the source string is too large to fit into the
      destination string, including the \0 byte, then no data is copied and
      the function returns NULL.  Otherwise, this function copies n bytes
      from source into dst, including the \0, and returns a pointer to the
      dst string.  This function is intended to replace all unsafe uses
      of strncpy in the code base, since strncpy does *not* guarantee that
      the buffer terminates with a \0.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      03d777f3
  25. 22 9月, 2009 2 次提交
    • D
      Fix handling of Xen(ner) detection · b81a7ece
      Daniel P. Berrange 提交于
      Latest upstream QEMU can be built with Xen support, which introduces
      a -xen-domid argument. This was  mistakenly detected as -domid due
      to old Xenner support. Adapt to cope with both syntax. Also only
      set domid if the virt type is xen, or the guest type is xen
      
      * src/qemu_conf.c, src/qemu_conf.h: Detect new -xen-domid flag in
        preference to -domid.
      * tests/qemuxml2argvdata/qemuxml2argv-bootloader.args,
        tests/qemuxml2argvdata/qemuxml2argv-input-xen.args: Add missing
        -domid param
      * tests/qemuxml2argvdata/qemuxml2argv-misc-uuid.args: Remove bogus
        -boot param.
      * tests/qemuxml2argvtest.c: Add missing QEMUD_CMD_FLAG_DOMID params
      b81a7ece
    • C
      aabafbea
  26. 21 9月, 2009 1 次提交
    • D
      Move QEMU driver to src/qemu/ · 58355a5b
      Daniel P. Berrange 提交于
      * src/qemu_conf.c, src/qemu_conf.h, src/qemu_driver.c,
        src/qemu_driver.h: Move to src/qemu/
      * daemon/qemud.c, src/Makefile.am, tests/qemuargv2xmltest.c,
        tests/qemuhelptest.c, tests/qemuxml2argvtest.c,
        tests/qemuxml2xmltest.c: Adapt for changed paths
      58355a5b
  27. 10 9月, 2009 4 次提交
    • D
      Fix more OOM handling bugs · cbe63e52
      Daniel P. Berrange 提交于
      * src/qemu_conf.c: Fix leak of values upon OOM
      * src/xend_internal.c: Fix missing check for OOM failure
      * tests/qemuargv2xmltest.c, tests/qemuxml2argvtest.c: Free
        stateDir upon exit to avoid leak
      cbe63e52
    • M
      Probe machine types from kvm binary too · 3e14a8dc
      Mark McLoughlin 提交于
      Currently we only probe the main qemu binary for machine types, but we
      should also probe the kvm binary.
      
      * src/qemu_conf.c: probe kvm binary machines in qemudCapsInitGuest()
      3e14a8dc
    • M
      Look up machine types from all domains in qemudGetOldMachines() · f5dd3bcd
      Mark McLoughlin 提交于
      Rather than just looking at the default domain info, look at all
      domains
      
      * src/qemu_conf.c: look at all domains in qemudGetOldMachines()
      f5dd3bcd
    • M
      Split up qemudGetOldMachines() · 44646747
      Mark McLoughlin 提交于
      We need to look at all the domain infos in guest capabilities, not
      just the defaults.
      
      In order to allow that, split out a qemudGetOldMachinesFromInfo()
      from qemudGetOldMachines(). We'll make more use of it in the next
      patch.
      
      * src/qemu_conf.c: split out qemudGetOldMachinesFromInfo() from
        qemudGetOldMachines()
      44646747
  28. 05 9月, 2009 1 次提交
  29. 04 9月, 2009 1 次提交
    • R
      Fix several memory leaks · 0cf672fa
      Ryota Ozaki 提交于
      * src/domain_conf.c src/network_conf.c src/qemu_conf.c
        src/storage_backend_fs.c: various problems spotted by valgrind
        through libvirt code
      0cf672fa