Received: by 10.223.164.202 with SMTP id h10csp4747058wrb; Wed, 29 Nov 2017 11:09:05 -0800 (PST) X-Google-Smtp-Source: AGs4zMZuvuRt2ynQ5X0Mh8IX2v1Vx0YJOVXidHr5E6/N1HnDyJwufGDtTcQNj0mJ8Gn4SkyZz8G0 X-Received: by 10.98.253.3 with SMTP id p3mr4066311pfh.20.1511982545771; Wed, 29 Nov 2017 11:09:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511982545; cv=none; d=google.com; s=arc-20160816; b=VvQcfLwZPm9jQ70Iftk2/6r/5Nw5kgx28n5AKN+V00l/P2o9Pkb1OAxDRkaz8R12WQ y7ex3X0k3qxTahTj0yuj5bgMG/uMbI7zyCL1sk21gu/YD0qnF08KLWwEcNoWYLLJ1AmG i/WrBPEll7aTvzCUEqPkZFiOrG56MrxAKgd2YmqUX9pYJdIbB/awktfjuNzMgz0u/Yj0 JXqyVoB4PGD8PLsOOkvdmgIKpciqA9Sn544X0TMoR1BtIUwzqB6bTX5DFM2qlBkq+u+b lX+x4bEDnQr2tJesu8HFegwu/LDk1I672U1gVAXajo6yOLJWY/R0KRTauXhX/FLSUZi/ EpkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=8fhGRQN1edyAKeK8KVoLBOgQWBc3eqHuuMmO8DHcO1E=; b=PVap6x1bfYGtlCDshWEjoY4wrWNimyD2+5D9gd1vxcA6x8guJjJwhVTrHhgB33P+Mf UHYJjA/LHkzkYfk2MsxnBvqN+mjCi2wJ9oZ97EJa9UFfUnsmGmpyovQcmBi+3K4ep0kN tkTnYaacmfhUlK6rRwDYXZnaRUMrCfRGO6bsdjS4sCZi16IUrejxMrOspYLYYFdHet2Z hrrW+gE/u0F0GjXB3HpcGn/FvQKO7W9cj+5Inc0fHtWbwDMW08YWeRA47srxbXZTBwPN xY5vSBDDfv7P3+jh9Xt4RXtAiDknyDICRhS2XgKDKSTtesmlTygJmLH+E5hOqKm30A98 7kEg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j123si1678243pgc.260.2017.11.29.11.08.51; Wed, 29 Nov 2017 11:09:05 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752480AbdK2TIb (ORCPT + 99 others); Wed, 29 Nov 2017 14:08:31 -0500 Received: from terminus.zytor.com ([65.50.211.136]:57899 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752418AbdK2TI2 (ORCPT ); Wed, 29 Nov 2017 14:08:28 -0500 Received: from hanvin-desk.amr.corp.intel.com (fmdmzpr04-ext.fm.intel.com [192.55.54.39]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id vATJ1ZGs005858 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 29 Nov 2017 11:01:36 -0800 Subject: Re: [PATCHv2 0/4] x86: 5-level related changes into decompression code To: Borislav Petkov , "Kirill A. Shutemov" Cc: Thomas Gleixner , "Kirill A. Shutemov" , Ingo Molnar , x86@kernel.org, Linus Torvalds , Andy Lutomirski , Cyrill Gorcunov , Andi Kleen , linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20171110220645.59944-1-kirill.shutemov@linux.intel.com> <20171129154908.6y4st6xc7hbsey2v@pd.tnic> <20171129161349.d7ksuhwhdamloty6@node.shutemov.name> <20171129170831.2iqpop2u534mgrbc@node.shutemov.name> <20171129174851.jk2ai37uumxve6sg@pd.tnic> From: "H. Peter Anvin" Message-ID: <793b9c55-e85b-97b5-c857-dd8edcda4081@zytor.com> Date: Wed, 29 Nov 2017 11:01:35 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20171129174851.jk2ai37uumxve6sg@pd.tnic> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/29/17 09:48, Borislav Petkov wrote: > On Wed, Nov 29, 2017 at 08:08:31PM +0300, Kirill A. Shutemov wrote: >> We're really early in the boot -- startup_64 in decompression code -- and >> I don't know a way print a message there. Is there a way? >> >> no_longmode handled by just hanging the machine. Is it enough for no_la57 >> case too? > > Patch pls. > I don't think there is any way to get a message out here. It's too late to use the firmware, and too early to use anything native. no_longmode in startup_64 is an oxymoron -- it simply can't happen, although of course we can enter at the 32-bit entry point with that problem. We can hang the machine, or we can triple-fault it in the hope of triggering a reset, and that way if the bootloader has been configured with a backup kernel there is a hope of recovery. Triple-faulting is trivial: push $0 push $0 lidt (%rsp) /* %esp for 32-bit mode */ ud2 /* WTF? */ 1: hlt jmp 1b This will either hang the machine or reboot it, depending on if the reboot-on-triple-fault logic in the chipset actually works. -hpa From 1585423737146391072@xxx Wed Nov 29 17:51:38 +0000 2017 X-GM-THRID: 1583718603202818481 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread