From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: hyp-stub: improve ABI
Date: Mon, 9 Jan 2017 14:28:06 +0000 [thread overview]
Message-ID: <20170109142806.GB7593@e104818-lin.cambridge.arm.com> (raw)
In-Reply-To: <20170109125431.GY14217@n2100.armlinux.org.uk>
On Mon, Jan 09, 2017 at 12:54:31PM +0000, Russell King - ARM Linux wrote:
> So, we need KVM's stub to be (a) better documented so this stuff is
> obvious, and (b) updated so that kdump stands a chance of working even
> if the KVM stub is still in place at the point the host kernel panics.
>
> Another reason why documentation is important here is that we need to
> make it clear to alternative hypervisors that the host kernel may issue
> a HVC call at any moment due to a crash with particular arguments, and
> that the host kernel expects a certain behaviour in that case, and that
> the hypervisor does not crash.
The only hypervisor (apart from the hyp-stub) built and deployed
together with the kernel is KVM. On ARM, to be able to enable KVM, the
host kernel must be booted in Hyp mode and install the stub before
dropping to SVC.
With Xen (or a different Type-1 hypervisor), the "host" kernel (dom0 for
Xen, a.k.a. control domain) is booted in SVC mode directly, so hyp-stub
is not installed and is_hyp_mode_available() returns false.
> For example, how will Xen behave - is introducing these changes going
> to cause a regression with Xen? Does anyone even know the answer to
> that? From what I can see, it seems we'll end up calling Xen's
> hypervisor with a random r12 value (which it uses as a reason code)
> but without the 0xea1 immediate constant in the HVC instruction.
> Beyond that, I've no idea.
Any HVC calls from the control domain kernel must comply with the ABI
offered by the corresponding hypervisor and has nothing to do with the
hyp-stub ABI. Routing hyp-stub ABI HVC calls to an unaware hypervisor
like Xen as part of kdump/kexec is a kernel bug and would probably
result in the kernel being killed. I haven't tried but kexec in a host
kernel under Xen should work just like kexec in any other guest kernel.
--
Catalin
next prev parent reply other threads:[~2017-01-09 14:28 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-09 19:49 [PATCH] ARM: soft-reboot into same mode that we entered the kernel Russell King
2016-12-13 10:54 ` Mark Rutland
2016-12-13 11:11 ` Russell King - ARM Linux
2016-12-13 11:30 ` Mark Rutland
2016-12-14 10:46 ` [PATCH 1/2] ARM: hyp-stub: improve ABI Russell King
2016-12-14 11:49 ` Mark Rutland
2016-12-15 11:18 ` Marc Zyngier
2016-12-15 11:35 ` Russell King - ARM Linux
2016-12-15 11:46 ` Marc Zyngier
2016-12-15 15:15 ` Russell King - ARM Linux
2016-12-15 15:37 ` Marc Zyngier
2016-12-15 18:57 ` Russell King - ARM Linux
2016-12-17 12:07 ` Catalin Marinas
2017-01-02 12:12 ` Russell King - ARM Linux
2017-01-03 9:51 ` Christoffer Dall
2017-01-09 12:26 ` Russell King - ARM Linux
2017-01-09 13:26 ` Christoffer Dall
2017-01-09 14:05 ` Russell King - ARM Linux
2017-01-09 14:10 ` Russell King - ARM Linux
2017-01-09 14:42 ` Russell King - ARM Linux
2017-01-09 14:57 ` Christoffer Dall
2017-01-09 15:01 ` Christoffer Dall
2017-01-09 15:43 ` Russell King - ARM Linux
2017-01-09 12:54 ` Russell King - ARM Linux
2017-01-09 13:14 ` Marc Zyngier
2017-01-09 13:20 ` Russell King - ARM Linux
2017-01-09 13:31 ` Marc Zyngier
2017-01-09 14:28 ` Catalin Marinas [this message]
2016-12-14 10:46 ` [PATCH 2/2] ARM: soft-reboot into same mode that we entered the kernel Russell King
2016-12-14 11:56 ` Mark Rutland
2016-12-14 12:05 ` Russell King - ARM Linux
2016-12-14 12:17 ` Mark Rutland
2016-12-14 12:29 ` Russell King - ARM Linux
2016-12-14 12:40 ` Mark Rutland
2016-12-14 12:46 ` Russell King - ARM Linux
2016-12-14 13:42 ` Marc Zyngier
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=20170109142806.GB7593@e104818-lin.cambridge.arm.com \
--to=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).