diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-04-16 01:16:39 +0300 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-04-16 01:16:39 +0300 |
| commit | 83964553e8a94217edf961994ea0ca722d297447 (patch) | |
| tree | 69b45f37b99cff30114a66e760303657783b7e18 /drivers | |
| parent | a5f998094fa344cdd1342164948abb4d7c6101ce (diff) | |
| parent | 3f100dd61ad4ee7c1fb6a44775a928dcdba7515b (diff) | |
| download | linux-83964553e8a94217edf961994ea0ca722d297447.tar.xz | |
Merge tag 'for-linus-7.1-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen updates from Juergen Gross:
- fix an error path in drivers/xen/manage.c
- fix the Xen console driver solving a boot hangup when the console
backend isn't yet running
- comment fix in the Xen swiotlb driver
- hardening for Xen on Arm adding a more thorough validation
- cleanup of the Xen grant table code hiding suspend/resume code for
the case if CONFIG_HIBERNATE_CALLBACKS isn't defined
* tag 'for-linus-7.1-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
xen/grant-table: guard gnttab_suspend/resume with CONFIG_HIBERNATE_CALLBACKS
hvc/xen: Check console connection flag
xen/swiotlb: fix stale reference to swiotlb_unmap_page()
xen/manage: unwind partial shutdown watcher setup on error
ARM: xen: validate hypervisor compatible before parsing its version
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/tty/hvc/hvc_xen.c | 3 | ||||
| -rw-r--r-- | drivers/xen/grant-table.c | 3 | ||||
| -rw-r--r-- | drivers/xen/manage.c | 20 | ||||
| -rw-r--r-- | drivers/xen/swiotlb-xen.c | 2 |
4 files changed, 23 insertions, 5 deletions
diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c index 7f0b6262488c..c407592442cd 100644 --- a/drivers/tty/hvc/hvc_xen.c +++ b/drivers/tty/hvc/hvc_xen.c @@ -139,6 +139,9 @@ static ssize_t domU_write_console(uint32_t vtermno, const u8 *data, size_t len) if (cons == NULL) return -EINVAL; + if (cons->intf->connection == XENCONSOLE_DISCONNECTED) + return -ENOTCONN; + /* * Make sure the whole buffer is emitted, polling if * necessary. We don't ever want to rely on the hvc daemon diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index 97e27f754d39..a6abf1ccd54c 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c @@ -1579,7 +1579,7 @@ static int gnttab_setup(void) } return gnttab_map(0, nr_grant_frames - 1); } - +#ifdef CONFIG_HIBERNATE_CALLBACKS int gnttab_resume(void) { gnttab_request_version(); @@ -1592,6 +1592,7 @@ int gnttab_suspend(void) gnttab_interface->unmap_frames(); return 0; } +#endif static int gnttab_expand(unsigned int req_entries) { diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index e20c40a62e64..05d7de128e71 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c @@ -343,12 +343,11 @@ static int setup_shutdown_watcher(void) return err; } - #ifdef CONFIG_MAGIC_SYSRQ err = register_xenbus_watch(&sysrq_watch); if (err) { pr_err("Failed to set sysrq watcher\n"); - return err; + goto err_unregister_shutdown; } #endif @@ -361,11 +360,26 @@ static int setup_shutdown_watcher(void) if (err) { pr_err("%s: Error %d writing %s\n", __func__, err, node); - return err; + goto err_remove_features; } } return 0; + +err_remove_features: + while (--idx >= 0) { + if (!shutdown_handlers[idx].flag) + continue; + snprintf(node, FEATURE_PATH_SIZE, "feature-%s", + shutdown_handlers[idx].command); + xenbus_rm(XBT_NIL, "control", node); + } +#ifdef CONFIG_MAGIC_SYSRQ + unregister_xenbus_watch(&sysrq_watch); +err_unregister_shutdown: +#endif + unregister_xenbus_watch(&shutdown_watch); + return err; } static int shutdown_event(struct notifier_block *notifier, diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index ccf25027bec1..4a734ee38994 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -340,7 +340,7 @@ xen_swiotlb_sync_single_for_device(struct device *dev, dma_addr_t dma_addr, /* * Unmap a set of streaming mode DMA translations. Again, cpu read rules - * concerning calls here are the same as for swiotlb_unmap_phys() above. + * concerning calls here are the same as for xen_swiotlb_unmap_phys() above. */ static void xen_swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sgl, int nelems, |
