From patchwork Tue Sep 11 14:06:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 146464 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3686529ljw; Tue, 11 Sep 2018 07:10:42 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda9D/d9x4nqzrECwMQqwaWAciGOJVhg9uZ1oi8S7ceXYp5aBaMmacJ45dQR3pcykvsE2FWq X-Received: by 2002:a37:e84:: with SMTP id 126-v6mr19374535qko.0.1536675041974; Tue, 11 Sep 2018 07:10:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536675041; cv=none; d=google.com; s=arc-20160816; b=n0JreSULiKo/K0UKruxijTfOSnZuYjsXJ1z40ZS9adZ+saJGrgh+LKM7i8ODNSbHVQ miCkRPLTYKkN+W12yFcHUTWdubK/ZkQ48u5Hge/xIQ++rzGeIU/rOMoH6ZGVJaM5Ie46 CtRsaStK20muiJU3FNTMpiz4Xqm3pF8R5lU05IQm/KTgQ3hxLD5rVdOBJxPkKy5GOIUW pdo+uaoK0d7T3YuUAkXzMw319DqIFOKWrYJs78nsPyXDfSdFQtRWdDmmNb+cFutRkguo lhzPSVRbMNiOehznPTQ7PTkYkNxP06awuqI8WqhHtbgoQ1DN9e3eAryrHUkYVtDLM5qW WsQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:message-id:date:to:from :dkim-signature; bh=YKRD5DqacITUSOL8MxpjxQ1cuvsHVQ1GmzjMPkFet/A=; b=zvKioxpa5EjDFJdqtI3TXiv2zBKomizc31Uhi5Gq3SmTRQEUfENWgzIZZtBdrIqnvX 92ud9cROuYb72CTpLHIwYHpcBlCq8/ag+e1wqPjmjqVWXELhWcyBkkpghAj2S3WnDUah 9rTgTLDvwDZ6Detf8swP6YiHwlx+u0CptUqMX4gUhnj84ZnrDDph4bebb4s+7DUvnT4L BkDkLEPOuniKo9p2N4+ZBweCnls4AKSDZ4PJLJi/8TYGM6xJH/cji0JYJKglS+3DqjHF +md/nIU/mMzMgQcwYr/3Qc+D120F6ndTJQQYomVbhCJRBECsZoqGC0HbuzAeFc5+Z32M w0lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="YkkMdG/7"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 8-v6si191978qvw.194.2018.09.11.07.10.41 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 11 Sep 2018 07:10:41 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="YkkMdG/7"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:57935 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzjNJ-00058L-EE for patch@linaro.org; Tue, 11 Sep 2018 10:10:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzjJP-0008Qm-Ko for qemu-devel@nongnu.org; Tue, 11 Sep 2018 10:06:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzjJK-0007VE-IN for qemu-devel@nongnu.org; Tue, 11 Sep 2018 10:06:39 -0400 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:51974) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fzjJK-0007Sc-1J for qemu-devel@nongnu.org; Tue, 11 Sep 2018 10:06:34 -0400 Received: by mail-wm0-x243.google.com with SMTP id y2-v6so1152755wma.1 for ; Tue, 11 Sep 2018 07:06:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YKRD5DqacITUSOL8MxpjxQ1cuvsHVQ1GmzjMPkFet/A=; b=YkkMdG/7B8BCNtGaHzqGVi2ruEgCkZAu+OVa+oPPBcqK0RKSTJ+ml8j/fFC+YL2OMs RHhmO6ZHZTFB0aiHIPJNbfAoPp9JIJBSSEeV/2WLzMPlo8LW8rYi8P2eGE1wXzDGRE1P YiXBnSAR/j33i7SCMRrQJQDbhIjRR/vxBONaQ= 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:mime-version :content-transfer-encoding; bh=YKRD5DqacITUSOL8MxpjxQ1cuvsHVQ1GmzjMPkFet/A=; b=lSkBLd17QKxPh3m3g9zbhAnlAtdx18py/YstlisVLMftk5Bo1FvaJjLjJz3C8lHm2B CJAUoWXRwDqLxO4JxFP/CkNXI1huphXv0yGBt16mVBQE0ggxXOnYpSBM9XEus3WryXna K4AHLkgoFUU6gSwToW7EHWWRiuN+WW6XhjbEFoWXdKTO5vFeMpExFAnB0mGtHa0Yejqi xp99puOvNKO1i9sTha30p/DoYXUtUsUJv7JPrn6Mk+GJLwE59u4MmUXDTy3902e8YDuX m2f9fhUPB3r6+1yjgD12L9znsbSE4n4L0G2+eSSRsfBHJWwmHiCHYXzwGwmTg5RHAqC3 2/Nw== X-Gm-Message-State: APzg51DviBcBNJQvk2lDduqZqNVgOCd1LTwrmHwRXC/6VDL0HW5yDcbC cOlfjHdoLlbSA91uDTEFiYW3Dg== X-Received: by 2002:a1c:760d:: with SMTP id r13-v6mr1397699wmc.22.1536674792537; Tue, 11 Sep 2018 07:06:32 -0700 (PDT) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id x15-v6sm17110193wrt.53.2018.09.11.07.06.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 11 Sep 2018 07:06:31 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 5C9763E0489; Tue, 11 Sep 2018 15:06:31 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 11 Sep 2018 15:06:27 +0100 Message-Id: <20180911140631.18481-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [RFC PATCH 0/4] Add Nios II cross-compiler and enable tests/tcg X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 1791796@bugs.launchpad.net, =?utf-8?q?Alex_Benn=C3=A9e?= , thuth@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Hi, tl;dr Nios II linux-user seems pretty broken Following up on some mailing list queries about the state of Nios II Thomas pointed out that buildroot could build cross-compilers for the architecture. As a quick experiment I've enabled a docker based buildroot and turned on tests/tcg for it. The results are not very encouraging as both linux-test and test-mmap fail although (impressively?) testthread passes. The test-mmap failure looks like some sort of argument mangling failure as arg6 of target_mmap looks negative/big and hence causes the mmap to fail. I tried messing with the #ifdef mangling logic in do_syscall1 but failed to get it working. The linux-test failure seems like a missing lseek system call but I have no doubt there are others given the bug reports on list. This series includes a hack to min uname which we can't really merge. This is because buildroot is focused on building system images so sets the glibc minimum kernel version to whatever it builds for the system image. I leave the problem of programatically tuning the qemu_nios2_10m50_defconfig to build a general purpose glibc to whoever wants to take this forward. As I'm not particularly interested in this architecture I don't intend to spend any more time on this. Given how broken linux-user is I suspect most users of QEMU's Nios 2 emulation use softmmu. If there is interest in fixing up linux-user then the docker and test/tcg patches can be included when the fixups are sent to the list. I would argue that any linux-user target should at the very least pass all of tests/tcg/multiarch - it's not super comprehensive but it's all we have at the moment. Perhaps we should consider deprecating the obviously less used linux-user targets? Alex Bennée (4): docker: add debian-buildroot-base docker: add buildroot-nios2-cross image linux-user/nios2: bump min uname to 4.16.0 [!HACK] tests/tcg: add nios2 architecture (NEEDS FIXES) linux-user/nios2/target_syscall.h | 2 +- tests/docker/Makefile.include | 6 ++++- .../dockerfiles/buildroot-nios2-cross.docker | 10 +++++++ .../dockerfiles/debian-buildroot-base.docker | 26 +++++++++++++++++++ tests/tcg/nios2/Makefile.include | 2 ++ 5 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 tests/docker/dockerfiles/buildroot-nios2-cross.docker create mode 100644 tests/docker/dockerfiles/debian-buildroot-base.docker create mode 100644 tests/tcg/nios2/Makefile.include -- 2.17.1