From patchwork Sun Jun 9 16:10:43 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: 250060 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 57D7C2C00AD for ; Mon, 10 Jun 2013 02:14:56 +1000 (EST) Received: from localhost ([::1]:37560 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UliGc-0007v0-A1 for incoming@patchwork.ozlabs.org; Sun, 09 Jun 2013 12:14:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UliCz-0002OJ-Un for qemu-devel@nongnu.org; Sun, 09 Jun 2013 12:11:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UliCy-0001wY-7I for qemu-devel@nongnu.org; Sun, 09 Jun 2013 12:11:09 -0400 Received: from cantor2.suse.de ([195.135.220.15]:39891 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UliCy-0001wQ-01 for qemu-devel@nongnu.org; Sun, 09 Jun 2013 12:11:08 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9675BA5359; Sun, 9 Jun 2013 18:11:07 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Sun, 9 Jun 2013 18:10:43 +0200 Message-Id: <1370794247-28267-15-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1370794247-28267-1-git-send-email-afaerber@suse.de> References: <1370794247-28267-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: qiaonuohan@cn.fujitsu.com, =?UTF-8?q?Andreas=20F=C3=A4rber?= , lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH qom-cpu v4 14/18] dump: Abstract dump_init() with cpu_synchronize_all_states() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Instead of calling cpu_synchronize_state() for each CPU, call the existing cpu_synchronize_all_states() helper. Signed-off-by: Andreas Färber Reviewed-by: Luiz Capitulino --- dump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dump.c b/dump.c index b44dafc..44a1339 100644 --- a/dump.c +++ b/dump.c @@ -21,6 +21,7 @@ #include "sysemu/dump.h" #include "sysemu/sysemu.h" #include "sysemu/memory_mapping.h" +#include "sysemu/cpus.h" #include "qapi/error.h" #include "qmp-commands.h" @@ -732,12 +733,12 @@ static int dump_init(DumpState *s, int fd, bool paging, bool has_filter, * If the target architecture is not supported, cpu_get_dump_info() will * return -1. * - * if we use kvm, we should synchronize the register before we get dump + * If we use KVM, we should synchronize the registers before we get dump * info. */ + cpu_synchronize_all_states(); nr_cpus = 0; for (env = first_cpu; env != NULL; env = env->next_cpu) { - cpu_synchronize_state(env); nr_cpus++; }