From patchwork Tue Jan 16 17:25:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 861801 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zLcdG2lmsz9sRV for ; Wed, 17 Jan 2018 04:28:34 +1100 (AEDT) Received: from localhost ([::1]:50820 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebV2G-0001yD-Dr for incoming@patchwork.ozlabs.org; Tue, 16 Jan 2018 12:28:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebUzR-00007s-8A for qemu-devel@nongnu.org; Tue, 16 Jan 2018 12:25:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebUzO-0001PN-9M for qemu-devel@nongnu.org; Tue, 16 Jan 2018 12:25:37 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:59942) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebUzN-0001Nw-GI for qemu-devel@nongnu.org; Tue, 16 Jan 2018 12:25:34 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue004 [212.227.15.167]) with ESMTPSA (Nemesis) id 0LjwS5-1f8uvL0rZx-00budE; Tue, 16 Jan 2018 18:25:14 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Tue, 16 Jan 2018 18:25:06 +0100 Message-Id: <20180116172510.28878-1-laurent@vivier.eu> X-Mailer: git-send-email 2.14.3 MIME-Version: 1.0 X-Provags-ID: V03:K0:an/Cu/50wh5vp0qO47aHPJ5KHAIsVk4mu+8cci27tcicLCPgyCA NVzYROHC3BqoP/DLLaEdt6McF8Tlmr1V9VYyhJrGRrjVxWbM1FDF3SxBgslss1CtpOO0fdN 5dnEKdnGA4S0CA4b+s4u0TU8VgbASjcX2pADFYekEIG50sq1i/LGLp6ptglmYdryW75BCKF nMx0qZygipot0Sfe9xygg== X-UI-Out-Filterresults: notjunk:1; V01:K0:oG5b5fNI3Zo=:9/zhiEzAQCgJhj8vxZ1C8s PkPEeH6YqhVKZSxKVObMpIm/RADRx3ukA7Tgy9KKCo0S7Nx5LhhMDIuXQTVb7H1xy6e4RI64U k2k8mlI1qSi4A8ruBevivaYuHiEyIG5CLAsXsttcyCcfL9P73udyOlMx69ohyBrh5BeZGW55t jxcVfJevSFv+oxEAq+OseJ8P5UPsunTPWOUDj0YI8zA/Nwd+m0MFc6OAfYShcXNNPwtCSMqoL WnQReoZ/23WGiNCukwJTwYTKqPkuyDPneOKYbN5U3SuLoSW8aqR78BeOPY0raVi1cItIpi8vh Ub8Nqhp0II9Tw65bab9iA17eMLuJ9KjjbN6Ffm9gbN/WqbiQOaiA6Ih2O4dg30n8BXfN75J0T 276k5HsUAuX7yCQdR51lxQ76RdeyVp4fklD2gWRMHBkKl7CevZyz2HNrgZwrdqqnxG/HNC6fT 8Q+xyx1lJMtUnVPleMf4G6d8FBG3BBDaZYLm7GaejoxX7jiPOYPTr4lz2QFgD0VqY8i93jSfb Egfbmw/m/ApH83FwTaiFhTk6bpGHqOMjcbJe7I70rgrJa7+FlLUJ0T+CGpX3cTNVpInpW9FrJ sG59dAAFIDDmRq0K7JXr7CuF155SlfnrphKqc4LJvp7dRTgif7reC3f/1kBPPC2UMFqRFHICB GHcPVPh/BYheqmiODXKxExeXHTibpbKCBM5oReYLfy8Jp7OtUeU+pUWnc3gHlKdlnAwnNwyjA kxLWm/128m7EX4QbMvuFMuZoMQ+oZ5sV8G1D+vaiAlJyvHJf7B4bfqha3dU= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.126.130 Subject: [Qemu-devel] [PATCH v2 0/4] linux-user: select CPU type according ELF header values 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: Peter Maydell , YunQiang Su , Riku Voipio , Richard Henderson , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Laurent Vivier , Aaron Sierra Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This idea has been suggested to me before by Philippe Mathieu-Daudé, and recently YunQiang Su has proposed a patch to manage the MIPS r6 case. Based on this, this series tries to clean-up the original patch, and introduces the use for m68k architecture and port the patch from YunQiang Su. v2: move cpu_model selection to linux-user/*/target_elf.h provide eflags to cpu_get_model() instead of fd (and modify other patches accordingly) Laurent Vivier (2): linux-user: Move CPU type name selection to a function linux-user,m68k: select CPU according to ELF header values YunQiang Su (2): linux-user: introduce functions to detect CPU type linux-user: MIPS set cpu to r6 CPU if binary is R6 include/elf.h | 4 +++ linux-user/aarch64/target_elf.h | 14 +++++++++ linux-user/alpha/target_elf.h | 14 +++++++++ linux-user/arm/target_elf.h | 14 +++++++++ linux-user/cris/target_elf.h | 14 +++++++++ linux-user/elfload.c | 35 ++++++++++++++++++++++ linux-user/hppa/target_elf.h | 14 +++++++++ linux-user/i386/target_elf.h | 14 +++++++++ linux-user/m68k/target_elf.h | 20 +++++++++++++ linux-user/main.c | 59 +++++++------------------------------- linux-user/microblaze/target_elf.h | 14 +++++++++ linux-user/mips/target_elf.h | 17 +++++++++++ linux-user/mips64/target_elf.h | 17 +++++++++++ linux-user/nios2/target_elf.h | 14 +++++++++ linux-user/openrisc/target_elf.h | 14 +++++++++ linux-user/ppc/target_elf.h | 21 ++++++++++++++ linux-user/qemu.h | 1 + linux-user/s390x/target_elf.h | 14 +++++++++ linux-user/sh4/target_elf.h | 14 +++++++++ linux-user/sparc/target_elf.h | 14 +++++++++ linux-user/sparc64/target_elf.h | 14 +++++++++ linux-user/tilegx/target_elf.h | 14 +++++++++ linux-user/unicore32/target_elf.h | 14 +++++++++ linux-user/x86_64/target_elf.h | 14 +++++++++ 24 files changed, 350 insertions(+), 48 deletions(-) create mode 100644 linux-user/aarch64/target_elf.h create mode 100644 linux-user/alpha/target_elf.h create mode 100644 linux-user/arm/target_elf.h create mode 100644 linux-user/cris/target_elf.h create mode 100644 linux-user/hppa/target_elf.h create mode 100644 linux-user/i386/target_elf.h create mode 100644 linux-user/m68k/target_elf.h create mode 100644 linux-user/microblaze/target_elf.h create mode 100644 linux-user/mips/target_elf.h create mode 100644 linux-user/mips64/target_elf.h create mode 100644 linux-user/nios2/target_elf.h create mode 100644 linux-user/openrisc/target_elf.h create mode 100644 linux-user/ppc/target_elf.h create mode 100644 linux-user/s390x/target_elf.h create mode 100644 linux-user/sh4/target_elf.h create mode 100644 linux-user/sparc/target_elf.h create mode 100644 linux-user/sparc64/target_elf.h create mode 100644 linux-user/tilegx/target_elf.h create mode 100644 linux-user/unicore32/target_elf.h create mode 100644 linux-user/x86_64/target_elf.h