From patchwork Wed Jun 26 17:35:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 2787491 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D4E09C0AB1 for ; Wed, 26 Jun 2013 17:36:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3445520461 for ; Wed, 26 Jun 2013 17:35:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A44BB2045E for ; Wed, 26 Jun 2013 17:35:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752735Ab3FZRfw (ORCPT ); Wed, 26 Jun 2013 13:35:52 -0400 Received: from cantor2.suse.de ([195.135.220.15]:59207 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752299Ab3FZRfv (ORCPT ); Wed, 26 Jun 2013 13:35:51 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 8CED0A5211; Wed, 26 Jun 2013 19:35:50 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , Gleb Natapov , Marcelo Tosatti , kvm@vger.kernel.org (open list:Overall) Subject: [PATCH qom-cpu v3 03/14] kvm: Change kvm_remove_all_breakpoints() argument to CPUState Date: Wed, 26 Jun 2013 19:35:32 +0200 Message-Id: <1372268143-3894-4-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1372268143-3894-1-git-send-email-afaerber@suse.de> References: <1372268143-3894-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Acked-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Andreas Färber --- gdbstub.c | 2 +- include/sysemu/kvm.h | 2 +- kvm-all.c | 6 +++--- kvm-stub.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 3101a43..9e7f7a1 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -2019,7 +2019,7 @@ static void gdb_breakpoint_remove_all(void) CPUArchState *env; if (kvm_enabled()) { - kvm_remove_all_breakpoints(gdbserver_state->c_cpu); + kvm_remove_all_breakpoints(ENV_GET_CPU(gdbserver_state->c_cpu)); return; } diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index c88aee9..9460d5a 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -163,7 +163,7 @@ int kvm_insert_breakpoint(CPUArchState *env, target_ulong addr, target_ulong len, int type); int kvm_remove_breakpoint(CPUArchState *env, target_ulong addr, target_ulong len, int type); -void kvm_remove_all_breakpoints(CPUArchState *env); +void kvm_remove_all_breakpoints(CPUState *cpu); int kvm_update_guest_debug(CPUArchState *env, unsigned long reinject_trap); #ifndef _WIN32 int kvm_set_signal_mask(CPUState *cpu, const sigset_t *sigset); diff --git a/kvm-all.c b/kvm-all.c index d074597..ee0ee02 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1981,11 +1981,11 @@ int kvm_remove_breakpoint(CPUArchState *env, target_ulong addr, return 0; } -void kvm_remove_all_breakpoints(CPUArchState *env) +void kvm_remove_all_breakpoints(CPUState *cpu) { - CPUState *cpu = ENV_GET_CPU(env); struct kvm_sw_breakpoint *bp, *next; KVMState *s = cpu->kvm_state; + CPUArchState *env; QTAILQ_FOREACH_SAFE(bp, &s->kvm_sw_breakpoints, entry, next) { if (kvm_arch_remove_sw_breakpoint(cpu, bp) != 0) { @@ -2026,7 +2026,7 @@ int kvm_remove_breakpoint(CPUArchState *env, target_ulong addr, return -EINVAL; } -void kvm_remove_all_breakpoints(CPUArchState *env) +void kvm_remove_all_breakpoints(CPUState *cpu) { } #endif /* !KVM_CAP_SET_GUEST_DEBUG */ diff --git a/kvm-stub.c b/kvm-stub.c index 76da61e..a6c2b01 100644 --- a/kvm-stub.c +++ b/kvm-stub.c @@ -95,7 +95,7 @@ int kvm_remove_breakpoint(CPUArchState *env, target_ulong addr, return -EINVAL; } -void kvm_remove_all_breakpoints(CPUArchState *env) +void kvm_remove_all_breakpoints(CPUState *cpu) { }