From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07987C433E0 for ; Sat, 30 Jan 2021 18:11:43 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9956464E11 for ; Sat, 30 Jan 2021 18:11:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9956464E11 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Subject:To:From: Message-ID:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=x8dwvKITkVBnY93ro/OwLApnVJPPwKwpxm6eNGeQOGY=; b=l++2/ZBUAxpYqOWtyQOmB0+ce On2FI2ky0H+tE3ZQWCaU4q1j882kNeSoX4AQHW0tLYXPkl+ddKv8Zfxr1dzBQZtgQxGvEusVPBUnF FNjmcMPBbKHq7bUJ2+BpncejdBZsMFktamlAnDXbVPPX2FKNdztAtEShDm7auTzsg3NOioJ1C5wZc HgUw647uG55jV0Tyf0U3s6/Qdm5WOysn3/Pv7IGaKh2GqzDJB3iNLsxIy0/KpocWlF6ACjGNslxFH 6dH7vVasTlAmEhiuFnyn0NanpnZI+Yg/jtvcYz8/CbIcrQa81DY0QbDhEGfCno2GDfI3v7gKEoOxC VSj+cGMag==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l5uhS-0008RZ-J9; Sat, 30 Jan 2021 18:10:22 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l5uhP-0008Qk-UR for linux-arm-kernel@lists.infradead.org; Sat, 30 Jan 2021 18:10:20 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8232E64E05; Sat, 30 Jan 2021 18:10:18 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1l5uhM-00B0ti-DX; Sat, 30 Jan 2021 18:10:16 +0000 Date: Sat, 30 Jan 2021 18:10:14 +0000 Message-ID: <87pn1ml2ih.wl-maz@kernel.org> From: Marc Zyngier To: Guenter Roeck Subject: Re: [PATCH v2 4/8] KVM: arm64: Generate hyp relocation data In-Reply-To: <20210130161104.GA77773@roeck-us.net> References: <20210105180541.65031-1-dbrazdil@google.com> <20210105180541.65031-5-dbrazdil@google.com> <20210129214325.GA195322@roeck-us.net> <87r1m2lets.wl-maz@kernel.org> <20210130161104.GA77773@roeck-us.net> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: linux@roeck-us.net, dbrazdil@google.com, kvmarm@lists.cs.columbia.edu, mark.rutland@arm.com, suzuki.poulose@arm.com, catalin.marinas@arm.com, linux-kernel@vger.kernel.org, james.morse@arm.com, linux-arm-kernel@lists.infradead.org, will@kernel.org, ardb@kernel.org, julien.thierry.kdev@gmail.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210130_131020_068083_C6B55566 X-CRM114-Status: GOOD ( 21.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Suzuki K Poulose , Catalin Marinas , linux-kernel@vger.kernel.org, Ard Biesheuvel , James Morse , Julien Thierry , David Brazdil , Will Deacon , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat, 30 Jan 2021 16:11:04 +0000, Guenter Roeck wrote: > > On Sat, Jan 30, 2021 at 01:44:15PM +0000, Marc Zyngier wrote: > > From d80ca05b2ed90fc30d328041692fa80f525c8d12 Mon Sep 17 00:00:00 2001 > > From: Marc Zyngier > > Date: Sat, 30 Jan 2021 13:07:51 +0000 > > Subject: [PATCH] KVM: arm64: Make gen-hyprel endianness agnostic > > > > gen-hyprel is, for better or worse, a native-endian program: > > it assumes that the ELF data structures are in the host's > > endianness, and even assumes that the compiled kernel is > > little-endian in one particular case. > > > > None of these assumptions hold true though: people actually build > > (use?) BE arm64 kernels, and seem to avoid doing so on BE hosts. > > Madness! > > > > In order to solve this, wrap each access to the ELF data structures > > with the required byte-swapping magic. This requires to obtain > > the kernel data structure, and provide per-endianess wrappers. > > > > This result in a kernel that links and even boots in a model. > > > > Fixes: 8c49b5d43d4c ("KVM: arm64: Generate hyp relocation data") > > Reported-by: Guenter Roeck > > Signed-off-by: Marc Zyngier > > Tested-by: Guenter Roeck > > Compiles and boots both big- and little-endian systems in qemu. Great, thanks for confirming that it fixed this issue. Now applied to kvm-arm64/hyp-reloc, and pushed out to kvmarm/next. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel