1. 19 1月, 2011 8 次提交
  2. 18 1月, 2011 5 次提交
    • 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
      tests: Add tests for per-device boot elements · e182ba87
      Jiri Denemark 提交于
      e182ba87
    • J
      qemu: Support per-device boot ordering · 3d440358
      Jiri Denemark 提交于
      Support for this is included in qemu and seabios from upstream git.
      3d440358
    • J
      Introduce per-device boot element · 94234fa2
      Jiri Denemark 提交于
      Currently, boot order can be specified per device class but there is no
      way to specify exact disk/NIC device to boot from.
      
      This patch adds <boot order='N'/> element which can be used inside
      <disk/> and <interface/>. This is incompatible with the older os/boot
      element. Since not all hypervisors support per-device boot
      specification, new deviceboot flag is included in capabilities XML for
      hypervisors which understand the new boot element. Presence of the flag
      allows (but doesn't require) users to use the new style boot order
      specification.
      94234fa2
    • J
      conf: Move boot parsing into a separate function · f5456ffd
      Jiri Denemark 提交于
      f5456ffd
  3. 17 1月, 2011 3 次提交
  4. 16 1月, 2011 2 次提交
    • M
      tests: Remove obsolete secaatest · ed25dcc2
      Matthias Bolte 提交于
      Before the security driver was refactored in d6623003 seclabeltest and
      secaatest were basically the same. seclabeltest was meant for SELinux
      and secaatest for AppArmor. Both tests exited early when the specific
      security driver backend wasn't enabled.
      
      With the new security manager trying to initialize a disabled security
      driver backend is an error that can't be distinguished from other errors
      anymore. Therefore, the updated seclabeltest just asks for the first
      available backend as this will always work even with SELinux and AppArmor
      backend being disabled due to the new Nop backend.
      
      Remove the obsolete secaatest and compile and run the seclabeltest
      unconditional.
      
      This fixes make check on systems that support AppArmor.
      ed25dcc2
    • M
      virsh: Use WITH_SECDRIVER_APPARMOR to detect AppArmor support · 2095dc39
      Matthias Bolte 提交于
      There is no ENABLE_SECDRIVER_APPARMOR.
      2095dc39
  5. 15 1月, 2011 11 次提交
    • N
      memtune: Let virsh know the unlimited value for memory tunables · d94a14f8
      Nikunj A. Dadhania 提交于
      Display or set unlimited values for memory parameters. Unlimited is
      represented by INT64_MAX in memory cgroup.
      Signed-off-by: NNikunj A. Dadhania <nikunj@linux.vnet.ibm.com>
      Reported-by: NJustin Clift <jclift@redhat.com>
      d94a14f8
    • E
      maint: improve sc_prohibit_strncmp syntax check · 63dbc84a
      Eric Blake 提交于
      * .gnulib: Update, for sc_prohibit_strcmp fix.
      * cfg.mk: Adjust copyright; the only FSF portions come from when
      this file was copied from coreutils.
      (sc_prohibit_strncmp): Copy bug-fixes from sc_prohibit_strcmp.
      * .x-sc_prohibit_strcmp: Delete, now that rule is smarter.
      * .x-sc_prohibit_strncmp: Likewise.
      * Makefile.am (syntax_check_exceptions): Track deletion.
      63dbc84a
    • E
      datatypes: avoid redundant __FUNCTION__ · d9b04947
      Eric Blake 提交于
      virLibConnError already includes __FUNCTION__ in its output, so we
      were redundant.  Furthermore, clang warns that __FUNCTION__ is not
      a string literal (at least __FUNCTION__ will never contain %, so
      it was not a security risk).
      
      * src/datatypes.c: Replace __FUNCTION__ with a descriptive string.
      d9b04947
    • 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
    • M
      Use the new set_password monitor command to set password. · 9d73efdb
      Marc-André Lureau 提交于
      We try to use that command first when setting a VNC/SPICE password. If
      that doesn't work we fallback to the legacy VNC only password
      
      Allow an expiry time to be set, if that doesn't work, throw an error
      if they try to use SPICE.
      
      Change since v1:
      - moved qemuInitGraphicsPasswords to qemu_hotplug, renamed
        to qemuDomainChangeGraphicsPasswords.
      - updated what looks like a typo (that appears to work anyway) in
        initial patch from Daniel:
          - ret = qemuInitGraphicsPasswords(driver, vm,
          -                                 VIR_DOMAIN_GRAPHICS_TYPE_SPICE,
          -                                 &vm->def->graphics[0]->data.vnc.auth,
          -                                 driver->vncPassword);
          + ret = qemuInitGraphicsPasswords(driver, vm,
          +                                 VIR_DOMAIN_GRAPHICS_TYPE_SPICE,
          +                                 &vm->def->graphics[0]->data.spice.auth,
          +                                 driver->spicePassword);
      
      Based on patch by Daniel P. Berrange <berrange@redhat.com>.
      9d73efdb
    • M
      4d099bc0
    • J
      Fix 'make check' after commit 04197350 · 094c6f4a
      Jim Fehlig 提交于
      I broke 'make check' with commit 04197350 by unconditionally
      emitting 'hap=' in xen xm driver.  Only emit 'hap=' if
      xendConfigVersion >= 3.  I've tested sending 'hap=' to a Xen 3.2
      machine without support for hap setting and verified that xend
      silently drops the unrecognized setting.
      094c6f4a
    • 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
    • J
      cpu: Add support for Westmere CPU model · d4d5cccd
      Jiri Denemark 提交于
      d4d5cccd
  6. 14 1月, 2011 9 次提交
    • E
      qemu: improve device flag parsing · f892f5a5
      Eric Blake 提交于
      * src/qemu/qemu_capabilities.h (qemuCapsParseDeviceStr): New
      prototype.
      * src/qemu/qemu_capabilities.c (qemuCapsParsePCIDeviceStrs)
      Rename and split...
      (qemuCapsExtractDeviceStr, qemuCapsParseDeviceStr): ...to make it
      easier to add and test device-specific checks.
      (qemuCapsExtractVersionInfo): Update caller.
      * tests/qemuhelptest.c (testHelpStrParsing): Also test parsing of
      device-related flags.
      (mymain): Update expected flags.
      * tests/qemuhelpdata/qemu-0.12.1-device: New file.
      * tests/qemuhelpdata/qemu-kvm-0.12.1.2-rhel60-device: New file.
      * tests/qemuhelpdata/qemu-kvm-0.12.3-device: New file.
      * tests/qemuhelpdata/qemu-kvm-0.13.0-device: New file.
      f892f5a5
    • E
      util: add missing string->integer conversion functions · 1ff03b28
      Eric Blake 提交于
      It was awkward having only int conversion in the virStrToLong family,
      but only long conversion in the virXPath family.  Make both families
      support both types.
      
      * src/util/util.h (virStrToLong_l, virStrToLong_ul): New
      prototypes.
      * src/util/xml.h (virXPathInt, virXPathUInt): Likewise.
      * src/util/util.c (virStrToLong_l, virStrToLong_ul): New
      functions.
      * src/util/xml.c (virXPathInt, virXPathUInt): Likewise.
      * src/libvirt_private.syms (util.h, xml.h): Export them.
      1ff03b28
    • J
    • E
      qemu: convert capabilities to use virCommand · 22115181
      Eric Blake 提交于
      * src/qemu/qemu_capabilities.c (qemuCapsProbeMachineTypes)
      (qemuCapsProbeCPUModels, qemuCapsParsePCIDeviceStrs)
      (qemuCapsExtractVersionInfo): Use virCommand rather than virExec.
      22115181
    • J
      6935a1e2
    • J
      Document HAP domain feature · 79f56c66
      Jim Fehlig 提交于
      Add HAP feature to schema and documentation.
      79f56c66
    • J
      Add HAP to xen hypervisor capabilities · af521a01
      Jim Fehlig 提交于
      xen-unstable c/s 16931 introduced a per-domain setting for hvm
      guests to enable/disable hardware assisted paging.  If disabled,
      software techniques such as shadow page tables are used.  If enabled,
      and the feature exists in underlying hardware, hardware support for
      paging is used.
      
      Xen does not provide a mechanism to discover the HAP capability, so
      we advertise its availability for hvm guests on Xen >= 3.3.
      af521a01
    • J
      Add support for HAP feature to xen drivers · 04197350
      Jim Fehlig 提交于
      xen-unstable c/s 16931 introduced a per-domain setting for hvm
      guests to enable/disable hardware assisted paging.  If disabled,
      software techniques such as shadow page tables are used.  If enabled,
      and the feature exists in underlying hardware, hardware support for
      paging is used.
      
      This provides implementation for mapping HAP setting to/from
      domxml/native formats in xen drivers.
      04197350
    • J
      Add HAP to virDomainFeature enum · 48a5dccd
      Jim Fehlig 提交于
      Extend the virDomainFeature enumeration to include HAP (hardware
      assisted paging) feature.
      
      Hardware features such as Extended Page Table and Nested Page
      Table augment hypervisor software techniques such as shadow
      page table.  Adding HAP to the virDomainFeature enumeration
      allows users to select between hardware and software memory
      management mechanisms for their guests.
      48a5dccd
  7. 13 1月, 2011 2 次提交
    • E
      tests: virsh is no longer in builddir/src · 90c2a138
      Eric Blake 提交于
      Commit 870dba07 (Mar 2008) added builddir/src to PATH to pick
      up virsh.  Later, virsh was moved to tools; commit db68d6b1
      (Oct 2009) noticed this, but only added the new location rather
      than deleting the old location.
      
      * tests/Makefile.am (path_add): Drop now-useless directory.
      Suggested by Daniel P. Berrange.
      90c2a138
    • E
      virFindFileInPath: only find executable non-directory · 9ae992f2
      Eric Blake 提交于
      Without this patch, at least tests/daemon-conf (which sticks
      $builddir/src in the PATH) tries to execute the directory
      $builddir/src/qemu rather than a real qemu binary.
      
      * src/util/util.h (virFileExists): Adjust prototype.
      (virFileIsExecutable): New prototype.
      * src/util/util.c (virFindFileInPath): Reject non-executables and
      directories.  Avoid huge stack allocation.
      (virFileExists): Use lighter-weight syscall.
      (virFileIsExecutable): New function.
      * src/libvirt_private.syms (util.h): Export new function.
      9ae992f2