1. 11 10月, 2014 1 次提交
  2. 12 9月, 2014 1 次提交
  3. 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
  4. 26 8月, 2014 1 次提交
  5. 24 7月, 2014 1 次提交
  6. 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
  7. 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
  8. 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
  9. 11 7月, 2014 1 次提交
  10. 10 7月, 2014 1 次提交
  11. 08 7月, 2014 1 次提交
  12. 27 6月, 2014 1 次提交
  13. 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
  14. 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
  15. 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
  16. 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
  17. 03 6月, 2014 3 次提交
  18. 13 5月, 2014 1 次提交
  19. 08 4月, 2014 1 次提交
  20. 03 4月, 2014 1 次提交
    • S
      libxl: Set disk format for empty cdrom device · 7a1452f5
      Stefan Bader 提交于
      The XML config for a CDROM device can be without a source path,
      indicating that there is no media present. Without this change
      the libxl driver fails to start a guest in that case because
      the libxl library checks for the LIBXL_DISK_FORMAT_EMPTY format
      type and tries to stat the NULL pointer that gets passed on.
      
      > libxl: error: libxl_device.c:265:libxl__device_disk_set_backend:
      > Disk vdev=hdc failed to stat: (null): Bad address
      Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
      7a1452f5
  21. 26 3月, 2014 1 次提交
    • S
      libxl: Create log directory earlier · 139efe75
      Stefan Bader 提交于
      Commit d9f19c30 moved a lot of the
      configuration setup into libxlDriverConfigNew().
      However that tries to create the libxl/libxl-driver.log before the
      libxl directory gets created in libxlStateInitialize().
      
      This causes the daemon to fail on systems that have not had the directory
      created before.
      
      Move the code to create the libxl directory into libxlDriverConfigNew().
      Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
      139efe75
  22. 25 3月, 2014 2 次提交
  23. 20 3月, 2014 1 次提交
  24. 19 3月, 2014 1 次提交
    • J
      libxl: fix framebuffer port setting for HVM domains · b55cc5f4
      Jim Fehlig 提交于
      libxl uses the libxl_vnc_info and libxl_sdl_info fields from the
      hvm union in libxl_domain_build_info struct when generating QEMU
      args for VNC or SDL.  These fields were left unset by the libxl
      driver, causing libxl to ignore any user settings.  E.g. with
      
        <graphics type='vnc' port='5950'/>
      
      port would be ignored and QEMU would instead be invoked with
      
        -vnc 127.0.0.1:0,to=99
      
      Unlike the libxl_domain_config struct, the libxl_domain_build_info
      contains only a single libxl_vnc_info and libxl_sdl_info, so
      populate these fields from the first vfb in
      libxl_domain_config->vfbs.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      Signed-off-by: NDavid Kiarie <davidkiarie4@gmail.com>
      b55cc5f4
  25. 18 3月, 2014 1 次提交
  26. 13 3月, 2014 1 次提交
  27. 26 2月, 2014 1 次提交
    • I
      libxl: Recognise ARM architectures · bf5dbce6
      Ian Campbell 提交于
      Only tested on v7 but the v8 equivalent seems pretty obvious.
      
      XEN_CAP_REGEX already accepts more than it should (e.g. x86_64p or x86_32be)
      but I have stuck with the existing pattern.
      
      With this I can create a guest from:
        <domain type='xen'>
          <name>libvirt-test</name>
          <uuid>6343998e-9eda-11e3-98f6-77252a7d02f3</uuid>
          <memory>393216</memory>
          <currentMemory>393216</currentMemory>
          <vcpu>1</vcpu>
          <os>
            <type arch='armv7l' machine='xenpv'>linux</type>
            <kernel>/boot/vmlinuz-arm-native</kernel>
            <cmdline>console=hvc0 earlyprintk debug root=/dev/xvda1</cmdline>
          </os>
          <clock offset='utc'/>
          <on_poweroff>destroy</on_poweroff>
          <on_reboot>restart</on_reboot>
          <on_crash>destroy</on_crash>
          <devices>
            <disk type='block' device='disk'>
              <source dev='/dev/marilith-n0/debian-disk'/>
              <target dev='xvda1'/>
            </disk>
            <interface type='bridge'>
              <mac address='8e:a7:8e:3c:f4:f6'/>
              <source bridge='xenbr0'/>
            </interface>
          </devices>
        </domain>
      
      Using virsh create and I can destroy it too.
      
      Currently virsh console fails with:
        Connected to domain libvirt-test
        Escape character is ^]
        error: internal error: cannot find character device <null>
      
      I haven't investigated yet.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      bf5dbce6
  28. 25 2月, 2014 1 次提交
  29. 09 1月, 2014 1 次提交
    • S
      libxl: Fix devid init in libxlMakeNicList · e1459c1f
      Stefan Bader 提交于
      This basically reverts commit ba64b971
      "libxl: Allow libxl to set NIC devid". However assigning devid's
      before calling libxlMakeNic does not work as that is calling
      libxl_device_nic_init which sets it back to -1.
      Right now auto-assignment only works in the hotplug case. But even if
      that would be fixed at some point (if that is possible at all), this
      would add a weird dependency between Xen and libvirt versions.
      The change here should accept any auto-assignment that makes it into
      libxl_device_nic_init. My understanding is that a caller always is
      allowed to make the devid choice itself. And assuming libxlMakeNicList
      is only used on domain creation, a sequential numbering should be ok.
      Signed-off-by: NStefan Bader <stefan.bader@canonical.com>
      e1459c1f
  30. 07 1月, 2014 1 次提交
  31. 18 11月, 2013 1 次提交
    • J
      Return -1 in virPortAllocatorAcquire if all ports are used · 8c41794a
      Ján Tomko 提交于
      Report the error in virPortAllocatorAcquire instead
      of doing it in every caller.
      
      The error contains the port range name instead of the intended
      use for the port, e.g.:
      Unable to find an unused port in range 'display' (65534-65535)
      instead of:
      Unable to find an unused port for SPICE
      
      This also adds error reporting when the QEMU driver could not
      find an unused port for VNC, VNC WebSockets or NBD migration.
      8c41794a
  32. 08 11月, 2013 1 次提交
    • P
      conf: Refactor storing and usage of feature flags · de7b5faf
      Peter Krempa 提交于
      Currently we were storing domain feature flags in a bit field as the
      they were either enabled or disabled. New features such as paravirtual
      spinlocks however can be tri-state as the default option may depend on
      hypervisor version.
      
      To allow storing tri-state feature state in the same place instead of
      having to declare dedicated variables for each feature this patch
      refactors the bit field to an array.
      de7b5faf
  33. 06 9月, 2013 1 次提交
    • J
      libxl: Compile regular expression where it is used · 4e0ba0bd
      Jim Fehlig 提交于
      The regular expression used to determine guest capabilities
      was compiled in libxlCapsInitHost() but used in libxlCapsInitGuests().
      Move compilation to libxlCapsInitGuests() where it is used, and free
      the compiled regex after use.  Ensure not to free the regex if
      compilation fails.
      4e0ba0bd
  34. 05 9月, 2013 1 次提交
  35. 04 9月, 2013 2 次提交