From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-la0-f47.google.com ([209.85.215.47]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XpI5Q-0003BL-3s for kexec@lists.infradead.org; Fri, 14 Nov 2014 14:42:56 +0000 Received: by mail-la0-f47.google.com with SMTP id gd6so14783940lab.20 for ; Fri, 14 Nov 2014 06:42:33 -0800 (PST) Message-ID: <546614D7.8080401@cogentembedded.com> Date: Fri, 14 Nov 2014 17:42:31 +0300 From: Sergei Shtylyov MIME-Version: 1.0 Subject: Re: [PATCH 7/8] arm64/kexec: Add checks for KVM and EFI References: In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: Geoff Levand , Catalin Marinas , Will Deacon Cc: marc.zyngier@arm.com, Grant Likely , kexec@lists.infradead.org, christoffer.dall@linaro.org, linux-arm-kernel@lists.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 > --- > 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 > #include > +/* TODO: Remove this include when KVM can support a kexc reboot. */ s/kexc/kexec/ here and below. > +#include > + > +/* TODO: Remove this include when EFI can support a kexc reboot. */ > +#include > + > /* 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