From patchwork Sun Jun 16 15:57:40 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: 2728511 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 281FB9F96B for ; Sun, 16 Jun 2013 15:58:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 597462016D for ; Sun, 16 Jun 2013 15:58:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 67CD220167 for ; Sun, 16 Jun 2013 15:58:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755348Ab3FPP63 (ORCPT ); Sun, 16 Jun 2013 11:58:29 -0400 Received: from cantor2.suse.de ([195.135.220.15]:60018 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755322Ab3FPP6S (ORCPT ); Sun, 16 Jun 2013 11:58:18 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 810C2A50E4; Sun, 16 Jun 2013 17:58:17 +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 v2 20/29] kvm: Change kvm_remove_all_breakpoints() argument to CPUState Date: Sun, 16 Jun 2013 17:57:40 +0200 Message-Id: <1371398269-6213-21-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1371398269-6213-1-git-send-email-afaerber@suse.de> References: <1371398269-6213-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.0 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 Signed-off-by: Andreas Färber --- gdbstub.c | 2 +- include/sysemu/kvm.h | 2 +- kvm-all.c | 5 ++--- kvm-stub.c | 2 +- 4 files changed, 5 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 fe8bc40..c767488 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -163,7 +163,7 @@ int kvm_insert_breakpoint(CPUArchState *current_env, target_ulong addr, target_ulong len, int type); int kvm_remove_breakpoint(CPUArchState *current_env, target_ulong addr, target_ulong len, int type); -void kvm_remove_all_breakpoints(CPUArchState *current_env); +void kvm_remove_all_breakpoints(CPUState *current_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 90b89cd..b3ba6aa 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -1979,9 +1979,8 @@ int kvm_remove_breakpoint(CPUArchState *current_env, target_ulong addr, return 0; } -void kvm_remove_all_breakpoints(CPUArchState *current_env) +void kvm_remove_all_breakpoints(CPUState *current_cpu) { - CPUState *current_cpu = ENV_GET_CPU(current_env); struct kvm_sw_breakpoint *bp, *next; KVMState *s = current_cpu->kvm_state; CPUArchState *env; @@ -2026,7 +2025,7 @@ int kvm_remove_breakpoint(CPUArchState *current_env, target_ulong addr, return -EINVAL; } -void kvm_remove_all_breakpoints(CPUArchState *current_env) +void kvm_remove_all_breakpoints(CPUState *current_cpu) { } #endif /* !KVM_CAP_SET_GUEST_DEBUG */ diff --git a/kvm-stub.c b/kvm-stub.c index 5457fe8..f614f92 100644 --- a/kvm-stub.c +++ b/kvm-stub.c @@ -95,7 +95,7 @@ int kvm_remove_breakpoint(CPUArchState *current_env, target_ulong addr, return -EINVAL; } -void kvm_remove_all_breakpoints(CPUArchState *current_env) +void kvm_remove_all_breakpoints(CPUState *current_cpu) { }