Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753181AbcDVJwz (ORCPT ); Fri, 22 Apr 2016 05:52:55 -0400 Received: from terminus.zytor.com ([198.137.202.10]:37250 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752938AbcDVJwv (ORCPT ); Fri, 22 Apr 2016 05:52:51 -0400 Date: Fri, 22 Apr 2016 02:51:29 -0700 From: "tip-bot for Luis R. Rodriguez" Message-ID: Cc: torvalds@linux-foundation.org, hpa@zytor.com, mingo@kernel.org, mcgrof@kernel.org, bp@alien8.de, tglx@linutronix.de, luto@amacapital.net, brgerst@gmail.com, peterz@infradead.org, dvlasenk@redhat.com, linux-kernel@vger.kernel.org, rusty@rustcorp.com.au Reply-To: peterz@infradead.org, dvlasenk@redhat.com, linux-kernel@vger.kernel.org, rusty@rustcorp.com.au, torvalds@linux-foundation.org, hpa@zytor.com, mingo@kernel.org, mcgrof@kernel.org, bp@alien8.de, tglx@linutronix.de, luto@amacapital.net, brgerst@gmail.com In-Reply-To: <1460592286-300-8-git-send-email-mcgrof@kernel.org> References: <1460592286-300-8-git-send-email-mcgrof@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/boot] tools/lguest: Force disable tboot and APM Git-Commit-ID: 46504590321dc62a11065f8d00e1b12037c37018 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2395 Lines: 72 Commit-ID: 46504590321dc62a11065f8d00e1b12037c37018 Gitweb: http://git.kernel.org/tip/46504590321dc62a11065f8d00e1b12037c37018 Author: Luis R. Rodriguez AuthorDate: Wed, 13 Apr 2016 17:04:37 -0700 Committer: Ingo Molnar CommitDate: Fri, 22 Apr 2016 10:29:03 +0200 tools/lguest: Force disable tboot and APM The paravirt_enabled() check is going away, the area tossed to the kernel on lguest is not zeroed out, so ensure lguest force disables tboot and APM just in case the kernel file being read might have this set for whatever reason. Signed-off-by: Luis R. Rodriguez Acked-by: Rusty Russell Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: andrew.cooper3@citrix.com Cc: andriy.shevchenko@linux.intel.com Cc: bigeasy@linutronix.de Cc: boris.ostrovsky@oracle.com Cc: david.vrabel@citrix.com Cc: ffainelli@freebox.fr Cc: george.dunlap@citrix.com Cc: glin@suse.com Cc: jgross@suse.com Cc: jlee@suse.com Cc: josh@joshtriplett.org Cc: julien.grall@linaro.org Cc: konrad.wilk@oracle.com Cc: kozerkov@parallels.com Cc: lenb@kernel.org Cc: lguest@lists.ozlabs.org Cc: linux-acpi@vger.kernel.org Cc: lv.zheng@intel.com Cc: matt@codeblueprint.co.uk Cc: mbizon@freebox.fr Cc: rjw@rjwysocki.net Cc: robert.moore@intel.com Cc: tiwai@suse.de Cc: toshi.kani@hp.com Cc: xen-devel@lists.xensource.com Link: http://lkml.kernel.org/r/1460592286-300-8-git-send-email-mcgrof@kernel.org Signed-off-by: Ingo Molnar --- tools/lguest/lguest.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/lguest/lguest.c b/tools/lguest/lguest.c index ff0aa580..d9836c5 100644 --- a/tools/lguest/lguest.c +++ b/tools/lguest/lguest.c @@ -3357,6 +3357,12 @@ int main(int argc, char *argv[]) /* Tell the entry path not to try to reload segment registers. */ boot->hdr.loadflags |= KEEP_SEGMENTS; + /* We don't support tboot: */ + boot->tboot_addr = 0; + + /* Ensure this is 0 to prevent APM from loading: */ + boot->apm_bios_info.version = 0; + /* We tell the kernel to initialize the Guest. */ tell_kernel(start);