From: Marc Zyngier <marc.zyngier@arm.com>
To: Andrey Konovalov <andreyknvl@google.com>,
Nick Desaulniers <ndesaulniers@google.com>,
Stephen Hines <srhines@google.com>,
Greg Hackmann <ghackmann@google.com>,
Christoffer Dall <christoffer.dall@linaro.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
kvmarm@lists.cs.columbia.edu, LKML <linux-kernel@vger.kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Cc: kernel-dynamic-tools <kernel-dynamic-tools@google.com>
Subject: Re: arm64 kvm built with clang doesn't boot
Date: Fri, 16 Mar 2018 14:13:31 +0000 [thread overview]
Message-ID: <26a25069-ea1d-5fb3-549c-ab653f454a30@arm.com> (raw)
In-Reply-To: <CAAeHK+xjnXnrG0p06r-QRcUucYi5vcTJOn3mSS-JVxX9_TYg4w@mail.gmail.com>
Hi Andrey,
On 16/03/18 13:49, Andrey Konovalov wrote:
> Hi!
>
> I've recently tried to boot clang built kernel on real hardware
> (Odroid C2 board) instead of using a VM. The issue that I stumbled
> upon is that arm64 kvm built with clang doesn't boot.
>
> Adding -fno-jump-tables compiler flag to arch/arm64/kvm/* helps. There
> was a patch some time ago that did exactly that
> (https://patchwork.kernel.org/patch/10060381/), but it wasn't accepted
> AFAICT (see the discussion on that thread).
I wasn't aware of that discussion, but this is indeed quite annoying.
Note that you should be able to restrict this to arch/arm64/kvm/hyp/*
and virt/kvm/arm/hyp/*.
> What would be the best way to get this fixed?
Ideally, I'd like to see is a way to stick to PC-relative addressing
within a compilation unit.
> I've also had to disable CONFIG_JUMP_LABEL to get the kernel boot
> (even without kvm enabled), but that might be a different (though
> related) issue.
That's quite bizarre. Does clang has the equivalent of "asm goto"? Or do
you rely on reading a variable to decide whether or not to branch?
Thanks,
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2018-03-16 14:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-16 13:49 Andrey Konovalov
2018-03-16 14:13 ` Mark Rutland
2018-03-16 14:31 ` Mark Rutland
2018-03-16 14:55 ` Andrey Konovalov
2018-04-12 17:35 ` Andrey Konovalov
2018-03-16 14:50 ` Andrey Konovalov
2018-03-16 14:13 ` Marc Zyngier [this message]
2018-03-16 14:53 ` Andrey Konovalov
2018-03-16 15:00 ` Marc Zyngier
2018-03-16 16:52 ` Nick Desaulniers
2018-03-16 17:13 ` Mark Rutland
2018-03-17 10:19 ` Ard Biesheuvel
2018-03-16 17:18 ` Marc Zyngier
2018-03-19 17:42 ` Nick Desaulniers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=26a25069-ea1d-5fb3-549c-ab653f454a30@arm.com \
--to=marc.zyngier@arm.com \
--cc=andreyknvl@google.com \
--cc=catalin.marinas@arm.com \
--cc=christoffer.dall@linaro.org \
--cc=ghackmann@google.com \
--cc=kernel-dynamic-tools@google.com \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=ndesaulniers@google.com \
--cc=srhines@google.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®