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=-14.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 A218EC43460 for ; Wed, 5 May 2021 18:04:50 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 02B5C611ED for ; Wed, 5 May 2021 18:04:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 02B5C611ED 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Subject:Cc: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=x1rFy7/Er8JMKf+/Qdsiem7zR+Bv4taUWaC/JfyKTpw=; b=QlzaZMfTiQSwqxfxPmBsYSiKZ 3KW6NyTWrbRX/HWDM2WCawbF+ogC1jnKJw3ybjCAWmI5eX6hlXYRhQinTo57OehZOPyUik+pk+Ho9 otGrjX8n1cUBsF9nO8oThXz2STQ2sXB2P5abFMnpMgsejAGK+pTdNbjZYl6g2zvz925owBWFHFrUp z+Np1FGQ0VTRvUr+xPPdHFBnIJ1WzOQwkRksjiTLwDJmg1broanf63mOTZJge5syBgTtRVQba7Qeu KGmc6VD0l831mCASupPvg+6Midh/B/u/4FkYRnOOtcYySuCH6KzFAQkuxcQwjaT1MqeUx79EAPabo BSdOPpVpQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1leLrl-001yHe-Q8; Wed, 05 May 2021 18:03:22 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1leLrg-001yGk-8M for linux-arm-kernel@desiato.infradead.org; Wed, 05 May 2021 18:03:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type:MIME-Version:References: In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=qhUnxFSvL13HrYTjSYBNqp1PMECI+kcQvLDY6pVQOJY=; b=NAUo/oS1mXPm2P5Rd7nLCMKgnJ JKqcIWwqiAw2kCJSEn0t2D7THy1tt4KOBfi1ULOUxPhdSIR4zFDNmbBNKb0ATDvKbJ5xGVfHEBI/H FQDJTwjlxZTR2CYq6NUZNq5JYl5EDYF9W0CEhoxZ8dmsNxmxs/Lt+lZH3WyRTsCMB9d3aPvywGbcN 46bxxH+X1tIDMJ93qmVUYSm4bxrzCiJyYjiAd6iZPEvP2vIs6Nn72SIKnwn2sm0aAxqtApGB4Bku9 A3Eoq1iJe0AlFvG3IyBVe2YOT5pDwPEcosttWzRvI/lUIFo2RNSvt7bs31dndIkem0zeDrCmolbfz M8aiIEaw==; Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1leLrd-0057X2-BT for linux-arm-kernel@lists.infradead.org; Wed, 05 May 2021 18:03:15 +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 CDDCA61057; Wed, 5 May 2021 18:03:12 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.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 1leLra-00B5q6-Nc; Wed, 05 May 2021 19:03:10 +0100 Date: Wed, 05 May 2021 19:03:09 +0100 Message-ID: <871ralnjmq.wl-maz@kernel.org> From: Marc Zyngier To: Auger Eric Cc: Paolo Bonzini , Alexander Graf , Alexandru Elisei , Andrew Scull , Catalin Marinas , Christoffer Dall , David Brazdil , Gavin Shan , James Morse , Mark Rutland , Peng Hao , Quentin Perret , Will Deacon , Julien Thierry , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH 15/56] KVM: arm64: Add build rules for separate VHE/nVHE object files In-Reply-To: <2ff3a1cb-a310-7963-4171-bd1e7d08e39b@redhat.com> References: <20200805175700.62775-1-maz@kernel.org> <20200805175700.62775-16-maz@kernel.org> <2ff3a1cb-a310-7963-4171-bd1e7d08e39b@redhat.com> 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: eric.auger@redhat.com, pbonzini@redhat.com, graf@amazon.com, alexandru.elisei@arm.com, ascull@google.com, catalin.marinas@arm.com, christoffer.dall@arm.com, dbrazdil@google.com, gshan@redhat.com, james.morse@arm.com, mark.rutland@arm.com, richard.peng@oppo.com, qperret@google.com, will@kernel.org, julien.thierry.kdev@gmail.com, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, kernel-team@android.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-20210505_110313_477694_2800DBAD X-CRM114-Status: GOOD ( 34.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Hi Eric, On Tue, 04 May 2021 15:47:36 +0100, Auger Eric wrote: > > Hi David, Marc, > > On 8/5/20 7:56 PM, Marc Zyngier wrote: > > From: David Brazdil > > > > Add new folders arch/arm64/kvm/hyp/{vhe,nvhe} and Makefiles for building code > > that runs in EL2 under VHE/nVHE KVM, repsectivelly. Add an include folder for > > hyp-specific header files which will include code common to VHE/nVHE. > > > > Build nVHE code with -D__KVM_NVHE_HYPERVISOR__, VHE code with > > -D__KVM_VHE_HYPERVISOR__. > > > > Under nVHE compile each source file into a `.hyp.tmp.o` object first, then > > prefix all its symbols with "__kvm_nvhe_" using `objcopy` and produce > > a `.hyp.o`. Suffixes were chosen so that it would be possible for VHE and nVHE > > to share some source files, but compiled with different CFLAGS. > > > > The nVHE ELF symbol prefix is added to kallsyms.c as ignored. EL2-only symbols > > will never appear in EL1 stack traces. > > > > Due to symbol prefixing, add a section in image-vars.h for aliases of symbols > > that are defined in nVHE EL2 and accessed by kernel in EL1 or vice versa. > > > > Signed-off-by: David Brazdil > > Signed-off-by: Marc Zyngier > > Link: https://lore.kernel.org/r/20200625131420.71444-4-dbrazdil@google.com > > --- > > arch/arm64/kernel/image-vars.h | 14 +++++++++++++ > > arch/arm64/kvm/hyp/Makefile | 10 +++++++--- > > arch/arm64/kvm/hyp/nvhe/Makefile | 34 ++++++++++++++++++++++++++++++++ > > arch/arm64/kvm/hyp/vhe/Makefile | 17 ++++++++++++++++ > > scripts/kallsyms.c | 1 + > > 5 files changed, 73 insertions(+), 3 deletions(-) > > create mode 100644 arch/arm64/kvm/hyp/nvhe/Makefile > > create mode 100644 arch/arm64/kvm/hyp/vhe/Makefile [...] > > diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c > > index 6dc3078649fa..0096cd965332 100644 > > --- a/scripts/kallsyms.c > > +++ b/scripts/kallsyms.c > > @@ -109,6 +109,7 @@ static bool is_ignored_symbol(const char *name, char type) > > ".LASANPC", /* s390 kasan local symbols */ > > "__crc_", /* modversions */ > > "__efistub_", /* arm64 EFI stub namespace */ > > + "__kvm_nvhe_", /* arm64 non-VHE KVM namespace */ > The addition of this line seems to have introduced errors on the > 'vmlinux symtab matches kallsyms' perf test (perf test -v 1) which fails > on aarch64 for all __kvm_nvhe_ prefixed symbols, like > > ERR : : __kvm_nvhe___invalid not on kallsyms > ERR : : __kvm_nvhe___do_hyp_init not on kallsyms > ERR : : __kvm_nvhe___kvm_handle_stub_hvc not on kallsyms > ERR : : __kvm_nvhe_reset not on kallsyms > ../.. > > I understand we willingly hided those symbols from /proc/kallsyms. Do > you confirm the right fix is to upgrade the perf test suite accordingly? Hmmm. This test always fail here, no matter whether I have this line or not: maz@big-leg-emma:~$ sudo perf_5.10 test -v 1 1: vmlinux symtab matches kallsyms : --- start --- test child forked, pid 664 /proc/{kallsyms,modules} inconsistency while looking for "[bpf]" module! /proc/{kallsyms,modules} inconsistency while looking for "[bpf]" module! /proc/{kallsyms,modules} inconsistency while looking for "[bpf]" module! /proc/{kallsyms,modules} inconsistency while looking for "[bpf]" module! /proc/{kallsyms,modules} inconsistency while looking for "[bpf]" module! /proc/{kallsyms,modules} inconsistency while looking for "[bpf]" module! /proc/{kallsyms,modules} inconsistency while looking for "[bpf]" module! /proc/{kallsyms,modules} inconsistency while looking for "[bpf]" module! /proc/{kallsyms,modules} inconsistency while looking for "[bpf]" module! /proc/{kallsyms,modules} inconsistency while looking for "[bpf]" module! Looking at the vmlinux_path (8 entries long) symsrc__init: cannot get elf header. symsrc__init: cannot get elf header. Couldn't find a vmlinux that matches the kernel running on this machine, skipping test test child finished with -2 ---- end ---- vmlinux symtab matches kallsyms: Skip Rookie question: How do you provide a kernel to the test framework? Thanks, 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