From patchwork Thu May 7 17:39:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 283203 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D35CFC38A2A for ; Thu, 7 May 2020 17:47:30 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9C2382173E for ; Thu, 7 May 2020 17:47:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SqfzoUyB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C2382173E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34200 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWkcL-0007nd-N5 for qemu-devel@archiver.kernel.org; Thu, 07 May 2020 13:47:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWkX7-0008O5-UK for qemu-devel@nongnu.org; Thu, 07 May 2020 13:42:05 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:33561 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jWkX6-0002iC-TX for qemu-devel@nongnu.org; Thu, 07 May 2020 13:42:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588873324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a0F6ldTOd8VBTvynMaD5KXJRN63vFzeEfQeG4bxiOT0=; b=SqfzoUyB8uSoXuB79zskW9FqokzilEIcSWyElXmqM+IPIZVjhmn5ka7KgI0lspQ85bvHtO GosvvbgAj3cnhoN7cmHXHXvG7oEoC5ZvR2D7oRI2zOxcJVvoVWhXuF05Vt3Dt6ODc9HJLc SuY48HvhHtEbOhJ0xJ6Mk9e1z5N77Gs= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-474-OOhdLuMnN6i88QPVjipWjA-1; Thu, 07 May 2020 13:42:02 -0400 X-MC-Unique: OOhdLuMnN6i88QPVjipWjA-1 Received: by mail-wr1-f71.google.com with SMTP id p8so3865036wrj.5 for ; Thu, 07 May 2020 10:42:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=L2IryXDavM4F6hNiL5uGphYz9XWPkFL2dN/mkNIfy2I=; b=B93oqm1z0UrWy68iiJh5c+SECepkW2uYHAd/9m2E0mDS+g9AlM3zVAPjuY8hAWVVa1 XQ4Di73JLapHkmEEjNVhmEYmdjOseAkBSKnCLBXOd/vpMAcFGHjfij5VAuUX5eh541FV i8ZvliXICWyG10kTxolmfWqMU4ZmHpFLtOJVhmMbORwlHzDSTwyOBAQbrXf2L1KIkNbL Tky3GsWJ+OuWwxQndTbx5fmE5K0LwMaGHSeYWNRQ9rct04vhKht8HehxlqsppEeD7diB RGSuS/RenBDR+ajDCYWjtodFRcIQ7EYQhePelK6GofAOOYUVFka2yCml3yPDigh6BivI bhow== X-Gm-Message-State: AGi0PuY/utM/qxaYxWc+lZppKM6cUdGQxBZBlH/+nLtUDBrXN/sWvINh J1G/gctAJfljGD4sM44Fyrvz3K9cvw1LTK4dsHzUAxMTd6pLlSKH+57OD3+0jO+uWgdsf5+5OAM NHx7O5dUVLoXnmYc= X-Received: by 2002:adf:e8c4:: with SMTP id k4mr16063870wrn.209.1588873320737; Thu, 07 May 2020 10:42:00 -0700 (PDT) X-Google-Smtp-Source: APiQypJIHd5xsiLMMK2BzwSmY5On55OLx9kYf3R0jmh8d4ZLvAY3P/ejD7CzHKZ3d5OGk5MyJ2W+0A== X-Received: by 2002:adf:e8c4:: with SMTP id k4mr16063857wrn.209.1588873320555; Thu, 07 May 2020 10:42:00 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id q14sm9428007wrc.66.2020.05.07.10.41.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 10:42:00 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Paolo Bonzini , qemu-devel@nongnu.org Subject: [PATCH 09/10] exec: Update coding style to make checkpatch.pl happy Date: Thu, 7 May 2020 19:39:57 +0200 Message-Id: <20200507173958.25894-10-philmd@redhat.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200507173958.25894-1-philmd@redhat.com> References: <20200507173958.25894-1-philmd@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=205.139.110.61; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/07 02:00:54 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Cornelia Huck , Alex Williamson , "Michael S. Tsirkin" , qemu-block@nongnu.org, David Hildenbrand , Juan Quintela , "Dr. David Alan Gilbert" , Max Reitz , Halil Pasic , Christian Borntraeger , qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, Keith Busch , Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?b?w6k=?= , David Gibson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" We will move this code in the next commit. Clean it up first to avoid checkpatch.pl errors. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/ram_addr.h | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 0deffad66f..6acde47a0f 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -95,7 +95,8 @@ static inline bool cpu_physical_memory_all_dirty(ram_addr_t start, while (page < end) { unsigned long next = MIN(end, base + DIRTY_MEMORY_BLOCK_SIZE); unsigned long num = next - base; - unsigned long found = find_next_zero_bit(blocks->blocks[idx], num, offset); + unsigned long found = find_next_zero_bit(blocks->blocks[idx], + num, offset); if (found < num) { dirty = false; break; @@ -120,14 +121,14 @@ static inline bool cpu_physical_memory_is_clean(ram_addr_t addr) { bool vga = cpu_physical_memory_get_dirty_flag(addr, DIRTY_MEMORY_VGA); bool code = cpu_physical_memory_get_dirty_flag(addr, DIRTY_MEMORY_CODE); - bool migration = - cpu_physical_memory_get_dirty_flag(addr, DIRTY_MEMORY_MIGRATION); + bool migration = cpu_physical_memory_get_dirty_flag(addr, + DIRTY_MEMORY_MIGRATION); return !(vga && code && migration); } static inline uint8_t cpu_physical_memory_range_includes_clean(ram_addr_t start, - ram_addr_t length, - uint8_t mask) + ram_addr_t length, + uint8_t mask) { uint8_t ret = 0; @@ -272,7 +273,8 @@ static inline void cpu_physical_memory_set_dirty_lebitmap(unsigned long *bitmap, xen_hvm_modified_memory(start, pages << TARGET_PAGE_BITS); } else { - uint8_t clients = tcg_enabled() ? DIRTY_CLIENTS_ALL : DIRTY_CLIENTS_NOCODE; + uint8_t clients = tcg_enabled() + ? DIRTY_CLIENTS_ALL : DIRTY_CLIENTS_NOCODE; if (!global_dirty_log) { clients &= ~(1 << DIRTY_MEMORY_MIGRATION); @@ -304,8 +306,11 @@ bool cpu_physical_memory_test_and_clear_dirty(ram_addr_t start, ram_addr_t length, unsigned client); -DirtyBitmapSnapshot *cpu_physical_memory_snapshot_and_clear_dirty - (MemoryRegion *mr, hwaddr offset, hwaddr length, unsigned client); +DirtyBitmapSnapshot *cpu_physical_memory_snapshot_and_clear_dirty( + MemoryRegion *mr, + hwaddr offset, + hwaddr length, + unsigned client); bool cpu_physical_memory_snapshot_get_dirty(DirtyBitmapSnapshot *snap, ram_addr_t start, @@ -314,7 +319,8 @@ bool cpu_physical_memory_snapshot_get_dirty(DirtyBitmapSnapshot *snap, static inline void cpu_physical_memory_clear_dirty_range(ram_addr_t start, ram_addr_t length) { - cpu_physical_memory_test_and_clear_dirty(start, length, DIRTY_MEMORY_MIGRATION); + cpu_physical_memory_test_and_clear_dirty(start, length, + DIRTY_MEMORY_MIGRATION); cpu_physical_memory_test_and_clear_dirty(start, length, DIRTY_MEMORY_VGA); cpu_physical_memory_test_and_clear_dirty(start, length, DIRTY_MEMORY_CODE); }