From patchwork Mon Dec 21 00:53:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 1418854 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.a=rsa-sha256 header.s=fm1 header.b=VbDRe6Bh; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=DP8AhrES; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4Czgw609bjz9sVj for ; Mon, 21 Dec 2020 11:54:14 +1100 (AEDT) Received: from localhost ([::1]:47956 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kr9Sm-0006iU-2D for incoming@patchwork.ozlabs.org; Sun, 20 Dec 2020 19:54:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41632) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9SJ-0006g4-RA; Sun, 20 Dec 2020 19:53:43 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:60415) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9SI-0005Iw-4n; Sun, 20 Dec 2020 19:53:43 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 1AB015803F8; Sun, 20 Dec 2020 19:53:41 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 20 Dec 2020 19:53:41 -0500 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=ld7CKW5vB77WI lvV4wV47qN/agE7Mm627Lyt8Dw6I+8=; b=VbDRe6BhmOr/FLXZ04jZwqRWcsiSE +mZ5syHy6w3ggZ2WvyAIvV+UGj2dwVPGx5lUgGnZFoNQcIv7Wn/o8AjOwvMOoerr tzeDagLJ2Yfc1uoR3krKhWLWVdW83zaC2ifhxVT7ojsyDFOczjFlH4ATPKrzYm7x Rk3esHNtiRPaJaFcDTxsZ3vE7yf0ElFrClmMVadSnwIc7TFTy/8bIUFoQCD4E6q+ vkzswXkYNBsHxKFExC+1WCRFcdVE2pWkAqCDhC+LBogClPaDUP4VEY9IzypBdh/S aLjjADp8KPv7s3me94Z+7IVeyt55nBXL/ip94GP+3VsZkn56UYUBlkNKg== 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=ld7CKW5vB77WIlvV4wV47qN/agE7Mm627Lyt8Dw6I+8=; b=DP8AhrES wUBmG1vdl7vtLE97r+OrKSVGunFvkFQQbgdiFf4RKmhIHlyyDRh2msAjWlAFD2mB O8iFSsCckNMRGEfNODCRv5CeuF3L0z+q0eeQn0CN6NLsIuPt/QmuMLPkRk2aw1oi 5Hopcb/w8yfR+25IrBXn/a6+rJncsGTaEVDuiuzmTOO8MGmFG9QkM7jKdcBBVRk0 iSCrlIW6BP2JOuXCsExvVw51pn+D+Xpl4U8Ndt0wA6FooHxjUobzi/bOnX7SeeZX NaL2Z17EJdYz8ob1nE7aMGeIUb48kMinTu1N9tn4RSx15lthfA8sTfooWzgyGrCI obshvFFBdZvdkQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtuddgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihu nhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecugg ftrfgrthhtvghrnhepjeeuhfekgeehhefftefgueevuedvueekveekieegudfhhffgvddv heehhfffhfdunecuffhomhgrihhnpegrlhhpihhnvghlihhnuhigrdhorhhgnecukfhppe eghedrfeefrdehtddrvdehgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Received: from strike.U-LINK.com (li1000-254.members.linode.com [45.33.50.254]) by mail.messagingengine.com (Postfix) with ESMTPA id A112F24005C; Sun, 20 Dec 2020 19:53:33 -0500 (EST) From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH 1/9] tests/docker: Add dockerfile for Alpine Linux Date: Mon, 21 Dec 2020 08:53:10 +0800 Message-Id: <20201221005318.11866-2-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 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_Mathieu-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_?= =?utf-8?q?Benn=C3=A9e?= , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Alpine Linux[1] is a security-oriented, lightweight Linux distribution based on musl libc and busybox. It it popular among Docker guests and embedded applications. Adding it to test against different libc. [1]: https://alpinelinux.org/ Signed-off-by: Jiaxun Yang --- tests/docker/dockerfiles/alpine.docker | 56 ++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 tests/docker/dockerfiles/alpine.docker diff --git a/tests/docker/dockerfiles/alpine.docker b/tests/docker/dockerfiles/alpine.docker new file mode 100644 index 0000000000..a1b80f08d2 --- /dev/null +++ b/tests/docker/dockerfiles/alpine.docker @@ -0,0 +1,56 @@ + +FROM alpine:edge + +RUN apk update +RUN apk upgrade + +# Please keep this list sorted alphabetically +ENV PACKAGES \ + alsa-lib-dev \ + bash \ + bison \ + build-base \ + coreutils \ + curl-dev \ + flex \ + git \ + glib-dev \ + glib-static \ + gnutls-dev \ + gtk+3.0-dev \ + libaio-dev \ + libcap-dev \ + libcap-ng-dev \ + libjpeg-turbo-dev \ + libnfs-dev \ + libpng-dev \ + libseccomp-dev \ + libssh-dev \ + libusb-dev \ + libxml2-dev \ + linux-headers \ + lzo-dev \ + mesa-dev \ + mesa-egl \ + mesa-gbm \ + meson \ + ncurses-dev \ + ninja \ + paxmark \ + perl \ + pulseaudio-dev \ + python3 \ + py3-sphinx \ + snappy-dev \ + spice-dev \ + texinfo \ + usbredir-dev \ + util-linux-dev \ + vde2-dev \ + virglrenderer-dev \ + vte3-dev \ + xfsprogs-dev \ + zlib-dev \ + zlib-static + +RUN apk add $PACKAGES From patchwork Mon Dec 21 00:53:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 1418857 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.a=rsa-sha256 header.s=fm1 header.b=SIelJS4F; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=TdJUcTr4; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CzgyK74k8z9sW0 for ; Mon, 21 Dec 2020 11:56:09 +1100 (AEDT) Received: from localhost ([::1]:54184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kr9Ud-0000ti-LL for incoming@patchwork.ozlabs.org; Sun, 20 Dec 2020 19:56:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9SS-0006oR-BU; Sun, 20 Dec 2020 19:53:52 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:52653) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9SQ-0005Mq-C1; Sun, 20 Dec 2020 19:53:52 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 536F2580413; Sun, 20 Dec 2020 19:53:49 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 20 Dec 2020 19:53:49 -0500 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=KWLNfn6cch3ST kJIn9ZITmEXeddtBMzmWKV1IAEIciA=; b=SIelJS4Fke3A/aeRfSeo5JZd7hpoo lGPByjwCuuxZZSdIaz5cO5929SskOcL0ukg0hPUgyWQuvuGqm7lg/ObLoHZbMvBY xfdkJ9zqRhXOIUPTAuf6YuZLXp+XMLtd/MzkCTM/B/sP58UI0XrIMJhtCjf6zTK1 B3wv3LCN3BJOmT/6DdNQWM8QKAmKd/qfAj22xjk+6mCFiiVpNRcxq7NMK0Flo75v /U95VeXOXneGZw9zeDMnRpWH9bOwG8T+WARTQuGsFcr8AwjNr/DLejg2g/kIvLOH K80WrgvFTPeowZCv1YJifdyS6g955nYxkCC+2mG28cGMF7S6/XXSl3IHg== 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=KWLNfn6cch3STkJIn9ZITmEXeddtBMzmWKV1IAEIciA=; b=TdJUcTr4 tJAhXwVjbuSZj2bwRxiwq3vjLrSeGQJhBOxVsxauF1dRlQxau4X89dB8t+iVW8EO BrFTJevYoqc1S7HC0N9M2IsKxW+OFc8O4h4BeODsAqw2yEoPqPCri9RHE/mBvKgO 23/XADnLaiLPa7OGVzWqsdRibjcgUetjU3yPx2cZlBwqov6eLwcC1xnlE9Vqc549 4QPXmmOwJ4ENMshP2Kdyqrc4EpPrDM8Yeexw57Gsbb/dXXdLKOxlGLw78ipee+Mx VOi3EqRJzMpUx8djRCzGqsGelVw+2EjXXpqGPXsgyN2xyyF1inWWQayYouqj5hQp jMxdXVOz33Vz9w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtuddgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihu nhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecugg ftrfgrthhtvghrnhepjeeihffgteelkeelffdukedtheevudejvdegkeekjeefhffhhfet udetgfdtffeunecukfhppeeghedrfeefrdehtddrvdehgeenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhih ghhorghtrdgtohhm X-ME-Proxy: Received: from strike.U-LINK.com (li1000-254.members.linode.com [45.33.50.254]) by mail.messagingengine.com (Postfix) with ESMTPA id 7E63A240057; Sun, 20 Dec 2020 19:53:41 -0500 (EST) From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH 2/9] configure: Add sys/timex.h to probe clk_adjtime Date: Mon, 21 Dec 2020 08:53:11 +0800 Message-Id: <20201221005318.11866-3-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 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_Mathieu-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_?= =?utf-8?q?Benn=C3=A9e?= , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" It is not a part of standard time.h. Glibc put it under time.h however musl treat it as a sys timex extension. Signed-off-by: Jiaxun Yang Reviewed-by: Thomas Huth --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index c228f7c21e..990f37e123 100755 --- a/configure +++ b/configure @@ -4374,6 +4374,7 @@ fi clock_adjtime=no cat > $TMPC < +#include int main(void) { From patchwork Mon Dec 21 00:53:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 1418855 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.a=rsa-sha256 header.s=fm1 header.b=Ll6qfyAz; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=ZK74NNww; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4CzgwL4xh0z9sVj for ; Mon, 21 Dec 2020 11:54:26 +1100 (AEDT) Received: from localhost ([::1]:48688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kr9Sy-00071Y-Lu for incoming@patchwork.ozlabs.org; Sun, 20 Dec 2020 19:54:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41690) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9Sb-0006zw-OO; Sun, 20 Dec 2020 19:54:01 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:51277) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9Sa-0005PM-1D; Sun, 20 Dec 2020 19:54:01 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id A75A4580416; Sun, 20 Dec 2020 19:53:58 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 20 Dec 2020 19:53:58 -0500 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=5v3r5xR/8KTgk 2MbhP0S8UCpl80Myi9a3f0wzZyGpqA=; b=Ll6qfyAzCqncyQqoUVxe1hf+39LI0 XjiP71boY/ACZyILIfRmcs324EGJVTqYXfd9dylw5YMF2p2xy41dUMtdxIt2XOi0 MZ1TZ/7Q9kLyPsqBkWhuIB2hEKB/min5aK2WuM2DzqfjFzkcviB7Niw/YE8lx2Je It4TL4onsPqYmlkp1ILxa4yWrgGblKSZ/d1xIyF7EXPBlQkBJRyavt0bhrgvJVsQ x0FF9HoGYQbShjh6N8cpAKpu/wjh3QJu54Xv9xnJZTB0fRN+JU2oLL4KgPmnaiiC 26clj8Bauxlg24NWNgcB1RQ5EvFr7GvkRO3DjSleXG2cw7SKSlAqUlPuA== 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=5v3r5xR/8KTgk2MbhP0S8UCpl80Myi9a3f0wzZyGpqA=; b=ZK74NNww ash4ckQMNi9Ch1J8uaUTnRG7Xncs9u++Emn+VSA7GxJElRGZ9EUtS6T800nSzaj4 BDBaOdFtOTDtmIjCCBNBESR12rUVKFbOEKB8M5AeEW3OaZHYXPvM9ZR+D5gZtuQ+ ktmWQLNbrjCwSWh4/wK3nMm9BqOfveH/m66TJnJeZwtwTq7Icz7rBNtzQH19JOQZ dgb612yIGCFTKJxuKpXIt5GMGaKJkNjwyJp7rxDZGrPetLuFs1yf7PdW6I9j9pbV onFVEgzkDsUH1xHlkBaIzfoLqfx0IkKVYi/vxjmBTAKmD5r/CIOIQyAX0ZYQvabV sLThOZdCmXD8eQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtuddgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihu nhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecugg ftrfgrthhtvghrnhepjeeihffgteelkeelffdukedtheevudejvdegkeekjeefhffhhfet udetgfdtffeunecukfhppeeghedrfeefrdehtddrvdehgeenucevlhhushhtvghrufhiii gvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhih ghhorghtrdgtohhm X-ME-Proxy: Received: from strike.U-LINK.com (li1000-254.members.linode.com [45.33.50.254]) by mail.messagingengine.com (Postfix) with ESMTPA id E929624005C; Sun, 20 Dec 2020 19:53:49 -0500 (EST) From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH 3/9] configure/meson: Only check sys/signal.h on non-Linux Date: Mon, 21 Dec 2020 08:53:12 +0800 Message-Id: <20201221005318.11866-4-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 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_Mathieu-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_?= =?utf-8?q?Benn=C3=A9e?= , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" signal.h is equlevant of sys/signal.h on Linux, musl would complain wrong usage of sys/signal.h. In file included from /builds/FlyGoat/qemu/include/qemu/osdep.h:108, from ../tests/qemu-iotests/socket_scm_helper.c:13: /usr/include/sys/signal.h:1:2: error: #warning redirecting incorrect #include to [-Werror=cpp] 1 | #warning redirecting incorrect #include to | ^~~~~~~ Signed-off-by: Jiaxun Yang Reviewed-by: Thomas Huth --- meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 372576f82c..1ef8722b3a 100644 --- a/meson.build +++ b/meson.build @@ -841,7 +841,10 @@ config_host_data.set('HAVE_DRM_H', cc.has_header('libdrm/drm.h')) config_host_data.set('HAVE_PTY_H', cc.has_header('pty.h')) config_host_data.set('HAVE_SYS_IOCCOM_H', cc.has_header('sys/ioccom.h')) config_host_data.set('HAVE_SYS_KCOV_H', cc.has_header('sys/kcov.h')) -config_host_data.set('HAVE_SYS_SIGNAL_H', cc.has_header('sys/signal.h')) +if targetos != 'linux' + # signal.h is equlevant of sys/signal.h on Linux + config_host_data.set('HAVE_SYS_SIGNAL_H', cc.has_header('sys/signal.h')) +endif ignored = ['CONFIG_QEMU_INTERP_PREFIX'] # actually per-target arrays = ['CONFIG_AUDIO_DRIVERS', 'CONFIG_BDRV_RW_WHITELIST', 'CONFIG_BDRV_RO_WHITELIST'] From patchwork Mon Dec 21 00:53:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 1418858 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.a=rsa-sha256 header.s=fm1 header.b=hCb37zU6; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=J516B6b1; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4Czgyy2pZzz9sSC for ; Mon, 21 Dec 2020 11:56:42 +1100 (AEDT) Received: from localhost ([::1]:55022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kr9VA-0001Em-C1 for incoming@patchwork.ozlabs.org; Sun, 20 Dec 2020 19:56:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41706) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9Sj-0007GQ-VL; Sun, 20 Dec 2020 19:54:10 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:40973) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9Si-0005RS-CF; Sun, 20 Dec 2020 19:54:09 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 41FE1580415; Sun, 20 Dec 2020 19:54:07 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 20 Dec 2020 19:54:07 -0500 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=SIxHxyqyLzEhn mwwU1peHf9lIiT+tCzX4idpVxjYV5I=; b=hCb37zU6RaIxloQK3e0NxyXYgZ1ah M+CHJ56h7KjWkiIj1yTOWIImIsrZmNl1KBHZCrW5qvVXp13hEOS/OFUgQKA9Wevm HCj9M6CdP3N6V3wXv1iLiinByI1V2nyXM1K/dGECdpb66wPT39bVarN/aWuRq0Ne f4BFrEM1EQlJdgls0T9SucNtPVJQiNPQ5k4+NrUIb+tEaHrVAdSzX2Bbp4+Ks17g 4S3oQ4ZrSHFXj0K29WIao4pWlU3wBW3L32H7hFB1fsVPh0cphq+qV6VcAt78RD2P P5HUQkMfkYgIQCtVbTw7FHxJo/Wla33sL06hd00nDiQ3Okg7pdRI+q5Ww== 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=SIxHxyqyLzEhnmwwU1peHf9lIiT+tCzX4idpVxjYV5I=; b=J516B6b1 EWF9W4G3Pc1+T/hP3MX8LSQP7rTy/EZPJiYJbg5hN1whHrQrfQhM49UvAk8qxL5B wsPClC0yDXFsafmaFN8G0Tf+tEEJWDjzzn9FqeQ14SG68wJo4/R/7vZ6ojcpqmwO F3jqr7nCj7PX1iDwdnWOd30Sze80TlUdEhpMq8CbLieFuyj0G4RWIhZFn9siMOLL /oKRcqy+MFilMmZhbnNJwUDXv3PER3kj8t5MZ3WbpiRlRfofamMdq1vCDacIVysc BqxV81qXNrXRNofJ1cL5LbHrx4eXYY6J8ZjRvZrBY3WzvbdZL7byBWqJYXIetKFz cCJ/eQP85sLHJg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtuddgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihu nhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecugg ftrfgrthhtvghrnhepjeeihffgteelkeelffdukedtheevudejvdegkeekjeefhffhhfet udetgfdtffeunecukfhppeeghedrfeefrdehtddrvdehgeenucevlhhushhtvghrufhiii gvpedvnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhih ghhorghtrdgtohhm X-ME-Proxy: Received: from strike.U-LINK.com (li1000-254.members.linode.com [45.33.50.254]) by mail.messagingengine.com (Postfix) with ESMTPA id 443E724005A; Sun, 20 Dec 2020 19:53:58 -0500 (EST) From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH 4/9] libvhost-user: Include poll.h instead of sys/poll.h Date: Mon, 21 Dec 2020 08:53:13 +0800 Message-Id: <20201221005318.11866-5-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 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_Mathieu-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_?= =?utf-8?q?Benn=C3=A9e?= , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Musl libc complains about it's wrong usage. In file included from ../subprojects/libvhost-user/libvhost-user.h:20, from ../subprojects/libvhost-user/libvhost-user-glib.h:19, from ../subprojects/libvhost-user/libvhost-user-glib.c:15: /usr/include/sys/poll.h:1:2: error: #warning redirecting incorrect #include to [-Werror=cpp] 1 | #warning redirecting incorrect #include to | ^~~~~~~ Signed-off-by: Jiaxun Yang Reviewed-by: Thomas Huth --- subprojects/libvhost-user/libvhost-user.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/libvhost-user/libvhost-user.h b/subprojects/libvhost-user/libvhost-user.h index 7d47f1364a..3d13dfadde 100644 --- a/subprojects/libvhost-user/libvhost-user.h +++ b/subprojects/libvhost-user/libvhost-user.h @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include "standard-headers/linux/virtio_ring.h" From patchwork Mon Dec 21 00:53:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 1418860 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.a=rsa-sha256 header.s=fm1 header.b=m3VXv3fT; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=h77b8TCU; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4Czh1x6NpSz9sSC for ; Mon, 21 Dec 2020 11:59:15 +1100 (AEDT) Received: from localhost ([::1]:33444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kr9Xb-00044L-EV for incoming@patchwork.ozlabs.org; Sun, 20 Dec 2020 19:59:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41738) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9Sv-0007dP-K4; Sun, 20 Dec 2020 19:54:21 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:57059) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9St-0005UD-99; Sun, 20 Dec 2020 19:54:21 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 16A10580424; Sun, 20 Dec 2020 19:54:18 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 20 Dec 2020 19:54:18 -0500 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=G6GrFNYxw3Hpn lVCxc/Y26AMqdyir1vl9w0Jd4+e1xY=; b=m3VXv3fTWuG+aNWC2Bx7t9oV0jzRa 446f7x6Jki/oxhC8SWH0+X7gF9mqAd9HdAXkOcXQyXl/BdPyGPFili6UyEuhExIs WN//+2jp8oBvMWzEl9eZX5vpsMBwvODI6+yn3olSZFiN+KrsnpemEkErL2k7cKK5 ap83ZfnlGz5ebZCxT+fDSav8CaWKWmacLO3Xn/7d9yVM43Qzb+Y7lxLz9qcd3G5s vHELtXU3LbhFAEYWiKiQpMGMmSCovFfy4j8rB4Ue/T9kAE/gbtV+QXhD86LRhJz4 8YmLL22xbEdYmyCsPtD/wLMq4IUZHiqvghkiAorwX8Dhu7zwtxSS5rnng== 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=G6GrFNYxw3HpnlVCxc/Y26AMqdyir1vl9w0Jd4+e1xY=; b=h77b8TCU wSGbAzb6GrMsCt4X7FEOkEr/a2aCMzvKdYCGYtuFs+r++hQGgDLqg7bosOyZZnYT bzzpPXc3GXas1euO6lEUorHjV+lRtSRaWSCLxVgSAet+enIxSAzInVsSbwLFB/3z RxNnLyuux798GDVmgBXalxxObKbw9ld+KkoNCT7feWPafxvytStRqIuIGjC5QuQS HuiB9UX0lUCfwlpp6IDxMbcuySHAnKpUkZzFDtjssOed1XIEa63a+j0YQz/XuBjy 1EqE1VcICjQjc3sH9/yLhShQfVdracLxM9TRf+C5/jmjC1UIAwZofzslpLoapKE0 YuaP/kwO12kkIQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtuddgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihu nhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecugg ftrfgrthhtvghrnhepgeduheekudduheektedvveffieevteetfeefieekudffieduudet vdetffeileeknecuffhomhgrihhnpehophgvnhhgrhhouhhprdhorhhgpdhphhihshhitg grlhhmvghmohhrhigslhhotghkrdhruhhnnecukfhppeeghedrfeefrdehtddrvdehgeen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjihgrgi hunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Received: from strike.U-LINK.com (li1000-254.members.linode.com [45.33.50.254]) by mail.messagingengine.com (Postfix) with ESMTPA id D1EF424005A; Sun, 20 Dec 2020 19:54:07 -0500 (EST) From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH 5/9] elf2dmp: Rename PAGE_SIZE to ELF2DMP_PAGE_SIZE Date: Mon, 21 Dec 2020 08:53:14 +0800 Message-Id: <20201221005318.11866-6-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 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_Mathieu-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_?= =?utf-8?q?Benn=C3=A9e?= , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" As per POSIX specification of limits.h [1], OS libc may define PAGE_SIZE in limits.h. To prevent collosion of definition, we rename PAGE_SIZE here. [1]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html Signed-off-by: Jiaxun Yang Reviewed-by: Thomas Huth --- contrib/elf2dmp/addrspace.c | 4 ++-- contrib/elf2dmp/addrspace.h | 6 +++--- contrib/elf2dmp/main.c | 18 +++++++++--------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/contrib/elf2dmp/addrspace.c b/contrib/elf2dmp/addrspace.c index 8a76069cb5..53ded17061 100644 --- a/contrib/elf2dmp/addrspace.c +++ b/contrib/elf2dmp/addrspace.c @@ -207,8 +207,8 @@ int va_space_rw(struct va_space *vs, uint64_t addr, void *buf, size_t size, int is_write) { while (size) { - uint64_t page = addr & PFN_MASK; - size_t s = (page + PAGE_SIZE) - addr; + uint64_t page = addr & ELF2DMP_PFN_MASK; + size_t s = (page + ELF2DMP_PAGE_SIZE) - addr; void *ptr; s = (s > size) ? size : s; diff --git a/contrib/elf2dmp/addrspace.h b/contrib/elf2dmp/addrspace.h index d87f6a18c6..00b44c1218 100644 --- a/contrib/elf2dmp/addrspace.h +++ b/contrib/elf2dmp/addrspace.h @@ -10,9 +10,9 @@ #include "qemu_elf.h" -#define PAGE_BITS 12 -#define PAGE_SIZE (1ULL << PAGE_BITS) -#define PFN_MASK (~(PAGE_SIZE - 1)) +#define ELF2DMP_PAGE_BITS 12 +#define ELF2DMP_PAGE_SIZE (1ULL << ELF2DMP_PAGE_BITS) +#define ELF2DMP_PFN_MASK (~(ELF2DMP_PAGE_SIZE - 1)) #define INVALID_PA UINT64_MAX diff --git a/contrib/elf2dmp/main.c b/contrib/elf2dmp/main.c index ac746e49e0..20b477d582 100644 --- a/contrib/elf2dmp/main.c +++ b/contrib/elf2dmp/main.c @@ -244,8 +244,8 @@ static int fill_header(WinDumpHeader64 *hdr, struct pa_space *ps, WinDumpHeader64 h; size_t i; - QEMU_BUILD_BUG_ON(KUSD_OFFSET_SUITE_MASK >= PAGE_SIZE); - QEMU_BUILD_BUG_ON(KUSD_OFFSET_PRODUCT_TYPE >= PAGE_SIZE); + QEMU_BUILD_BUG_ON(KUSD_OFFSET_SUITE_MASK >= ELF2DMP_PAGE_SIZE); + QEMU_BUILD_BUG_ON(KUSD_OFFSET_PRODUCT_TYPE >= ELF2DMP_PAGE_SIZE); if (!suite_mask || !product_type) { return 1; @@ -281,14 +281,14 @@ static int fill_header(WinDumpHeader64 *hdr, struct pa_space *ps, }; for (i = 0; i < ps->block_nr; i++) { - h.PhysicalMemoryBlock.NumberOfPages += ps->block[i].size / PAGE_SIZE; + h.PhysicalMemoryBlock.NumberOfPages += ps->block[i].size / ELF2DMP_PAGE_SIZE; h.PhysicalMemoryBlock.Run[i] = (WinDumpPhyMemRun64) { - .BasePage = ps->block[i].paddr / PAGE_SIZE, - .PageCount = ps->block[i].size / PAGE_SIZE, + .BasePage = ps->block[i].paddr / ELF2DMP_PAGE_SIZE, + .PageCount = ps->block[i].size / ELF2DMP_PAGE_SIZE, }; } - h.RequiredDumpSpace += h.PhysicalMemoryBlock.NumberOfPages << PAGE_BITS; + h.RequiredDumpSpace += h.PhysicalMemoryBlock.NumberOfPages << ELF2DMP_PAGE_BITS; *hdr = h; @@ -379,7 +379,7 @@ static int pe_get_pdb_symstore_hash(uint64_t base, void *start_addr, size_t pdb_name_sz; size_t i; - QEMU_BUILD_BUG_ON(sizeof(*dos_hdr) >= PAGE_SIZE); + QEMU_BUILD_BUG_ON(sizeof(*dos_hdr) >= ELF2DMP_PAGE_SIZE); if (memcmp(&dos_hdr->e_magic, e_magic, sizeof(e_magic))) { return 1; @@ -509,10 +509,10 @@ int main(int argc, char *argv[]) } printf("CPU #0 IDT[0] -> 0x%016"PRIx64"\n", idt_desc_addr(first_idt_desc)); - KernBase = idt_desc_addr(first_idt_desc) & ~(PAGE_SIZE - 1); + KernBase = idt_desc_addr(first_idt_desc) & ~(ELF2DMP_PAGE_SIZE - 1); printf("Searching kernel downwards from 0x%016"PRIx64"...\n", KernBase); - for (; KernBase >= 0xfffff78000000000; KernBase -= PAGE_SIZE) { + for (; KernBase >= 0xfffff78000000000; KernBase -= ELF2DMP_PAGE_SIZE) { nt_start_addr = va_space_resolve(&vs, KernBase); if (!nt_start_addr) { continue; From patchwork Mon Dec 21 00:53:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 1418856 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.a=rsa-sha256 header.s=fm1 header.b=bVgCmclr; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=MdzJ7l3Z; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4Czgxk0DQfz9sSC for ; Mon, 21 Dec 2020 11:55:38 +1100 (AEDT) Received: from localhost ([::1]:51174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kr9U7-00083a-VY for incoming@patchwork.ozlabs.org; Sun, 20 Dec 2020 19:55:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41756) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9T6-0007zg-93; Sun, 20 Dec 2020 19:54:32 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:33137) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9T4-0005Ye-6B; Sun, 20 Dec 2020 19:54:31 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 17363580427; Sun, 20 Dec 2020 19:54:29 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 20 Dec 2020 19:54:29 -0500 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=zCKncd9YBiJLe /SIK46OV+jqTbALSNNeyfKkVIBdzbQ=; b=bVgCmclr1Iko8K5v3zpByutM15xeU E6An0F6L9PO65AO2T4DBJXskDWWOYSiap1ieS8GPXoVTsm01JV4RE7Zdj8b3q6vf t3VdrPZnRCHSXVyUhXn8MU4IPR8RDOrF0f4hIDSvRc/nHauok9LBw5/pGXSvfszK 1A7zAyp2yoEgcg22nSt3QY8JBClBMrMl3CTIeOQ2Tnt48CrbxrQgZf5uuBAOPetX +Iyr7ZXrLLhFHgcXoWf5BAw4og/j8hlNXAGQS6KbhcneQIkzVUGo6LBHNdvrWJuI AK9Lbi0SsVqc53CEwg9zGn8gVhSkW5DWJbB5Mg6RhquQnC1n0hMYwamGQ== 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=zCKncd9YBiJLe/SIK46OV+jqTbALSNNeyfKkVIBdzbQ=; b=MdzJ7l3Z GlxIEztRG70zvXN8MmOKTf0hidDPSyjfdmjiJATwdniN4lfx0JLYKkca+972hI/R AOe2ntN5MFNqvV6NXJ8O7Q0BD0vfjC2wIsKcNT5rragJwK5b6TXNdYATN2REpRln IneBvHJHG9UG9uXgLXXrXxerw9zitbvBG15KOP9ib82bVXwZwF55D/PXl3iHnj9k r1taxEbC3FO8GbsjFsYGpbfmDP5TB6uF4faLpQcTU1Y9ZYBuUkaxBUhNVmAxiwU0 EJdXiYqlXlnjeVQ6c9MMz2N4+wZFrFZZRIyucKeJRvSk+437Bk2f9RdQ+m0OdJfQ 8DJToMpINHWfvg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtuddgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihu nhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecugg ftrfgrthhtvghrnheptdevhedvfeelgefhueevffejueffteffkefhveeiudejieeivedu vdeitdehffejnecuffhomhgrihhnpehophgvnhhgrhhouhhprdhorhhgnecukfhppeeghe drfeefrdehtddrvdehgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Received: from strike.U-LINK.com (li1000-254.members.linode.com [45.33.50.254]) by mail.messagingengine.com (Postfix) with ESMTPA id 5A242240057; Sun, 20 Dec 2020 19:54:17 -0500 (EST) From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH 6/9] hw/block/nand: Rename PAGE_SIZE to NAND_PAGE_SIZE Date: Mon, 21 Dec 2020 08:53:15 +0800 Message-Id: <20201221005318.11866-7-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 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_Mathieu-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_?= =?utf-8?q?Benn=C3=A9e?= , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" As per POSIX specification of limits.h [1], OS libc may define PAGE_SIZE in limits.h. To prevent collosion of definition, we rename PAGE_SIZE here. [1]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html Signed-off-by: Jiaxun Yang Reviewed-by: Thomas Huth --- hw/block/nand.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/hw/block/nand.c b/hw/block/nand.c index 1d7a48a2ec..17645667d8 100644 --- a/hw/block/nand.c +++ b/hw/block/nand.c @@ -114,24 +114,24 @@ static void mem_and(uint8_t *dest, const uint8_t *src, size_t n) # define NAND_IO # define PAGE(addr) ((addr) >> ADDR_SHIFT) -# define PAGE_START(page) (PAGE(page) * (PAGE_SIZE + OOB_SIZE)) +# define PAGE_START(page) (PAGE(page) * (NAND_PAGE_SIZE + OOB_SIZE)) # define PAGE_MASK ((1 << ADDR_SHIFT) - 1) # define OOB_SHIFT (PAGE_SHIFT - 5) # define OOB_SIZE (1 << OOB_SHIFT) # define SECTOR(addr) ((addr) >> (9 + ADDR_SHIFT - PAGE_SHIFT)) # define SECTOR_OFFSET(addr) ((addr) & ((511 >> PAGE_SHIFT) << 8)) -# define PAGE_SIZE 256 +# define NAND_PAGE_SIZE 256 # define PAGE_SHIFT 8 # define PAGE_SECTORS 1 # define ADDR_SHIFT 8 # include "nand.c" -# define PAGE_SIZE 512 +# define NAND_PAGE_SIZE 512 # define PAGE_SHIFT 9 # define PAGE_SECTORS 1 # define ADDR_SHIFT 8 # include "nand.c" -# define PAGE_SIZE 2048 +# define NAND_PAGE_SIZE 2048 # define PAGE_SHIFT 11 # define PAGE_SECTORS 4 # define ADDR_SHIFT 16 @@ -661,7 +661,7 @@ type_init(nand_register_types) #else /* Program a single page */ -static void glue(nand_blk_write_, PAGE_SIZE)(NANDFlashState *s) +static void glue(nand_blk_write_, NAND_PAGE_SIZE)(NANDFlashState *s) { uint64_t off, page, sector, soff; uint8_t iobuf[(PAGE_SECTORS + 2) * 0x200]; @@ -681,11 +681,11 @@ static void glue(nand_blk_write_, PAGE_SIZE)(NANDFlashState *s) return; } - mem_and(iobuf + (soff | off), s->io, MIN(s->iolen, PAGE_SIZE - off)); - if (off + s->iolen > PAGE_SIZE) { + mem_and(iobuf + (soff | off), s->io, MIN(s->iolen, NAND_PAGE_SIZE - off)); + if (off + s->iolen > NAND_PAGE_SIZE) { page = PAGE(s->addr); - mem_and(s->storage + (page << OOB_SHIFT), s->io + PAGE_SIZE - off, - MIN(OOB_SIZE, off + s->iolen - PAGE_SIZE)); + mem_and(s->storage + (page << OOB_SHIFT), s->io + NAND_PAGE_SIZE - off, + MIN(OOB_SIZE, off + s->iolen - NAND_PAGE_SIZE)); } if (blk_pwrite(s->blk, sector << BDRV_SECTOR_BITS, iobuf, @@ -713,7 +713,7 @@ static void glue(nand_blk_write_, PAGE_SIZE)(NANDFlashState *s) } /* Erase a single block */ -static void glue(nand_blk_erase_, PAGE_SIZE)(NANDFlashState *s) +static void glue(nand_blk_erase_, NAND_PAGE_SIZE)(NANDFlashState *s) { uint64_t i, page, addr; uint8_t iobuf[0x200] = { [0 ... 0x1ff] = 0xff, }; @@ -725,7 +725,7 @@ static void glue(nand_blk_erase_, PAGE_SIZE)(NANDFlashState *s) if (!s->blk) { memset(s->storage + PAGE_START(addr), - 0xff, (PAGE_SIZE + OOB_SIZE) << s->erase_shift); + 0xff, (NAND_PAGE_SIZE + OOB_SIZE) << s->erase_shift); } else if (s->mem_oob) { memset(s->storage + (PAGE(addr) << OOB_SHIFT), 0xff, OOB_SIZE << s->erase_shift); @@ -751,7 +751,7 @@ static void glue(nand_blk_erase_, PAGE_SIZE)(NANDFlashState *s) memset(iobuf, 0xff, 0x200); i = (addr & ~0x1ff) + 0x200; - for (addr += ((PAGE_SIZE + OOB_SIZE) << s->erase_shift) - 0x200; + for (addr += ((NAND_PAGE_SIZE + OOB_SIZE) << s->erase_shift) - 0x200; i < addr; i += 0x200) { if (blk_pwrite(s->blk, i, iobuf, BDRV_SECTOR_SIZE, 0) < 0) { printf("%s: write error in sector %" PRIu64 "\n", @@ -772,7 +772,7 @@ static void glue(nand_blk_erase_, PAGE_SIZE)(NANDFlashState *s) } } -static void glue(nand_blk_load_, PAGE_SIZE)(NANDFlashState *s, +static void glue(nand_blk_load_, NAND_PAGE_SIZE)(NANDFlashState *s, uint64_t addr, int offset) { if (PAGE(addr) >= s->pages) { @@ -786,7 +786,7 @@ static void glue(nand_blk_load_, PAGE_SIZE)(NANDFlashState *s, printf("%s: read error in sector %" PRIu64 "\n", __func__, SECTOR(addr)); } - memcpy(s->io + SECTOR_OFFSET(s->addr) + PAGE_SIZE, + memcpy(s->io + SECTOR_OFFSET(s->addr) + NAND_PAGE_SIZE, s->storage + (PAGE(s->addr) << OOB_SHIFT), OOB_SIZE); s->ioaddr = s->io + SECTOR_OFFSET(s->addr) + offset; @@ -800,23 +800,23 @@ static void glue(nand_blk_load_, PAGE_SIZE)(NANDFlashState *s, } } else { memcpy(s->io, s->storage + PAGE_START(s->addr) + - offset, PAGE_SIZE + OOB_SIZE - offset); + offset, NAND_PAGE_SIZE + OOB_SIZE - offset); s->ioaddr = s->io; } } -static void glue(nand_init_, PAGE_SIZE)(NANDFlashState *s) +static void glue(nand_init_, NAND_PAGE_SIZE)(NANDFlashState *s) { s->oob_shift = PAGE_SHIFT - 5; s->pages = s->size >> PAGE_SHIFT; s->addr_shift = ADDR_SHIFT; - s->blk_erase = glue(nand_blk_erase_, PAGE_SIZE); - s->blk_write = glue(nand_blk_write_, PAGE_SIZE); - s->blk_load = glue(nand_blk_load_, PAGE_SIZE); + s->blk_erase = glue(nand_blk_erase_, NAND_PAGE_SIZE); + s->blk_write = glue(nand_blk_write_, NAND_PAGE_SIZE); + s->blk_load = glue(nand_blk_load_, NAND_PAGE_SIZE); } -# undef PAGE_SIZE +# undef NAND_PAGE_SIZE # undef PAGE_SHIFT # undef PAGE_SECTORS # undef ADDR_SHIFT From patchwork Mon Dec 21 00:53:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 1418861 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.a=rsa-sha256 header.s=fm1 header.b=rn1ggbbJ; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=Qck8JKGW; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4Czh262k4yz9sSC for ; Mon, 21 Dec 2020 11:59:26 +1100 (AEDT) Received: from localhost ([::1]:34208 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kr9Xo-0004Ol-BA for incoming@patchwork.ozlabs.org; Sun, 20 Dec 2020 19:59:24 -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 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: 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) 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 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_Mathieu-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_?= =?utf-8?q?Benn=C3=A9e?= , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 //#define DEBUG_KVM From patchwork Mon Dec 21 00:53:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 1418859 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.a=rsa-sha256 header.s=fm1 header.b=iXgga/U+; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=f+lpHHRl; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4Czh0M3RFdz9sSC for ; Mon, 21 Dec 2020 11:57:55 +1100 (AEDT) Received: from localhost ([::1]:59046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kr9WL-0002yV-E9 for incoming@patchwork.ozlabs.org; Sun, 20 Dec 2020 19:57:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41812) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9TS-0008L4-Nw; Sun, 20 Dec 2020 19:54:56 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:56699) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9TO-0005fw-Kt; Sun, 20 Dec 2020 19:54:53 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id B0D8A58042A; Sun, 20 Dec 2020 19:54:49 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 20 Dec 2020 19:54:49 -0500 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=YfIOnPf3y5lSF CslL+LkIwfnCB3kZng697q01cmTQfE=; b=iXgga/U+6PxLgJLLbgF4pDp2W/zTU aaA9scXsQ6wCaNdoeiDOxFZulnNxocWHnAaHrR9jmginr1s2aASUSFW1QReLMQ46 Ay1s4YYZClQ4rDdB4ldr/+AHl2okhDysP7rYkTttCZLPD9ZIdARI3VvTIx/dJcL4 ig99018N9BCx09pp4QIbkzD6o+q6zsPMQ9nhK8PTpvXkhH+yWDJkhKP2KuHk48q2 YQ5099bDIjrEWwTm4KG+d8Jc2sQN38LDW7+k86ZfACEvEPOB/+gWOasvfu7d82pq nUneyeCLCDAokNN16Pb3RJixt83wF+bHYafu8WLs6Vbj05PZTavUGBBrg== 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=YfIOnPf3y5lSFCslL+LkIwfnCB3kZng697q01cmTQfE=; b=f+lpHHRl J21rgyM3cqxFnvrO0gydUvyduFulf/p8MViz+FB8mxp9NwczAC5NQca2mdLNRF7I inrba9ib92r1nA01Vr+VU88cCFZwoWjQbpqDzUtV35Yo04RxkwzhFRw+Y7wCdnNy a8qslLue4oVc/ED2AOCKuhzKZFXGzozXmWSyNSD1kYay3YCFLrMk0RJIQLeQxsJF cnT0NNtYz6De8whImF/fiH8kt5JgjnVyIrcRXYL9Tn6njn0YQRd/DwrlBWRbcz7x 7M/5MUjGZJmhXhZbYuZRWycRwMz1IaGY2PUlAiONFHs3FHSXaJvq0z25TX43wOK5 7o3ZEmgBoacWAA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtuddgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihu nhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecugg ftrfgrthhtvghrnheptdevhedvfeelgefhueevffejueffteffkefhveeiudejieeivedu vdeitdehffejnecuffhomhgrihhnpehophgvnhhgrhhouhhprdhorhhgnecukfhppeeghe drfeefrdehtddrvdehgeenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgr ihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhihghhorghtrdgtohhm X-ME-Proxy: Received: from strike.U-LINK.com (li1000-254.members.linode.com [45.33.50.254]) by mail.messagingengine.com (Postfix) with ESMTPA id 34B0D240057; Sun, 20 Dec 2020 19:54:39 -0500 (EST) From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH 8/9] tests: Rename PAGE_SIZE definitions Date: Mon, 21 Dec 2020 08:53:17 +0800 Message-Id: <20201221005318.11866-9-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 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_Mathieu-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_?= =?utf-8?q?Benn=C3=A9e?= , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" As per POSIX specification of limits.h [1], OS libc may define PAGE_SIZE in limits.h. Self defined PAGE_SIZE is frequently used in tests, to prevent collosion of definition, we give PAGE_SIZE definitons reasonable prefixs. [1]: https://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html Signed-off-by: Jiaxun Yang Reviewed-by: Thomas Huth --- tests/migration/stress.c | 10 ++--- tests/qtest/libqos/malloc-pc.c | 4 +- tests/qtest/libqos/malloc-spapr.c | 4 +- tests/qtest/m25p80-test.c | 54 +++++++++++----------- tests/tcg/multiarch/system/memory.c | 6 +-- tests/test-xbzrle.c | 70 ++++++++++++++--------------- 6 files changed, 74 insertions(+), 74 deletions(-) diff --git a/tests/migration/stress.c b/tests/migration/stress.c index de45e8e490..b7240a15c8 100644 --- a/tests/migration/stress.c +++ b/tests/migration/stress.c @@ -27,7 +27,7 @@ const char *argv0; -#define PAGE_SIZE 4096 +#define RAM_PAGE_SIZE 4096 #ifndef CONFIG_GETTID static int gettid(void) @@ -158,11 +158,11 @@ static unsigned long long now(void) static void stressone(unsigned long long ramsizeMB) { - size_t pagesPerMB = 1024 * 1024 / PAGE_SIZE; + size_t pagesPerMB = 1024 * 1024 / RAM_PAGE_SIZE; g_autofree char *ram = g_malloc(ramsizeMB * 1024 * 1024); char *ramptr; size_t i, j, k; - g_autofree char *data = g_malloc(PAGE_SIZE); + g_autofree char *data = g_malloc(RAM_PAGE_SIZE); char *dataptr; size_t nMB = 0; unsigned long long before, after; @@ -174,7 +174,7 @@ static void stressone(unsigned long long ramsizeMB) * calloc instead :-) */ memset(ram, 0xfe, ramsizeMB * 1024 * 1024); - if (random_bytes(data, PAGE_SIZE) < 0) { + if (random_bytes(data, RAM_PAGE_SIZE) < 0) { return; } @@ -186,7 +186,7 @@ static void stressone(unsigned long long ramsizeMB) for (i = 0; i < ramsizeMB; i++, nMB++) { for (j = 0; j < pagesPerMB; j++) { dataptr = data; - for (k = 0; k < PAGE_SIZE; k += sizeof(long long)) { + for (k = 0; k < RAM_PAGE_SIZE; k += sizeof(long long)) { ramptr += sizeof(long long); dataptr += sizeof(long long); *(unsigned long long *)ramptr ^= *(unsigned long long *)dataptr; diff --git a/tests/qtest/libqos/malloc-pc.c b/tests/qtest/libqos/malloc-pc.c index 16ff9609cc..f1e3b392a5 100644 --- a/tests/qtest/libqos/malloc-pc.c +++ b/tests/qtest/libqos/malloc-pc.c @@ -18,7 +18,7 @@ #include "qemu-common.h" -#define PAGE_SIZE (4096) +#define ALLOC_PAGE_SIZE (4096) void pc_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags) { @@ -26,7 +26,7 @@ void pc_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags) QFWCFG *fw_cfg = pc_fw_cfg_init(qts); ram_size = qfw_cfg_get_u64(fw_cfg, FW_CFG_RAM_SIZE); - alloc_init(s, flags, 1 << 20, MIN(ram_size, 0xE0000000), PAGE_SIZE); + alloc_init(s, flags, 1 << 20, MIN(ram_size, 0xE0000000), ALLOC_PAGE_SIZE); /* clean-up */ pc_fw_cfg_uninit(fw_cfg); diff --git a/tests/qtest/libqos/malloc-spapr.c b/tests/qtest/libqos/malloc-spapr.c index 84862e4876..05b306c191 100644 --- a/tests/qtest/libqos/malloc-spapr.c +++ b/tests/qtest/libqos/malloc-spapr.c @@ -10,7 +10,7 @@ #include "qemu-common.h" -#define PAGE_SIZE 4096 +#define SPAPR_PAGE_SIZE 4096 /* Memory must be a multiple of 256 MB, * so we have at least 256MB @@ -19,5 +19,5 @@ void spapr_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags) { - alloc_init(s, flags, 1 << 20, SPAPR_MIN_SIZE, PAGE_SIZE); + alloc_init(s, flags, 1 << 20, SPAPR_MIN_SIZE, SPAPR_PAGE_SIZE); } diff --git a/tests/qtest/m25p80-test.c b/tests/qtest/m25p80-test.c index 50c6b79fb3..f860cef5f0 100644 --- a/tests/qtest/m25p80-test.c +++ b/tests/qtest/m25p80-test.c @@ -62,7 +62,7 @@ enum { #define FLASH_JEDEC 0x20ba19 /* n25q256a */ #define FLASH_SIZE (32 * 1024 * 1024) -#define PAGE_SIZE 256 +#define FLASH_PAGE_SIZE 256 /* * Use an explicit bswap for the values read/wrote to the flash region @@ -165,7 +165,7 @@ static void read_page(uint32_t addr, uint32_t *page) writel(ASPEED_FLASH_BASE, make_be32(addr)); /* Continuous read are supported */ - for (i = 0; i < PAGE_SIZE / 4; i++) { + for (i = 0; i < FLASH_PAGE_SIZE / 4; i++) { page[i] = make_be32(readl(ASPEED_FLASH_BASE)); } spi_ctrl_stop_user(); @@ -178,15 +178,15 @@ static void read_page_mem(uint32_t addr, uint32_t *page) /* move out USER mode to use direct reads from the AHB bus */ spi_ctrl_setmode(CTRL_READMODE, READ); - for (i = 0; i < PAGE_SIZE / 4; i++) { + for (i = 0; i < FLASH_PAGE_SIZE / 4; i++) { page[i] = make_be32(readl(ASPEED_FLASH_BASE + addr + i * 4)); } } static void test_erase_sector(void) { - uint32_t some_page_addr = 0x600 * PAGE_SIZE; - uint32_t page[PAGE_SIZE / 4]; + uint32_t some_page_addr = 0x600 * FLASH_PAGE_SIZE; + uint32_t page[FLASH_PAGE_SIZE / 4]; int i; spi_conf(CONF_ENABLE_W0); @@ -200,14 +200,14 @@ static void test_erase_sector(void) /* Previous page should be full of zeroes as backend is not * initialized */ - read_page(some_page_addr - PAGE_SIZE, page); - for (i = 0; i < PAGE_SIZE / 4; i++) { + read_page(some_page_addr - FLASH_PAGE_SIZE, page); + for (i = 0; i < FLASH_PAGE_SIZE / 4; i++) { g_assert_cmphex(page[i], ==, 0x0); } /* But this one was erased */ read_page(some_page_addr, page); - for (i = 0; i < PAGE_SIZE / 4; i++) { + for (i = 0; i < FLASH_PAGE_SIZE / 4; i++) { g_assert_cmphex(page[i], ==, 0xffffffff); } @@ -216,8 +216,8 @@ static void test_erase_sector(void) static void test_erase_all(void) { - uint32_t some_page_addr = 0x15000 * PAGE_SIZE; - uint32_t page[PAGE_SIZE / 4]; + uint32_t some_page_addr = 0x15000 * FLASH_PAGE_SIZE; + uint32_t page[FLASH_PAGE_SIZE / 4]; int i; spi_conf(CONF_ENABLE_W0); @@ -225,7 +225,7 @@ static void test_erase_all(void) /* Check some random page. Should be full of zeroes as backend is * not initialized */ read_page(some_page_addr, page); - for (i = 0; i < PAGE_SIZE / 4; i++) { + for (i = 0; i < FLASH_PAGE_SIZE / 4; i++) { g_assert_cmphex(page[i], ==, 0x0); } @@ -236,7 +236,7 @@ static void test_erase_all(void) /* Recheck that some random page */ read_page(some_page_addr, page); - for (i = 0; i < PAGE_SIZE / 4; i++) { + for (i = 0; i < FLASH_PAGE_SIZE / 4; i++) { g_assert_cmphex(page[i], ==, 0xffffffff); } @@ -245,9 +245,9 @@ static void test_erase_all(void) static void test_write_page(void) { - uint32_t my_page_addr = 0x14000 * PAGE_SIZE; /* beyond 16MB */ - uint32_t some_page_addr = 0x15000 * PAGE_SIZE; - uint32_t page[PAGE_SIZE / 4]; + uint32_t my_page_addr = 0x14000 * FLASH_PAGE_SIZE; /* beyond 16MB */ + uint32_t some_page_addr = 0x15000 * FLASH_PAGE_SIZE; + uint32_t page[FLASH_PAGE_SIZE / 4]; int i; spi_conf(CONF_ENABLE_W0); @@ -259,20 +259,20 @@ static void test_write_page(void) writel(ASPEED_FLASH_BASE, make_be32(my_page_addr)); /* Fill the page with its own addresses */ - for (i = 0; i < PAGE_SIZE / 4; i++) { + for (i = 0; i < FLASH_PAGE_SIZE / 4; i++) { writel(ASPEED_FLASH_BASE, make_be32(my_page_addr + i * 4)); } spi_ctrl_stop_user(); /* Check what was written */ read_page(my_page_addr, page); - for (i = 0; i < PAGE_SIZE / 4; i++) { + for (i = 0; i < FLASH_PAGE_SIZE / 4; i++) { g_assert_cmphex(page[i], ==, my_page_addr + i * 4); } /* Check some other page. It should be full of 0xff */ read_page(some_page_addr, page); - for (i = 0; i < PAGE_SIZE / 4; i++) { + for (i = 0; i < FLASH_PAGE_SIZE / 4; i++) { g_assert_cmphex(page[i], ==, 0xffffffff); } @@ -281,9 +281,9 @@ static void test_write_page(void) static void test_read_page_mem(void) { - uint32_t my_page_addr = 0x14000 * PAGE_SIZE; /* beyond 16MB */ - uint32_t some_page_addr = 0x15000 * PAGE_SIZE; - uint32_t page[PAGE_SIZE / 4]; + uint32_t my_page_addr = 0x14000 * FLASH_PAGE_SIZE; /* beyond 16MB */ + uint32_t some_page_addr = 0x15000 * FLASH_PAGE_SIZE; + uint32_t page[FLASH_PAGE_SIZE / 4]; int i; /* Enable 4BYTE mode for controller. This is should be strapped by @@ -300,13 +300,13 @@ static void test_read_page_mem(void) /* Check what was written */ read_page_mem(my_page_addr, page); - for (i = 0; i < PAGE_SIZE / 4; i++) { + for (i = 0; i < FLASH_PAGE_SIZE / 4; i++) { g_assert_cmphex(page[i], ==, my_page_addr + i * 4); } /* Check some other page. It should be full of 0xff */ read_page_mem(some_page_addr, page); - for (i = 0; i < PAGE_SIZE / 4; i++) { + for (i = 0; i < FLASH_PAGE_SIZE / 4; i++) { g_assert_cmphex(page[i], ==, 0xffffffff); } @@ -315,8 +315,8 @@ static void test_read_page_mem(void) static void test_write_page_mem(void) { - uint32_t my_page_addr = 0x15000 * PAGE_SIZE; - uint32_t page[PAGE_SIZE / 4]; + uint32_t my_page_addr = 0x15000 * FLASH_PAGE_SIZE; + uint32_t page[FLASH_PAGE_SIZE / 4]; int i; /* Enable 4BYTE mode for controller. This is should be strapped by @@ -334,14 +334,14 @@ static void test_write_page_mem(void) /* move out USER mode to use direct writes to the AHB bus */ spi_ctrl_setmode(CTRL_WRITEMODE, PP); - for (i = 0; i < PAGE_SIZE / 4; i++) { + for (i = 0; i < FLASH_PAGE_SIZE / 4; i++) { writel(ASPEED_FLASH_BASE + my_page_addr + i * 4, make_be32(my_page_addr + i * 4)); } /* Check what was written */ read_page_mem(my_page_addr, page); - for (i = 0; i < PAGE_SIZE / 4; i++) { + for (i = 0; i < FLASH_PAGE_SIZE / 4; i++) { g_assert_cmphex(page[i], ==, my_page_addr + i * 4); } diff --git a/tests/tcg/multiarch/system/memory.c b/tests/tcg/multiarch/system/memory.c index d124502d73..eb0ec6f8eb 100644 --- a/tests/tcg/multiarch/system/memory.c +++ b/tests/tcg/multiarch/system/memory.c @@ -20,12 +20,12 @@ # error "Target does not specify CHECK_UNALIGNED" #endif -#define PAGE_SIZE 4096 /* nominal 4k "pages" */ -#define TEST_SIZE (PAGE_SIZE * 4) /* 4 pages */ +#define MEM_PAGE_SIZE 4096 /* nominal 4k "pages" */ +#define TEST_SIZE (MEM_PAGE_SIZE * 4) /* 4 pages */ #define ARRAY_SIZE(x) ((sizeof(x) / sizeof((x)[0]))) -__attribute__((aligned(PAGE_SIZE))) +__attribute__((aligned(MEM_PAGE_SIZE))) static uint8_t test_data[TEST_SIZE]; typedef void (*init_ufn) (int offset); diff --git a/tests/test-xbzrle.c b/tests/test-xbzrle.c index f5e08de91e..795d6f1cba 100644 --- a/tests/test-xbzrle.c +++ b/tests/test-xbzrle.c @@ -15,7 +15,7 @@ #include "qemu/cutils.h" #include "../migration/xbzrle.h" -#define PAGE_SIZE 4096 +#define XBZRLE_PAGE_SIZE 4096 static void test_uleb(void) { @@ -41,11 +41,11 @@ static void test_uleb(void) static void test_encode_decode_zero(void) { - uint8_t *buffer = g_malloc0(PAGE_SIZE); - uint8_t *compressed = g_malloc0(PAGE_SIZE); + uint8_t *buffer = g_malloc0(XBZRLE_PAGE_SIZE); + uint8_t *compressed = g_malloc0(XBZRLE_PAGE_SIZE); int i = 0; int dlen = 0; - int diff_len = g_test_rand_int_range(0, PAGE_SIZE - 1006); + int diff_len = g_test_rand_int_range(0, XBZRLE_PAGE_SIZE - 1006); for (i = diff_len; i > 0; i--) { buffer[1000 + i] = i; @@ -55,8 +55,8 @@ static void test_encode_decode_zero(void) buffer[1000 + diff_len + 5] = 105; /* encode zero page */ - dlen = xbzrle_encode_buffer(buffer, buffer, PAGE_SIZE, compressed, - PAGE_SIZE); + dlen = xbzrle_encode_buffer(buffer, buffer, XBZRLE_PAGE_SIZE, compressed, + XBZRLE_PAGE_SIZE); g_assert(dlen == 0); g_free(buffer); @@ -65,11 +65,11 @@ static void test_encode_decode_zero(void) static void test_encode_decode_unchanged(void) { - uint8_t *compressed = g_malloc0(PAGE_SIZE); - uint8_t *test = g_malloc0(PAGE_SIZE); + uint8_t *compressed = g_malloc0(XBZRLE_PAGE_SIZE); + uint8_t *test = g_malloc0(XBZRLE_PAGE_SIZE); int i = 0; int dlen = 0; - int diff_len = g_test_rand_int_range(0, PAGE_SIZE - 1006); + int diff_len = g_test_rand_int_range(0, XBZRLE_PAGE_SIZE - 1006); for (i = diff_len; i > 0; i--) { test[1000 + i] = i + 4; @@ -79,8 +79,8 @@ static void test_encode_decode_unchanged(void) test[1000 + diff_len + 5] = 109; /* test unchanged buffer */ - dlen = xbzrle_encode_buffer(test, test, PAGE_SIZE, compressed, - PAGE_SIZE); + dlen = xbzrle_encode_buffer(test, test, XBZRLE_PAGE_SIZE, compressed, + XBZRLE_PAGE_SIZE); g_assert(dlen == 0); g_free(test); @@ -89,21 +89,21 @@ static void test_encode_decode_unchanged(void) static void test_encode_decode_1_byte(void) { - uint8_t *buffer = g_malloc0(PAGE_SIZE); - uint8_t *test = g_malloc0(PAGE_SIZE); - uint8_t *compressed = g_malloc(PAGE_SIZE); + uint8_t *buffer = g_malloc0(XBZRLE_PAGE_SIZE); + uint8_t *test = g_malloc0(XBZRLE_PAGE_SIZE); + uint8_t *compressed = g_malloc(XBZRLE_PAGE_SIZE); int dlen = 0, rc = 0; uint8_t buf[2]; - test[PAGE_SIZE - 1] = 1; + test[XBZRLE_PAGE_SIZE - 1] = 1; - dlen = xbzrle_encode_buffer(buffer, test, PAGE_SIZE, compressed, - PAGE_SIZE); + dlen = xbzrle_encode_buffer(buffer, test, XBZRLE_PAGE_SIZE, compressed, + XBZRLE_PAGE_SIZE); g_assert(dlen == (uleb128_encode_small(&buf[0], 4095) + 2)); - rc = xbzrle_decode_buffer(compressed, dlen, buffer, PAGE_SIZE); - g_assert(rc == PAGE_SIZE); - g_assert(memcmp(test, buffer, PAGE_SIZE) == 0); + rc = xbzrle_decode_buffer(compressed, dlen, buffer, XBZRLE_PAGE_SIZE); + g_assert(rc == XBZRLE_PAGE_SIZE); + g_assert(memcmp(test, buffer, XBZRLE_PAGE_SIZE) == 0); g_free(buffer); g_free(compressed); @@ -112,18 +112,18 @@ static void test_encode_decode_1_byte(void) static void test_encode_decode_overflow(void) { - uint8_t *compressed = g_malloc0(PAGE_SIZE); - uint8_t *test = g_malloc0(PAGE_SIZE); - uint8_t *buffer = g_malloc0(PAGE_SIZE); + uint8_t *compressed = g_malloc0(XBZRLE_PAGE_SIZE); + uint8_t *test = g_malloc0(XBZRLE_PAGE_SIZE); + uint8_t *buffer = g_malloc0(XBZRLE_PAGE_SIZE); int i = 0, rc = 0; - for (i = 0; i < PAGE_SIZE / 2 - 1; i++) { + for (i = 0; i < XBZRLE_PAGE_SIZE / 2 - 1; i++) { test[i * 2] = 1; } /* encode overflow */ - rc = xbzrle_encode_buffer(buffer, test, PAGE_SIZE, compressed, - PAGE_SIZE); + rc = xbzrle_encode_buffer(buffer, test, XBZRLE_PAGE_SIZE, compressed, + XBZRLE_PAGE_SIZE); g_assert(rc == -1); g_free(buffer); @@ -133,13 +133,13 @@ static void test_encode_decode_overflow(void) static void encode_decode_range(void) { - uint8_t *buffer = g_malloc0(PAGE_SIZE); - uint8_t *compressed = g_malloc(PAGE_SIZE); - uint8_t *test = g_malloc0(PAGE_SIZE); + uint8_t *buffer = g_malloc0(XBZRLE_PAGE_SIZE); + uint8_t *compressed = g_malloc(XBZRLE_PAGE_SIZE); + uint8_t *test = g_malloc0(XBZRLE_PAGE_SIZE); int i = 0, rc = 0; int dlen = 0; - int diff_len = g_test_rand_int_range(0, PAGE_SIZE - 1006); + int diff_len = g_test_rand_int_range(0, XBZRLE_PAGE_SIZE - 1006); for (i = diff_len; i > 0; i--) { buffer[1000 + i] = i; @@ -153,12 +153,12 @@ static void encode_decode_range(void) test[1000 + diff_len + 5] = 109; /* test encode/decode */ - dlen = xbzrle_encode_buffer(test, buffer, PAGE_SIZE, compressed, - PAGE_SIZE); + dlen = xbzrle_encode_buffer(test, buffer, XBZRLE_PAGE_SIZE, compressed, + XBZRLE_PAGE_SIZE); - rc = xbzrle_decode_buffer(compressed, dlen, test, PAGE_SIZE); - g_assert(rc < PAGE_SIZE); - g_assert(memcmp(test, buffer, PAGE_SIZE) == 0); + rc = xbzrle_decode_buffer(compressed, dlen, test, XBZRLE_PAGE_SIZE); + g_assert(rc < XBZRLE_PAGE_SIZE); + g_assert(memcmp(test, buffer, XBZRLE_PAGE_SIZE) == 0); g_free(buffer); g_free(compressed); From patchwork Mon Dec 21 00:53:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiaxun Yang X-Patchwork-Id: 1418862 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=flygoat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=flygoat.com header.i=@flygoat.com header.a=rsa-sha256 header.s=fm1 header.b=kjNEuFBx; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm1 header.b=nkAVKFa/; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 4Czh5918P1z9sSC for ; Mon, 21 Dec 2020 12:02:05 +1100 (AEDT) Received: from localhost ([::1]:37404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kr9aN-0005iy-1o for incoming@patchwork.ozlabs.org; Sun, 20 Dec 2020 20:02:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9TY-0008V5-H3; Sun, 20 Dec 2020 19:55:00 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:39435) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kr9TW-0005hj-R5; Sun, 20 Dec 2020 19:55:00 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id AA626580429; Sun, 20 Dec 2020 19:54:57 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 20 Dec 2020 19:54:57 -0500 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=CPk8hWNwTbOuu sALCr78eQxjcJr/MxCKc2iZwwjx04g=; b=kjNEuFBxoCZ14wpAhm9PPqL6qGQ8m cl2ej1uLe1AOMw/ETGg5RQP+0HesOg+hGA+kyrejc89AncDLoXodmI85586D7M9B FV8qQLiZgPspd+3edIYxEg54hURZoHl65Z1eypBbOJwUp85l+qKKPOigy1p4Lgev gVqvMEiIc3bt/CnlckiEa/e0i6u7ImdllmffthcDJHyRtrP9dQpETUtfDuV11mPP fNVDzOsUR7ModJcUjZ/dYxh4kJmmJIpyY/do0mnWIDfCzZPPsDoNtmUJU+brhsvF geWVrZ8h4LoC71NY3NpniUjfqNg5yfhNDMhXmN1C/YGTTg0rnMoKHBktQ== 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=CPk8hWNwTbOuusALCr78eQxjcJr/MxCKc2iZwwjx04g=; b=nkAVKFa/ nyGYNo7uVY0BqhDYRoAeWeQ3otG3WVBf4idd5vJnInv2/7IoazFwgVxIejP8T9XD r+ynH3hT1jyRYyfCu+elV+E/fR0HuSIXe+RNVtMDjSjjmU7e3teOheAlN2zQMilG swC+nihDzxJvxZe3nt2+8htbImV3T6pjX2ITU0ns9byO7bS3/m0rYC4pXieiwJCf XLn+0TybYEjC5/GaalGyvnxn7tV7tIJh1BeTd0+DzzmuM2Sjx1vd27mDHPEIL/mC DlKtw4Hi0IQPuTRYLD282e+K554HM62aliE38dqL//nvqYHMOZ9CFJ96t5qJ2Ass 3NQAJOGhMVbpqg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvddtuddgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflihgrgihu nhcujggrnhhguceojhhirgiguhhnrdihrghnghesfhhlhihgohgrthdrtghomheqnecugg ftrfgrthhtvghrnhepjeeihffgteelkeelffdukedtheevudejvdegkeekjeefhffhhfet udetgfdtffeunecukfhppeeghedrfeefrdehtddrvdehgeenucevlhhushhtvghrufhiii gvpeefnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjihgrgihunhdrhigrnhhgsehflhih ghhorghtrdgtohhm X-ME-Proxy: Received: from strike.U-LINK.com (li1000-254.members.linode.com [45.33.50.254]) by mail.messagingengine.com (Postfix) with ESMTPA id 7DBB224005A; Sun, 20 Dec 2020 19:54:49 -0500 (EST) From: Jiaxun Yang To: qemu-devel@nongnu.org Subject: [PATCH 9/9] gitlab-ci: Add alpine to pipeline Date: Mon, 21 Dec 2020 08:53:18 +0800 Message-Id: <20201221005318.11866-10-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 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_Mathieu-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_?= =?utf-8?q?Benn=C3=A9e?= , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" We only run build test and check-acceptance as their are too many failures in checks due to minor string mismatch. Signed-off-by: Jiaxun Yang --- .gitlab-ci.d/containers.yml | 5 +++++ .gitlab-ci.yml | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/.gitlab-ci.d/containers.yml b/.gitlab-ci.d/containers.yml index 892ca8d838..cc4390911d 100644 --- a/.gitlab-ci.d/containers.yml +++ b/.gitlab-ci.d/containers.yml @@ -28,6 +28,11 @@ - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - if: '$CI_COMMIT_REF_NAME == "testing/next"' +amd64-alpine-container: + <<: *container_job_definition + variables: + NAME: alpine + amd64-centos7-container: <<: *container_job_definition variables: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 98bff03b47..4794fa6289 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,6 +67,29 @@ include: - python3 -c 'import json; r = json.load(open("tests/results/latest/results.json")); [print(t["logfile"]) for t in r["tests"] if t["status"] not in ("PASS", "SKIP", "CANCEL")]' | xargs cat - du -chs ${CI_PROJECT_DIR}/avocado-cache +build-system-alpine: + <<: *native_build_job_definition + variables: + IMAGE: alpine + TARGETS: aarch64-softmmu alpha-softmmu cris-softmmu hppa-softmmu + moxie-softmmu microblazeel-softmmu mips64el-softmmu + MAKE_CHECK_ARGS: check-build + CONFIGURE_ARGS: --enable-docs + artifacts: + expire_in: 2 days + paths: + - build + +acceptance-system-alpine: + <<: *native_test_job_definition + needs: + - job: build-system-alpine + artifacts: true + variables: + IMAGE: alpine + MAKE_CHECK_ARGS: check-acceptance + <<: *acceptance_definition + build-system-ubuntu: <<: *native_build_job_definition variables: