From patchwork Thu May 7 17:39:50 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: 283206 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.6 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, 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 2E824C38A2A for ; Thu, 7 May 2020 17:43:37 +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 EED3520735 for ; Thu, 7 May 2020 17:43:36 +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="IrxhOifP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EED3520735 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]:48486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWkYa-0001cE-64 for qemu-devel@archiver.kernel.org; Thu, 07 May 2020 13:43:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58674) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWkVQ-0004HS-LK for qemu-devel@nongnu.org; Thu, 07 May 2020 13:40:20 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:43238 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 1jWkVP-0001tV-Mr for qemu-devel@nongnu.org; Thu, 07 May 2020 13:40:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588873219; 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=lxO/QfhV7TdK4OIX7B7RR3nAolSQ5KL0SwXgbuIknFc=; b=IrxhOifPTe+j91upsc2c2OXBdBQEeurm9UBtG8tRknIOExAzd0sa11R987aydcVQ9UJ5eH U6aBVutYIqH/ZXSH/rCF0RpviK2nqiOTweuCNc9Qs/MTgn+PO6fzqXQjF2ZTQHZHtqxVy4 ffrCBPPNFi4CDF/hw6uYNO3dDG02BM4= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-231-vDE5JFgDPJOIxdrQJLu2sQ-1; Thu, 07 May 2020 13:40:16 -0400 X-MC-Unique: vDE5JFgDPJOIxdrQJLu2sQ-1 Received: by mail-wm1-f69.google.com with SMTP id o74so1358353wme.2 for ; Thu, 07 May 2020 10:40:16 -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=AYsaK9GNOXZIFUV300k/n6Vn/uB0ELw2OsZ7tcgl1LI=; b=KCxjFb4Mvf0PWMi114i882UVszO7MebtyJh9fJvW9FimXet4tFz5dK3EyHnnu/qDta FO5sH01SZ38vpfiD4sYCIFzKX0lk6bpLGCf1fYAgwVnUyWKHm1FBhk0UBcI9R4z2ATSx GiUi539r2O47hXArtRtaK7Oglw8fhD4bQfcVsb8RAVrw9Uc29UMcgYczNMIELKLxKrbd W8hgK9UarOYezHcDkLilgGUACl1iisiIDK7Oj8KVCNiP7TlXcZoihAnM+01gd/biQDtZ kOdJYbIKdRO0VyRfdpoNRYr5+6gzBcMGYaO4NPwPWvEO9rZnIFtqrxZbp6rjXKZ1upvd BnrA== X-Gm-Message-State: AGi0PubnphL7TDaBpHAfh0u3a7KRc1B8oxz+RT4gcawiMPr21BnqvdIK ALHKb2PuVRAyBNB/Z6BLPfYl2u8enZsV3zbY/vjiwGeioWpD+XT8uS2lwFe6g7EhtVp6lCUZ+7c Rvnj7Cg4wVUwb5+E= X-Received: by 2002:a7b:c3d2:: with SMTP id t18mr3291881wmj.100.1588873215514; Thu, 07 May 2020 10:40:15 -0700 (PDT) X-Google-Smtp-Source: APiQypJ/AaUMzxN6c9AoFV7na/bw7wTqjkWo0VEqXrFVogrggBfyPF77EaBvs4PKan+/nsLzTJ6QVQ== X-Received: by 2002:a7b:c3d2:: with SMTP id t18mr3291851wmj.100.1588873215269; Thu, 07 May 2020 10:40:15 -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 k23sm8431664wmi.46.2020.05.07.10.40.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 10:40:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Paolo Bonzini , qemu-devel@nongnu.org Subject: [PATCH 02/10] exec/ramblock: Add missing 'qemu/rcu.h' include Date: Thu, 7 May 2020 19:39:50 +0200 Message-Id: <20200507173958.25894-3-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=207.211.31.81; 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 00:55:34 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-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" The first field of RAMBlock is a rcu_head structure. We need to include the "qemu/rcu.h" to avoid errors when including "exec/ramblock.h" without "qemu/rcu.h": include/exec/ramblock.h:27:21: error: field ‘rcu’ has incomplete type 27 | struct rcu_head rcu; | ^~~ include/exec/ramblock.h:39:5: error: expected specifier-qualifier-list before ‘QLIST_ENTRY’ 39 | QLIST_ENTRY(RAMBlock) next; | ^~~~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé --- include/exec/ramblock.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/exec/ramblock.h b/include/exec/ramblock.h index 07d50864d8..6ac0aa7a89 100644 --- a/include/exec/ramblock.h +++ b/include/exec/ramblock.h @@ -21,6 +21,7 @@ #ifndef CONFIG_USER_ONLY #include "cpu-common.h" +#include "qemu/rcu.h" struct RAMBlock { struct rcu_head rcu; From patchwork Thu May 7 17:39:52 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: 283204 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.6 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, 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 E9B78C38A2A for ; Thu, 7 May 2020 17:45:14 +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 B35A02173E for ; Thu, 7 May 2020 17:45:14 +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="dilP+YDo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B35A02173E 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]:55922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWka9-0004mZ-T2 for qemu-devel@archiver.kernel.org; Thu, 07 May 2020 13:45:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWkVd-0004cw-1J for qemu-devel@nongnu.org; Thu, 07 May 2020 13:40:33 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:55916 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 1jWkVb-000238-OY for qemu-devel@nongnu.org; Thu, 07 May 2020 13:40:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588873230; 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=DTInzwfX63p1qih9M+Dgx3t+UyJi8t1Fm5i0KyZ44dI=; b=dilP+YDoYFV0p+PcNr3yDD9pVVV/giapUSXUxxCa20OjyyoUpbpTrx1sndwwKF8mcDzvpK hrLnhOlXfWMSq6NL5M6h/Ez1R3EFtB36hbY7gwIVBWTbq1/Pikz1nLhfDgZ7XuqChDnNwx Ltu/aSPETncIYlJzhAiEoTiwSwv5C80= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-308-Td0NmQ9GMdKRYqYPmoGBsQ-1; Thu, 07 May 2020 13:40:29 -0400 X-MC-Unique: Td0NmQ9GMdKRYqYPmoGBsQ-1 Received: by mail-wm1-f69.google.com with SMTP id o26so3019873wmh.1 for ; Thu, 07 May 2020 10:40:29 -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=cufZfBHIUwQzCgzD4HBPhihgc0XcJ+ZYlhn0GKj8V9k=; b=ZT2tHtA5uhE52AdZADDY6WKcVUAdZYvKFZW95XUvDCiNLZBx9zZiHC0ggYhPNQvCsA G4m79pRAbHmajkSaecqPyiPTtkDmE3yPtlC+mKfp67oCHYRpmVJOzrAFgG1GevvW2m44 bpRVHOyz1t6g5563+0HF0EKzTz2t15jTyYWathbIp4KHMm6kbmSejB55URS1uPAVw7Cp 44tuHf5fo/4UG5+gPjj+KdOlrTUlbwpIxE8R5KlJHhtclPBcb55StYn4WLAsSBxWFvXb 5XO9pvPT3A3O6fdVzniKrgSDbaURPF5jZCKSiPTS5WiGpkkS29e6he0mBx73+ByVHROa 5tRg== X-Gm-Message-State: AGi0PubA2nr5v2aJDweZJmaCTMUdSDze5ts/NHSdRpG88liBbGYISfud bDP8Oyd9Dq8gS3n3hybQ+ctJ+7yVCawCaisVz4wbRaTWkMaVTOckOmyMipm5CG+lHuiGtY6zeHY v1237+CTzywUQhj4= X-Received: by 2002:a1c:5642:: with SMTP id k63mr11361487wmb.188.1588873228044; Thu, 07 May 2020 10:40:28 -0700 (PDT) X-Google-Smtp-Source: APiQypJbDQPmlpA5L5mUbNL57avc7o0U8xeDyRm/PDLK7AdA2hywNGuD6taYQC/vj9FG7kxQww3kOw== X-Received: by 2002:a1c:5642:: with SMTP id k63mr11361466wmb.188.1588873227814; Thu, 07 May 2020 10:40:27 -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 x5sm8941896wro.12.2020.05.07.10.40.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 10:40:27 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Paolo Bonzini , qemu-devel@nongnu.org Subject: [PATCH 04/10] exec/memory-internal: Check CONFIG_SOFTMMU instead of CONFIG_USER_ONLY Date: Thu, 7 May 2020 19:39:52 +0200 Message-Id: <20200507173958.25894-5-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 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" The CONFIG_SOFTMMU definition is poisoned in "exec/poison.h". As this header is internal, check for poisoned CONFIG_SOFTMMU instead of CONFIG_USER_ONLY to make this include harder to use. Signed-off-by: Philippe Mathieu-Daudé --- include/exec/memory-internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/exec/memory-internal.h b/include/exec/memory-internal.h index 9fcc2af25c..b2b7c1e78a 100644 --- a/include/exec/memory-internal.h +++ b/include/exec/memory-internal.h @@ -22,7 +22,7 @@ #include "cpu.h" -#ifndef CONFIG_USER_ONLY +#ifdef CONFIG_SOFTMMU static inline AddressSpaceDispatch *flatview_to_dispatch(FlatView *fv) { return fv->dispatch; From patchwork Thu May 7 17:39:53 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: 283207 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=-7.8 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_BLACK,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 2D498C38A24 for ; Thu, 7 May 2020 17:41:53 +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 ED28420735 for ; Thu, 7 May 2020 17:41:52 +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="fqs3NY0M" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ED28420735 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]:42358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWkWu-0007Iz-4T for qemu-devel@archiver.kernel.org; Thu, 07 May 2020 13:41:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58740) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWkVj-0004ty-Fc for qemu-devel@nongnu.org; Thu, 07 May 2020 13:40:39 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:24304 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 1jWkVh-000243-Vp for qemu-devel@nongnu.org; Thu, 07 May 2020 13:40:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588873237; 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=ZdFZ0OjE1DpAAVLNEZIjDa8uv1PWgwWozsvTfYsCYTw=; b=fqs3NY0MwEsFXhtfJZVQcYghaYguR6/N/SVruP9SufuA2o/YO+MkzX/1CsEc6+2wcFCChy qxO7yCzlK/9GwPq2UopMK7xw3tErMECxM1hzc0XZ5fkwrMmo2MOkGhrkQJ5PpzdAs2kStI hLc7G3vtQHU7FNjpcB8jk8JZl6qsOt4= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-495-kddcGn7pNz6SBaZFLnbpHw-1; Thu, 07 May 2020 13:40:35 -0400 X-MC-Unique: kddcGn7pNz6SBaZFLnbpHw-1 Received: by mail-wm1-f71.google.com with SMTP id w189so134751wmg.1 for ; Thu, 07 May 2020 10:40:35 -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=DuSlgYQW6m0eg/30d5EZD9dD1Dk0rLysx3QIzLKclSo=; b=k/CNdeo/yrfjbUl9ArfQASE6veMhP///cHGEqWYF+TEoJ0Mw1B/uJxree8mMHjdD6E LO5hAgqsie81EoEyNFAPUxXFNRWCCyHVzVj3cIsYQchjVbdkQlqIHETKZH34E7sXKPaX 04pD4EhWX8e/1vB53J68drJv/oL2fg21KhSiAX1sMWF3nFuM6ufvH+55mZPUaPiw7I6v rqeAZIic0yJygoYHcl2AoFf6sguYU4QKMSM/XYaMT2F4YRn0QSTN5Ww7d7n0ntxN6TWk S1vQy0rxfvRECsSeJsFMo3FNgi0c6zYKlpipl4uX2zQ9sSwH4JhWg2Y30VCyKlxQFcPi ihXg== X-Gm-Message-State: AGi0Pua8IYafI3NjS1YmTozer/m1DdZKLQsJx6ootJlJjX25H+5ujmya WTqgjJTiPRYJOLrAsKHC8ivHJZeBmQ0Ru4tahhxCOPn7qd93Pq0RXvxEWG4/CL5stN9Tpohihi0 jkbjeJBfmQJmvi2k= X-Received: by 2002:a1c:7e82:: with SMTP id z124mr4412726wmc.53.1588873234572; Thu, 07 May 2020 10:40:34 -0700 (PDT) X-Google-Smtp-Source: APiQypIUjywJdc7qvMuEX/G7gKNbNfCgRlvC+A643ONE2kdTVge32hF2c0AYqiGKGwl93xhWiL4H5g== X-Received: by 2002:a1c:7e82:: with SMTP id z124mr4412705wmc.53.1588873234244; Thu, 07 May 2020 10:40:34 -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 c190sm9535898wme.10.2020.05.07.10.40.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 10:40:33 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Paolo Bonzini , qemu-devel@nongnu.org Subject: [PATCH 05/10] exec: Move qemu_minrampagesize/qemu_maxrampagesize to 'qemu-common.h' Date: Thu, 7 May 2020 19:39:53 +0200 Message-Id: <20200507173958.25894-6-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=207.211.31.81; 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 00:55:34 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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_H3=0.001, RCVD_IN_MSPIKE_WL=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 , Alexey Kardashevskiy , 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" Move these generic functions to a more common place, with other functions related to host page size. Document a little. Cc: Alexey Kardashevskiy Signed-off-by: Philippe Mathieu-Daudé --- include/exec/ram_addr.h | 3 --- include/qemu-common.h | 10 ++++++++++ hw/ppc/spapr_caps.c | 2 +- hw/s390x/s390-virtio-ccw.c | 1 + hw/vfio/spapr.c | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 06096e8c6a..195b67d3c8 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -93,9 +93,6 @@ static inline unsigned long int ramblock_recv_bitmap_offset(void *host_addr, bool ramblock_is_pmem(RAMBlock *rb); -long qemu_minrampagesize(void); -long qemu_maxrampagesize(void); - /** * qemu_ram_alloc_from_file, * qemu_ram_alloc_from_fd: Allocate a ram block from the specified backing diff --git a/include/qemu-common.h b/include/qemu-common.h index d0142f29ac..2821a6ef76 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -80,6 +80,16 @@ bool set_preferred_target_page_bits(int bits); */ void finalize_target_page_bits(void); +/** + * qemu_minrampagesize: + * qemu_maxrampagesize: + * + * If backed via -memdev, return the device page size, + * else return the host kernel page size. + */ +long qemu_minrampagesize(void); +long qemu_maxrampagesize(void); + /** * Sends a (part of) iovec down a socket, yielding when the socket is full, or * Receives data into a (part of) iovec from a socket, diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c index eb54f94227..33a802a103 100644 --- a/hw/ppc/spapr_caps.c +++ b/hw/ppc/spapr_caps.c @@ -23,11 +23,11 @@ */ #include "qemu/osdep.h" +#include "qemu-common.h" #include "qemu/error-report.h" #include "qapi/error.h" #include "qapi/visitor.h" #include "sysemu/hw_accel.h" -#include "exec/ram_addr.h" #include "target/ppc/cpu.h" #include "target/ppc/mmu-hash64.h" #include "cpu-models.h" diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index f660070d22..c009384505 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -12,6 +12,7 @@ */ #include "qemu/osdep.h" +#include "qemu-common.h" #include "qapi/error.h" #include "cpu.h" #include "hw/boards.h" diff --git a/hw/vfio/spapr.c b/hw/vfio/spapr.c index 2900bd1941..c64db940a7 100644 --- a/hw/vfio/spapr.c +++ b/hw/vfio/spapr.c @@ -9,13 +9,13 @@ */ #include "qemu/osdep.h" +#include "qemu-common.h" #include "cpu.h" #include #include #include "hw/vfio/vfio-common.h" #include "hw/hw.h" -#include "exec/ram_addr.h" #include "qemu/error-report.h" #include "qapi/error.h" #include "trace.h" From patchwork Thu May 7 17:39:56 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: 283205 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.6 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, 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 7308DC38A24 for ; Thu, 7 May 2020 17:44:29 +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 35D7B215A4 for ; Thu, 7 May 2020 17:44:29 +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="PqJIIipW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 35D7B215A4 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]:52616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWkZQ-0003HI-Bb for qemu-devel@archiver.kernel.org; Thu, 07 May 2020 13:44:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWkW3-0005Zu-Cj for qemu-devel@nongnu.org; Thu, 07 May 2020 13:40:59 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:35884 helo=us-smtp-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 1jWkW1-0002AH-Ir for qemu-devel@nongnu.org; Thu, 07 May 2020 13:40:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588873256; 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=kPdxVicu969je/HHuYmc96kgT2/Tmz0/2S+LklATjmE=; b=PqJIIipWGWf/7EJ+L/UHrZjVFsu8lxM8x7ZXqSDsiHF0e+Wpda7KjljHaP55yAhS54xYK2 lmt9jc+hSjKhxxilTULdN9OQV68VaFW0DPppQ7WuhI92VdlCPv8ICj8xQUse+7Xgi4Mgrm rtkVepbvgi2+BH2WrR2LbU/0yOgzZ6o= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-254-lrKowiSqOd6NBV7cvaz--w-1; Thu, 07 May 2020 13:40:55 -0400 X-MC-Unique: lrKowiSqOd6NBV7cvaz--w-1 Received: by mail-ej1-f69.google.com with SMTP id jp4so3191733ejb.20 for ; Thu, 07 May 2020 10:40:54 -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=GU+pb8s4KCPhcsiRUlvVEDRxp1DqtYppL7zwVgzuzEQ=; b=f3mPDOdQJ50rQOHGlLSIcF5KkaNhehB7oaueuS3eRWPnnalyWCPAgYDnzXwgnGFoR8 ydm8Wd1Thr8fAUPLH6HB0cRT5A3Q1GfoL7P9XTASyu1kFsfzlPO84pxIh2C33BVw3WHX YXtoOSzVE6PrqSOl56G513jXsC2hKCO4S5xYNdVSluwBCvWQvGCErGWw4XGNPONfNC2+ 94Kd/IY/hiRB/hc0xDvlxTDf3Z7QsyBZaV1v2N2xcCZR2QBGnp7h4+moqZlxqjDlIn/N AbufFONaQ8TKkWJnxsVFXErXZ7eR7rddWgxVKJT4xIr5PGf2DsJF+pqCu0j3gjIUOAPA Q2Sw== X-Gm-Message-State: AGi0PuauHb6Mz2fXuZP+541E8cZK+hcYqDofhVCN8hWMKnGWMTbSp8yj jua+HeG1rmCUu36YtTTLHGP2hGD707HzN4Lh+TI4CHrcs3fg/M+DgAC4hPpGjyx3+yB9H4U6qRe SH0cODgcP2Qvdzuw= X-Received: by 2002:a17:906:2d4a:: with SMTP id e10mr13560855eji.222.1588873253598; Thu, 07 May 2020 10:40:53 -0700 (PDT) X-Google-Smtp-Source: APiQypJSzp8FrllgoD8AfFcqANwT/r92S58QUd+F/AuoUVq6Oym4Bc4+UQvyW+kuojt0+IflWUrAUw== X-Received: by 2002:a17:906:2d4a:: with SMTP id e10mr13560841eji.222.1588873253422; Thu, 07 May 2020 10:40:53 -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 bu4sm606672edb.90.2020.05.07.10.40.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 May 2020 10:40:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , Paolo Bonzini , qemu-devel@nongnu.org Subject: [PATCH 08/10] hw/block: Let the NVMe emulated device be target-agnostic Date: Thu, 7 May 2020 19:39:56 +0200 Message-Id: <20200507173958.25894-9-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.120; envelope-from=philmd@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/07 03:15:48 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 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" Now than qemu_ram_msync() has been ... Signed-off-by: Philippe Mathieu-Daudé --- hw/block/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/Makefile.objs b/hw/block/Makefile.objs index 47960b5f0d..8855c22656 100644 --- a/hw/block/Makefile.objs +++ b/hw/block/Makefile.objs @@ -13,6 +13,6 @@ common-obj-$(CONFIG_SH4) += tc58128.o obj-$(CONFIG_VIRTIO_BLK) += virtio-blk.o obj-$(CONFIG_VHOST_USER_BLK) += vhost-user-blk.o -obj-$(CONFIG_NVME_PCI) += nvme.o +common-obj-$(CONFIG_NVME_PCI) += nvme.o obj-y += dataplane/ 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); }