1. 09 12月, 2016 2 次提交
  2. 22 11月, 2016 1 次提交
  3. 22 10月, 2016 1 次提交
  4. 14 10月, 2016 1 次提交
  5. 12 10月, 2016 1 次提交
  6. 28 9月, 2016 2 次提交
    • J
      libxl: fix param assignment in domainGetSchedulerParameters · 4c600de7
      Jim Fehlig 提交于
      Due to a copy and paste error, the scheduler 'cap' parameter
      was over-writing the 'weight' parameter when preparing the
      return parameters in libxlDomainGetSchedulerParametersFlags.
      As a result, the scheduler weight was never shown when getting
      schedinfo and setting the weight failed as well
      
      virsh  schedinfo testvm
      Scheduler      : credit
      cap            : 0
      
      virsh  schedinfo testvm --cap 50 --weight 500
      Scheduler      : credit
      error: invalid scheduler option: weight
      
      The obvious fix is to assign the 'caps' parameter to the correct
      item in the parameter list.
      Reported-by: NVolo M. <vm@vovs.net>
      4c600de7
    • J
      libxl: channels support · 719b663f
      Joao Martins 提交于
      And allow libxl to handle channel element which creates a Xen
      console visible to the guest as a low-bandwitdh communication
      channel. If type is PTY we also fetch the tty after boot using
      libxl_channel_getinfo to fetch the tty path. On socket case,
      we autogenerate a path if not specified in the XML. Path autogenerated
      is slightly different from qemu driver: qemu stores also on
      "channels/target" but it creates then a directory per domain with
      each channel target name. libxl doesn't appear to have a clear
      definition of private files associated with each domain, so for
      simplicity we do it slightly different. On qemu each autogenerated
      channel goes like:
      
      channels/target/<domain-name>/<target name>
      
      Whereas for libxl:
      
      channels/target/<domain-name>-<target name>
      
      Should note that if path is not specified it won't persist,
      existing only on live XML, unless user had initially specified it.
      Since support for libxl channels only came on Xen >= 4.5 we therefore
      need to conditionally compile it with LIBXL_HAVE_DEVICE_CHANNEL.
      
      After this patch and having a qemu guest agent:
       $ cat domain.xml | grep -a1 channel | head -n 5 | tail -n 4
       <channel type='unix'>
         <source mode='bind' path='/tmp/channel'/>
         <target type='xen' name='org.qemu.guest_agent.0'/>
       </channel>
      
       $ virsh create domain.xml
       $ echo '{"execute":"guest-network-get-interfaces"}' | socat
       stdio,ignoreeof  unix-connect:/tmp/channel
      
       {"execute":"guest-network-get-interfaces"}
       {"return": [{"name": "lo", "ip-addresses": [{"ip-address-type": "ipv4",
       "ip-address": "127.0.0.1", "prefix": 8}, {"ip-address-type": "ipv6",
       "ip-address": "::1", "prefix": 128}], "hardware-address":
       "00:00:00:00:00:00"}, {"name": "eth0", "ip-addresses":
       [{"ip-address-type": "ipv4", "ip-address": "10.100.0.6", "prefix": 24},
       {"ip-address-type": "ipv6", "ip-address": "fe80::216:3eff:fe40:88eb",
       "prefix": 64}], "hardware-address": "00:16:3e:40:88:eb"}, {"name":
       "sit0"}]}
      Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      719b663f
  7. 26 9月, 2016 1 次提交
  8. 22 9月, 2016 1 次提交
    • J
      cpu: Rework cpuCompare* APIs · 7f127ded
      Jiri Denemark 提交于
      Both cpuCompare* APIs are renamed to virCPUCompare*. And they should now
      work for any guest CPU definition, i.e., even for host-passthrough
      (trivial) and host-model CPUs. The implementation in x86 driver is
      enhanced to provide a hint about -noTSX Broadwell and Haswell models
      when appropriate.
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      7f127ded
  9. 12 9月, 2016 2 次提交
  10. 03 9月, 2016 1 次提交
  11. 30 8月, 2016 1 次提交
    • J
      libxl: advertise support for migration V3 · 36f57ad7
      Jim Fehlig 提交于
      The libxl driver has long supported migration V3 but has never
      indicated so in the connectSupportsFeature API. As a result, apps
      such as virt-manager that use the more generic virDomainMigrate API
      fail with
      
      libvirtError: this function is not supported by the connection driver:
      virDomainMigrate
      
      Add VIR_DRV_FEATURE_MIGRATION_V3 to the list of features marked as
      supported in the connectSupportsFeature API.
      36f57ad7
  12. 16 8月, 2016 2 次提交
    • M
      libxl_driver: Indent LIBXL_VBD_SECTOR_SIZE macro correctly · 2140e3da
      Michal Privoznik 提交于
      Because of change in caaa1bd3 this macro is no under
      #ifdef block. That means it needs to be re-intended correctly.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      2140e3da
    • R
      libxl: fix unused functions · caaa1bd3
      Roman Bogorodskiy 提交于
      Commit eee7bd4e introduced two functions: libxlDiskPathToID and
      libxlDiskSectorSize.
      
      However, as they're used only by code under #ifdef __linux__,
      on non-Linux platforms it results in errors similar to this:
      
       CC       libxl/libvirt_driver_libxl_impl_la-libxl_driver.lo
      libxl/libxl_driver.c:5263:1: error: unused function 'libxlDiskPathToID' [-Werror,-Wunused-function]
      libxlDiskPathToID(const char *virtpath)
      ^
      libxl/libxl_driver.c:5312:1: error: unused function 'libxlDiskSectorSize' [-Werror,-Wunused-function]
      libxlDiskSectorSize(int domid, int devno)
      ^
      2 errors generated.
      
      Fix that by moving these functions under the #ifdef __linux__ block.
      caaa1bd3
  13. 02 8月, 2016 5 次提交
    • J
      libxl: Fix broken build attach/detach controller device · 172218a0
      John Ferlan 提交于
      Commit id '44304c6e' added the API libxlDomainAttachControllerDevice
      inside a conditional LIBXL_HAVE_PVUSB, but called that function outside
      the conditional in libxlDomainAttachDeviceLive.
      
      Similarly, the API libxlDomainDetachControllerDevice was added inside a
      conditional LIBXL_HAVE_PVUSB, but called outside the conditional in
      libxlDomainDetachDeviceLive.
      
      This patch adds the conditional LIBXL_HAVE_PVUSB around those two calls
      from within the switch.
      172218a0
    • C
      libxl: add hooks support · 7d3b2eb5
      Cédric Bosdonnat 提交于
      Introduce libxl hook and use it for start, prepare, started,
      stop, stopped, migrate events.
      7d3b2eb5
    • C
      libxl: fix segfault in libxlReconnectDomain · a9aafc0a
      Cédric Bosdonnat 提交于
      In case of error, libxlReconnectDomain may call
      virDomainObjListRemoveLocked. However it has no local reference on
      the domain object, leading to segfault. Get a reference to the domain
      object at the start of the function and release it at the end to avoid
      problems.
      
      This commit also factorizes code between the error and normal ends.
      a9aafc0a
    • C
      libxl: check available controller and port when hotplugging USB device · f5359e55
      Chunyan Liu 提交于
      When hotplugging a USB device, check if there is an available controller
      and port, if not, automatically create a USB controller of version
      2.0 and 8 ports.
      Signed-off-by: NChunyan Liu <cyliu@suse.com>
      f5359e55
    • C
      libxl: support usb controller hotplug · 44304c6e
      Chunyan Liu 提交于
      Support USB controller hot-plug and hot-unplug.
      
       #virsh attach-device dom usbctrl.xml
       #virsh detach-device dom usbctrl.xml
       usbctrl.xml example:
       <controller type='usb' index='0' model='qusb2'>
      Signed-off-by: NChunyan Liu <cyliu@suse.com>
      44304c6e
  14. 27 7月, 2016 1 次提交
    • J
      libxl: implement virDomainBlockStats · eee7bd4e
      Joao Martins 提交于
      Introduce initial support for domainBlockStats API call that
      allow us to query block device statistics. OpenStack nova
      uses this API call to query block statistics, alongside
      virDomainMemoryStats and virDomainInterfaceStats.  Note that
      this patch only introduces it for VBD for starters. QDisk
      would come in a separate patch series.
      
      A new statistics data structure is introduced to fit common
      statistics among others specific to the underlying block
      backends. For the VBD statistics on linux these are exported
      via sysfs on the path:
      
      "/sys/bus/xen-backend/devices/vbd-<domid>-<devid>/statistics"
      
      To calculate the block devno libxlDiskPathToID is introduced.
      Each backend implements its own function to extract statistics,
      allowing support for multiple backends and different platforms.
      
      VBD stats are exposed in reqs and number of sectors from
      blkback, and it's up to us to convert it to sector sizes.
      The sector size is gathered through xenstore in the device
      backend entry "physical-sector-size".
      
      BlockStatsFlags variant is also implemented which has the
      added benefit of getting the number of flush requests.
      Signed-off-by: NJoao Martins <joao.m.martins@oracle.com>
      eee7bd4e
  15. 11 7月, 2016 2 次提交
  16. 07 7月, 2016 1 次提交
  17. 23 6月, 2016 1 次提交
    • J
      libxl: use serial device for console when targetType is serial · 76d58716
      Jim Fehlig 提交于
      When domXML contains only <console type='pty'> and no corresponding
      <serial>, the console is "stolen" [1] and used as the first <serial>
      device. When this "stolen" console is accessed from the libxl driver
      (in libxlConsoleCallback and libxlDomainOpenConsole), check if the
      targetType is VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL, and use the
      "stolen" device in def->serials[0] instead. Prior to this change,
      creating a domain with input XML containing only a <console> device
      and subsequently attempting to access its console with
      'virsh console' would fail
      
      error: internal error: character device <null> is not using a PTY
      
      [1] See comments associated with virDomainDefAddConsoleCompat() in
          $LIBVIRT-SRC/src/conf/domain_conf.c:
      76d58716
  18. 17 6月, 2016 1 次提交
  19. 15 6月, 2016 2 次提交
    • C
      libxl: support hotplug USB host device · fc21d106
      Chunyan Liu 提交于
      Support hot attach/detach a USB host device to guest.
      Currently libxl only supports xen PV guest, and only
      supports specifying USB host device by 'bus number'
      and 'device number', for example:
      
       usb.xml:
          <hostdev mode='subsystem' type='usb' managed='no'>
            <source>
              <address bus='1' device='3'/>
            </source>
          </hostdev>
       #xl attach-device dom usb.xml
       #xl detach-device dom usb.xml
      Signed-off-by: NChunyan Liu <cyliu@suse.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      fc21d106
    • C
      libxl: support creating guest with USB hostdev · 2a58ed0b
      Chunyan Liu 提交于
      Support creating guest with USB host device in config file.
      Currently libxl only supports xen PV guest, and only supports
      specifying USB host device by 'bus number' and 'device number',
      for example:
      
          <hostdev mode='subsystem' type='usb' managed='no'>
            <source>
              <address bus='1' device='3'/>
            </source>
          </hostdev>
      Signed-off-by: NChunyan Liu <cyliu@suse.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      2a58ed0b
  20. 14 6月, 2016 3 次提交
  21. 13 6月, 2016 1 次提交
    • W
      libxl: fix vm lock overwritten bug · 9ac94507
      Wang Yufei 提交于
      In libxl driver we do virObjectRef in libxlDomainObjBeginJob,
      If virCondWaitUntil failed, it goes to error, do virObjectUnref,
      There's a chance that someone undefine the vm at the same time,
      and refs unref to zero, vm is freed in libxlDomainObjBeginJob.
      But the vm outside function is not Null, we do virObjectUnlock(vm).
      That's how we overwrite the vm memory after it's freed. I fix it.
      Signed-off-by: NWang Yufei <james.wangyufei@huawei.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      9ac94507
  22. 08 6月, 2016 1 次提交
  23. 07 6月, 2016 2 次提交
  24. 25 5月, 2016 1 次提交
    • C
      libxl: add .domainInterfaceAddresses · ba566428
      Chunyan Liu 提交于
      Add .domainInterfaceAddresses so that user can have a way to
      get domain interface address by 'virsh domifaddr'. Currently
      it only supports '--source lease'.
      
      Signed-off: Chunyan Liu <cyliu@suse.com>
      ba566428
  25. 24 5月, 2016 1 次提交
  26. 20 5月, 2016 1 次提交
  27. 18 5月, 2016 1 次提交