From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Geoff Levand <geoff@infradead.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>
Cc: marc.zyngier@arm.com, Grant Likely <grant.likely@linaro.org>,
kexec@lists.infradead.org, christoffer.dall@linaro.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 7/8] arm64/kexec: Add checks for KVM and EFI
Date: Fri, 14 Nov 2014 17:42:31 +0300 [thread overview]
Message-ID: <546614D7.8080401@cogentembedded.com> (raw)
In-Reply-To: <b7b2f48822a563bafe2888d7ac8e863731159796.1415926876.git.geoff@infradead.org>
Hello.
On 11/14/2014 4:22 AM, Geoff Levand wrote:
> Add runtime checks that fail the arm64 kexec syscall for situations that would
> result in system instability do to problems in the KVM and EFI kernel support.
> These checks should be removed when the KVM and EFI problems are fixed.
> Signed-off-by: Geoff Levand <geoff@infradead.org>
> ---
> arch/arm64/kernel/machine_kexec.c | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
> diff --git a/arch/arm64/kernel/machine_kexec.c b/arch/arm64/kernel/machine_kexec.c
> index 775bcc3..5b62bd1f 100644
> --- a/arch/arm64/kernel/machine_kexec.c
> +++ b/arch/arm64/kernel/machine_kexec.c
> @@ -16,6 +16,12 @@
> #include <asm/cacheflush.h>
> #include <asm/system_misc.h>
> +/* TODO: Remove this include when KVM can support a kexc reboot. */
s/kexc/kexec/ here and below.
> +#include <asm/virt.h>
> +
> +/* TODO: Remove this include when EFI can support a kexc reboot. */
> +#include <linux/efi.h>
> +
> /* Global variables for the relocate_kernel routine. */
> extern const unsigned char relocate_new_kernel[];
> extern const unsigned long relocate_new_kernel_size;
> @@ -101,6 +107,22 @@ int machine_kexec_prepare(struct kimage *image)
>
> kexec_image_info(image);
>
> + /* TODO: Remove this message when KVM can support a kexc reboot. */
> + if (IS_ENABLED(CONFIG_KVM) && is_hyp_mode_available()) {
> + pr_err("%s: Your kernel is configued with KVM support "
Configured.
> + "(CONFIG_KVM=y) which currently does not allow for "
> + "kexec re-boot.\n", __func__);
> + return -ENOSYS;
> + }
> +
> + /* TODO: Remove this message when EFI can support a kexc reboot. */
> + if (efi_enabled(EFI_BOOT)) {
> + pr_err("%s: Your kernel is using the Extensible Firmware "
> + "Interface (EFI) which currently does not allow for "
> + "kexec re-boot.\n", __func__);
> + return -ENOSYS;
> + }
> +
> return 0;
> }
WBR, Sergei
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2014-11-14 14:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 1:22 [PATCH 0/8] arm64 kexec kernel patches V6 Geoff Levand
2014-11-14 1:22 ` [PATCH 2/8] arm64: Add new hcall HVC_CALL_FUNC Geoff Levand
2014-11-14 1:22 ` [PATCH 1/8] arm64: Convert hcalls to use ISS field Geoff Levand
2014-11-14 1:22 ` [PATCH 6/8] arm64/kexec: Add pr_devel output Geoff Levand
2014-11-14 21:12 ` [PATCH v2 " Geoff Levand
2014-11-14 1:22 ` [PATCH 7/8] arm64/kexec: Add checks for KVM and EFI Geoff Levand
2014-11-14 14:42 ` Sergei Shtylyov [this message]
2014-11-14 18:28 ` [PATCH v2 " Geoff Levand
2014-11-14 18:40 ` Sergei Shtylyov
2014-11-14 21:08 ` [PATCH v3 " Geoff Levand
2014-11-14 1:22 ` [PATCH 4/8] arm64: Move proc-macros.S to include/asm Geoff Levand
2014-11-14 1:22 ` [PATCH 8/8] arm64/kexec: Enable kexec in the arm64 defconfig Geoff Levand
2014-11-14 1:22 ` [PATCH 5/8] arm64/kexec: Add core kexec support Geoff Levand
2014-11-14 1:22 ` [PATCH 3/8] arm64: Add EL2 switch to soft_restart Geoff Levand
2014-11-27 6:19 ` [PATCH 0/8] arm64 kexec kernel patches V6 Dave Young
2014-11-28 6:56 ` Dave Young
2014-12-02 20:26 ` Geoff Levand
2014-12-02 20:22 ` Geoff Levand
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=546614D7.8080401@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=catalin.marinas@arm.com \
--cc=christoffer.dall@linaro.org \
--cc=geoff@infradead.org \
--cc=grant.likely@linaro.org \
--cc=kexec@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=marc.zyngier@arm.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