Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'for-linus-5.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen fixes from Juergen Gross:

- correct panic handling when running as a Xen guest

- cleanup the Xen grant driver to remove printing a pointer being
always NULL

- remove a soon to be wrong call of of_dma_configure()

* tag 'for-linus-5.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
xen: Stop abusing DT of_dma_configure API
xen/grant-table: remove unnecessary printing
x86/xen: Return from panic notifier

+34 -26
+4
Documentation/admin-guide/kernel-parameters.txt
··· 5302 5302 the unplug protocol 5303 5303 never -- do not unplug even if version check succeeds 5304 5304 5305 + xen_legacy_crash [X86,XEN] 5306 + Crash from Xen panic notifier, without executing late 5307 + panic() code such as dumping handler. 5308 + 5305 5309 xen_nopvspin [X86,XEN] 5306 5310 Disables the ticketlock slowpath using Xen PV 5307 5311 optimizations.
+25 -3
arch/x86/xen/enlighten.c
··· 269 269 BUG(); 270 270 } 271 271 272 + static int reboot_reason = SHUTDOWN_reboot; 273 + static bool xen_legacy_crash; 272 274 void xen_emergency_restart(void) 273 275 { 274 - xen_reboot(SHUTDOWN_reboot); 276 + xen_reboot(reboot_reason); 275 277 } 276 278 277 279 static int 278 280 xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr) 279 281 { 280 - if (!kexec_crash_loaded()) 281 - xen_reboot(SHUTDOWN_crash); 282 + if (!kexec_crash_loaded()) { 283 + if (xen_legacy_crash) 284 + xen_reboot(SHUTDOWN_crash); 285 + 286 + reboot_reason = SHUTDOWN_crash; 287 + 288 + /* 289 + * If panic_timeout==0 then we are supposed to wait forever. 290 + * However, to preserve original dom0 behavior we have to drop 291 + * into hypervisor. (domU behavior is controlled by its 292 + * config file) 293 + */ 294 + if (panic_timeout == 0) 295 + panic_timeout = -1; 296 + } 282 297 return NOTIFY_DONE; 283 298 } 299 + 300 + static int __init parse_xen_legacy_crash(char *arg) 301 + { 302 + xen_legacy_crash = true; 303 + return 0; 304 + } 305 + early_param("xen_legacy_crash", parse_xen_legacy_crash); 284 306 285 307 static struct notifier_block xen_panic_block = { 286 308 .notifier_call = xen_panic_event,
+2 -10
drivers/gpu/drm/xen/xen_drm_front.c
··· 718 718 struct device *dev = &xb_dev->dev; 719 719 int ret; 720 720 721 - /* 722 - * The device is not spawn from a device tree, so arch_setup_dma_ops 723 - * is not called, thus leaving the device with dummy DMA ops. 724 - * This makes the device return error on PRIME buffer import, which 725 - * is not correct: to fix this call of_dma_configure() with a NULL 726 - * node to set default DMA ops. 727 - */ 728 - dev->coherent_dma_mask = DMA_BIT_MASK(32); 729 - ret = of_dma_configure(dev, NULL, true); 721 + ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(64)); 730 722 if (ret < 0) { 731 - DRM_ERROR("Cannot setup DMA ops, ret %d", ret); 723 + DRM_ERROR("Cannot setup DMA mask, ret %d", ret); 732 724 return ret; 733 725 } 734 726
+2 -11
drivers/xen/gntdev.c
··· 22 22 23 23 #define pr_fmt(fmt) "xen:" KBUILD_MODNAME ": " fmt 24 24 25 + #include <linux/dma-mapping.h> 25 26 #include <linux/module.h> 26 27 #include <linux/kernel.h> 27 28 #include <linux/init.h> ··· 35 34 #include <linux/slab.h> 36 35 #include <linux/highmem.h> 37 36 #include <linux/refcount.h> 38 - #ifdef CONFIG_XEN_GRANT_DMA_ALLOC 39 - #include <linux/of_device.h> 40 - #endif 41 37 42 38 #include <xen/xen.h> 43 39 #include <xen/grant_table.h> ··· 623 625 flip->private_data = priv; 624 626 #ifdef CONFIG_XEN_GRANT_DMA_ALLOC 625 627 priv->dma_dev = gntdev_miscdev.this_device; 626 - 627 - /* 628 - * The device is not spawn from a device tree, so arch_setup_dma_ops 629 - * is not called, thus leaving the device with dummy DMA ops. 630 - * Fix this by calling of_dma_configure() with a NULL node to set 631 - * default DMA ops. 632 - */ 633 - of_dma_configure(priv->dma_dev, NULL, true); 628 + dma_coerce_mask_and_coherent(priv->dma_dev, DMA_BIT_MASK(64)); 634 629 #endif 635 630 pr_debug("priv %p\n", priv); 636 631
+1 -2
drivers/xen/grant-table.c
··· 1363 1363 if (xen_feature(XENFEAT_auto_translated_physmap) && gnttab_shared.addr == NULL) { 1364 1364 gnttab_shared.addr = xen_auto_xlat_grant_frames.vaddr; 1365 1365 if (gnttab_shared.addr == NULL) { 1366 - pr_warn("gnttab share frames (addr=0x%08lx) is not mapped!\n", 1367 - (unsigned long)xen_auto_xlat_grant_frames.vaddr); 1366 + pr_warn("gnttab share frames is not mapped!\n"); 1368 1367 return -ENOMEM; 1369 1368 } 1370 1369 }