radeon: avoid boot hang in Xen Dom0

Submitted by Jan Beulich on Sept. 13, 2016, 3:54 p.m.

Details

Message ID 57D83D6D020000780010E7D9@prv-mh.provo.novell.com
State New
Headers show
Series "radeon: avoid boot hang in Xen Dom0" ( rev: 1 ) in DRI devel

Not browsing as part of any series.

Commit Message

Jan Beulich Sept. 13, 2016, 3:54 p.m.
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 <jbeulich@suse.com>
---
 drivers/gpu/drm/radeon/radeon_device.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

--- 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 <linux/vgaarb.h>
 #include <linux/vga_switcheroo.h>
 #include <linux/efi.h>
+#include <xen/xen.h>
 #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