From patchwork Thu Apr 7 00:06:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 8767581 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2385F9FC89 for ; Thu, 7 Apr 2016 00:09:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6236420204 for ; Thu, 7 Apr 2016 00:09:07 +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 60D31201CD for ; Thu, 7 Apr 2016 00:09:06 +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 1anxTX-0002jQ-Gb; Thu, 07 Apr 2016 00:07:07 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1anxTW-0002iL-8u for xen-devel@lists.xensource.com; Thu, 07 Apr 2016 00:07:06 +0000 Received: from [85.158.143.35] by server-3.bemta-6.messagelabs.com id B3/C9-07120-9A4A5075; Thu, 07 Apr 2016 00:07:05 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmplkeJIrShJLcpLzFFi42I5NlG2Q3flEtZ wg9kdXBb3prxnd2D02N63iz2AMYo1My8pvyKBNaOpdRZLwQT2iievj7I2MP5g7WLk4hASmMoo 0bnxG5Qzg0li4+3VbF2MHBxsAroSN29LdDFycogIJEjcffqNGaSGWeAbk8Tu08+YQRLCAs4SW 48cZQKxWQRUJf5vOcYE0ssr4CDR9tYEJCwhICfR8mM3K4jNKeAosfzUVDBbCKikcekSRoiaDI l5PXNYIWwviUU3LkHZahJXz21insDIt4CRYRWjenFqUVlqka6hXlJRZnpGSW5iZo6uoYGZXm5 qcXFiempOYlKxXnJ+7iZGYJAwAMEOxp3PnQ4xSnIwKYnyulayhgvxJeWnVGYkFmfEF5XmpBYf YpTh4FCS4OUBBp2QYFFqempFWmYOMFxh0hIcPEoivCsWA6V5iwsSc4sz0yFSpxh1ORb8uL2WS YglLz8vVUqcdyJIkQBIUUZpHtwIWOxcYpSVEuZlBDpKiKcgtSg3swRV/hWjOAejkjDvPZApPJ l5JXCbXgEdwQR0RL0wE8gRJYkIKakGxqiEEs5ti/s4t3X2/zkb/c2GaY6Yd9Sd6gCz97m/F3n MX8sh4RbyeIHhr8dKx5gCY/bf0TvSo2G/UO7F+3fOezg3SzIt8M3Q8ZYU8Us0UQ8pfCH6VMbC zf7Twq6ctueCE14vdzh4JjCjVOFNVIjk1Lserm85nY85H3C7dF/qwYI1C26YZZz1V2Ipzkg01 GIuKk4EALdLxqiYAgAA X-Env-Sender: mcgrof@kernel.org X-Msg-Ref: server-16.tower-21.messagelabs.com!1459987623!3514941!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 15524 invoked from network); 7 Apr 2016 00:07:05 -0000 Received: from mail.kernel.org (HELO mail.kernel.org) (198.145.29.136) by server-16.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 7 Apr 2016 00:07:05 -0000 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F3A912025B; Thu, 7 Apr 2016 00:07:02 +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 9C1122025A; Thu, 7 Apr 2016 00:07:01 +0000 (UTC) From: "Luis R. Rodriguez" To: bp@alien8.de, hpa@zytor.com, tglx@linutronix.de, mingo@redhat.com, rusty@rustcorp.com.au Date: Wed, 6 Apr 2016 17:06:27 -0700 Message-Id: <1459987594-5434-8-git-send-email-mcgrof@kernel.org> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1459987594-5434-1-git-send-email-mcgrof@kernel.org> References: <1459987594-5434-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: xen-devel@lists.xensource.com, matt@codeblueprint.co.uk, andrew.cooper3@citrix.com, x86@kernel.org, linux-kernel@vger.kernel.org, luto@amacapital.net, jlee@suse.com, "Luis R. Rodriguez" , lguest@lists.ozlabs.org, glin@suse.com, david.vrabel@citrix.com, boris.ostrovsky@oracle.com, andriy.shevchenko@linux.intel.com Subject: [Xen-devel] [PATCH v4 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 Acked-by: Rusty Russell --- 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);