From patchwork Fri Feb 7 09:00:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Varad Gautam X-Patchwork-Id: 11369995 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 CE28E1398 for ; Fri, 7 Feb 2020 09:02:18 +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 AA9A22082E for ; Fri, 7 Feb 2020 09:02:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazon.de header.i=@amazon.de header.b="AYfJCBq+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA9A22082E Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.de 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 1izzVe-0008Au-5l; Fri, 07 Feb 2020 09:01:10 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1izzVc-0008Ap-TS for xen-devel@lists.xenproject.org; Fri, 07 Feb 2020 09:01:09 +0000 X-Inumbo-ID: 60bd8648-4988-11ea-b110-12813bfff9fa Received: from smtp-fw-9102.amazon.com (unknown [207.171.184.29]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 60bd8648-4988-11ea-b110-12813bfff9fa; Fri, 07 Feb 2020 09:01:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1581066068; x=1612602068; h=from:to:cc:subject:date:message-id:mime-version; bh=fd9LUaLCdVcDB2rQf6iWGal3f2opkubKnd3P8La6qvk=; b=AYfJCBq+dFKRNUjzyfS0B37HEv6sKkRQ7FLVn3d3p6MsRXgLyEBWv/0m OGuRmeC1plwPnXlFSsplkWmcfQ4jWgd19platS6P6oKpsu1vXk28mqEbA gqHhPBv7OD5yiuKIGh1uCxS+g63wLFkNxAA1nm59q5EMKeX5zKbbCBm+V E=; IronPort-SDR: G56RWXpJXDWBJfKijqHiXPNHjt2/r8rWOSvqCgxMJsr9VaQ/6Dcx0Zl7Q3yEX9Nk347X5wBNmZ 2xmRQu4l/eig== X-IronPort-AV: E=Sophos;i="5.70,412,1574121600"; d="scan'208";a="23635444" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2b-c300ac87.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP; 07 Feb 2020 09:00:56 +0000 Received: from EX13MTAUEB002.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2b-c300ac87.us-west-2.amazon.com (Postfix) with ESMTPS id 74FD1A2794 for ; Fri, 7 Feb 2020 09:00:56 +0000 (UTC) Received: from EX13D08UEB004.ant.amazon.com (10.43.60.142) by EX13MTAUEB002.ant.amazon.com (10.43.60.12) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 7 Feb 2020 09:00:55 +0000 Received: from EX13MTAUEB002.ant.amazon.com (10.43.60.12) by EX13D08UEB004.ant.amazon.com (10.43.60.142) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 7 Feb 2020 09:00:55 +0000 Received: from u908889d5e8f057.ant.amazon.com (10.28.86.33) by mail-relay.amazon.com (10.43.60.234) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Fri, 7 Feb 2020 09:00:54 +0000 From: Varad Gautam To: Date: Fri, 7 Feb 2020 10:00:52 +0100 Message-ID: <1581066052-25269-1-git-send-email-vrd@amazon.de> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Precedence: Bulk Subject: [Xen-devel] [PATCH] kimage: Allow load/exec for images with KEXEC_TYPE_LIVE_UPDATE X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Varad Gautam , David Woodhouse Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Do not -EINVAL on loading/execing an image if kexec type is KEXEC_TYPE_LIVE_UPDATE. Signed-off-by: Varad Gautam CC: David Woodhouse --- xen/common/kimage.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/common/kimage.c b/xen/common/kimage.c index 86d2797..599aa74 100644 --- a/xen/common/kimage.c +++ b/xen/common/kimage.c @@ -421,6 +421,7 @@ struct page_info *kimage_alloc_control_page(struct kexec_image *image, switch ( image->type ) { case KEXEC_TYPE_DEFAULT: + case KEXEC_TYPE_LIVE_UPDATE: pages = kimage_alloc_normal_control_page(image, memflags); break; case KEXEC_TYPE_CRASH: @@ -775,6 +776,7 @@ static int kimage_load_segment(struct kexec_image *image, xen_kexec_segment_t *s switch ( image->type ) { case KEXEC_TYPE_DEFAULT: + case KEXEC_TYPE_LIVE_UPDATE: result = kimage_load_normal_segment(image, segment); break; case KEXEC_TYPE_CRASH: @@ -803,6 +805,7 @@ int kimage_alloc(struct kexec_image **rimage, uint8_t type, uint16_t arch, switch( type ) { case KEXEC_TYPE_DEFAULT: + case KEXEC_TYPE_LIVE_UPDATE: result = kimage_normal_alloc(rimage, entry_maddr, nr_segments, segment); break; case KEXEC_TYPE_CRASH: