svn commit: r336471 - head/sys/dev/xen/console
Roger Pau Monné
royger at FreeBSD.org
Thu Jul 19 07:58:25 UTC 2018
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);
}
More information about the svn-src-head
mailing list