From owner-svn-src-head@freebsd.org Thu Jul 19 08:00:53 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 067FA104F6C5; Thu, 19 Jul 2018 08:00:53 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AFCA18331B; Thu, 19 Jul 2018 08:00:52 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 90F5626592; Thu, 19 Jul 2018 08:00:52 +0000 (UTC) (envelope-from royger@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6J80qPT060912; Thu, 19 Jul 2018 08:00:52 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6J80qT1060911; Thu, 19 Jul 2018 08:00:52 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201807190800.w6J80qT1060911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Date: Thu, 19 Jul 2018 08:00:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336472 - head/sys/dev/xen/pvcpu X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/dev/xen/pvcpu X-SVN-Commit-Revision: 336472 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2018 08:00:53 -0000 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) {