From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754333AbcLOTnv (ORCPT ); Thu, 15 Dec 2016 14:43:51 -0500 Received: from mx2.suse.de ([195.135.220.15]:39789 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753560AbcLOTnu (ORCPT ); Thu, 15 Dec 2016 14:43:50 -0500 Date: Thu, 15 Dec 2016 20:23:05 +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: <20161215192305.dlgyrmteirgzop4y@pd.tnic> References: <73a4d64b-b139-6579-a560-92311641d6c7@suse.com> <20161215164635.thm7ruio2ddnxszw@pd.tnic> <20161215171755.xpfuax7a6q3jofet@pd.tnic> <20161215173609.ornfok6lk5oro2pj@pd.tnic> <385ac3cd-7a3f-4c4d-69bb-8feee235fb7e@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <385ac3cd-7a3f-4c4d-69bb-8feee235fb7e@oracle.com> User-Agent: NeoMutt/20161014 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 15, 2016 at 02:08:50PM -0500, Boris Ostrovsky wrote: > This fixes my PV boot problem. I am still failing to boot HVM, will > need to look at this some more. No, no more stabbing in the dark and no more brown paper bags. Please check whether CPUID(4) works that early in any xen guest and let's add that check to a function which does something like: bool loader_disabled(void) { if (running_on_a_xen_guest) return true; if (check_loader_disabled_bsp()) return true; if (!have_cpuid_p()) return true; return false; } and call that at the entry points and be done with it. Or if there's some other clean method to detect I'm running on a xen guest. Thanks. -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --