1. 30 4月, 2015 1 次提交
  2. 25 4月, 2015 2 次提交
  3. 22 4月, 2015 1 次提交
  4. 21 4月, 2015 3 次提交
  5. 17 4月, 2015 1 次提交
  6. 20 3月, 2015 1 次提交
    • J
      libxl: use xenlight pkgconfig file if present · 2adba7d3
      Jim Fehlig 提交于
      xen.git commit babeca32 added a pkgconfig file for libxenlight,
      allowing libxl apps to determine the location of Xen binaries
      such as firmware blobs, device emulator, etc.
      
      This patch adds support for xenlight.pc in the libxl driver, falling
      back to the previous configure logic if not found.  It introduces
      LIBXL_FIRMWARE_DIR and LIBXL_EXECBIN_DIR to define the firmware and
      libexec_bin locations.  If xenlight.pc does not exist, the defines
      are set to the current hardcoded paths.  The capabilities'
      <emulator> and <loader> elements are updated to use the paths.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      2adba7d3
  7. 17 3月, 2015 1 次提交
    • J
      libxl: fix regression introduced by commit 4ab8cd77 · a7d6b94a
      Jim Fehlig 提交于
      Commit 4ab8cd77 added a check requiring input devices to have
      a bus type of VIR_DOMAIN_INPUT_BUS_USB, failing to start the
      domain otherwise.  But virDomainDefParseXML adds implicit mouse
      and keyboard if a graphics device is configured.  See calls to
      virDomainDefMaybeAddInput.
      
      The regression is fixed by removing the check requiring USB input
      devices, and skipping non-USB input devices when populating USB
      'usbdevice' in libxl_domain_build_info struct.
      a7d6b94a
  8. 16 3月, 2015 1 次提交
    • P
      conf: Replace access to def->mem.max_balloon with accessor functions · 4f9907cd
      Peter Krempa 提交于
      As there are two possible approaches to define a domain's memory size -
      one used with legacy, non-NUMA VMs configured in the <memory> element
      and per-node based approach on NUMA machines - the user needs to make
      sure that both are specified correctly in the NUMA case.
      
      To avoid this burden on the user I'd like to replace the NUMA case with
      automatic totaling of the memory size. To achieve this I need to replace
      direct access to the virDomainMemtune's 'max_balloon' field with
      two separate getters depending on the desired size.
      
      The two sizes are needed as:
      1) Startup memory size doesn't include memory modules in some
      hypervisors.
      2) After startup these count as the usable memory size.
      
      Note that the comments for the functions are future aware and document
      state that will be present after a few later patches.
      4f9907cd
  9. 14 3月, 2015 1 次提交
  10. 21 2月, 2015 1 次提交
  11. 12 2月, 2015 2 次提交
  12. 03 12月, 2014 1 次提交
    • J
      Replace virNetworkFree with virObjectUnref · 121c09a9
      John Ferlan 提交于
      Since virNetworkFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      121c09a9
  13. 31 10月, 2014 2 次提交
    • J
      libxl: fix double-free of libxl_domain_build_info · 720be2eb
      Jim Fehlig 提交于
      On error, libxlMakeDomBuildInfo() frees the caller-provided
      libxl_domain_build_info struct embedded in libxl_domain_config,
      causing a segfault
      
      Program received signal SIGSEGV, Segmentation fault.
      [Switching to Thread 0x7f9c13020700 (LWP 40988)]
      (gdb) bt
      0  0x00007f9c162f95b4 in free () from /lib64/libc.so.6
      1  0x00007f9c0d0965ad in libxl_bitmap_dispose () from
         /usr/lib64/libxenlight.so.4.4
      2  0x00007f9c0d0a73bf in libxl_domain_build_info_dispose ()
         from /usr/lib64/libxenlight.so.4.4
      3  0x00007f9c0d0a7974 in libxl_domain_config_dispose () from
         /usr/lib64/libxenlight.so.4.4
      4  0x00007f9c0d2e00c5 in libxlDomainStart (driver=0x7f9c0400e4e0,
         vm=0x7f9c0412b0d0, start_paused=false, restore_fd=-1) at
         libxl/libxl_domain.c:1323
      5  0x00007f9c0d2e1d4b in libxlDomainCreateXML (conn=0x7f9c000009a0,...)
         at libxl/libxl_driver.c:660
      
      Remove the call to libxl_domain_build_info_dispose() from
      libxlMakeDomBuildInfo().  On error, callers will dispose the
      libxl_domain_config object, which in turn disposes the build info.
      720be2eb
    • J
      libxl: Support user-specified <emulator> · 1c0bf509
      Jim Fehlig 提交于
      With the introduction of the libxlDomainGetEmulatorType function,
      it is trivial to support a user-specfied <emulator> in the libxl
      driver.  This patch is based loosely on David Scott's old patch
      to do the same
      
      https://www.redhat.com/archives/libvir-list/2013-April/msg02119.htmlSigned-off-by: NJim Fehlig <jfehlig@suse.com>
      1c0bf509
  14. 11 10月, 2014 3 次提交
    • S
      libxl: Implement basic video device selection · 1298daca
      Stefan Bader 提交于
      This started as an investigation into an issue where libvirt (using the
      libxl driver) and the Xen host, like an old couple, could not agree on
      who is responsible for selecting the VNC port to use.
      
      Things usually (and a bit surprisingly) did work because, just like that
      old couple, they had the same idea on what to do by default. However it
      was possible that this ended up in a big argument.
      
      The problem is that display information exists in two different places:
      in the vfbs list and in the build info. And for launching the device model,
      only the latter is used. But that never gets initialized from libvirt. So
      Xen allows the device model to select a default port while libvirt thinks
      it has told Xen that this is done by libvirt (though the vfbs config).
      
      While fixing that, I made a stab at actually evaluating the configuration
      of the video device. So that it is now possible to at least decide between
      a Cirrus or standard VGA emulation and to modify the VRAM within certain
      limits using libvirt.
      Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      1298daca
    • J
      libxl: Add function to determine device model type · c5a00350
      Jim Fehlig 提交于
      This patch introduces a function to detect whether the specified
      emulator is QEMU_XEN or QEMU_XEN_TRADITIONAL.  Detection is based on the
      string "Options specific to the Xen version:" in '$qemu -help' output.
      AFAIK, the only qemu containing that string in help output is the
      old Xen fork (aka qemu-dm).
      
      Note:
      QEMU_XEN means a qemu that contains support for Xen.
      
      QEMU_XEN_TRADITIONAL means Xen's old forked qemu 0.10.2
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      c5a00350
    • J
      libxl: Copy user-specified keymap to libxl build info struct · be28ae16
      Jim Fehlig 提交于
      Commit 4dfc34c3 missed copying the user-specified keymap to
      libxl_domain_build_info struct when creating a VFB device.
      Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      be28ae16
  15. 12 9月, 2014 1 次提交
  16. 04 9月, 2014 1 次提交
    • E
      maint: use consistent if-else braces in xen and friends · fb6d6507
      Eric Blake 提交于
      I'm about to add a syntax check that enforces our documented
      HACKING style of always using matching {} on if-else statements.
      
      This patch focuses on code related to xen.
      
      * src/libxl/libxl_conf.c (libxlCapsInitGuests)
      (libxlMakeDomBuildInfo): Correct use of {}.
      * src/xen/xen_hypervisor.c (virXen_getvcpusinfo)
      (xenHypervisorMakeCapabilitiesInternal): Likewise.
      * src/xen/xend_internal.c (xenDaemonOpen)
      (xenDaemonDomainMigratePerform, xend_detect_config_version)
      (xenDaemonDetachDeviceFlags, xenDaemonDomainMigratePerform)
      (xenDaemonDomainBlockPeek): Likewise.
      * src/xenapi/xenapi_driver.c (xenapiConnectListDomains)
      (xenapiDomainLookupByUUID, xenapiDomainGetOSType): Likewise.
      * src/xenconfig/xen_common.c (xenParseCPUFeatures, xenFormatNet):
      Likewise.
      * src/xenconfig/xen_sxpr.c (xenParseSxpr, xenFormatSxprNet)
      (xenFormatSxpr): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      fb6d6507
  17. 26 8月, 2014 1 次提交
  18. 24 7月, 2014 1 次提交
  19. 23 7月, 2014 1 次提交
    • J
      Introduce virTristateSwitch enum · 3227e17d
      Ján Tomko 提交于
      For the values "default", "on", "off"
      
      Replaces
      virDeviceAddressPCIMulti
      virDomainFeatureState
      virDomainIoEventFd
      virDomainVirtioEventIdx
      virDomainDiskCopyOnRead
      virDomainMemDump
      virDomainPCIRombarMode
      virDomainGraphicsSpicePlaybackCompression
      3227e17d
  20. 17 7月, 2014 1 次提交
    • M
      support for QEMU vhost-user · a14abd46
      Michele Paolino 提交于
      This patch adds support for the QEMU vhost-user feature to libvirt.
      vhost-user enables the communication between a QEMU virtual machine
      and other userspace process using the Virtio transport protocol.
      It uses a char dev (e.g. Unix socket) for the control plane,
      while the data plane based on shared memory.
      
      The XML looks like:
      
      <interface type='vhostuser'>
          <mac address='52:54:00:3b:83:1a'/>
          <source type='unix' path='/tmp/vhost.sock' mode='server'/>
          <model type='virtio'/>
      </interface>
      Signed-off-by: NMichele Paolino <m.paolino@virtualopensystems.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a14abd46
  21. 14 7月, 2014 1 次提交
    • E
      capabilities: use bool instead of int · 58156f39
      Eric Blake 提交于
      While preparing to add a capability for active commit, I noticed
      that the existing code was abusing int for boolean values.
      
      * src/conf/capabilities.h (_virCapsGuestFeature, _virCapsHost)
      (virCapabilitiesNew, virCapabilitiesAddGuestFeature): Improve
      types.
      * src/conf/capabilities.c (virCapabilitiesNew)
      (virCapabilitiesAddGuestFeature): Adjust signature.
      * src/bhyve/bhyve_capabilities.c (virBhyveCapsBuild): Update
      clients.
      * src/esx/esx_driver.c (esxCapsInit): Likewise.
      * src/libxl/libxl_conf.c (libxlMakeCapabilities): Likewise.
      * src/lxc/lxc_conf.c (virLXCDriverCapsInit): Likewise.
      * src/openvz/openvz_conf.c (openvzCapsInit): Likewise.
      * src/parallels/parallels_driver.c (parallelsBuildCapabilities):
      Likewise.
      * src/phyp/phyp_driver.c (phypCapsInit): Likewise.
      * src/qemu/qemu_capabilities.c (virQEMUCapsInit)
      (virQEMUCapsInitGuestFromBinary): Likewise.
      * src/security/virt-aa-helper.c (get_definition): Likewise.
      * src/test/test_driver.c (testBuildCapabilities): Likewise.
      * src/uml/uml_conf.c (umlCapsInit): Likewise.
      * src/vbox/vbox_tmpl.c (vboxCapsInit): Likewise.
      * src/vmware/vmware_conf.c (vmwareCapsInit): Likewise.
      * src/xen/xen_hypervisor.c (xenHypervisorBuildCapabilities):
      Likewise.
      * src/xenapi/xenapi_driver.c (getCapsObject): Likewise.
      * tests/qemucaps2xmltest.c (testGetCaps): Likewise.
      * tests/testutils.c (virTestGenericCapsInit): Likewise.
      * tests/testutilslxc.c (testLXCCapsInit): Likewise.
      * tests/testutilsqemu.c (testQemuCapsInit): Likewise.
      * tests/testutilsxen.c (testXenCapsInit): Likewise.
      * tests/vircaps2xmltest.c (buildVirCapabilities): Likewise.
      * tests/vircapstest.c (buildNUMATopology): Likewise.
      * tests/vmx2xmltest.c (testCapsInit): Likewise.
      * tests/xml2vmxtest.c (testCapsInit): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      58156f39
  22. 11 7月, 2014 1 次提交
  23. 10 7月, 2014 1 次提交
  24. 08 7月, 2014 1 次提交
  25. 27 6月, 2014 1 次提交
  26. 24 6月, 2014 1 次提交
    • J
      libxl: prefer qdisk for <driver name='file'> · 48d81cef
      Jim Fehlig 提交于
      The libxl driver currently sets the disk backend to
      LIBXL_DISK_BACKEND_TAP when <driver name='file'> is specified
      in the <disk> config.  qdisk should be prefered with this
      configuration, otherwise existing configuration such as the
      following, which worked with the old Xen driver, will not work
      with the libxl driver
      
        <disk type='file' device='cdrom'>
          <driver name='file'/>
          <source file='/path/to/some/iso'/>
          <target dev='hdc' bus='ide'/>
          <readonly/>
        </disk>
      
      In addition, tap performs poorly compared to qdisk.
      48d81cef
  27. 20 6月, 2014 2 次提交
    • J
      libxl: limit support for specifying an interface script · 2624dfde
      Jim Fehlig 提交于
      Generally, <interface> ... <script> is only supported for
      type='ethernet'.  Due to the long and pervasive use of
      
        <interface type='bridge'>
          ...
          <script path='foo'/>
        </interface>
      
      in Xen domain configuration, it was agreed to allow the use
      of <script> with type='bridge' for backwards compatibility.  See
      the following discussion thread
      
      http://www.redhat.com/archives/libvir-list/2013-April/msg00755.html
      
      This patch limits the use of <script> to interface types ethernet
      and bridge, raising an unsupported config error if <script> is
      specified for all other interface types.
      
      While at it, use VIR_ERR_CONFIG_UNSUPPORTED instead of
      VIR_ERR_INTERNAL_ERROR when reporting unsupported interface types.
      2624dfde
    • J
      libxl: support interface type=network · bf410bb8
      Jim Fehlig 提交于
      Add support for <interface type='network'> in the libxl driver.
      bf410bb8
  28. 19 6月, 2014 1 次提交
    • M
      virCaps: expose pages info · 02129b7c
      Michal Privoznik 提交于
      There are two places where you'll find info on page sizes. The first
      one is under <cpu/> element, where all supported pages sizes are
      listed. Then the second one is under each <cell/> element which refers
      to concrete NUMA node. At this place, the size of page's pool is
      reported. So the capabilities XML looks something like this:
      
      <capabilities>
      
        <host>
          <uuid>01281cda-f352-cb11-a9db-e905fe22010c</uuid>
          <cpu>
            <arch>x86_64</arch>
            <model>Westmere</model>
            <vendor>Intel</vendor>
            <topology sockets='1' cores='1' threads='1'/>
            ...
            <pages unit='KiB' size='4'/>
            <pages unit='KiB' size='2048'/>
            <pages unit='KiB' size='1048576'/>
          </cpu>
          ...
          <topology>
            <cells num='4'>
              <cell id='0'>
                <memory unit='KiB'>4054408</memory>
                <pages unit='KiB' size='4'>1013602</pages>
                <pages unit='KiB' size='2048'>3</pages>
                <pages unit='KiB' size='1048576'>1</pages>
                <distances/>
                <cpus num='1'>
                  <cpu id='0' socket_id='0' core_id='0' siblings='0'/>
                </cpus>
              </cell>
              <cell id='1'>
                <memory unit='KiB'>4071072</memory>
                <pages unit='KiB' size='4'>1017768</pages>
                <pages unit='KiB' size='2048'>3</pages>
                <pages unit='KiB' size='1048576'>1</pages>
                <distances/>
                <cpus num='1'>
                  <cpu id='1' socket_id='0' core_id='0' siblings='1'/>
                </cpus>
              </cell>
              ...
            </cells>
          </topology>
          ...
        </host>
      
        <guest/>
      
      </capabilities>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      02129b7c
  29. 04 6月, 2014 1 次提交
    • M
      virCaps: Expose distance between host NUMA nodes · 8ba0a58f
      Michal Privoznik 提交于
      If user or management application wants to create a guest,
      it may be useful to know the cost of internode latencies
      before the guest resources are pinned. For example:
      
      <capabilities>
      
        <host>
          ...
          <topology>
            <cells num='2'>
              <cell id='0'>
                <memory unit='KiB'>4004132</memory>
                <distances>
                  <sibling id='0' value='10'/>
                  <sibling id='1' value='20'/>
                </distances>
                <cpus num='2'>
                  <cpu id='0' socket_id='0' core_id='0' siblings='0'/>
                  <cpu id='2' socket_id='0' core_id='2' siblings='2'/>
                </cpus>
              </cell>
              <cell id='1'>
                <memory unit='KiB'>4030064</memory>
                <distances>
                  <sibling id='0' value='20'/>
                  <sibling id='1' value='10'/>
                </distances>
                <cpus num='2'>
                  <cpu id='1' socket_id='0' core_id='0' siblings='1'/>
                  <cpu id='3' socket_id='0' core_id='2' siblings='3'/>
                </cpus>
              </cell>
            </cells>
          </topology>
          ...
        </host>
        ...
      </capabilities>
      
      We can see the distance from node1 to node0 is 20 and within nodes 10.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      8ba0a58f
  30. 03 6月, 2014 3 次提交