Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757351AbcLORhg (ORCPT ); Thu, 15 Dec 2016 12:37:36 -0500 Received: from mx2.suse.de ([195.135.220.15]:50993 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752923AbcLORgs (ORCPT ); Thu, 15 Dec 2016 12:36:48 -0500 Date: Thu, 15 Dec 2016 18:36:09 +0100 From: Borislav Petkov To: Boris Ostrovsky Cc: Juergen Gross , Linux Kernel Mailing List , xen-devel Subject: Re: Can't boot as Xen dom0 due to commit fe055896 Message-ID: <20161215173609.ornfok6lk5oro2pj@pd.tnic> References: <73a4d64b-b139-6579-a560-92311641d6c7@suse.com> <20161215164635.thm7ruio2ddnxszw@pd.tnic> <20161215171755.xpfuax7a6q3jofet@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20161014 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1005 Lines: 34 On Thu, Dec 15, 2016 at 12:27:49PM -0500, Boris Ostrovsky wrote: > It will probably fix it but I don't think we want this: it's a > build-time solution. Most kernels have XEN on even though they are > booted bare-metal. Lemme tell you want I want: a way to detect I'm running on xen. Does CPUID(4) work really early, at load_ucode_bsp() time? IOW, can I use some of the functionality hypervisor_cpuid_base() uses to detect xen and stop loading any further? > I meant, for example: > > proc_fam = find_cpu_family_by_equiv_cpu(proc_id); > if (!proc_fam) { > pr_err("No patch family for equiv ID: 0x%04x\n", proc_id); > return crnt_size; > } > > -boris > > > It returns > > crnt_size which can be a positive number so that we can advance to the > > next patch in the blob. ^^^^^^^^^^^^^^^ Read what I wrote here. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --