Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2476131ybh; Mon, 5 Aug 2019 01:36:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzdx7o/ZwwaZJ4gt/GWBiA3zZ2L0wBxE40ZBxjI78wXdPDAjjrhpxWtRPXQ3GcAl+PRbKU3 X-Received: by 2002:a62:187:: with SMTP id 129mr72544800pfb.128.1564994213894; Mon, 05 Aug 2019 01:36:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564994213; cv=none; d=google.com; s=arc-20160816; b=iQuGXj/4GxwOhBw++uW4G90oXsbLvpqXoIRb3GxkBMJhus8aD8KTTx39dpPvDbqfyL gO67QwW45I2hOCQUj2M4kbtbeP9tu4lp3TpPjW8UYm1K378vBTFaznO53rTjyeUw1krw XjpH6kxRbw6ESn/YuzI4u9v5Rd0aFn3TAEFWrSj2wgch6hCcUtWiqczczF9jPdLvDVqQ qbHxPw1Adg5HsCHA5/1DAWU91FOgvlSY/wgK/HqLpNwfnSKSQJmNfZz3fp70J+MX7DSe YHiN1DNtD93HOxr81FIvVBGX8saEg5WLTKnQyyYEKO1rraX5LGk2covhFo3hK/eg4w9Y k93w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date; bh=CAIIQzZCViT4nTdfoDvq19lR3eWLeWAgH89uTxNxSQI=; b=PgpT6mWHnJKbduneYGNfIAn9lmzOaP1KA9MEOpGx3Zb9OvCxnbShfk2cqxTs3rMgYy 5YLvL/qMZ6KmxtzO0Vi7JyGoV4ddISq69K6XGxEw7cnZ6tsZyv+EP9pjAhPwKqW5m9dS bg+7H3xRShfvBCt1g5z3qiM6iGYZiM52QNXTnOUzHjAhqxw2nZ6TSaY/Z7e7mVdZ8ErI BFt56bPypD73uILgVQTmeojRrLyxhWHPU+wwEG8NKkN5nUOJke3/E28AJSRJa58Kqs2F joHbcFOyvRLrzN3VHuvJMd88/gpQSbkERz2Dd23rjzcHjvAn6la1N3wAtJfQWujwGaqg Q98g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a21si42726528pgv.185.2019.08.05.01.36.38; Mon, 05 Aug 2019 01:36:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727450AbfHEIgA (ORCPT + 99 others); Mon, 5 Aug 2019 04:36:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51222 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726423AbfHEIgA (ORCPT ); Mon, 5 Aug 2019 04:36:00 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 44C19300BCE9; Mon, 5 Aug 2019 08:36:00 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-149.pek2.redhat.com [10.72.12.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8803E5C1A1; Mon, 5 Aug 2019 08:35:57 +0000 (UTC) Date: Mon, 5 Aug 2019 16:35:53 +0800 From: Dave Young To: linux-efi@vger.kernel.org, ard.biesheuvel@linaro.org Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org, matthewgarrett@google.com, bhsharma@redhat.com Subject: [PATCH] do not clean dummy variable in kexec path Message-ID: <20190805083553.GA27708@dhcp-128-65.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 05 Aug 2019 08:36:00 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kexec reboot fails randomly in UEFI based kvm guest. The firmware just reset while calling efi_delete_dummy_variable(); Unfortunately I don't know how to debug the firmware, it is also possible a potential problem on real hardware as well although nobody reproduced it. The intention of efi_delete_dummy_variable is to trigger garbage collection when entering virtual mode. But SetVirtualAddressMap can only run once for each physical reboot, thus kexec_enter_virtual_mode is not necessarily a good place to clean dummy object. Drop efi_delete_dummy_variable so that kexec reboot can work. Signed-off-by: Dave Young --- arch/x86/platform/efi/efi.c | 3 --- 1 file changed, 3 deletions(-) --- linux-x86.orig/arch/x86/platform/efi/efi.c +++ linux-x86/arch/x86/platform/efi/efi.c @@ -894,9 +894,6 @@ static void __init kexec_enter_virtual_m if (efi_enabled(EFI_OLD_MEMMAP) && (__supported_pte_mask & _PAGE_NX)) runtime_code_page_mkexec(); - - /* clean DUMMY object */ - efi_delete_dummy_variable(); #endif }