1. 13 8月, 2015 1 次提交
  2. 11 7月, 2015 1 次提交
    • J
      libxl: set dom0 state to running · 4ffb21c8
      Jim Fehlig 提交于
      Commit 45697fe5 added dom0 to driver->domains, but missed
      setting its state to 'running'
      
      $ virsh list
       Id    Name                           State
      ----------------------------------------------------
       0     Domain-0                       shut off
      4ffb21c8
  3. 09 7月, 2015 2 次提交
    • J
      libxl: rework setting the state of virDomainObj · e9c27344
      Jim Fehlig 提交于
      Set the state of virDomainObj in the functions that
      actually change the domain state, instead of the generic
      libxlDomainCleanup function. This approach gives functions
      calling libxlDomainCleanup more flexibility wrt when and
      how they change virDomainObj state via virDomainObjSetState.
      
      The prior approach of calling virDomainObjSetState in
      libxlDomainCleanup resulted in the following incorrect
      coding pattern in the various functions that change
      domain state
      
       libxlDomain<DoStateTransition>
         call libxl function to do state transition
         emit lifecycle event
         libxlDomainCleanup
           virDomainObjSetState
      
      Once simple manifestation of this bug is seeing a domain
      running in virt-manager after selecting the shutdown button,
      even after the domain has long shutdown.
      e9c27344
    • J
      libxl: support dom0 · 45697fe5
      Jim Fehlig 提交于
      In Xen, dom0 is really just another domain that supports ballooning,
      adding/removing devices, changing vcpu configuration, etc. This patch
      adds support to the libxl driver for managing dom0. Note that the
      legacy xend driver has long supported managing dom0.
      
      Operations that are not supported on dom0 are filtered in libvirt
      where a sensible error is reported. Errors from libxl are not
      always helpful. E.g., attempting a save on dom0 results in
      
      2015-06-23 15:25:05 MDT libxl: debug: libxl_dom.c:1570:libxl__toolstack_save: domain=0 toolstack data size=8
      2015-06-23 15:25:05 MDT libxl: debug: libxl.c:979:do_libxl_domain_suspend: ao 0x7f7e68000b70: inprogress: poller=0x7f7e68000930, flags=i
      2015-06-23 15:25:05 MDT libxl-save-helper: debug: starting save: Success
      2015-06-23 15:25:05 MDT xc: detail: xc_domain_save_suse: starting save of domid 0
      2015-06-23 15:25:05 MDT xc: error: Couldn't map live_shinfo (3 = No such process): Internal error
      2015-06-23 15:25:05 MDT xc: detail: Save exit of domid 0 with errno=3
      2015-06-23 15:25:05 MDT libxl-save-helper: debug: complete r=1: No such process
      2015-06-23 15:25:05 MDT libxl: error: libxl_dom.c:1876:libxl__xc_domain_save_done: saving domain: domain did not respond to suspend request: No such process
      2015-06-23 15:25:05 MDT libxl: error: libxl_dom.c:2033:remus_teardown_done: Remus: failed to teardown device for guest with domid 0, rc -8
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      45697fe5
  4. 01 7月, 2015 4 次提交
    • J
      libxl: Set def->vcpus after successfully modifying live vcpu count · 04597f8f
      Jim Fehlig 提交于
      def->vcpus was never updated after successfully changing the live
      vcpu count of a domain. Subsequent queries for vcpu info would
      return incorrect results.  E.g.:
      
      virsh vcpucount test
      maximum      config         4
      maximum      live           4
      current      config         4
      current      live           4
      
      virsh setvcpus test 2
      
      virsh vcpucount test
      maximum      config         4
      maximum      live           4
      current      config         4
      current      live           4
      
      After patch, live current config is reported correctly:
      
      virsh vcpucount test
      maximum      config         4
      maximum      live           4
      current      config         4
      current      live           2
      
      While fixing this, noticed that the live config was not saved
      to cfg->stateDir via virDomainSaveStatus. Save the live config
      and change error handling of virDomainSave{Config,Status} to
      log a message via VIR_WARN, instead of failing the entire
      DomainSetVcpusFlags operation.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      04597f8f
    • J
      libxl: honor domainGetXMLDesc() --inactive flag · 33be48d7
      Jim Fehlig 提交于
      The libxl driver always uses virDomainObj->def when formatting
      the domain XML description.  Use virDomainObj->newDef when
      --inactive flag is set.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      33be48d7
    • J
      libxl: don't remove persistent domain on start failure · 4b53d0d4
      Jim Fehlig 提交于
      libxlDomainCreateXML() would remove a persistent domain if
      libxlDomainStart() failed.  Check if domain is persistent
      before removing.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      4b53d0d4
    • J
      libxl: don't overwrite domain state from statedir config · 29b154e2
      Jim Fehlig 提交于
      When restarting libvirtd and reconnecting to running domains,
      libxlReconnectDomain() would unconditionally set the domain state
      to VIR_DOMAIN_RUNNING, overwriting the state maintained in
      $statedir/<domname>.xml.  A domain in a paused state would have
      the state changed to running, even though it was actually in a
      paused state.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      29b154e2
  5. 24 6月, 2015 1 次提交
    • L
      Improve some errors for openconsole/channel · 898e76f0
      Luyao Huang 提交于
      Functions like virDomainOpenConsole() and virDomainOpenChannel() accept
      NULL as a dev_name parameter.  Try using alias for the error message if
      dev_name is not specified.
      
      Before:
        error: internal error: character device <null> is not using a PTY
      
      After:
        error: internal error: character device serial0 is not using a PTY
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      898e76f0
  6. 20 6月, 2015 1 次提交
    • I
      libxl: avoid freeing an uninitialised bitmap · cc99d240
      Ian Campbell 提交于
      If vm->def->cputune.nvcpupin is 0 in libxlDomainSetVcpuAffinities (as
      seems to be the case on arm) then the VIR_FREE after cleanup: would be
      operating on an uninitialised pointer in map.map.
      
      Fix this by using libxl_bitmap_init and libxl_bitmap_dispose in the
      appropriate places (like VIR_FREE, libxl_bitmap_dispose is also
      idempotent, so there is no double free on exit from the loop).
      
      libxl_bitmap_dispose is slightly preferable since it also sets
      map.size back to 0, avoiding a potential source of confusion.
      
      This fixes the crashes we've been seeing in the Xen automated tests on
      ARM.
      
      I had a glance at the handful of other users of libxl_bitmap and none
      of them looked to have a similar issue.
      Signed-off-by: NIan Campbell <ian.campbell@citrix.com>
      cc99d240
  7. 19 6月, 2015 1 次提交
  8. 13 6月, 2015 1 次提交
  9. 11 6月, 2015 1 次提交
  10. 04 6月, 2015 3 次提交
    • P
      libxl: Don't remove vcpu pin definition in libxlDomainCleanup · 8db0f438
      Peter Krempa 提交于
      The vCPU pinning definition gets removed when the domain definition is
      being freed later. If there is no next configuration it would remove the
      configured pinning.
      8db0f438
    • P
      qemu: libxl: vcpupin: Don't reset pinning when pinning to all pcpus · a02a161b
      Peter Krempa 提交于
      In the pre-NUMA ages pinning a vCPU to all pCPUs was eaqual to deleting
      the pinning info. Now it does not entirely work that way. Pinning a vCPU
      to all pCPUs might be a desired operation. Additionally removal of the
      pinning will result into using the default pinning information at the
      next boot which might be different from all vcpus.
      
      This patch removes the false assumption that we should remove the
      pinning after pinning to all vCPUs and tweaks the documentation for
      virsh.
      
      A later patch will implement a new flag for the virDomainPinVcpuFlags
      API that will allow to remove the pinning in a sane way.
      a02a161b
    • J
      maint: remove incorrect apostrophes from 'its' · 12b949df
      Ján Tomko 提交于
      12b949df
  11. 03 6月, 2015 3 次提交
  12. 01 6月, 2015 1 次提交
    • R
      libxl: load on FreeBSD · f57842ec
      Roman Bogorodskiy 提交于
      The libxl tries to check if it's running in dom0 by parsing
      /proc/xen/capabilities and if that fails it doesn't load.
      
      There's no procfs interface in Xen on FreeBSD, so this check always
      fails.
      
      In addition to checking procfs, check if /dev/xen/xenstored, that's enough to
      check if we're running in dom0 in FreeBSD case.
      f57842ec
  13. 29 5月, 2015 4 次提交
  14. 21 5月, 2015 1 次提交
  15. 18 5月, 2015 1 次提交
    • L
      conf: make virNodeDevCapData an official type · ffc40b63
      Laine Stump 提交于
      For some reason a union (_virNodeDevCapData) that had only been
      declared inside the toplevel struct virNodeDevCapsDef was being used
      as an argument to functions all over the place. Since it was only a
      union, the "type" attribute wasn't necessarily sent with it. While
      this works, it just seems wrong.
      
      This patch creates a toplevel typedef for virNodeDevCapData and
      virNodeDevCapDataPtr, making it a struct that has the type attribute
      as a member, along with an anonymous union of everything that used to
      be in union _virNodeDevCapData. This way we only have to change the
      following:
      
        s/union _virNodeDevCapData */virNodeDevCapDataPtr /
      
      and
      
        s/caps->type/caps->data.type/
      
      This will make me feel less guilty when adding functions that need a
      pointer to one of these.
      ffc40b63
  16. 16 5月, 2015 1 次提交
    • J
      libxl: provide impl for nodeGetSecurityModel · 99a42f3c
      Jim Fehlig 提交于
      Currently, the libxl driver does not support any security drivers.
      When the qemu driver has no security driver configued,
      nodeGetSecurityModel succeeds but returns an empty virSecurityModel
      object.  Do the same in the libxl driver instead of reporting
      
      this function is not supported by the connection driver:
      virNodeGetSecurityModel
      99a42f3c
  17. 13 5月, 2015 1 次提交
  18. 06 5月, 2015 1 次提交
    • J
      libxl: Resolve Coverity RESOURCE_LEAK · 11b91679
      John Ferlan 提交于
      The returned socks from virNetSocketNewListenTCP needs to be VIR_FREE'd
      as well as seach of the Close/Unref on all the socks[i] that is
      already done
      11b91679
  19. 05 5月, 2015 1 次提交
  20. 30 4月, 2015 1 次提交
  21. 25 4月, 2015 4 次提交
  22. 24 4月, 2015 1 次提交
  23. 22 4月, 2015 1 次提交
  24. 21 4月, 2015 3 次提交