Skip to content
  1. Nov 28, 2016
  2. Nov 18, 2016
  3. Nov 05, 2016
  4. Aug 09, 2016
  5. Jul 29, 2016
  6. Jun 15, 2016
  7. Jun 14, 2016
  8. Jun 09, 2016
  9. May 17, 2016
  10. Apr 18, 2016
  11. Apr 14, 2016
    • Will Deacon's avatar
      kvmtool: delegate exit/reboot responsibility to vcpu0 · e8cb90fb
      Will Deacon authored
      
      
      Our exit/reboot code is a bit of a mess:
      
        - Both kvm__reboot and kvm_cpu_exit send SIGKVMEXIT to running vcpus
        - When vcpu0 exits, the main thread starts executing destructors
          (exitcalls) whilst other vcpus may be running
        - The pause_lock isn't always held when inspecting is_running for
          a vcpu
      
      This patch attempts to fix these issues by restricting the exit/reboot
      path to vcpu0 and the main thread. In particular, a KVM_SYSTEM_EVENT
      will signal SIGKVMEXIT to vcpu0, which will join with the main thread
      and then tear down the other vcpus before invoking any destructor code.
      
      Acked-by: default avatarBalbir Singh <bsingharora@gmail.com>
      Tested-by: default avatarJulien Grall <julien.grall@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      e8cb90fb
  12. Apr 11, 2016
  13. Mar 16, 2016
  14. Mar 11, 2016
  15. Mar 02, 2016
  16. Feb 01, 2016
  17. Nov 18, 2015
  18. Nov 11, 2015
  19. Nov 09, 2015
    • Andre Przywara's avatar
      kvmtool: Makefile: remove LDFLAGS from guest_init linking · b40a51a1
      Andre Przywara authored
      
      
      Looking back at the HEAD from a few commits ago, it's obvious that
      using the LDFLAGS variable for linking the guest_init binary was
      rather pointless, as it was zeroed in the beginning and then never
      set.
      
      As guest_init is a rather special binary that does not cope well with
      arbitrary linker flags, let's reinstantiate the previous state by
      removing the LDFLAGS variable from those linking steps. This allows
      LDFLAGS to be used for linking the actual kvmtool binary only and
      helps to re-merge commit d0e2772b ("Makefile: allow overriding
      CFLAGS on the command line").
      
      Signed-off-by: Andre Przywara's avatarAndre Przywara <andre.przywara@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      b40a51a1
  20. Nov 05, 2015
    • Will Deacon's avatar
      kvmtool: fix VM exit race attempting to pthread_kill an exited thread · 2aa76b26
      Will Deacon authored
      
      
      lkvm currently suffers from a Segmentation Fault when exiting, which can
      also lead to the console not being cleaned up correctly after a VM exits.
      
      The issue is that (the misnamed) kvm_cpu__reboot function sends a
      SIGKVMEXIT to each vcpu thread, which causes those vcpu threads to exit
      once their main loops (kvm_cpu__start) detect that cpu->is_running is
      now false. The lack of synchronisation in this exit path means that a
      concurrent pause event (due to the br_write_lock in ioport__unregister)
      ends up sending SIGKVMPAUSE to an exited thread, resulting in a SEGV.
      
      This patch fixes the issue by moving kvm_cpu__reboot into kvm.c
      (renaming it in the process) where it can hold the pause_lock mutex
      across the reboot operation. This in turn makes it safe for the pause
      code to check the is_running field of each CPU before attempting to
      send a SIGKVMPAUSE signal.
      
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      2aa76b26
  21. Nov 04, 2015
  22. Nov 02, 2015
Loading