From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: [PATCH kvm-unit-tests 0/3] use setjmp/longjmp to catch exceptions Date: Tue, 15 Dec 2015 11:25:34 +0100 Message-ID: <1450175138-1140-1-git-send-email-pbonzini@redhat.com> Cc: dmatlack@google.com To: kvm@vger.kernel.org Return-path: Received: from mail-wm0-f41.google.com ([74.125.82.41]:34105 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964847AbbLOKZw (ORCPT ); Tue, 15 Dec 2015 05:25:52 -0500 Received: by mail-wm0-f41.google.com with SMTP id p66so102719279wmp.1 for ; Tue, 15 Dec 2015 02:25:51 -0800 (PST) Sender: kvm-owner@vger.kernel.org List-ID: This is an attempt to fix David's reported problem with set_exception_return and make it more robust. Patch 1 introduces setjmp; patches 2 and 3 replace test_for_exception and set_exception_return with setjmp/longjmp. Patch 4 provides further cleanups. Paolo Paolo Bonzini (4): lib: add setjmp header and x86 implementation x86: replace set_exception_return with longjmp-based implementation x86: remove test_for_exception x86: apic: cleanup config/config-i386.mak | 2 ++ config/config-x86-common.mak | 4 +++- config/config-x86_64.mak | 2 ++ lib/setjmp.h | 12 +++++++++++ lib/x86/desc.c | 24 +++++++++------------ lib/x86/desc.h | 8 ++++--- lib/x86/setjmp32.S | 25 ++++++++++++++++++++++ lib/x86/setjmp64.S | 27 ++++++++++++++++++++++++ x86/apic.c | 50 ++++++++++++++++++++------------------------ x86/setjmp.c | 19 +++++++++++++++++ x86/vmx.c | 43 ++++++++++++++++++++++--------------- 11 files changed, 154 insertions(+), 62 deletions(-) create mode 100644 lib/setjmp.h create mode 100644 lib/x86/setjmp32.S create mode 100644 lib/x86/setjmp64.S create mode 100644 x86/setjmp.c -- 2.5.0