1. 18 Feb, 2016 7 commits
  2. 15 Feb, 2016 1 commit
  3. 26 Jan, 2016 5 commits
  4. 19 Jan, 2016 25 commits
  5. 12 Jan, 2016 2 commits
    • Paolo Bonzini's avatar
      x86: simplify test_for_exception trigger functions · 932ba2d2
      Paolo Bonzini authored
      test_for_exception makes the unit tests simpler, but it requires the
      trigger function to be in on the joke: before, by calling
      set_exception_return; now, by calling set_exception_jmpbuf and
      handle_exception(NULL).  The new setjmp-based implementation
      lets us move all of this into test_for_exception itself, so
      that the trigger_func can be very simple.
      Suggested-by: default avatarDavid Matlack <dmatlack@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    • Paolo Bonzini's avatar
      x86: replace set_exception_return with longjmp-based implementation · 03f37ef2
      Paolo Bonzini authored
      set_exception_return forces exceptions handlers to return to a specific
      address instead of returning to the instruction address pushed by the
      CPU at the time of the exception. The unit tests apic.c and vmx.c use
      this functionality to recover from expected exceptions.
      When using set_exception_return one would have to be careful not to modify
      the stack (such as by doing a function call) as triggering the exception
      will likely jump us past the instructions which undo the stack manipulation
      (such as a ret).  This is unnecessarily brittle, and C already has a
      mechanism to do non-local returns---setjmp.  Now that libcflat includes
      an implementation of setjmp, replace set_exception_return with a wrapper
      that takes care of restoring the processor flags as well.
      Reported-by: default avatarDavid Matlack <dmatlack@google.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>