1. 26 10月, 2010 1 次提交
    • J
      qemu: Fix detection of drive readonly option · 69b75521
      Jiri Denemark 提交于
      So far, readonly=on option is used when qemu supports -device. However,
      there are qemu versions which support readonly option with -drive
      although they don't have support for -device.
      69b75521
  2. 20 10月, 2010 1 次提交
    • J
      Add process= support for 'qemu-kvm -name' · c08c7b01
      John Morrissey 提交于
      This sets the process name to the same value as the Windows title,
      but since the name is limited to 16 chars only this is kept as a
      configuration option and turned off by default
      * src/qemu/qemu.conf src/qemu/qemu_conf.[ch]: hceck for support in the
        QEmu help output, add the option in qemu conf file and augment
        qemudBuildCommandLine to add it if switched on
      * src/qemu/libvirtd_qemu.aug src/qemu/test_libvirtd_qemu.aug: augment
        the augeas lenses accordingly
      * tests/qemuhelptest.c: cope with the extra flag being detected now
      c08c7b01
  3. 13 10月, 2010 2 次提交
    • D
      Enable support for nested SVM · f98a6cd6
      Daniel P. Berrange 提交于
      This enables support for nested SVM using the regular CPU
      model/features block. If the CPU model or features include
      'svm', then the '-enable-nesting' flag will be added to the
      QEMU command line. Latest out of tree patches for nested
      'vmx', no longer require the '-enable-nesting' flag. They
      instead just look at the cpu features. Several of the models
      already include svm support, but QEMU was just masking out
      the svm bit silently. So this will enable SVM on such
      models
      
      * src/qemu/qemu_conf.h: flag for -enable-nesting
      * src/qemu/qemu_conf.c: Use -enable-nesting if VMX or SVM are in
        the CPUID
      * src/cpu/cpu.h, src/cpu/cpu.c: API to check for a named feature
      * src/cpu/cpu_x86.c: x86 impl of feature check
      * src/libvirt_private.syms: Add cpuHasFeature
      * src/qemuhelptest.c: Add nesting flag where required
      f98a6cd6
    • D
      Implement support for virtio plan9fs filesystem passthrough in QEMU · a5c646a7
      Daniel P. Berrange 提交于
      Make use of the existing <filesystem> element to support plan9fs
      filesystem passthrough in the QEMU driver
      
          <filesystem type='mount'>
            <source dir='/export/to/guest'/>
            <target dir='/import/from/host'/>
          </filesystem>
      
      NB, the target is not actually a directory, it is merely a arbitrary
      string tag that is exported to the guest as a hint for where to mount
      it.
      a5c646a7
  4. 23 8月, 2010 1 次提交
    • D
      Add support for -enable-kqemu flag · 6e44ec7a
      Daniel P. Berrange 提交于
      Previously QEMU enabled KQEMU by default and had -no-kqemu.
      0.11.x switched to requiring -enable-kqemu. 0.12.x dropped
      kqemu entirely. This patch adds support for -enable-kqemu
      so 0.11.x works. It replaces a huge set of if() with a
      switch() to make the code a bit more readable.
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Support
        -enable-kqemu
      6e44ec7a
  5. 28 7月, 2010 1 次提交
    • C
      qemu: Allow setting boot menu on/off · 4f24ca01
      Cole Robinson 提交于
      Add a new element to the <os> block:
      
        <bootmenu enable="yes|no"/>
      
      Which maps to -boot,menu=on|off on the QEMU command line.
      
      I decided to use an explicit 'enable' attribute rather than just make the
      bootmenu element boolean. This allows us to treat lack of a bootmenu element
      as 'use hypervisor default'.
      4f24ca01
  6. 24 7月, 2010 1 次提交
    • C
      Qemu arbitrary command-line arguments. · 869939a5
      Chris Lalancette 提交于
      Implement the qemu hooks for XML namespace data.  This
      allows us to specify a qemu XML namespace, and then
      specify:
      
      <qemu:commandline>
       <qemu:arg value='arg'/>
       <qemu:env name='name' value='value'/>
      </qemu:commandline>
      
      In the domain XML.
      
      Changes since v1:
       - Change the <qemu:arg>arg</qemu:arg> XML to <qemu:arg value='arg'/> XML
       - Fix up some memory leaks in qemuDomainDefNamespaceParse
       - Rename num_extra and extra to num_args and args, respectively
       - Fixed up some error messages
       - Make sure to escape user-provided data in qemuDomainDefNamespaceFormatXML
      
      Changes since v2:
       - Add checking to ensure environment variable names are valid
       - Invert the logic in qemuDomainDefNamespaceFormatXML to return early
      
      Changes since v3:
       - Change strspn() to c_isalpha() check of first letter of environment variable
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      869939a5
  7. 21 7月, 2010 1 次提交
    • D
      Explicitly represent balloon device in XML and handle PCI address · b2f18635
      Daniel P. Berrange 提交于
      To allow compatibility with older QEMU PCI device slot assignment
      it is necessary to explicitly track the balloon device in the
      XML. This introduces a new device
      
         <memballoon model='virtio|xen'/>
      
      It can also have a PCI address, auto-assigned if necessary.
      
      The memballoon will be automatically added to all Xen and QEMU
      guests by default.
      
      * docs/schemas/domain.rng: Add <memballoon> element
      * src/conf/domain_conf.c, src/conf/domain_conf.h: parsing
        and formatting for memballoon device. Always add a memory
        balloon device to Xen/QEMU if none exists in XML
      * src/libvirt_private.syms: Export memballoon model APIs
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Honour the
        PCI device address in memory balloon device
      * tests/*: Update to test new functionality
      b2f18635
  8. 20 7月, 2010 1 次提交
  9. 13 7月, 2010 1 次提交
  10. 25 6月, 2010 1 次提交
    • L
      Check for presence of qemu -nodefconfig option before using it · 7d02393b
      Laine Stump 提交于
      We previously assumed that if the -device option existed in qemu, that
      -nodefconfig would also exist. It turns out that isn't the case, as
      demonstrated by qemu-kvm-0.12.3 in Fedora 13.
      
      */src/qemu/qemu_conf.[hc] - add a new QEMUD_CMD_FLAG, set it via the
                                  help output, and check it before adding
                                  -nodefconfig to the qemu commandline.
      7d02393b
  11. 02 6月, 2010 1 次提交
  12. 27 5月, 2010 1 次提交
    • A
      Pass pre-opened PCI device sysfs config file to QEMU · c444af1a
      Alex Williamson 提交于
      This allows libvirt to open the PCI device sysfs config file prior
      to dropping privileges so qemu can access the full config space.
      Without this, a de-privileged qemu can only access the first 64
      bytes of config space.
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Detect support
        for pci-assign.configfd option. Use this option when formatting
        PCI device string if possible
      * src/qemu/qemu_driver.c: Pre-open PCI sysfs config file and pass
        to QEMU
      c444af1a
  13. 26 5月, 2010 1 次提交
    • S
      vepa: parsing for 802.1Qb{g|h} XML · a8f75d2c
      Stefan Berger 提交于
      This patch parses the following two XML descriptions, one for
      802.1Qbg and one for 802.1Qbh, and stores the data internally.
      The actual triggering of the switch setup protocol has not been
      implemented here but the relevant code to do that should go into
      the functions associatePortProfileId() and disassociatePortProfileId().
      
         <interface type='direct'>
            <source dev='eth0.100' mode='vepa'/>
            <model type='virtio'/>
            <virtualport type='802.1Qbg'>
              <parameters managerid='12' typeid='0x123456' typeidversion='1'
               instanceid='fa9b7fff-b0a0-4893-8e0e-beef4ff18f8f'/>
            </virtualport>
            <filterref filter='clean-traffic'/>
          </interface>
      
          <interface type='direct'>
            <source dev='eth0.100' mode='vepa'/>
            <model type='virtio'/>
            <virtualport type='802.1Qbh'>
              <parameters profileid='my_profile'/>
            </virtualport>
          </interface>
      
      I'd suggest to use this patch as a base for triggering the setup
      protocol with the 802.1Qb{g|h} switch.
      
      Several rounds of changes were made to this patch. The
      following is a list of these changes.
      - Renamed structure virVirtualPortProfileDef to virVirtualPortProfileParams
        as per Daniel Berrange's request
      - Addressing Daniel Berrange's comments:
       - removing macvtap.h's dependency on domain_conf.h by
         moving the virVirtualPortProfileDef structure into macvtap.h
         and not passing virtDomainNetDefPtr to any functions in
         macvtap.c
      - Addressed most of Chris Wright's comments:
        - indicating error in case virtualport XML node cannot be parsed
          properly
        - parsing hex and decimal numbers using virStrToLong_ui() with
          parameter '0' for base
        - tgifname (target interface name) variable wasn't necessary
          to pass to openMacvtapTap function anymore
      - assigning the virtual port data structure to the virDomainNetDef
        only if it was previously parsed
      - make sure that the error code returned by openMacvtapTap() is a negative n
        in case the associatePortProfileId() function failed.
      - renaming vsi in the XML to virtualport
      - replace all occurrences of vsi in the source as well
      - removing mode and MAC address parameters from the functions that
        will communicate with the hareware diretctly or indirectly
      - moving the associate and disassociate functions to the end of the
        file for subsequent patches to easier make them generally available
        for export
      - passing the macvtap interface name rather than the link device since
        this otherwise gives funny side effects when using netlink messages
        where IFLA_IFNAME and IFLA_ADDRESS are specified and the link dev
        all of a sudden gets the MAC address of the macvtap interface.
      - Removing rc = -1 error indications in the case of 802.1Qbg|h setup in case
        we wanted to use hook scripts for the setup and so the setup doesn't fail
        here.
      - if instance ID UUID is not supplied it will automatically be generated
        - adapted schema to make instance ID UUID optional
        - added test case
      - parser and XML generator have been separated into their own
        functions so they can be re-used elsewhere (passthrough case
        for example)
      - Adapted XML parser and generator support the above shown type
        (802.1Qbg, 802.1Qbh).
      - Adapted schema to above XML
      - Adapted test XML to above XML
      - Passing through the VM's UUID which seems to be necessary for
        802.1Qbh -- sorry no host UUID
      - adding virtual function ID to association function, in case it's
        necessary to use (for SR-IOV)
      a8f75d2c
  14. 25 5月, 2010 1 次提交
    • C
      qemu: Allow using regular audio backends with VNC · fb3ebd03
      Cole Robinson 提交于
      Currently all host audio backends are disabled if a VM is using VNC, in
      favor of the QEMU VNC audio extension. Unfortunately no released VNC
      client supports this extension, so users have no way of getting audio
      to work if using VNC.
      
      Add a new config option in qemu.conf which allows changing libvirt's
      behavior, but keep the default intact.
      
      v2: Fix doc typos, change name to vnc_allow_host_audio
      fb3ebd03
  15. 22 5月, 2010 1 次提交
    • J
      Fix race in finding available vnc port · ba196952
      Jim Fehlig 提交于
      The qemu driver contains a subtle race in the logic to find next
      available vnc port.  Currently it iterates through all available ports
      and returns the first for which bind(2) succeeds.  However it is possible
      that a previously issued port has not yet been bound by qemu, resulting
      in the same port used for a subsequent domain.
      
      This patch addresses the race by using a simple bitmap to "reserve" the
      ports allocated by libvirt.
      
      V2:
        - Put port bitmap in struct qemud_driver
        - Initialize bitmap in qemudStartup
      
      V3:
        - Check for failure of virBitmapGetBit
        - Additional check for port != -1 before calling virbitmapClearBit
      
      V4:
        - Check for failure of virBitmap{Set,Clear}Bit
      ba196952
  16. 20 5月, 2010 1 次提交
  17. 18 5月, 2010 1 次提交
    • E
      qemu_conf: fix flag value · f30ccb24
      Eric Blake 提交于
      (gdb) p/x QEMUD_CMD_FLAG_VNET_HOST
      $7 = 0xffffffff80000000
      
      Oops - that meant we were incorrectly setting QEMU_CMD_FLAG_RTC_TD_HACK
      for qemu-kvm-0.12.3 (and probably botching a few other settings as well).
      
      Fixes Red Hat BZ#592070
      
      * src/qemu/qemu_conf.h (QEMUD_CMD_FLAG_VNET_HOST): Avoid sign
      extension.
      * tests/qemuhelpdata/qemu-kvm-0.12.3: New file.
      * tests/qemuhelptest.c (mymain): Add another case.
      f30ccb24
  18. 16 4月, 2010 2 次提交
    • D
      Fix CDROM media change for QEMU when using -device syntax · c4896d37
      Daniel P. Berrange 提交于
      Disk devices in QEMU have two parts, the guest device and the host
      backend driver. Historically these two parts have had the same
      "unique" name. With the switch to using -device though, they now
      have separate names. Thus when changing CDROM media, for guests
      using -device syntax, we need to prepend the QEMU_DRIVE_HOST_PREFIX
      constant
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Add helper function
        qemuDeviceDriveHostAlias() for building a host backend alias
      * src/qemu/qemu_driver.c: Use qemuDeviceDriveHostAlias() to determine
        the host backend alias for performing eject/change commands in the
        monitor
      c4896d37
    • D
      Update QEMU device_add command in JSON mode · db336caa
      Daniel P. Berrange 提交于
      The device_add command was added in JSON mode in a way I didn't
      expect. Instead of passing the normal device string to the JSON
      command:
      
          { "execute": "device_add", "arguments": { "device": "ne2k_pci,id=nic.1,netdev=net.1" } }
      
      We need to split up the device string into a full JSON object
      
          { "execute": "device_add", "arguments": { "driver": "ne2k_pci", "id": "nic.1", "netdev": "net.1" } }
      
      * src/qemu/qemu_conf.h, src/qemu/qemu_conf.c: Rename the
        qemuCommandLineParseKeywords method to qemuParseKeywords
        and export it to monitor
      * src/qemu/qemu_monitor_json.c: Split up device string into
        a JSON object for device_add command
      db336caa
  19. 05 4月, 2010 1 次提交
  20. 04 4月, 2010 1 次提交
    • D
      Implement managed save operations for qemu driver · 6e41f30e
      Daniel Veillard 提交于
      The images are saved in /var/lib/libvirt/qemu/save/
      and named $domainname.save . The directory is created appropriately
      at daemon startup. When a domain is started while a saved image is
      available, libvirt will try to load this saved image, and start the
      domain as usual in case of failure. In any case the saved image is
      discarded once the domain is created.
      
      * src/qemu/qemu_conf.h: adds an extra save path to the driver config
      * src/qemu/qemu_driver.c: implement the 3 new operations and handling
        of the image directory
      6e41f30e
  21. 30 3月, 2010 1 次提交
  22. 19 3月, 2010 1 次提交
    • L
      Support vhost-net mode at qemu startup for virtio network devices · 598a0c00
      Laine Stump 提交于
      Attempt to turn on vhost-net mode for devices of type NETWORK, BRIDGE,
      and DIRECT (macvtap).
      
      * src/qemu/qemu_conf.h: add vhostfd to qemuBuildHostNetStr prototype
        add qemudOpenVhostNet prototype new flag to set when :,vhost=" found in
        qemu help
      * src/qemu/qemu_conf.c: * set QEMUD_CMD_FLAG_VNET_HOST is ",vhost=" found
        in qemu help
         - qemudOpenVhostNet - opens /dev/vhost-net to pass to qemu if everything
           is in place to use it.
         - qemuBuildHostNetStr - add vhostfd to commandline if it's not empty
           (higher levels decide whether or not to fill it in)
         - qemudBuildCommandLine - if /dev/vhost-net is successfully opened, add
           its fd to tapfds array so it isn't closed on qemu exec, and populate
           vhostfd_name to be passed in to commandline builder.
      * src/qemu/qemu_driver.c: add filler 0 for new arg to qemuBuildHostNetStr,
        along with a note that this must be implemented in order for hot-plug of
        vhost-net virtio devices to work properly (once qemu "netdev_add" monitor
        command is implemented).
      598a0c00
  23. 10 3月, 2010 1 次提交
  24. 08 3月, 2010 1 次提交
    • E
      build: consistently use C99 varargs macros · 2e56fb2b
      Eric Blake 提交于
      Prior to this patch, there was an inconsistent mix between GNU and C99.
      
      For consistency, and potential portability to other compilers, stick
      with the C99 vararg macro syntax.
      
      * src/conf/cpu_conf.c (virCPUReportError): Use C99 rather than GNU
        vararg macro syntax.
      * src/conf/domain_conf.c (virDomainReportError): Likewise.
      * src/conf/domain_event.c (eventReportError): Likewise.
      * src/conf/interface_conf.c (virInterfaceReportError): Likewise.
      * src/conf/network_conf.c (virNetworkReportError): Likewise.
      * src/conf/node_device_conf.h (virNodeDeviceReportError): Likewise.
      * src/conf/secret_conf.h (virSecretReportError): Likewise.
      * src/conf/storage_conf.h (virStorageReportError): Likewise.
      * src/esx/esx_device_monitor.c (ESX_ERROR): Use C99 rather than
        GNU vararg macro syntax.
      * src/esx/esx_driver.c (ESX_ERROR): Likewise.
      * src/esx/esx_interface_driver.c (ESX_ERROR): Likewise.
      * src/esx/esx_network_driver.c (ESX_ERROR): Likewise.
      * src/esx/esx_secret_driver.c (ESX_ERROR): Likewise.
      * src/esx/esx_storage_driver.c (ESX_ERROR): Likewise.
      * src/esx/esx_util.c (ESX_ERROR): Likewise.
      * src/esx/esx_vi.c (ESX_VI_ERROR): Likewise.
      * src/esx/esx_vi_methods.c (ESX_VI_ERROR): Likewise.
      * src/esx/esx_vi_types.c (ESX_VI_ERROR): Likewise.
      * src/esx/esx_vmx.c (ESX_ERROR): Likewise.
      * src/util/hostusb.c (usbReportError): Use C99 rather than GNU
        vararg macro syntax.
      * src/util/json.c (virJSONError): Likewise.
      * src/util/macvtap.c (ReportError): Likewise.
      * src/util/pci.c (pciReportError): Likewise.
      * src/util/stats_linux.c (virStatsError): Likewise.
      * src/util/util.c (virUtilError): Likewise.
      * src/util/xml.c (virXMLError): Likewise.
      * src/xen/proxy_internal.c (virProxyError): Use C99 rather than
        GNU vararg macro syntax.
      * src/xen/sexpr.c (virSexprError): Likewise.
      * src/xen/xen_driver.c (xenUnifiedError): Likewise.
      * src/xen/xen_hypervisor.c (virXenError): Likewise.
      * src/xen/xen_inotify.c (virXenInotifyError): Likewise.
      * src/xen/xend_internal.c (virXendError): Likewise.
      * src/xen/xm_internal.c (xenXMError): Likewise.
      * src/xen/xs_internal.c (virXenStoreError): Likewise.
      * src/cpu/cpu.h (virCPUReportError): Use C99 rather than GNU
        vararg macro syntax.
      * src/datatypes.c (virLibConnError): Likewise.
      * src/interface/netcf_driver.c (interfaceReportError): Likewise.
      * src/libvirt.c (virLibStreamError): Likewise.
      * src/lxc/lxc_conf.h (lxcError): Likewise.
      * src/network/bridge_driver.c (networkReportError): Likewise.
      * src/nodeinfo.c (nodeReportError): Likewise.
      * src/opennebula/one_conf.h (oneError): Likewise.
      * src/openvz/openvz_conf.h (openvzError): Likewise.
      * src/phyp/phyp_driver.c (PHYP_ERROR): Likewise.
      * src/qemu/qemu_conf.h (qemuReportError): Likewise.
      * src/remote/remote_driver.c (errorf): Likewise.
      * src/security/security_driver.h (virSecurityReportError): Likewise.
      * src/test/test_driver.c (testError): Likewise.
      * src/uml/uml_conf.h (umlReportError): Likewise.
      * src/vbox/vbox_driver.c (vboxError): Likewise.
      * src/vbox/vbox_tmpl.c (vboxError): Likewise.
      2e56fb2b
  25. 02 3月, 2010 1 次提交
    • 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
  26. 26 2月, 2010 1 次提交
  27. 19 2月, 2010 3 次提交
    • 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
  28. 16 2月, 2010 1 次提交
    • 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
  29. 11 2月, 2010 1 次提交
    • D
      Fix disk stats retrieval with QEMU >= 0.12 · 73579750
      Daniel P. Berrange 提交于
      With QEMU >= 0.12 the host and guest side of disks no longer have
      the same naming convention. Specifically the host side will now
      get a 'drive-' prefix added to its name. The 'info blockstats'
      monitor command returns the host side name, so it is neccessary
      to strip this off when looking up stats since libvirt stores the
      guest side name !
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Move 'drive-' prefix
        string to a defined constant
      * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_text.c: Strip
        off 'drive-' prefix (if found) when looking up disk stats
      73579750
  30. 10 2月, 2010 3 次提交
    • D
      Annotate some virConnectPtr as mandatory non-null · 38536d6f
      Daniel P. Berrange 提交于
      Use the ATTRIBUTE_NONNULL annotation to mark some virConnectPtr
      args as mandatory non-null so the compiler can warn of mistakes
      
      * src/conf/domain_event.h: All virConnectPtr args must be non-null
      * src/qemu/qemu_conf.h: qemudBuildCommandLine and
        qemudNetworkIfaceConnect() must be given non-null connection
      * tests/qemuxml2argvtest.c: Provide a non-null (dummy) connection to
        qemudBuildCommandLine()
      38536d6f
    • D
      Convert qemu command line flags to 64-bit int · 910b019f
      Daniel P. Berrange 提交于
      The QEMU flags are commonly stored as a signed or unsigned int,
      allowing only 31 flags. This limit is rather close, so to aid
      future patches, change it to a 64-bit int
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h, src/qemu/qemu_driver.c,
        tests/qemuargv2xmltest.c, tests/qemuhelptest.c, tests/qemuxml2argvtest.c:
        Use 'unsigned long long' for QEMU flags
      910b019f
    • D
      caa805ea
  31. 09 2月, 2010 1 次提交
  32. 03 2月, 2010 3 次提交
    • 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