From owner-svn-src-head@freebsd.org Thu Jul 19 07:58:25 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 BDB7F104F3B7; Thu, 19 Jul 2018 07:58:25 +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 6743B8312E; Thu, 19 Jul 2018 07:58:25 +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 45B002657E; Thu, 19 Jul 2018 07:58:25 +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 w6J7wPeE057823; Thu, 19 Jul 2018 07:58:25 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6J7wPFL057822; Thu, 19 Jul 2018 07:58:25 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201807190758.w6J7wPFL057822@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 07:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336471 - head/sys/dev/xen/console X-SVN-Group: head X-SVN-Commit-Author: royger X-SVN-Commit-Paths: head/sys/dev/xen/console X-SVN-Commit-Revision: 336471 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 07:58:25 -0000 Author: royger Date: Thu Jul 19 07:58:24 2018 New Revision: 336471 URL: https://svnweb.freebsd.org/changeset/base/336471 Log: xen: do not limit PV console usage to PV guests The Xen PV console is also available to HVM and PVHv2 guests, so don't limit the console usage to PV guests only. Sponsored by: Citrix Systems R&D Modified: head/sys/dev/xen/console/xen_console.c Modified: head/sys/dev/xen/console/xen_console.c ============================================================================== --- head/sys/dev/xen/console/xen_console.c Thu Jul 19 07:54:45 2018 (r336470) +++ head/sys/dev/xen/console/xen_console.c Thu Jul 19 07:58:24 2018 (r336471) @@ -397,7 +397,7 @@ xencons_early_init(void) mtx_init(&main_cons.mtx, "XCONS LOCK", NULL, MTX_SPIN); - if (xen_initial_domain()) + if (xen_get_console_evtchn() == 0) main_cons.ops = &xencons_hypervisor_ops; else main_cons.ops = &xencons_ring_ops; @@ -586,7 +586,7 @@ static void xencons_cnprobe(struct consdev *cp) { - if (!xen_pv_domain()) + if (!xen_domain()) return; cp->cn_pri = CN_REMOTE; @@ -701,13 +701,8 @@ xencons_identify(driver_t *driver, device_t parent) { device_t child; -#if defined(__arm__) || defined(__aarch64__) - if (!xen_domain()) + if (main_cons.ops == NULL) return; -#else - if (!xen_pv_domain()) - return; -#endif child = BUS_ADD_CHILD(parent, 0, driver_name, 0); }