From patchwork Wed Jan 22 08:53:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Woodhouse X-Patchwork-Id: 11345361 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1FD60924 for ; Wed, 22 Jan 2020 08:55:40 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 F018524672 for ; Wed, 22 Jan 2020 08:55:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="gVZ3r8Jp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F018524672 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iuBmb-00017w-Hu; Wed, 22 Jan 2020 08:54:41 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iuBmZ-00016q-TZ for xen-devel@lists.xenproject.org; Wed, 22 Jan 2020 08:54:39 +0000 X-Inumbo-ID: be438876-3cf4-11ea-aecd-bc764e2007e4 Received: from merlin.infradead.org (unknown [2001:8b0:10b:1231::1]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id be438876-3cf4-11ea-aecd-bc764e2007e4; Wed, 22 Jan 2020 08:54:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9TwAYGYlcelt/F0YlAPGXX2H4Bo71w4f4pVagbaPYhM=; b=gVZ3r8JpLQ8Y8spelTlHomcOBP AWVkWXYYOZb11Y+mk3hK8f9x1uBsmtxqA0/6lk8N0zr66bMtCym0Kwn9k85RLEi3o1uRrPzPx6izQ svSWDaCt+wJvK5LjAQg/WN4OFn4pXANhHbs4nrHMKGr0316FaS2YWOOz/bXiHB1ihbP6qCUEiDczv wCyDY5GjoBTsWsiVqnlrjpJysJOZEGx1RMBvLIZVeCh9vThYM341mUO9zllryFxxX6upinypApOQT Im/BdElVJdQnXjzhh/V0fpUOdNaNTwUcHErzR3keo+oyPJSg84rbDnFQf7LmN2k6RvCVYUsA2CxyM 5k5kpy5g==; Received: from i7.infradead.org ([2001:8b0:10b:1:21e:67ff:fecb:7a92]) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iuBlu-0002cs-6E; Wed, 22 Jan 2020 08:53:58 +0000 Received: from dwoodhou by i7.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1iuBlt-008mRx-Ca; Wed, 22 Jan 2020 08:53:57 +0000 From: David Woodhouse To: Xen-devel Date: Wed, 22 Jan 2020 08:53:54 +0000 Message-Id: <20200122085357.2092778-11-dwmw2@infradead.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200122085357.2092778-1-dwmw2@infradead.org> References: <6cbe16ae42ab806df513d359220212d4f01ce43d.camel@infradead.org> <20200122085357.2092778-1-dwmw2@infradead.org> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by merlin.infradead.org. See http://www.infradead.org/rpr.html Subject: [Xen-devel] [RFC PATCH v2 11/14] Don't panic if no multiboot modules are provided on live update boot X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Varad Gautam , paul@xen.org, Ian Jackson , Hongyan Xia , Amit Shah , =?utf-8?q?Ro?= =?utf-8?q?ger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: David Woodhouse Signed-off-by: David Woodhouse --- xen/arch/x86/setup.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 521946dc27..bd65d6bf5d 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -883,9 +883,14 @@ void __init noreturn __start_xen(unsigned long mbi_p) printk(" Found %d EDD information structures\n", bootsym(boot_edd_info_nr)); - /* Check that we have at least one Multiboot module. */ - if ( !(mbi->flags & MBI_MODULES) || (mbi->mods_count == 0) ) - panic("dom0 kernel not specified. Check bootloader configuration\n"); + if ( lu_data ) { + if ( (mbi->flags & MBI_MODULES) && (mbi->mods_count > 0) ) + panic("Multiboot modules provided with live update data\n"); + } else { + /* Check that we have at least one Multiboot module. */ + if ( !(mbi->flags & MBI_MODULES) || (mbi->mods_count == 0) ) + panic("dom0 kernel not specified. Check bootloader configuration\n"); + } /* Check that we don't have a silly number of modules. */ if ( mbi->mods_count > sizeof(module_map) * 8 )