From patchwork Tue Mar 15 21:50:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 87122 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 0F613B7045 for ; Wed, 16 Mar 2011 10:14:05 +1100 (EST) Received: from localhost ([127.0.0.1]:53516 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pzd3d-0004xP-2O for incoming@patchwork.ozlabs.org; Tue, 15 Mar 2011 18:49:41 -0400 Received: from [140.186.70.92] (port=35219 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PzcLW-0002LX-Fz for qemu-devel@nongnu.org; Tue, 15 Mar 2011 18:04:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PzcLV-0004yw-8z for qemu-devel@nongnu.org; Tue, 15 Mar 2011 18:04:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PzcLU-0004yC-Ce for qemu-devel@nongnu.org; Tue, 15 Mar 2011 18:04:04 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2FM43bO008988 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 15 Mar 2011 18:04:03 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p2FM43a7008153; Tue, 15 Mar 2011 18:04:03 -0400 Received: from amt.cnet (vpn1-5-191.ams2.redhat.com [10.36.5.191]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p2FM41dj024399; Tue, 15 Mar 2011 18:04:02 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id 183B968A034; Tue, 15 Mar 2011 18:53:14 -0300 (BRT) Received: (from marcelo@localhost) by amt.cnet (8.14.4/8.14.4/Submit) id p2FLrArc002158; Tue, 15 Mar 2011 18:53:10 -0300 From: Marcelo Tosatti To: Anthony Liguori Date: Tue, 15 Mar 2011 18:50:42 -0300 Message-Id: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Jan Kiszka , Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org Subject: [Qemu-devel] [PATCH 28/35] 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 From: Jan Kiszka 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 Signed-off-by: Marcelo Tosatti --- kvm-all.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 62b0984..906521e 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -975,17 +975,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);