From patchwork Fri Mar 4 10:20:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 85405 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D7B9DB70F6 for ; Fri, 4 Mar 2011 21:35:36 +1100 (EST) Received: from localhost ([127.0.0.1]:34497 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PvSLa-0007pR-Bg for incoming@patchwork.ozlabs.org; Fri, 04 Mar 2011 05:34:58 -0500 Received: from [140.186.70.92] (port=50844 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PvS8T-00028a-Bb for qemu-devel@nongnu.org; Fri, 04 Mar 2011 05:21:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PvS7N-0005Ek-Rc for qemu-devel@nongnu.org; Fri, 04 Mar 2011 05:20:25 -0500 Received: from goliath.siemens.de ([192.35.17.28]:34173) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PvS7N-0005D3-7B for qemu-devel@nongnu.org; Fri, 04 Mar 2011 05:20:17 -0500 Received: from mail1.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.13.6/8.13.6) with ESMTP id p24AKFbp018916; Fri, 4 Mar 2011 11:20:15 +0100 Received: from mchn199C.mchp.siemens.de ([139.25.109.49]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id p24AKCXP008671; Fri, 4 Mar 2011 11:20:14 +0100 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Date: Fri, 4 Mar 2011 11:20:07 +0100 Message-Id: <5e25fb47b24080e10d204c27f9f1d0176eaa1495.1299233998.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 192.35.17.28 Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH 10/15] kvm: Consider EXIT_DEBUG unknown without CAP_SET_GUEST_DEBUG X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Without KVM_CAP_SET_GUEST_DEBUG, we neither motivate the kernel to report KVM_EXIT_DEBUG nor do we expect such exits. So fall through to the arch code which will simply report an unknown exit reason. Signed-off-by: Jan Kiszka --- kvm-all.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 07a1a9c..2952499 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -992,17 +992,17 @@ int kvm_cpu_exec(CPUState *env) ret = kvm_handle_internal_error(env, run); break; #endif +#ifdef KVM_CAP_SET_GUEST_DEBUG case KVM_EXIT_DEBUG: DPRINTF("kvm_exit_debug\n"); -#ifdef KVM_CAP_SET_GUEST_DEBUG if (kvm_arch_debug(&run->debug.arch)) { ret = EXCP_DEBUG; goto out; } /* re-enter, this exception was guest-internal */ ret = 1; -#endif /* KVM_CAP_SET_GUEST_DEBUG */ break; +#endif /* KVM_CAP_SET_GUEST_DEBUG */ default: DPRINTF("kvm_arch_handle_exit\n"); ret = kvm_arch_handle_exit(env, run);