From patchwork Tue Sep 13 15:54:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 9329419 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E3CA1607FD for ; Tue, 13 Sep 2016 16:15:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D540A29516 for ; Tue, 13 Sep 2016 16:15:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C933329557; Tue, 13 Sep 2016 16:15:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 64F8B29516 for ; Tue, 13 Sep 2016 16:15:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1788A6E1DA; Tue, 13 Sep 2016 16:15:21 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 1206 seconds by postgrey-1.35 at gabe; Tue, 13 Sep 2016 16:15:20 UTC Received: from prv-mh.provo.novell.com (prv-mh.provo.novell.com [137.65.248.74]) by gabe.freedesktop.org (Postfix) with ESMTPS id 19FE26E1DA for ; Tue, 13 Sep 2016 16:15:20 +0000 (UTC) Received: from INET-PRV-MTA by prv-mh.provo.novell.com with Novell_GroupWise; Tue, 13 Sep 2016 09:55:12 -0600 Message-Id: <57D83D6D020000780010E7D9@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.1 Date: Tue, 13 Sep 2016 09:54:53 -0600 From: "Jan Beulich" To: , Subject: [PATCH] radeon: avoid boot hang in Xen Dom0 Mime-Version: 1.0 Content-Disposition: inline Cc: dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP While a hard hang in atom_asic_init() likely points at a deeper problem in the driver, restore the capability to boot a Xen Dom0 by simply avoiding the call there: Other than for Xen DomU, Dom0 owning a device does not really mean is has got passed through to it. In case it is of interest for further investigation, lspci for the offending device says: ATI Technologies Inc RS480 [Radeon Xpress 200G Series] [1002:5954] Fixes: 05082b8bbd "drm/radeon: fix asic initialization for virtualized environments" Signed-off-by: Jan Beulich --- drivers/gpu/drm/radeon/radeon_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- 4.8-rc6/drivers/gpu/drm/radeon/radeon_device.c +++ 4.8-rc6-radeon-Xen-boot/drivers/gpu/drm/radeon/radeon_device.c @@ -34,6 +34,7 @@ #include #include #include +#include #include "radeon_reg.h" #include "radeon.h" #include "atom.h" @@ -642,7 +643,7 @@ void radeon_gtt_location(struct radeon_d static bool radeon_device_is_virtual(void) { #ifdef CONFIG_X86 - return boot_cpu_has(X86_FEATURE_HYPERVISOR); + return boot_cpu_has(X86_FEATURE_HYPERVISOR) && !xen_initial_domain(); #else return false; #endif