diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-09 20:38:27 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-09 20:38:27 -0800 |
| commit | 33120a2f8fc47f388506b7df1209bd5ac85dd584 (patch) | |
| tree | 41ec6df5bbcd871e6010f29dbf24104c7adc6579 /drivers/tty | |
| parent | 45bf4bc87c46856c5cf4ac39a0c25c83ccbf3209 (diff) | |
| parent | c307b6dc9c4f68d00524ec10899cdf21466b5c1e (diff) | |
Merge tag 'for-linus-7.0-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen updates from Juergen Gross:
- fix running as Xen PVH guest in 32-bit mode without PAE
- fix PV device handling for suspend/resume when running as
a Xen guest
- clean up workqueue usage
- fix the Xen balloon driver for PVH dom0
- introduce the possibility to use hypercalls for console
messages in unprivileged guests
- enable Xen dom0 use of virtio devices in nested virtualization
setups
- simplify the xen-mcelog driver
* tag 'for-linus-7.0-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
xenbus: Rename helpers to freeze/thaw/restore
xenbus: Use .freeze/.thaw to handle xenbus devices
xen/mcelog: simplify MCE_GETCLEAR_FLAGS using xchg()
xen/balloon: improve accuracy of initial balloon target for dom0
Partial revert "x86/xen: fix balloon target initialization for PVH dom0"
xen: introduce xen_console_io option
xen/virtio: Don't use grant-dma-ops when running as Dom0
x86/xen/pvh: Enable PAE mode for 32-bit guest only when CONFIG_X86_PAE is set
xen: privcmd: WQ_PERCPU added to alloc_workqueue users
xen/events: replace use of system_wq with system_percpu_wq
Diffstat (limited to 'drivers/tty')
| -rw-r--r-- | drivers/tty/hvc/hvc_xen.c | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index 388a71afd6ef..95ec01b1aacf 100644 --- a/drivers/tty/hvc/hvc_xen.c +++ b/drivers/tty/hvc/hvc_xen.c @@ -51,6 +51,22 @@ static DEFINE_SPINLOCK(xencons_lock); /* ------------------------------------------------------------------ */ +static bool xen_console_io = false; +static int __initdata opt_console_io = -1; + +static int __init parse_xen_console_io(char *arg) +{ + bool val; + int ret; + + ret = kstrtobool(arg, &val); + if (ret == 0) + opt_console_io = (int)val; + + return ret; +} +early_param("xen_console_io", parse_xen_console_io); + static struct xencons_info *vtermno_to_xencons(int vtermno) { struct xencons_info *entry, *ret = NULL; @@ -331,7 +347,7 @@ static int xen_initial_domain_console_init(void) struct xencons_info *info; unsigned long flags; - if (!xen_initial_domain()) + if (!xen_console_io) return -ENODEV; info = vtermno_to_xencons(HVC_COOKIE); @@ -369,7 +385,7 @@ void xen_console_resume(void) { struct xencons_info *info = vtermno_to_xencons(HVC_COOKIE); if (info != NULL && info->irq) { - if (!xen_initial_domain()) + if (!xen_console_io) xen_console_update_evtchn(info); rebind_evtchn_irq(info->evtchn, info->irq); } @@ -601,7 +617,7 @@ static int __init xen_hvc_init(void) if (!xen_domain()) return -ENODEV; - if (xen_initial_domain()) { + if (xen_console_io) { ops = &dom0_hvc_ops; r = xen_initial_domain_console_init(); if (r < 0) @@ -647,14 +663,17 @@ static int __init xen_hvc_init(void) } device_initcall(xen_hvc_init); -static int xen_cons_init(void) +static int __init xen_cons_init(void) { const struct hv_ops *ops; + xen_console_io = opt_console_io >= 0 ? opt_console_io : + xen_initial_domain(); + if (!xen_domain()) return 0; - if (xen_initial_domain()) + if (xen_console_io) ops = &dom0_hvc_ops; else { int r; |
