From patchwork Sat Nov 30 11:57:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 11267947 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 29E7615AB for ; Sat, 30 Nov 2019 11:59:11 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0617F2075A for ; Sat, 30 Nov 2019 11:59:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qgqFzb61" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0617F2075A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ib1OE-0004xn-9h; Sat, 30 Nov 2019 11:58:18 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ib1OD-0004xP-Li for xen-devel@lists.xenproject.org; Sat, 30 Nov 2019 11:58:17 +0000 X-Inumbo-ID: a0a926be-1368-11ea-a55d-bc764e2007e4 Received: from mail-wr1-x441.google.com (unknown [2a00:1450:4864:20::441]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a0a926be-1368-11ea-a55d-bc764e2007e4; Sat, 30 Nov 2019 11:57:48 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id z7so34679617wrl.13 for ; Sat, 30 Nov 2019 03:57:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cP76/cS0Q1i/wf27JixlotPAM1oHWVpKqPMlb1E5RNc=; b=qgqFzb61/MwHekLL2zc4ueue6TPByWS9JAf32t5kfixkfOCbNjsUG6K2ZUg5QgUyi8 J8clL0cUPRVN79qyNn6E4FHyv4AsMUF8OjZKy20pIa8VxCm1N8CbBB+3HkCnUiD3ZcyL 3j2+QJ9OoWTvp70kraX2lHGKJRyHt2BroXucX3iTpGM9UBF1m1pW/7HdUX82LqUU079X uiRJ8e8ldoYOM/9hiGFLY+m5g7DiKZ/qFOqgXRojKkEqyPmfD4/TF441dqyooqzRkeTA PLHKByNy/S3fXVCNDd7or/vmx6TxpmSa7sddOn80y/XwgOkHodd3SjKALhGmwwD6bPE8 5LGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=cP76/cS0Q1i/wf27JixlotPAM1oHWVpKqPMlb1E5RNc=; b=kcQuN2nM2Om7N0L8vj7c5KdnliA6BztuK0pdfu9YDL7G7RPQs8NqScamBoQherMuQI Wv75Pikonp/5PmNFA7MCiBSgtTrYw/7HCLWgPaYuY0M1gfbtm4BspP/oDwVl/DSsuzzO 4xAGeRgX54fgLb8p12swAEHBGPekiMTRo/sJPlymR9fVVGNXYP1uaW4LufUc1kZDToAY Jx89s+4fcNdN0k4yXFeAYZ1evxrLsXMEleumtnH1EJUhHGDdOlY9faz+EOkFsh+IDzJz DGpp31uUCpIaGzbhoxPgpi7PYjpEfdWAACHKYXU7vkZ7DSx/yuFwDVeGORo+M9Qg/a7B K3Vg== X-Gm-Message-State: APjAAAW9C2zAxqBLh3uPBd3OVv7BVg6GJqWARqUnCQXnmWshWVitx31C qUKj594fKYhiq4ZwBDngJ/1DxlztiQk= X-Google-Smtp-Source: APXvYqznFFz48yz0+q63EbYkN35ihorBYWGIKgtFa1LRaQaW0nxkC8VjXUyhRoF4DSXGXcfah5pbvA== X-Received: by 2002:a5d:4b08:: with SMTP id v8mr56413524wrq.338.1575115067710; Sat, 30 Nov 2019 03:57:47 -0800 (PST) Received: from debian.mshome.net (122.163.200.146.dyn.plus.net. [146.200.163.122]) by smtp.gmail.com with ESMTPSA id z11sm2227769wrt.82.2019.11.30.03.57.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Nov 2019 03:57:47 -0800 (PST) From: Wei Liu X-Google-Original-From: Wei Liu To: Xen Development List Date: Sat, 30 Nov 2019 11:57:36 +0000 Message-Id: <20191130115737.15752-8-liuwe@microsoft.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191130115737.15752-1-liuwe@microsoft.com> References: <20191130115737.15752-1-liuwe@microsoft.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v5 7/8] x86: be more verbose when running on a hypervisor X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Wei Liu , Wei Liu , Andrew Cooper , Michael Kelley , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Also replace reference to xen_guest. Signed-off-by: Wei Liu Acked-by: Jan Beulich --- Changes in v5: 1. Cache and use hypervisor name instead --- xen/arch/x86/setup.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index a6b354c29f..fc049eaac8 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -700,6 +700,7 @@ void __init noreturn __start_xen(unsigned long mbi_p) .max_grant_frames = -1, .max_maptrack_frames = -1, }; + const char *hypervisor_name; /* Critical region without IDT or TSS. Any fault is deadly! */ @@ -763,7 +764,7 @@ void __init noreturn __start_xen(unsigned long mbi_p) * allocing any xenheap structures wanted in lower memory. */ kexec_early_calculations(); - hypervisor_probe(); + hypervisor_name = hypervisor_probe(); parse_video_info(); @@ -788,6 +789,8 @@ void __init noreturn __start_xen(unsigned long mbi_p) printk("Command line: %s\n", cmdline); printk("Xen image load base address: %#lx\n", xen_phys_start); + if ( hypervisor_name ) + printk("Running on %s\n", hypervisor_name); #ifdef CONFIG_VIDEO printk("Video information:\n"); @@ -1569,7 +1572,7 @@ void __init noreturn __start_xen(unsigned long mbi_p) max_cpus = nr_cpu_ids; } - if ( xen_guest ) + if ( hypervisor_name ) hypervisor_setup(); /* Low mappings were only needed for some BIOS table parsing. */