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.8 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 C0F79C433E0 for ; Thu, 25 Jun 2020 13:14:31 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id 7C14D20720 for ; Thu, 25 Jun 2020 13:14:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="aR3924TG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C14D20720 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 3752E4B0FF; Thu, 25 Jun 2020 09:14:31 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RPuKGD1a38Ok; Thu, 25 Jun 2020 09:14:30 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id CA6B14B543; Thu, 25 Jun 2020 09:14:29 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 3F2574B512 for ; Thu, 25 Jun 2020 09:14:28 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E0lL9n6L6OUt for ; Thu, 25 Jun 2020 09:14:27 -0400 (EDT) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 21DAE4B520 for ; Thu, 25 Jun 2020 09:14:27 -0400 (EDT) Received: by mail-wr1-f67.google.com with SMTP id q5so5785484wru.6 for ; Thu, 25 Jun 2020 06:14:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=djiFW55yS1Rp4YNDz8isiFDt/Jj9YD2Q3nFMXytrXY8=; b=aR3924TG/GhiA+e7cSIyaJXA4Y+WubHOl2DXaNi1c0reM2jrYsW9uqw6yFadKgakVd XP/Ylg3kWsXPqPO0Ppu8rrrHbJPhaXOVHRa+esGXU6xwqh85CssuLdYju0YgANwUpFLQ es5wVqJK+4N3Ef7qF0XOda0fdxFiosUz/4tRhGvAA+oww2CasCmo0yBcKTETiOp1Ljiv YpNbGFi5F3sjN3M0z2JxhAflHCvzASzCC0A4VwKKideeVL33accPM86TTKg2K+mBsLtL /DZ3oFEbTF082pksDvRp/4Aukeo3/MT+qjhPr2+PRjoWyZyfJYoikkmbznirPdvyZ8hD 0xFg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=djiFW55yS1Rp4YNDz8isiFDt/Jj9YD2Q3nFMXytrXY8=; b=E80LZ38tcKdHVRajUcY1kSo36JM2RKklkT8by5Ag7PpA4stGk1dSlSkJ7N/lFAxWao Gty2aT32ZrKs8BqCx96sj44M+Sp71NQlKnNZdppnmCw0c7XbkpDCbDfRYbhARcnlnVDI fqdxxpelD011P3WOorrqmPwFNMWsW67nIAAB/J8ywgkkVfAdJeDTLWabZ3ZUE9QlDobZ DoWk1/+/dZiO4+MO9nz72o/JMMU3quor+QwSAakbIrlSFuUvpLuAELhRynJj0vQc5qOF 8/mIRMGa1FyCdfw5Fg7lBK6dG8aRgeSEwJdva842MY86qlMYbcOD1zPFv13qwt0ekvnK sIHg== X-Gm-Message-State: AOAM531UTXK0CN0u89bEBRJ+r9p1de+n01Pl+DU6usZQxqy4R5Fc5nMb uJY8//skLippM4AR9QDZhDLXcA== X-Google-Smtp-Source: ABdhPJwznHV4hv6Fj3Er6LKY8SIiHuc2Snez1YpadUkoPjJ25Jk5PeHh1uhQrUEuukHkOvjncxyEfA== X-Received: by 2002:adf:e647:: with SMTP id b7mr37709680wrn.170.1593090866123; Thu, 25 Jun 2020 06:14:26 -0700 (PDT) Received: from localhost ([2a01:4b00:8523:2d03:c126:6748:7a9d:2d]) by smtp.gmail.com with ESMTPSA id d13sm16942574wrn.61.2020.06.25.06.14.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jun 2020 06:14:25 -0700 (PDT) From: David Brazdil To: Marc Zyngier , Will Deacon , Catalin Marinas , James Morse , Julien Thierry , Suzuki K Poulose Subject: [PATCH v4 01/15] arm64: kvm: Fix symbol dependency in __hyp_call_panic_nvhe Date: Thu, 25 Jun 2020 14:14:06 +0100 Message-Id: <20200625131420.71444-2-dbrazdil@google.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200625131420.71444-1-dbrazdil@google.com> References: <20200625131420.71444-1-dbrazdil@google.com> MIME-Version: 1.0 Cc: android-kvm@google.com, linux-kernel@vger.kernel.org, kernel-team@android.com, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu __hyp_call_panic_nvhe contains inline assembly which did not declare its dependency on the __hyp_panic_string symbol. The static-declared string has previously been kept alive because of a use in __hyp_call_panic_vhe. Fix this in preparation for separating the source files between VHE and nVHE when the two users land in two different compilation units. The static variable otherwise gets dropped when compiling the nVHE source file, causing an undefined symbol linker error later. Signed-off-by: David Brazdil --- arch/arm64/kvm/hyp/switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c index db1c4487d95d..9270b14157b5 100644 --- a/arch/arm64/kvm/hyp/switch.c +++ b/arch/arm64/kvm/hyp/switch.c @@ -897,7 +897,7 @@ static void __hyp_text __hyp_call_panic_nvhe(u64 spsr, u64 elr, u64 par, * making sure it is a kernel address and not a PC-relative * reference. */ - asm volatile("ldr %0, =__hyp_panic_string" : "=r" (str_va)); + asm volatile("ldr %0, =%1" : "=r" (str_va) : "S" (__hyp_panic_string)); __hyp_do_panic(str_va, spsr, elr, -- 2.27.0 _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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=-10.0 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT 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 5FF26C433E0 for ; Thu, 25 Jun 2020 13:16:42 +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 2A7AF206A1 for ; Thu, 25 Jun 2020 13:16:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TuxCDTj1"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="aR3924TG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A7AF206A1 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.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=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:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=VfAPTSIsXQVsenLGXNu0RFDN2+P3H2KYgkEsKJHo10A=; b=TuxCDTj1ZGeYJUCxn8siqZGwl CBVONAEvPnLbKAMoL7bdcu66NGIGmg6Oogtl2viNNPJMvIKOmPU+q2aUvRTVzkV3L40eFhMpe/hvA 5jJcIWc+7kr4RS5eAk4j3M4lsF+QiVCQ/CCRSPwTDm2w28292xzoJjZkRlbu00mhhi9iyNZr+4thq mWZf6lsJDWX6VjLJN/YLSdjh4pqkOXN4kMMJaVgd300fYOs3F2VwenKMpSqu8UGPNZVvGU97URxqf FJEVG5tYxq2ILW2ilps/S7MkI7FwPuw8O3UvAArk8MJ1gzx5qq61PR8qerwhw7t+CN/b8FnrDaYRa WYRoVDimg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1joRi8-0006xL-OR; Thu, 25 Jun 2020 13:14:36 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1joRhz-0006tI-CR for linux-arm-kernel@lists.infradead.org; Thu, 25 Jun 2020 13:14:28 +0000 Received: by mail-wr1-x441.google.com with SMTP id b6so5769932wrs.11 for ; Thu, 25 Jun 2020 06:14:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=djiFW55yS1Rp4YNDz8isiFDt/Jj9YD2Q3nFMXytrXY8=; b=aR3924TG/GhiA+e7cSIyaJXA4Y+WubHOl2DXaNi1c0reM2jrYsW9uqw6yFadKgakVd XP/Ylg3kWsXPqPO0Ppu8rrrHbJPhaXOVHRa+esGXU6xwqh85CssuLdYju0YgANwUpFLQ es5wVqJK+4N3Ef7qF0XOda0fdxFiosUz/4tRhGvAA+oww2CasCmo0yBcKTETiOp1Ljiv YpNbGFi5F3sjN3M0z2JxhAflHCvzASzCC0A4VwKKideeVL33accPM86TTKg2K+mBsLtL /DZ3oFEbTF082pksDvRp/4Aukeo3/MT+qjhPr2+PRjoWyZyfJYoikkmbznirPdvyZ8hD 0xFg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=djiFW55yS1Rp4YNDz8isiFDt/Jj9YD2Q3nFMXytrXY8=; b=D5el4pDlTf5/J+kc5OS28m2GaTGB+sMXBS8b664oDOqEbvfTU2zASH9x6wc+w3Cyjs b0esKeGW0ECJv3iiVU6dK6ewi1Dc0tx7nqlq/EsWtR15ZHDHVD2Xil1XJOdGlD7EGs4e kVEzsxtlWKcXOXygi2NjoON1xKmzQBVHuMjFNzvL0Iv/1WiAXTHg7eBf/qySehAf8n08 ckMxXBg7i5KsSYjr06F8GPfH1wkQePfeky7ApBrRug5xunmIRiPhV9iCxMLillz4bgd9 pWVamIpknQbw8q2HwNwulbWVfqRBPGPpj6VBOw0SWY45hIaR6P0pQP2Wd+qC76I/7YTk XfMA== X-Gm-Message-State: AOAM532fs5MRG+4QXPvNO5ziOe64tzlKfh3K9UOUgUK3Ov3qLQKkG85+ EVCd3kMcVogU7Ygw+jE7YaPdyg== X-Google-Smtp-Source: ABdhPJwznHV4hv6Fj3Er6LKY8SIiHuc2Snez1YpadUkoPjJ25Jk5PeHh1uhQrUEuukHkOvjncxyEfA== X-Received: by 2002:adf:e647:: with SMTP id b7mr37709680wrn.170.1593090866123; Thu, 25 Jun 2020 06:14:26 -0700 (PDT) Received: from localhost ([2a01:4b00:8523:2d03:c126:6748:7a9d:2d]) by smtp.gmail.com with ESMTPSA id d13sm16942574wrn.61.2020.06.25.06.14.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jun 2020 06:14:25 -0700 (PDT) From: David Brazdil To: Marc Zyngier , Will Deacon , Catalin Marinas , James Morse , Julien Thierry , Suzuki K Poulose Subject: [PATCH v4 01/15] arm64: kvm: Fix symbol dependency in __hyp_call_panic_nvhe Date: Thu, 25 Jun 2020 14:14:06 +0100 Message-Id: <20200625131420.71444-2-dbrazdil@google.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200625131420.71444-1-dbrazdil@google.com> References: <20200625131420.71444-1-dbrazdil@google.com> MIME-Version: 1.0 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: android-kvm@google.com, linux-kernel@vger.kernel.org, David Brazdil , kernel-team@android.com, 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 __hyp_call_panic_nvhe contains inline assembly which did not declare its dependency on the __hyp_panic_string symbol. The static-declared string has previously been kept alive because of a use in __hyp_call_panic_vhe. Fix this in preparation for separating the source files between VHE and nVHE when the two users land in two different compilation units. The static variable otherwise gets dropped when compiling the nVHE source file, causing an undefined symbol linker error later. Signed-off-by: David Brazdil --- arch/arm64/kvm/hyp/switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c index db1c4487d95d..9270b14157b5 100644 --- a/arch/arm64/kvm/hyp/switch.c +++ b/arch/arm64/kvm/hyp/switch.c @@ -897,7 +897,7 @@ static void __hyp_text __hyp_call_panic_nvhe(u64 spsr, u64 elr, u64 par, * making sure it is a kernel address and not a PC-relative * reference. */ - asm volatile("ldr %0, =__hyp_panic_string" : "=r" (str_va)); + asm volatile("ldr %0, =%1" : "=r" (str_va) : "S" (__hyp_panic_string)); __hyp_do_panic(str_va, spsr, elr, -- 2.27.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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=-17.6 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT, USER_IN_DEF_DKIM_WL 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 64175C433E2 for ; Thu, 25 Jun 2020 13:14:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4406920720 for ; Thu, 25 Jun 2020 13:14:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="aR3924TG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404872AbgFYNOb (ORCPT ); Thu, 25 Jun 2020 09:14:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404710AbgFYNO2 (ORCPT ); Thu, 25 Jun 2020 09:14:28 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BFB9C08C5C1 for ; Thu, 25 Jun 2020 06:14:27 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id z13so5798871wrw.5 for ; Thu, 25 Jun 2020 06:14:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=djiFW55yS1Rp4YNDz8isiFDt/Jj9YD2Q3nFMXytrXY8=; b=aR3924TG/GhiA+e7cSIyaJXA4Y+WubHOl2DXaNi1c0reM2jrYsW9uqw6yFadKgakVd XP/Ylg3kWsXPqPO0Ppu8rrrHbJPhaXOVHRa+esGXU6xwqh85CssuLdYju0YgANwUpFLQ es5wVqJK+4N3Ef7qF0XOda0fdxFiosUz/4tRhGvAA+oww2CasCmo0yBcKTETiOp1Ljiv YpNbGFi5F3sjN3M0z2JxhAflHCvzASzCC0A4VwKKideeVL33accPM86TTKg2K+mBsLtL /DZ3oFEbTF082pksDvRp/4Aukeo3/MT+qjhPr2+PRjoWyZyfJYoikkmbznirPdvyZ8hD 0xFg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=djiFW55yS1Rp4YNDz8isiFDt/Jj9YD2Q3nFMXytrXY8=; b=k3Z1GqeUKpbttOplHOGurksPZkcfYIUa8EhaJ3IbIIjlhyFpRUCm/q5lXgD+Njx7z4 qaf/noUctsxGAf3i9SraEcVm6DtQpbk4fteZ9f+Ahjbh8bMS27CXEi+v3nyq4Ihhy2jp YsYyV+jWuuUXJ3LW8gjgz/jWA/pEwQ2FwsZFUyDWehP2eLIXqrJO9HAnN56w/wK6KLn/ 7wyja8cdJqGT4+D6dl7/gABLenbIIHWDiVCdIHfdzVloBhD2cUyQAGUUtCoPB6PUNn7P DayNifr1d3y8DdLAM+13St1Z4Ql+ZONGVorYhsNqlja9sv01Kp/C/ocNfQskLSdwSQ+V KaGQ== X-Gm-Message-State: AOAM5319MLjMXKY7bYX9RhSl8tMcj6GKjrgf4rounKvAdsGKYsiPcg4K fq+gVDXpMcSjHN1JMMSiLS/DPg== X-Google-Smtp-Source: ABdhPJwznHV4hv6Fj3Er6LKY8SIiHuc2Snez1YpadUkoPjJ25Jk5PeHh1uhQrUEuukHkOvjncxyEfA== X-Received: by 2002:adf:e647:: with SMTP id b7mr37709680wrn.170.1593090866123; Thu, 25 Jun 2020 06:14:26 -0700 (PDT) Received: from localhost ([2a01:4b00:8523:2d03:c126:6748:7a9d:2d]) by smtp.gmail.com with ESMTPSA id d13sm16942574wrn.61.2020.06.25.06.14.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Jun 2020 06:14:25 -0700 (PDT) From: David Brazdil To: Marc Zyngier , Will Deacon , Catalin Marinas , James Morse , Julien Thierry , Suzuki K Poulose Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, android-kvm@google.com, kernel-team@android.com, David Brazdil Subject: [PATCH v4 01/15] arm64: kvm: Fix symbol dependency in __hyp_call_panic_nvhe Date: Thu, 25 Jun 2020 14:14:06 +0100 Message-Id: <20200625131420.71444-2-dbrazdil@google.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200625131420.71444-1-dbrazdil@google.com> References: <20200625131420.71444-1-dbrazdil@google.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org __hyp_call_panic_nvhe contains inline assembly which did not declare its dependency on the __hyp_panic_string symbol. The static-declared string has previously been kept alive because of a use in __hyp_call_panic_vhe. Fix this in preparation for separating the source files between VHE and nVHE when the two users land in two different compilation units. The static variable otherwise gets dropped when compiling the nVHE source file, causing an undefined symbol linker error later. Signed-off-by: David Brazdil --- arch/arm64/kvm/hyp/switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c index db1c4487d95d..9270b14157b5 100644 --- a/arch/arm64/kvm/hyp/switch.c +++ b/arch/arm64/kvm/hyp/switch.c @@ -897,7 +897,7 @@ static void __hyp_text __hyp_call_panic_nvhe(u64 spsr, u64 elr, u64 par, * making sure it is a kernel address and not a PC-relative * reference. */ - asm volatile("ldr %0, =__hyp_panic_string" : "=r" (str_va)); + asm volatile("ldr %0, =%1" : "=r" (str_va) : "S" (__hyp_panic_string)); __hyp_do_panic(str_va, spsr, elr, -- 2.27.0