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=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 B7C2DC433B4 for ; Mon, 10 May 2021 08:46:39 +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 1060761042 for ; Mon, 10 May 2021 08:46:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1060761042 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TevnHD8DRrD3kI2uXj7sxXcza/uFgYi7jY15gEhLr+c=; b=ENyORKP55Si4TfKBI7Mr0KAlM LwFeF/qi8amEj78vv7oa3bMryr9g+3yJaHonGEK44Zzam0cI+72npoy5fVb1/T7GaiPYx4WQhqKcE hGh55RgjmDy+/ly4ZZg9o/k2Qnec48cLlhY8MnDZKD1F0SmR+dFaMZCp6k1hU/nvtNoWhGDi3Dgi8 F34Vfc9ytWV9580IJGumZweuj8Fw/vryaq1ZWDHlPt8xwOzwgxSZ3rCw8L5wWaj8GwOCoDGHiZESx BEwOPuthPIEtmw4e5ICv0ukOy8wyTudh5ilFEP2aZaWeyLq0TY1AONeG+SNxWNeJH7lOY71cy/lNq S4NIH1AHg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lg1WX-00DfV4-Er; Mon, 10 May 2021 08:44:21 +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 1lg1WV-00DfUc-2f for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 08:44:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=zcdJnihZR9fwljqxuJT0xreg/nDhm4mw3gRoSNdwurw=; b=wY2jzfS/Wp0TkWZNB/2iHJzhTL 0Ec1buQhz2xjmH3hY/e1sAjqoQiuuyZ3NcqqIQYCw5+i046K/OV24uxxD5l66Cus2mWYhPf0UHSVY Rt4OWMBr3LcFywd0oi/JsOJBKW4Eonetm8Mf5v2KDrxlV0dG87kaAReooWHFxah2iSpr3AJEMA8ZM adrVjGON5DfQAsQ5rXHqpO4osldF/AChujOjLvM/N6mkZazRQqgYgeF9ez69sXYeGb3ZSjuceOnOY gEYw1kL5kpK2kEHcyX3CS+tmzvxDs4LmBeEs4Tb2c/wlBYJdMWRFx4r+IOoTNqUpXK4pA1m/Ln0vJ tmGxm63Q==; Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg1WS-008QVa-0A for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 08:44:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620636254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zcdJnihZR9fwljqxuJT0xreg/nDhm4mw3gRoSNdwurw=; b=iXVe/wG/scVaXRNeF2WYNOc8TMnuT6H8GNmPLurvHEY+KDTwG6NxzA4w5jXOl3BBNxV32K uuVZoE2jEg0X2LLtJ4cAsOgpUGUTW5SAQeuZOC70DyfcNZpfWiV+DaNHmlk2CUB4ajkVF/ K+0InlE06pFXtVQIeYXbrblGTTf4EVE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-391-Zf--0QeyNEqyfUYpL9tg4g-1; Mon, 10 May 2021 04:44:10 -0400 X-MC-Unique: Zf--0QeyNEqyfUYpL9tg4g-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0826980ED8B; Mon, 10 May 2021 08:44:08 +0000 (UTC) Received: from [10.36.113.168] (ovpn-113-168.ams2.redhat.com [10.36.113.168]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 17B645D9F2; Mon, 10 May 2021 08:43:59 +0000 (UTC) Subject: Re: [PATCH 15/56] KVM: arm64: Add build rules for separate VHE/nVHE object files To: Marc Zyngier 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 References: <20200805175700.62775-1-maz@kernel.org> <20200805175700.62775-16-maz@kernel.org> <2ff3a1cb-a310-7963-4171-bd1e7d08e39b@redhat.com> <871ralnjmq.wl-maz@kernel.org> From: Auger Eric Message-ID: <3f3d1fe9-048c-90b4-1cd9-db0f97544479@redhat.com> Date: Mon, 10 May 2021 10:43:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <871ralnjmq.wl-maz@kernel.org> Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_014416_157427_B1A9779D X-CRM114-Status: GOOD ( 28.57 ) 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 Marc, On 5/5/21 8:03 PM, Marc Zyngier wrote: > 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: sorry Marc I missed your reply, > > > 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? On my end I compiled and installed a kernel and compiled perf from that same kernel. Should work. I don't know how to point to a specific vmlinux Thanks Eric > > Thanks, > > M. > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel