From nobody Fri Oct 18 05:22:43 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1608512500; cv=none; d=zohomail.com; s=zohoarc; b=nYHYwdytcAAsgVYERA3LVshu+NYiQ1U0qHfVzCVr497RR0NJ+8sXlJadFJYcYNG7Pjf219POqZNhaEgMqVsIK3/6KBvpRFuVvqS3/jYcvJTsHcsrX0kMn6EKcz98rDc5s7fxHP1LbMybfxsn/HZMYsA4VS8/dFc3KT8AjUc5Isw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608512500; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9UYdNJjXn4om72WGzYzSS6tZtwVGabGeZphyZWQCWjs=; b=EPmmq1FMf+yoaXs0z5b5SeMdIe4wU+UVSodSm/TVq/26dYvDXSF5GK5FIN6Jj3HZo0gghtvvcRYYdqQQ52hiYpgO52j7Ah4YEX4sr7swUXvJ4yCSPsdOvrq53uTKfSk15dKozCDtm47IBs9rJZf+YRCFdKmNzDfbsNsjlOmiPOQ= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608512500676899.6685830015731; Sun, 20 Dec 2020 17:01:40 -0800 (PST) Received: from localhost ([::1]:37222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kr9Zy-0005eW-PJ for importer@patchew.org; Sun, 20 Dec 2020 20:01:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9TH-0008IO-05; Sun, 20 Dec 2020 19:54:43 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:46539) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9TE-0005bN-Hr; Sun, 20 Dec 2020 19:54:42 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 702CA580428; Sun, 20 Dec 2020 19:54:39 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 20 Dec 2020 19:54:39 -0500 Received: from strike.U-LINK.com (li1000-254.members.linode.com [45.33.50.254]) by mail.messagingengine.com (Postfix) with ESMTPA id AC5C4240057; Sun, 20 Dec 2020 19:54:29 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=9UYdNJjXn4om7 2WGzYzSS6tZtwVGabGeZphyZWQCWjs=; b=rn1ggbbJN37cNfK/YCKEM5yFWhFib GuoqhQiq1QPZzYVOj+qLbnx1WHrhxxHlaOj4Q76NvHCT3R2MwkLe73mqtLXAkMDO 6kk6ncZprILgAeTEwMzaU+LREJF0ugJxjtuBESQ6wzX3NUBhpSUWV5bf8gL1XCRB n9OicS7dx8rX7Nzi2GG0vxG8Flq0M5KxfDiiSQRNEa98QsKdYFx+K9uuO0pNKXZg pmH0s0tJBZXQ6Yh4Wd0Trru5zuczr7Sz/+fGvqvSCGyZqR2s4EwmfOUJQ0MuaQS2 +9CAAZB6j7+LleYGo4IOrG40vZqGVc2WXmOVT/IuMVBtlzcC9sRWJoD3g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=9UYdNJjXn4om72WGzYzSS6tZtwVGabGeZphyZWQCWjs=; b=Qck8JKGW KjvkXlimw4lkc5XfEauZhw9xUMeZ1Tcee5fP9ihndLqNH+luWEKcUzAAiiUeaGke /WEwXcxJjdgD5IuOL5eQhumFLZbHwxZX7pciwGYTZInt2fZ70B1/IWMwvUf8q5GM Wb/6fp/8xRNHyFth9X8blmsg8d0phiGuHQzcvtZZUgUuqKQ57RYTsE4qk8uh8IfV MfHSL6iJbquJb7FZjMjpfkrz58rK5vQz2EJwveCbtVLbSAaQ3tZlsDKue7fg1eDM 7Ca09szp9L6O5a3llDMylhR5xTYccu0vCApW5gIQoW+ZgGs8Od8FT3qafpyJWMq+ K35ZTmE75NH8lQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtuddgvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihu nhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecugg ftrfgrthhtvghrnheptdevhedvfeelgefhueevffejueffteffkefhveeiudejieeivedu vdeitdehffejnecuffhomhgrihhnpehophgvnhhgrhhouhhprdhorhhgnecukfhppeeghe drfeefrdehtddrvdehgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH 7/9] accel/kvm: avoid using predefined PAGE_SIZE Date: Mon, 21 Dec 2020 08:53:16 +0800 Message-Id: <20201221005318.11866-8-jiaxun.yang@flygoat.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201221005318.11866-1-jiaxun.yang@flygoat.com> References: <20201221005318.11866-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: permerror client-ip=66.111.4.224; envelope-from=jiaxun.yang@flygoat.com; helo=new2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, T_SPF_PERMERROR=0.01 autolearn=ham autolearn_force=no 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 , Fam Zheng , Thomas Huth , kvm@vger.kernel.org, Viktor Prutyanov , Laurent Vivier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Alistair Francis , Greg Kurz , Wainer dos Santos Moschetta , Max Reitz , qemu-ppc@nongnu.org, Paolo Bonzini , qemu-block@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" As per POSIX specification of limits.h [1], OS libc may define PAGE_SIZE in limits.h. To prevent collosion of definition, we discard PAGE_SIZE from defined by libc and take QEMU's variable. [1]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html Signed-off-by: Jiaxun Yang --- accel/kvm/kvm-all.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 389eaace72..3feb17d965 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -58,6 +58,9 @@ /* KVM uses PAGE_SIZE in its definition of KVM_COALESCED_MMIO_MAX. We * need to use the real host PAGE_SIZE, as that's what KVM will use. */ +#ifdef PAGE_SIZE +#undef PAGE_SIZE +#endif #define PAGE_SIZE qemu_real_host_page_size =20 //#define DEBUG_KVM --=20 2.29.2