1. 21 2月, 2011 1 次提交
    • E
      hash: make virHashFree more free-like · 03ba07cb
      Eric Blake 提交于
      Two-argument free functions are uncommon; match the style elsewhere
      by caching the callback at creation.
      
      * src/util/hash.h (virHashCreate, virHashFree): Move deallocator
      argument to creation.
      * cfg.mk (useless_free_options): Add virHashFree.
      * src/util/hash.c (_virHashTable): Track deallocator.
      (virHashCreate, virHashFree): Update to new signature.
      * src/conf/domain_conf.c (virDomainObjListDeinit)
      (virDomainObjListInit, virDomainDiskDefForeachPath)
      (virDomainSnapshotObjListDeinit, virDomainSnapshotObjListInit):
      Update callers.
      * src/conf/nwfilter_params.c (virNWFilterHashTableFree)
      (virNWFilterHashTableCreate): Likewise.
      * src/conf/nwfilter_conf.c (virNWFilterTriggerVMFilterRebuild):
      Likewise.
      * src/cpu/cpu_generic.c (genericHashFeatures, genericBaseline):
      Likewise.
      * src/xen/xm_internal.c (xenXMOpen, xenXMClose): Likewise.
      * src/nwfilter/nwfilter_learnipaddr.c (virNWFilterLearnInit)
      (virNWFilterLearnShutdown): Likewise.
      * src/qemu/qemu_command.c (qemuDomainPCIAddressSetCreate)
      (qemuDomainPCIAddressSetFree): Likewise.
      * src/qemu/qemu_process.c (qemuProcessWaitForMonitor): Likewise.
      03ba07cb
  2. 18 2月, 2011 6 次提交
    • J
      Do not add drive 'boot=on' param when a kernel is specified · efc2594b
      Jim Fehlig 提交于
      libvirt-tck was failing several domain tests [1] with qemu 0.14, which
      is now less tolerable of specifying 2 bootroms with the same boot index [2].
      
      Drop the 'boot=on' param if kernel has been specfied.
      
      [1] https://www.redhat.com/archives/libvir-list/2011-February/msg00559.html
      [2] http://lists.nongnu.org/archive/html/qemu-devel/2011-02/msg01892.html
      efc2594b
    • C
      remove duplicated call to reportOOMError · 50daaa0a
      Christophe Fergeau 提交于
      50daaa0a
    • C
      remove no longer needed calls to virReportOOMError · 9905c69e
      Christophe Fergeau 提交于
      Now that the virHash handling functions call virReportOOMError by
      themselves when needed, users of the virHash API no longer need to
      do it by themselves. Since users of the virHash API were not
      consistently calling virReportOOMError after memory failures from
      the virHash code, this has the added benefit of making OOM
      reporting from this code more consistent and reliable.
      9905c69e
    • L
      Allow brAddTap to create a tap device that is down · 13ae7a02
      Laine Stump 提交于
      An upcoming patch has a use for a tap device to be created that
      doesn't need to be actually put into the "up" state, and keeping it
      "down" keeps the output of ifconfig from being unnecessarily cluttered
      (ifconfig won't show down interfaces unless you add "-a").
      
      bridge.[ch]: add "up" as an arg to brAddTap()
      uml_conf.c, qemu_command.c: add "up" (set to "true") to brAddTap() call.
      13ae7a02
    • L
      Add txmode attribute to interface XML for virtio backend · e9bd5c0e
      Laine Stump 提交于
      This is in response to:
      
         https://bugzilla.redhat.com/show_bug.cgi?id=629662
      
      Explanation
      
      qemu's virtio-net-pci driver allows setting the algorithm used for tx
      packets to either "bh" or "timer". This is done by adding ",tx=bh" or
      ",tx=timer" to the "-device virtio-net-pci" commandline option.
      
      'bh' stands for 'bottom half'; when this is set, packet tx is all done
      in an iothread in the bottom half of the driver. (In libvirt, this
      option is called the more descriptive "iothread".)
      
      'timer' means that tx work is done in qemu, and if there is more tx
      data than can be sent at the present time, a timer is set before qemu
      moves on to do other things; when the timer fires, another attempt is
      made to send more data. (libvirt retains the name "timer" for this
      option.)
      
      The resulting difference, according to the qemu developer who added
      the option is:
      
          bh makes tx more asynchronous and reduces latency, but potentially
          causes more processor bandwidth contention since the cpu doing the
          tx isn't necessarily the cpu where the guest generated the
          packets.
      
      Solution
      
      This patch provides a libvirt domain xml knob to change the option on
      the qemu commandline, by adding a new attribute "txmode" to the
      <driver> element that can be placed inside any <interface> element in
      a domain definition. It's use would be something like this:
      
          <interface ...>
            ...
            <model type='virtio'/>
            <driver txmode='iothread'/>
            ...
          </interface>
      
      I chose to put this setting as an attribute to <driver> rather than as
      a sub-element to <tune> because it is specific to the virtio-net
      driver, not something that is generally usable by all network drivers.
      (note that this is the same placement as the "driver name=..."
      attribute used to choose kernel vs. userland backend for the
      virtio-net driver.)
      
      Actually adding the tx=xxx option to the qemu commandline is only done
      if the version of qemu being used advertises it in the output of
      
          qemu -device virtio-net-pci,?
      
      If a particular txmode is requested in the XML, and the option isn't
      listed in that help output, an UNSUPPORTED_CONFIG error is logged, and
      the domain fails to start.
      e9bd5c0e
    • L
      Restructure domain struct interface "driver" data for easier expansion · b670a412
      Laine Stump 提交于
      When the <driver> element (and its "name" attribute) was added to the
      domain XML's interface element, a "backend" enum was simply added to
      the toplevel of the virDomainNetDef struct.
      
      Ignoring the naming inconsistency ("name" vs. "backend"), this is fine
      when there's only a single item contained in the driver element of the
      XML, but doesn't scale well as we add more attributes that apply to
      the backend of the virtio-net driver, or add attributes applicable to
      other drivers.
      
      This patch changes virDomainNetDef in two ways:
      
      1) Rename the item in the struct from "backend" to "name", so that
         it's the same in the XML and in the struct, hopefully avoiding
         confusion for someone unfamiliar with the function of the
         attribute.
      
      2) Create a "driver" union within virDomainNetDef, and a "virtio"
         struct in that struct, which contains the "name" enum value.
      
      3) Move around the virDomainNetParse and virDomainNetFormat functions
         to allow for simple plugin of new attributes without disturbing
         existing code. (you'll note that this results in a seemingly
         redundant if() in the format function, but that will no longer be
         the case as soon as a 2nd attribute is added).
      
      In the future, new attributes for the virtio driver backend can be
      added to the "virtio" struct, and any other network device backend that
      needs an attribute will have its own struct added to the "driver"
      union.
      b670a412
  3. 17 2月, 2011 1 次提交
    • D
      Split all QEMU process mangement code into separate file · 48c2d6c6
      Daniel P. Berrange 提交于
      Move the qemudStartVMDaemon and qemudShutdownVMDaemon
      methods into a separate file, renaming them to
      qemuProcessStart, qemuProcessStop. All helper methods
      called by these are also moved & renamed to match
      
      * src/Makefile.am: Add qemu_process.c/.h
      * src/qemu/qemu_command.c: Add qemuDomainAssignPCIAddresses
      * src/qemu/qemu_command.h: Add VNC port min/max
      * src/qemu/qemu_domain.c, src/qemu/qemu_domain.h: Add
        domain event queue helpers
      * src/qemu/qemu_driver.c, src/qemu/qemu_driver.h: Remove
        all QEMU process startup/shutdown functions
      * src/qemu/qemu_process.c, src/qemu/qemu_process.h: Add
        all QEMU process startup/shutdown functions
      48c2d6c6
  4. 16 2月, 2011 2 次提交
  5. 15 2月, 2011 1 次提交
  6. 11 2月, 2011 1 次提交
    • W
      qemu: fix attach-interface regression · 6bf4788e
      Wen Congyang 提交于
      QEMUD_CMD_FLAG_PCI_MULTIBUS should be set in the function
      qemuCapsExtractVersionInfo()
      
      The flag QEMUD_CMD_FLAG_PCI_MULTIBUS is used in the function
      qemuBuildDeviceAddressStr(). All callers get qemuCmdFlags
      by the function qemuCapsExtractVersionInfo() except that
      testCompareXMLToArgvFiles() in qemuxml2argvtest.c.
      
      So we should set QEMUD_CMD_FLAG_PCI_MULTIBUS in the function
      qemuCapsExtractVersionInfo() instead of qemuBuildCommandLine()
      because the function qemuBuildCommandLine() does not be called
      when we attach a pci device.
      
      tests: set QEMUD_CMD_FLAG_PCI_MULTIBUS in testCompareXMLToArgvFiles()
      
      set QEMUD_CMD_FLAG_PCI_MULTIBUS before calling qemuBuildCommandLine()
      as the flags is not set by qemuCapsExtractVersionInfo().
      Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
      6bf4788e
  7. 05 2月, 2011 2 次提交
    • E
      spicevmc: support older -device spicevmc of qemu 0.13.0 · 5a3ec56b
      Eric Blake 提交于
      qemu 0.13.0 (at least as built for Fedora 14, and also backported to
      RHEL 6.0 qemu) supported an older syntax for a spicevmc channel; it's
      not as flexible (it has an implicit name and hides the chardev
      aspect), but now that we support spicevmc, we might as well target
      both variants.
      
      * src/qemu/qemu_capabilities.h (QEMUD_CMD_FLAG_DEVICE_SPICEVMC):
      New flag.
      * src/qemu/qemu_capabilities.c (qemuCapsParseDeviceStr): Set it
      correctly.
      * src/qemu/qemu_command.h (qemuBuildVirtioSerialPortDevStr): Drop
      declaration.
      * src/qemu/qemu_command.c (qemuBuildVirtioSerialPortDevStr): Alter
      signature, check flag.
      (qemuBuildCommandLine): Adjust caller and check flag.
      * tests/qemuhelptest.c (mymain): Update test.
      * tests/qemuxml2argvtest.c (mymain): New test.
      * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc-old.xml:
      New file.
      * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc-old.args:
      Likewise.
      5a3ec56b
    • E
      smartcard: add spicevmc support · 79f9267f
      Eric Blake 提交于
      Adds <smartcard mode='passthrough' type='spicevmc'/>, which uses the
      new <channel name='smartcard'/> of <graphics type='spice'>.
      
      * docs/schemas/domain.rng: Support new XML.
      * docs/formatdomain.html.in: Document it.
      * src/conf/domain_conf.h (virDomainGraphicsSpiceChannelName): New
      enum value.
      (virDomainChrSpicevmcName): New enum.
      (virDomainChrSourceDef): Distinguish spicevmc types.
      * src/conf/domain_conf.c (virDomainGraphicsSpiceChannelName): Add
      smartcard.
      (virDomainSmartcardDefParseXML): Parse it.
      (virDomainChrDefParseXML, virDomainSmartcardDefParseXML): Set
      spicevmc name.
      (virDomainChrSpicevmc): New enum conversion functions.
      * src/libvirt_private.syms: Export new functions.
      * src/qemu/qemu_command.c (qemuBuildChrChardevStr): Conditionalize
      name.
      * tests/qemuxml2argvtest.c (domain): New test.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-spicevmc.args:
      New file.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-spicevmc.xml:
      Likewise.
      79f9267f
  8. 04 2月, 2011 3 次提交
    • D
      spicevmc: support new qemu chardev · be87a123
      Daniel P. Berrange 提交于
      Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=615757
      
      Add a new character device backend for virtio serial channels that
      activates the QEMU spice agent on the main channel using the vdagent
      spicevmc connection.  The <target> must be type='virtio', and supports
      an optional name that specifies how the guest will see the channel
      (for now, name must be com.redhat.spice.0).
      
      <channel type='spicevmc'>
        <target type='virtio'/>
        <address type='virtio-serial' controller='1' bus='0' port='3'/>
      </channel>
      
      * docs/schemas/domain.rng: Support new XML.
      * docs/formatdomain.html.in: Document it.
      * src/conf/domain_conf.h (virDomainChrType): New enum value.
      * src/conf/domain_conf.c (virDomainChr): Add spicevmc.
      (virDomainChrDefParseXML, virDomainChrSourceDefParseXML)
      (virDomainChrDefParseTargetXML): Parse and enforce proper use.
      (virDomainChrSourceDefFormat, virDomainChrDefFormat): Format.
      * src/qemu/qemu_command.c (qemuBuildChrChardevStr)
      (qemuBuildCommandLine): Add qemu support.
      * tests/qemuxml2argvtest.c (domain): New test.
      * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml: New
      file.
      * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.args:
      Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      be87a123
    • E
      smartcard: turn on qemu support · f5fd9baa
      Eric Blake 提交于
      * src/qemu/qemu_command.c (qemuBuildCommandLine): Emit smartcard
      options.
      (qemuAssignDeviceAliases): Assign an alias for smartcards.
      (qemuBuildControllerDevStr): Manage the usb-ccid controller.
      * tests/qemuxml2argvtest.c (mymain): Add new tests.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-host.args: New
      file.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-host-certificates.args:
      Likewise.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough.args:
      Likewise.
      * tests/qemuxml2argvdata/qemuxml2argv-smartcard-controller.args:
      Likewise.
      f5fd9baa
    • J
      qemu: Support booting from hostdev PCI devices · 963a9460
      Jiri Denemark 提交于
      963a9460
  9. 03 2月, 2011 1 次提交
  10. 01 2月, 2011 1 次提交
  11. 29 1月, 2011 2 次提交
    • M
      Add VIR_DIV_UP to divide memory or storage request sizes with round up · d9ad8ac3
      Matthias Bolte 提交于
      Use it in all places where a memory or storage request size is converted
      to a larger granularity. This avoids requesting too small memory or storage
      sizes that could result from the truncation done by a simple division.
      
      This extends the round up fix in 6002e040
      to the whole codebase.
      
      Instead of reporting errors for odd values in the VMX code round them up.
      
      Update the QEMU Argv tests accordingly as the original memory size 219200
      isn't a even multiple of 1024 and is rounded up to 215 megabyte now. Change
      it to 219100 and 219136. Use two different values intentionally to make
      sure that rounding up works.
      
      Update virsh.pod accordingly, as rounding down and rejecting are replaced
      by rounding up.
      d9ad8ac3
    • E
      qemu aio: enable support · 819269c4
      Eric Blake 提交于
      qemu allows the user to choose what io storage api should be used,
      either the default (threads) or native (linux aio) which in the latter
      case can result in better performance.
      
      Based on a patch originally by Matthias Dahl.
      
      Red Hat Bugzilla #591703
      Signed-off-by: NEric Blake <eblake@redhat.com>
      819269c4
  12. 28 1月, 2011 2 次提交
  13. 25 1月, 2011 1 次提交
    • C
      qemu: sound: Support intel 'ich6' model · 6cabc0b0
      Cole Robinson 提交于
      In QEMU, the card itself is a PCI device, but it requires a codec
      (either -device hda-output or -device hda-duplex) to actually output
      sound. Specifying <sound model='ich6'/> gives us -device intel-hda
      -device hda-duplex I think it's important that a simple <sound model='ich6'/>
      sets up a useful codec, to have consistent behavior with all other sound cards.
      
      This is basically Dan's proposal of
      
          <sound model='ich6'>
              <codec type='output' slot='0'/>
              <codec type='duplex' slot='3'/>
          </sound>
      
      without the codec bits implemented.
      
      The important thing is to keep a consistent API here, we don't want some
      <sound> devs require tweaking codecs but not others. Steps I see to
      accomplishing this:
      
          - every <sound> device has a <codec type='default'/> (unless codecs are
              manually specified)
          - <codec type='none'/> is required to specify 'no codecs'
          - new audio settings like mic=on|off could then be exposed in
              <sound> or <codec> in a consistent manner for all sound models
      
      v2:
          Use model='ich6'
      
      v3:
          Use feature detection, from eblake
          Set codec id, bus, and cad values
      
      v4:
          intel-hda isn't supported if -device isn't available
      
      v5:
          Comment spelling fixes
      6cabc0b0
  14. 22 1月, 2011 3 次提交
    • C
      qemu: Add conf option to auto setup VNC unix sockets · a942ea06
      Cole Robinson 提交于
      If vnc_auto_unix_socket is enabled, any VNC devices without a hardcoded
      listen or socket value will be setup to serve over a unix socket in
      /var/lib/libvirt/qemu/$vmname.vnc.
      
      We store the generated socket path in the transient VM definition at
      CLI build time.
      a942ea06
    • C
      qemu: Allow serving VNC over a unix domain socket · 1d9c0a08
      Cole Robinson 提交于
      QEMU supports serving VNC over a unix domain socket rather than traditional
      TCP host/port. This is specified with:
      
      <graphics type='vnc' socket='/foo/bar/baz'/>
      
      This provides better security access control than VNC listening on
      127.0.0.1, but will cause issues with tools that rely on the lax security
      (virt-manager in fedora runs as regular user by default, and wouldn't be
      able to access a socket owned by 'qemu' or 'root').
      
      Also not currently supported by any clients, though I have patches for
      virt-manager, and virt-viewer should be simple to update.
      
      v2:
          schema: Make listen vs. socket a <choice>
      1d9c0a08
    • O
      qemu: report more proper error for unsupported graphics · af268f2a
      Osier Yang 提交于
      Report VIR_ERR_CONFIG_UNSUPPORTED instead of VIR_ERR_INTERNAL_ERROR,
      as it's valid in our domain schema, just unsupported by hypervisor
      here.
      
      * src/qemu/qemu_command.c
      af268f2a
  15. 19 1月, 2011 1 次提交
  16. 18 1月, 2011 2 次提交
    • E
      qemu: use -incoming fd:n to avoid qemu holding fd indefinitely · 1859939a
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=620363
      
      When using -incoming stdio or -incoming exec:, qemu keeps the
      stdin fd open long after the migration is complete.  Not to
      mention that exec:cat is horribly inefficient, by doubling the
      I/O and going through a popen interface in qemu.
      
      The new -incoming fd: of qemu 0.12.0 closes the fd after using
      it, and allows us to bypass an intermediary cat process for
      less I/O.
      
      * src/qemu/qemu_command.h (qemuBuildCommandLine): Add parameter.
      * src/qemu/qemu_command.c (qemuBuildCommandLine): Support
      migration via fd: when possible.  Consolidate migration handling
      into one spot, now that it is more complex.
      * src/qemu/qemu_driver.c (qemudStartVMDaemon): Update caller.
      * tests/qemuxml2argvtest.c (mymain): Likewise.
      * tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.args: New file.
      * tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml: Likewise.
      1859939a
    • J
      qemu: Support per-device boot ordering · 3d440358
      Jiri Denemark 提交于
      Support for this is included in qemu and seabios from upstream git.
      3d440358
  17. 15 1月, 2011 4 次提交
    • L
      Enable tuning of qemu network tap device "sndbuf" size · fe053dbe
      Laine Stump 提交于
      This is in response to a request in:
      
         https://bugzilla.redhat.com/show_bug.cgi?id=665293
      
      In short, under heavy load, it's possible for qemu's networking to
      lock up due to the tap device's default 1MB sndbuf being
      inadequate. adding "sndbuf=0" to the qemu commandline -netdevice
      option will alleviate this problem (sndbuf=0 actually sets it to
      0xffffffff).
      
      Because we must be able to explicitly specify "0" as a value, the
      standard practice of "0 means not specified" won't work here. Instead,
      virDomainNetDef also has a sndbuf_specified, which defaults to 0, but
      is set to 1 if some value was given.
      
      The sndbuf value is put inside a <tune> element of each <interface> in
      the domain. The intent is that further tunable settings will also be
      placed inside this element.
      
           <interface type='network'>
             ...
             <tune>
               <sndbuf>0</sndbuf>
             ...
             </tune>
           </interface>
      fe053dbe
    • L
      Add XML config switch to enable/disable vhost-net support · 175077fd
      Laine Stump 提交于
      This patch is in response to
      
        https://bugzilla.redhat.com/show_bug.cgi?id=643050
      
      The existing libvirt support for the vhost-net backend to the virtio
      network driver happens automatically - if the vhost-net device is
      available, it is always enabled, otherwise the standard userland
      virtio backend is used.
      
      This patch makes it possible to force whether or not vhost-net is used
      with a bit of XML. Adding a <driver> element to the interface XML, eg:
      
           <interface type="network">
             <model type="virtio"/>
             <driver name="vhost"/>
      
      will force use of vhost-net (if it's not available, the domain will
      fail to start). if driver name="qemu", vhost-net will not be used even
      if it is available.
      
      If there is no <driver name='xxx'/> in the config, libvirt will revert
      to the pre-existing automatic behavior - use vhost-net if it's
      available, and userland backend if vhost-net isn't available.
      175077fd
    • E
      qemu: move monitor device out of domain_conf common code · 30b9e608
      Eric Blake 提交于
      * src/conf/domain_conf.h (virDomainChrDeviceType): Drop monitor.
      * src/conf/domain_conf.c (virDomainChrDevice)
      (virDomainChrDefParseTargetXML, virDomainChrDefFormat): Drop
      monitor support.
      * src/qemu/qemu_command.h (qemuBuildCommandLine): Alter signature.
      * src/qemu/qemu_monitor.h (qemuMonitorOpen): Likewise.
      * src/qemu/qemu_domain.h (_qemuDomainObjPrivate): Change type of
      monConfig.
      * src/qemu/qemu_domain.c (qemuDomainObjPrivateFree)
      (qemuDomainObjPrivateXMLFormat, qemuDomainObjPrivateXMLParse):
      Adjust to type change.
      * src/qemu/qemu_command.c (qemuBuildCommandLine): Likewise.
      * src/qemu/qemu_driver.c (qemuPrepareMonitorChr)
      (qemudStartVMDaemon, qemuDomainXMLToNative, qemuConnectMonitor)
      (qemudShutdownVMDaemon): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise.
      * src/qemu/qemu_monitor.c (qemuMonitorOpen): Likewise.
      * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Likewise.
      30b9e608
    • E
      domain_conf: split source data out from ChrDef · 98334e7c
      Eric Blake 提交于
      This opens up the possibility of reusing the smaller ChrSourceDef
      for both qemu monitor and a passthrough smartcard device.
      
      * src/conf/domain_conf.h (_virDomainChrDef): Factor host
      details...
      (_virDomainChrSourceDef): ...into new struct.
      (virDomainChrSourceDefFree): New prototype.
      * src/conf/domain_conf.c (virDomainChrDefFree)
      (virDomainChrDefParseXML, virDomainChrDefFormat): Split...
      (virDomainChrSourceDefClear, virDomainChrSourceDefFree)
      (virDomainChrSourceDefParseXML, virDomainChrSourceDefFormat):
      ...into new functions.
      (virDomainChrDefParseTargetXML): Update clients to reflect type
      split.
      * src/vmx/vmx.c (virVMXParseSerial, virVMXParseParallel)
      (virVMXFormatSerial, virVMXFormatParallel): Likewise.
      * src/xen/xen_driver.c (xenUnifiedDomainOpenConsole): Likewise.
      * src/xen/xend_internal.c (xenDaemonParseSxprChar)
      (xenDaemonFormatSxprChr): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainDumpXML, vboxAttachSerial)
      (vboxAttachParallel): Likewise.
      * src/security/security_dac.c (virSecurityDACSetChardevLabel)
      (virSecurityDACSetChardevCallback)
      (virSecurityDACRestoreChardevLabel)
      (virSecurityDACRestoreChardevCallback): Likewise.
      * src/security/security_selinux.c (SELinuxSetSecurityChardevLabel)
      (SELinuxSetSecurityChardevCallback)
      (SELinuxRestoreSecurityChardevLabel)
      (SELinuxSetSecurityChardevCallback): Likewise.
      * src/security/virt-aa-helper.c (get_files): Likewise.
      * src/lxc/lxc_driver.c (lxcVmStart, lxcDomainOpenConsole):
      Likewise.
      * src/uml/uml_conf.c (umlBuildCommandLineChr): Likewise.
      * src/uml/uml_driver.c (umlIdentifyOneChrPTY, umlIdentifyChrPTY)
      (umlDomainOpenConsole): Likewise.
      * src/qemu/qemu_command.c (qemuBuildChrChardevStr)
      (qemuBuildChrArgStr, qemuBuildCommandLine)
      (qemuParseCommandLineChr): Likewise.
      * src/qemu/qemu_domain.c (qemuDomainObjPrivateXMLFormat)
      (qemuDomainObjPrivateXMLParse): Likewise.
      * src/qemu/qemu_cgroup.c (qemuSetupChardevCgroup): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise.
      * src/qemu/qemu_driver.c (qemudFindCharDevicePTYsMonitor)
      (qemudFindCharDevicePTYs, qemuPrepareChardevDevice)
      (qemuPrepareMonitorChr, qemudShutdownVMDaemon)
      (qemuDomainOpenConsole): Likewise.
      * src/qemu/qemu_command.h (qemuBuildChrChardevStr)
      (qemuBuildChrArgStr): Delete, now that they are static.
      * src/libvirt_private.syms (domain_conf.h): New exports.
      * cfg.mk (useless_free_options): Update list.
      * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Update
      tests.
      98334e7c
  18. 13 1月, 2011 1 次提交
  19. 11 1月, 2011 1 次提交
    • R
      qemu: Watchdog IB700 is not a PCI device (RHBZ#667091). · feddaf1d
      Richard W.M. Jones 提交于
      Skip IB700 when assigning PCI slots.
      
      Note: the I6300ESB watchdog _is_ a PCI device.
      
      To test this: I applied this patch to libvirt-0.8.3-2.fc14 (rebasing
      it slightly: qemu_command.c didn't exist in that version) and
      installed this on my machine, then tested that I could successfully
      add an ib700 watchdog device to a guest, start the guest, and the
      ib700 was available to the guest.  I also added an i6300esb (PCI)
      watchdog to another guest, and verified that libvirt assigned a PCI
      device to it, that the guest could be started, and that i6300esb was
      present in the guest.
      
      Note that if you previously had a domain with a ib700 watchdog, it
      would have had an <address type='pci' .../> clause added to it in the
      libvirt configuration.  This patch does not attempt to remove this.
      You cannot start such a domain -- qemu gives an error if you try.
      With this patch you are able to remove the bogus address element
      without libvirt adding it back.
      Signed-off-by: NRichard W.M. Jones <rjones@redhat.com>
      feddaf1d
  20. 06 1月, 2011 1 次提交
  21. 17 12月, 2010 2 次提交
    • D
      Move QEMU command line management into a separate file · 0f2e4b9c
      Daniel P. Berrange 提交于
      The qemu_conf.c code is doing three jobs, driver config file
      loading, QEMU capabilities management and QEMU command line
      management. Move the command line code into its own file
      
      * src/qemu/qemu_command.c, src/qemu/qemu_command.h: New
        command line management code
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Delete command
        line code
      * src/qemu/qemu_conf.h, src/qemu_conf.c: Adapt for API renames
      * src/Makefile.am: add src/qemu/qemu_command.c
      * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_text.c: Add
        import of qemu_command.h
      0f2e4b9c
    • D
      Move QEMU capabilities management into a separate file · d8ae147d
      Daniel P. Berrange 提交于
      The qemu_conf.c code is doing three jobs, driver config file
      loading, QEMU capabilities management and QEMU command line
      management. Move the capabilities code into its own file
      
      * src/qemu/qemu_capabilities.c, src/qemu/qemu_capabilities.h: New
        capabilities management code
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Delete capabilities
        code
      * src/qemu/qemu_conf.h: Adapt for API renames
      * src/Makefile.am: add src/qemu/qemu_capabilities.c
      d8ae147d
  22. 11 12月, 2010 1 次提交
    • E
      command: ease use with virBuffer, and fix qemu leak · e8d05c97
      Eric Blake 提交于
      * src/util/command.h (virCommandAddArgBuffer)
      (virCommandAddEnvBuffer): New prototypes.
      * src/util/command.c (virCommandAddArgBuffer)
      (virCommandAddEnvBuffer): Implement them.
      * src/libvirt_private.syms (command.h): Export them.
      * src/qemu/qemu_conf.c (qemudBuildCommandLine): Use them, plugging
      a memory leak on rbd_hosts in the process.
      e8d05c97