From patchwork Fri Apr 8 23:58:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 8787451 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id ED470C0553 for ; Sat, 9 Apr 2016 00:00:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2541F202E9 for ; Sat, 9 Apr 2016 00:00:01 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 509A720148 for ; Sat, 9 Apr 2016 00:00:00 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aogI2-0002qA-SH; Fri, 08 Apr 2016 23:58:14 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aogI1-0002pk-32 for xen-devel@lists.xensource.com; Fri, 08 Apr 2016 23:58:13 +0000 Received: from [85.158.143.35] by server-3.bemta-6.messagelabs.com id 7C/13-07120-49548075; Fri, 08 Apr 2016 23:58:12 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjkeJIrShJLcpLzFFi42I5NlG2Q3eyK0e 4wf6pxhb3prxnd2D02N63iz2AMYo1My8pvyKBNaOpdRZLwQT2iievj7I2MP5g7WLk4hASmMoo 0brxDBOEM4NJYvn/U2xdjBwcbAK6EjdvS3QxcnKICCRI3H36jRmkhlngHIvEhkvz2UASwgLOE jP+bWQHsVkEVCXa7p5nBrF5BRwlFk3pYwGxJQTkJFp+7GYFsTkFnCQO7vsDViMEVHP1zBuomg yJeT1zWCFsL4lFNy5B2WoSV89tYp7AyLeAkWEVo3pxalFZapGusV5SUWZ6RkluYmaOrqGBmV5 uanFxYnpqTmJSsV5yfu4mRmCYMADBDsaOf06HGCU5mJREebc9ZA8X4kvKT6nMSCzOiC8qzUkt PsQow8GhJMGb6cIRLiRYlJqeWpGWmQMMWJi0BAePkgivM0iat7ggMbc4Mx0idYpRl2PBj9trm YRY8vLzUqXEeSVAigRAijJK8+BGwKLnEqOslDAvI9BRQjwFqUW5mSWo8q8YxTkYlYR5HUCm8G TmlcBtegV0BBPQERf42UCOKElESEk1MPa39nLbJu3X6RC0vbi+J0JVs+xibtTDuoZpD4UZNwk vVTX9+fXObPGTx5e81Ra9ZR6rP+uFsRCn0LmY1ILbJWIe714f/dxmpC1myn19yjHpe+HuC6tE uG5XL2fgt40rqI968OxZUL7RjRm8Lx9+ZPir6/nUOvjLCdM5l42qPlXsk1PeEr6fVYmlOCPRU Iu5qDgRAIBYECuZAgAA X-Env-Sender: mcgrof@kernel.org X-Msg-Ref: server-7.tower-21.messagelabs.com!1460159890!8444665!1 X-Originating-IP: [198.145.29.136] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 8.28; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30601 invoked from network); 8 Apr 2016 23:58:11 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-7.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 8 Apr 2016 23:58:11 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A1134202E9; Fri, 8 Apr 2016 23:58:09 +0000 (UTC) Received: from garbanzo.do-not-panic.com (c-73-15-241-2.hsd1.ca.comcast.net [73.15.241.2]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1579D2013A; Fri, 8 Apr 2016 23:58:08 +0000 (UTC) From: "Luis R. Rodriguez" To: bp@alien8.de, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, rusty@rustcorp.com.au Date: Fri, 8 Apr 2016 16:58:06 -0700 Message-Id: <1460159886-13344-1-git-send-email-mcgrof@kernel.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1460158825-13117-1-git-send-email-mcgrof@kernel.org> References: <1460158825-13117-1-git-send-email-mcgrof@kernel.org> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Cc: kozerkov@parallels.com, matt@codeblueprint.co.uk, lv.zheng@intel.com, xen-devel@lists.xensource.com, joro@8bytes.org, x86@kernel.org, robert.moore@intel.com, linux-acpi@vger.kernel.org, glin@suse.com, lenb@kernel.org, josh@joshtriplett.org, jlee@suse.com, lguest@lists.ozlabs.org, boris.ostrovsky@oracle.com, andriy.shevchenko@linux.intel.com, toshi.kani@hp.com, andrew.cooper3@citrix.com, rjw@rjwysocki.net, linux-kernel@vger.kernel.org, luto@amacapital.net, "Luis R. Rodriguez" , david.vrabel@citrix.com, tiwai@suse.de Subject: [Xen-devel] [PATCH v5 07/14] tools/lguest: force disable tboot and apm X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The paravirt_enabled() check is going away, the area tossed to the kernel on lguest is not zerored 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 --- tools/lguest/lguest.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/lguest/lguest.c b/tools/lguest/lguest.c index ff0aa580c6e1..0aa75af6e862 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);