1. 09 3月, 2010 1 次提交
    • L
      Fix format string warnings · 618dc80c
      Laine Stump 提交于
      A few more non-literal format strings in error log messages have crept
      in. Fix them in the standard way - turn the format string into "%s"
      with the original string as the arg.
      618dc80c
  2. 02 3月, 2010 4 次提交
    • R
      Fix error messages when parsing USB devices in QEMU · bc0f737d
      Rolf Eike Beer 提交于
      A number of the error messages raised when parsing USB devices
      refered to PCI devices by mistake
      
      * src/qemu/qemu_conf.c: s/PCI/USB/ in qemuParseCommandLineUSB()
      bc0f737d
    • D
      Allow configurable timezones with QEMU · 74042b8f
      Daniel P. Berrange 提交于
      Allow an arbitrary timezone with QEMU by setting the $TZ environment
      variable when launching QEMU
      
      * src/qemu/qemu_conf.c: Set TZ environment variable if a timezone
        is requested
      * tests/qemuxml2argvtest.c: Add test case for timezones
      * tests/qemuxml2argvdata/qemuxml2argv-clock-france.xml,
        tests/qemuxml2argvdata/qemuxml2argv-clock-france.args: Data
        for timezone tests
      74042b8f
    • D
      Support variable clock offset mode in QEMU · 200c83b2
      Daniel P. Berrange 提交于
      This allows QEMU guests to be started with an arbitrary clock
      offset
      
      The test case can't actually be enabled, since QEMU argv expects
      an absolute timestring, and this will obviously change every
      time the test runs :-( Hopefully QEMU will allow a relative
      time offset in the future.
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Use the -rtc arg
        if available to support variable clock offset mode
      * tests/qemuhelptest.c: Add QEMUD_CMD_FLAG_RTC for qemu 0.12.1
      * qemuxml2argvdata/qemuxml2argv-clock-variable.args,
        qemuxml2argvdata/qemuxml2argv-clock-variable.xml,
        qemuxml2argvtest.c: Test case, except we can't actually enable
        it yet.
      200c83b2
    • D
      Change the internal domain conf representation of localtime/utc · eed2f8c3
      Daniel P. Berrange 提交于
      The XML will soon be extended to allow more than just a simple
      localtime/utc boolean flag. This change replaces the plain
      'int localtime' with a separate struct to prepare for future
      extension
      
      * src/conf/domain_conf.c, src/conf/domain_conf.h: Add a new
        virDomainClockDef structure
      * src/libvirt_private.syms: Export virDomainClockOffsetTypeToString
        and virDomainClockOffsetTypeFromString
      * src/qemu/qemu_conf.c, src/vbox/vbox_tmpl.c, src/xen/xend_internal.c,
        src/xen/xm_internal.c: Updated to use new structure for localtime
      eed2f8c3
  3. 01 3月, 2010 1 次提交
  4. 26 2月, 2010 1 次提交
  5. 19 2月, 2010 5 次提交
    • D
      qemu: Check for IA64 kvm · 269556e5
      Dustin Xiong 提交于
      ACPI feature bit dropped: I asked internally if the -no-acpi option
      had any meaning for IA64, and was told 'probably not'.
      269556e5
    • S
      macvtap mac_filter support · b3e7890a
      Stefan Berger 提交于
      This patch adds the mac_filter support to the macvtap device.
      b3e7890a
    • S
      macvtap IFF_VNET_HDR configuration · e52687e8
      Stefan Berger 提交于
      This patch sets or unsets the IFF_VNET_HDR flag depending on what device
      is used in the VM. The manipulation of the flag is done in the open
      function and is only fatal if the IFF_VNET_HDR flag could not be cleared
      although it has to be (or if an ioctl generally fails). In that case the
      macvtap tap is closed again and the macvtap interface torn.
      
      * src/qemu/qemu_conf.c src/qemu/qemu_conf.h: pass qemuCmdFlags to
        qemudPhysIfaceConnect()
      * src/util/macvtap.c src/util/macvtap.h: add vnet_hdr boolean to
        openMacvtapTap(), and private function configMacvtapTap()
      * src/qemu/qemu_driver.c: add extra qemuCmdFlags when calling
        qemudPhysIfaceConnect()
      e52687e8
    • M
      Add QEMU support for virtio channel · 3ec09478
      Matthew Booth 提交于
      Support virtio-serial controller and virtio channel in QEMU backend.
      Will output
      the following for virtio-serial controller:
      
      -device
      virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4,max_ports=16,vectors=4
      
      and the following for a virtio channel:
      
      -chardev pty,id=channel0 \
      -device
      virtserialport,bus=virtio-serial0.0,chardev=channel0,name=org.linux-kvm.port.0
      
      * src/qemu/qemu_conf.c: Add argument output for virtio
      * tests/qemuxml2argvtest.c
        tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.args: Add test for
        QEMU command line generation
      3ec09478
    • M
      Add domain support for virtio channel · 7813a0f8
      Matthew Booth 提交于
      Add support for virtio-serial by defining a new 'virtio' channel target type
      and a virtio-serial controller. Allows the following to be specified in a
      domain:
      
      <controller type='virtio-serial' index='0' ports='16' vectors='4'/>
      <channel type='pty'>
        <target type='virtio' name='org.linux-kvm.port.0'/>
        <address type='virtio-serial' controller='0' bus='0'/>
      </channel>
      
      * docs/schemas/domain.rng: Add virtio-serial controller and virtio
        channel type.
      * src/conf/domain_conf.[ch]: Domain parsing/serialization for
        virtio-serial controller and virtio channel.
      * tests/qemuxml2xmltest.c
        tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.xml: add domain xml
        parsing test
      * src/libvirt_private.syms src/qemu/qemu_conf.c:
        virDomainDefAddDiskControllers() renamed to
        virDomainDefAddImplicitControllers()
      7813a0f8
  6. 18 2月, 2010 2 次提交
    • C
      qemu: Explicitly error if guest virtual network is inactive · 3f745ebe
      Cole Robinson 提交于
      Currently we just error with ex. 'virbr0: No such device'.
      
      Since we are using public API calls here, we need to ensure that any
      raised error is properly saved and restored, since API entry points
      always reset messages.
      3f745ebe
    • S
      macvtap teardown rework · f162252e
      Stefan Berger 提交于
      Rework and simplification of teardown of the macvtap device.
      
      Basically all devices with the same MAC address and link device are kept
      alive and not attempted to be torn down. If a macvtap device linked to a
      physical interface with a certain MAC address 'M' is to be created it
      will automatically fail if the interface is 'up'ed and another macvtap
      with the same properties (MAC addr 'M', link dev) happens to be 'up'.
      This will prevent the VM from starting or the device from being attached
      to a running VM. Stale interfaces are assumed to be there for some
      reason and not stem from libvirt.
      
      In the VM shutdown path, it's assuming that an interface name is always
      available so that if the device type is DIRECT it can be torn down
      using its name.
      
      * src/util/macvtap.h src/libvirt_macvtap.syms: change of deleting routine
      * src/util/macvtap.c: cleanups and change of deleting routine
      * src/qemu/qemu_driver.c: change cleanup on shutdown
      * src/qemu/qemu_conf.c: don't delete Macvtap in qemudPhysIfaceConnect()
      f162252e
  7. 16 2月, 2010 2 次提交
    • D
      Fix check for primary IDE controller in QEMU PCI slot assignment · 9ab3fac8
      Daniel P. Berrange 提交于
      A typo in the check for the primary IDE controller could cause
      a crash on restore depending on the exact guest config.
      
      * src/qemu/qemu_conf.c: Fix s/video/controller/ typo & slot
        number typo
      9ab3fac8
    • S
      macvtap support for libvirt -- qemu support · a1b1ab14
      Stefan Berger 提交于
      This part adds support for qemu making a macvtap tap device available
      via file descriptor passed to qemu command line. This also attempts to
      tear down the macvtap device when a VM terminates. This includes support
      for attachment and detachment to/from running VM.
      * src/qemu/qemu_conf.[ch] src/qemu/qemu_driver.c: add support in the
        QEmu driver
      a1b1ab14
  8. 11 2月, 2010 3 次提交
  9. 10 2月, 2010 4 次提交
  10. 09 2月, 2010 3 次提交
  11. 04 2月, 2010 1 次提交
    • D
      Fix restore of QEMU guests with PCI device reservation · 83acdeaf
      Daniel P. Berrange 提交于
      When restoring from a saved guest image, the XML would already
      contain the PCI slot ID of the IDE controller & video card.
      The attempt to explicitly reserve this upfront would thus fail
      everytime.
      
      * src/qemu/qemu_conf.c: Reserve IDE controller / video card
        slot at time of need, rather than upfront
      83acdeaf
  12. 03 2月, 2010 6 次提交
    • D
      Fix QEMU hotplug device alias assignment · 719c50ca
      Daniel P. Berrange 提交于
      To allow devices to be hot(un-)plugged it is neccessary to ensure
      they all have a unique device aliases. This fixes the hotplug
      methods to assign device aliases before invoking the monitor
      commands which need them
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Expose methods
        for assigning device aliases for disks, host devices and
        controllers
      * src/qemu/qemu_driver.c: Assign device aliases when hotplugging
        all types of device
      * tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.args,
        tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device.args:
        Update for changed hostdev naming scheme
      719c50ca
    • D
      Re-arrange QEMU device alias assignment code · 16478459
      Daniel P. Berrange 提交于
      This patch re-arranges the QEMU device alias assignment code to
      make it easier to call into the same codeblock when performing
      device hotplug. The new code has the ability to skip over already
      assigned names to facilitate hotplug
      
      * src/qemu/qemu_driver.c: Call qemuAssignDeviceNetAlias()
        instead of qemuAssignNetNames
      * src/qemu/qemu_conf.h: Export qemuAssignDeviceNetAlias()
        instead of qemuAssignNetNames
      * src/qemu/qemu_driver.c: Merge the legacy disk/network alias
        assignment code into the main methods
      16478459
    • D
      Remove direct storage of hostnet_name & vlan · 0943048a
      Daniel P. Berrange 提交于
      The current way of assigning names to the host network backend and
      NIC device in QEMU was over complicated, by varying naming scheme
      based on the NIC model and backend type. This simplifies the naming
      to simply be 'net0' and 'hostnet0', allowing code to easily determine
      the host network name and vlan based off the primary device alias
      name 'net0'. This in turn allows removal of alot of QEMU specific
      code from the XML parser, and makes it easier to assign new unique
      names for NICs that are hotplugged
      
      * src/conf/domain_conf.c, src/conf/domain_conf.h: Remove hostnet_name
        and vlan fields from virNetworkDefPtr
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h, src/qemu/qemu_driver.c:
        Use a single network alias naming scheme regardless of NIC type
        or backend type. Determine VLANs from the alias name.
      * tests/qemuxml2argvdata/qemuxml2argv-net-eth-names.args,
        tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.args,
        tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.args: Update
        for new simpler naming scheme
      0943048a
    • D
      Remove use of -netdev arg with QEMU · 49a0f6cd
      Daniel P. Berrange 提交于
      The QEMU 0.12.x tree has the -netdev command line argument, but not
      corresponding monitor command. We can't enable the former, without
      the latter since it will break hotplug/unplug.
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Disable -netdev usage
        until 0.13 at earliest
      * tests/qemuxml2argvtest.c: Add test for -netdev syntax
      * tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.args,
        tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.xml: Test
        data files for -netdev syntax
      49a0f6cd
    • D
      Assign PCI addresses before hotplugging devices · d8acc446
      Daniel P. Berrange 提交于
      PCI disk, disk controllers, net devices and host devices need to
      have PCI addresses assigned before they are hot-plugged
      
      * src/qemu/qemu_conf.c: Add APIs for ensuring a device has an
        address and releasing unused addresses
      * src/qemu/qemu_driver.c: Ensure all devices have addresses
        when hotplugging.
      d8acc446
    • D
      Rewrite way QEMU PCI addresses are allocated · 9258ec0a
      Daniel P. Berrange 提交于
      The current QEMU code allocates PCI addresses incrementally starting
      at 4. This is not satisfactory because the user may have given some
      addresses in their XML config, which need to be skipped over when
      allocating addresses to remaining devices.
      
      It is thus neccessary to maintain a list of already allocated PCI
      addresses and then only allocate ones that remain unused. This is
      also required for domain device hotplug to work properly later.
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Add APIs for creating
        list of existing PCI addresses, and allocating new addresses.
        Refactor address assignment to use this code
      * src/qemu/qemu_driver.c: Pull PCI address assignment up into the
        qemuStartVMDaemon() method, as a prelude to moving it into the
        'define' method. Update list of allocated addresses when connecting
        to a running VM at daemon startup.
      * tests/qemuxml2argvtest.c, tests/qemuargv2xmltest.c,
        tests/qemuxml2xmltest.c: Remove USB product test since all
        passthrough is done based on address
      * tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.args,
        tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.xml: Kil
        unused data files
      9258ec0a
  13. 02 2月, 2010 2 次提交
    • D
      Split out QEMU code for building PCI/USB hostdev arg values · 96c8608d
      Daniel P. Berrange 提交于
      To allow for better code reuse from hotplug methods, the code for
      generating PCI/USB hostdev arg values is split out into separate
      methods
      
      * qemu/qemu_conf.h, qemu/qemu_conf.c: Introduce new APis for
        qemuBuildPCIHostdevPCIDevStr, qemuBuildUSBHostdevUsbDevStr
        and qemuBuildUSBHostdevDevStr
      96c8608d
    • D
      Standard internal API syntax for building QEMU command line arguments · c129d4fe
      Daniel P. Berrange 提交于
      All the helper functions for building command line arguments
      now return a 'char *', instead of acepting a 'char **' or
      virBufferPtr argument
      
      * qemu/qemu_conf.c: Standardize syntax for building args
      * qemu/qemu_conf.h: Export all functions for building args
      * qemu/qemu_driver.c: Update for changed syntax for building
        NIC/hostnet args
      c129d4fe
  14. 01 2月, 2010 2 次提交
    • M
      Clarify controllers -device string in QEMU driver · 09080c38
      Matthew Booth 提交于
      The QEMU driver contained code to generate a -device string for piix4-ide, but
      wasn't using it. This change removes this string generation. It also adds a
      comment explaining why IDE and FDC controllers don't generate -device strings.
      
      The change also generates an error if a sata controller is specified for a QEMU
      domain, as this isn't supported.
      
      * src/qemu/qemu_conf.c: Remove VIR_DOMAIN_CONTROLLER_TYPE_IDE handler in
        qemuBuildControllerDevStr(). Ignore IDE and FDC controllers. Error if
        SATA controller is discovered. Add comments.
      09080c38
    • C
      Look in /usr/libexec for the qemu-kvm binary. · b16cd226
      Chris Lalancette 提交于
      On RHEL-5 the qemu-kvm binary is located in /usr/libexec.
      To reduce confusion for people trying to run upstream libvirt
      on RHEL-5 machines, make the qemu driver look in /usr/libexec
      for the qemu-kvm binary.
      
      To make this work, I modified virFindFileInPath to handle an
      absolute path correctly.  I also ran into an issue where
      NULL was sometimes being passed for the file parameter
      to virFindFileInPath; it didn't crash prior to this patch
      since it was building paths like /usr/bin/(null).  This
      is non-standard behavior, though, so I added a NULL
      check at the beginning.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      b16cd226
  15. 26 1月, 2010 1 次提交
  16. 22 1月, 2010 1 次提交
  17. 21 1月, 2010 1 次提交
    • J
      avoid more format-related warnings · d47b6e54
      Jim Meyering 提交于
      * src/qemu/qemu_conf.c (qemuBuildDriveStr): Use "%s".
      * src/qemu/qemu_monitor_json.c (qemuMonitorJSONGetGuestPCIAddress):
      (qemuMonitorJSONGetGuestDriveAddress): Likewise.
      d47b6e54