Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jul 2018 08:00:52 +0000 (UTC)
From:      =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= <royger@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r336472 - head/sys/dev/xen/pvcpu
Message-ID:  <201807190800.w6J80qT1060911@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: royger
Date: Thu Jul 19 08:00:52 2018
New Revision: 336472
URL: https://svnweb.freebsd.org/changeset/base/336472

Log:
  xen: attach the PV CPU if no CPU device is present
  
  When booted as PVHv2, there's no ACPI CPU object, so attach the PV CPU
  device in order to take it's place.
  
  This is required in case some device or driver tries to poke at the
  PCPU device field.
  
  Sponsored by: Citrix Systems R&D

Modified:
  head/sys/dev/xen/pvcpu/pvcpu.c

Modified: head/sys/dev/xen/pvcpu/pvcpu.c
==============================================================================
--- head/sys/dev/xen/pvcpu/pvcpu.c	Thu Jul 19 07:58:24 2018	(r336471)
+++ head/sys/dev/xen/pvcpu/pvcpu.c	Thu Jul 19 08:00:52 2018	(r336472)
@@ -49,8 +49,8 @@ xenpvcpu_identify(driver_t *driver, device_t parent)
 {
 	int i;
 
-	/* Only attach to PV guests, HVM guests use the ACPI CPU devices */
-	if (!xen_pv_domain())
+	/* Only attach in case the per-CPU device is not set. */
+	if (!xen_domain() || PCPU_GET(device) != NULL)
 		return;
 
 	CPU_FOREACH(i) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807190800.w6J80qT1060911>