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.15b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen fixes from Juergen Gross:
"Some minor cleanups and fixes of some theoretical bugs, as well as a
fix of a bug introduced in 5.15-rc1"

* tag 'for-linus-5.15b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
xen/x86: fix PV trap handling on secondary processors
xen/balloon: fix balloon kthread freezing
swiotlb-xen: this is PV-only on x86
xen/pci-swiotlb: reduce visibility of symbols
PCI: only build xen-pcifront in PV-enabled environments
swiotlb-xen: ensure to issue well-formed XENMEM_exchange requests
Xen/gntdev: don't ignore kernel unmapping error
xen/x86: drop redundant zeroing from cpu_initialize_context()

+28 -36
-1
arch/x86/Kconfig
··· 2610 2610 config PCI_XEN 2611 2611 def_bool y 2612 2612 depends on PCI && XEN 2613 - select SWIOTLB_XEN 2614 2613 2615 2614 config MMCONF_FAM10H 2616 2615 def_bool y
+1 -5
arch/x86/include/asm/xen/swiotlb-xen.h
··· 3 3 #define _ASM_X86_SWIOTLB_XEN_H 4 4 5 5 #ifdef CONFIG_SWIOTLB_XEN 6 - extern int xen_swiotlb; 7 6 extern int __init pci_xen_swiotlb_detect(void); 8 - extern void __init pci_xen_swiotlb_init(void); 9 7 extern int pci_xen_swiotlb_init_late(void); 10 8 #else 11 - #define xen_swiotlb (0) 12 - static inline int __init pci_xen_swiotlb_detect(void) { return 0; } 13 - static inline void __init pci_xen_swiotlb_init(void) { } 9 + #define pci_xen_swiotlb_detect NULL 14 10 static inline int pci_xen_swiotlb_init_late(void) { return -ENXIO; } 15 11 #endif 16 12
+9 -6
arch/x86/xen/enlighten_pv.c
··· 755 755 preempt_enable(); 756 756 } 757 757 758 - static void xen_convert_trap_info(const struct desc_ptr *desc, 759 - struct trap_info *traps) 758 + static unsigned xen_convert_trap_info(const struct desc_ptr *desc, 759 + struct trap_info *traps, bool full) 760 760 { 761 761 unsigned in, out, count; 762 762 ··· 766 766 for (in = out = 0; in < count; in++) { 767 767 gate_desc *entry = (gate_desc *)(desc->address) + in; 768 768 769 - if (cvt_gate_to_trap(in, entry, &traps[out])) 769 + if (cvt_gate_to_trap(in, entry, &traps[out]) || full) 770 770 out++; 771 771 } 772 - traps[out].address = 0; 772 + 773 + return out; 773 774 } 774 775 775 776 void xen_copy_trap_info(struct trap_info *traps) 776 777 { 777 778 const struct desc_ptr *desc = this_cpu_ptr(&idt_desc); 778 779 779 - xen_convert_trap_info(desc, traps); 780 + xen_convert_trap_info(desc, traps, true); 780 781 } 781 782 782 783 /* Load a new IDT into Xen. In principle this can be per-CPU, so we ··· 787 786 { 788 787 static DEFINE_SPINLOCK(lock); 789 788 static struct trap_info traps[257]; 789 + unsigned out; 790 790 791 791 trace_xen_cpu_load_idt(desc); 792 792 ··· 795 793 796 794 memcpy(this_cpu_ptr(&idt_desc), desc, sizeof(idt_desc)); 797 795 798 - xen_convert_trap_info(desc, traps); 796 + out = xen_convert_trap_info(desc, traps, false); 797 + memset(&traps[out], 0, sizeof(traps[0])); 799 798 800 799 xen_mc_flush(); 801 800 if (HYPERVISOR_set_trap_table(traps))
+2 -2
arch/x86/xen/pci-swiotlb-xen.c
··· 18 18 #endif 19 19 #include <linux/export.h> 20 20 21 - int xen_swiotlb __read_mostly; 21 + static int xen_swiotlb __read_mostly; 22 22 23 23 /* 24 24 * pci_xen_swiotlb_detect - set xen_swiotlb to 1 if necessary ··· 56 56 return xen_swiotlb; 57 57 } 58 58 59 - void __init pci_xen_swiotlb_init(void) 59 + static void __init pci_xen_swiotlb_init(void) 60 60 { 61 61 if (xen_swiotlb) { 62 62 xen_swiotlb_init_early();
-4
arch/x86/xen/smp_pv.c
··· 290 290 291 291 gdt = get_cpu_gdt_rw(cpu); 292 292 293 - memset(&ctxt->fpu_ctxt, 0, sizeof(ctxt->fpu_ctxt)); 294 - 295 293 /* 296 294 * Bring up the CPU in cpu_bringup_and_idle() with the stack 297 295 * pointing just below where pt_regs would be if it were a normal ··· 305 307 ctxt->user_regs.esp = (unsigned long)task_pt_regs(idle); 306 308 307 309 xen_copy_trap_info(ctxt->trap_ctxt); 308 - 309 - ctxt->ldt_ents = 0; 310 310 311 311 BUG_ON((unsigned long)gdt & ~PAGE_MASK); 312 312
+1 -1
drivers/pci/Kconfig
··· 110 110 111 111 config XEN_PCIDEV_FRONTEND 112 112 tristate "Xen PCI Frontend" 113 - depends on X86 && XEN 113 + depends on XEN_PV 114 114 select PCI_XEN 115 115 select XEN_XENBUS_FRONTEND 116 116 default y
+1
drivers/xen/Kconfig
··· 177 177 178 178 config SWIOTLB_XEN 179 179 def_bool y 180 + depends on XEN_PV || ARM || ARM64 180 181 select DMA_OPS 181 182 select SWIOTLB 182 183
+2 -2
drivers/xen/balloon.c
··· 522 522 timeout = 3600 * HZ; 523 523 credit = current_credit(); 524 524 525 - wait_event_interruptible_timeout(balloon_thread_wq, 526 - balloon_thread_cond(state, credit), timeout); 525 + wait_event_freezable_timeout(balloon_thread_wq, 526 + balloon_thread_cond(state, credit), timeout); 527 527 528 528 if (kthread_should_stop()) 529 529 return 0;
+8
drivers/xen/gntdev.c
··· 381 381 map->unmap_ops[offset+i].handle, 382 382 map->unmap_ops[offset+i].status); 383 383 map->unmap_ops[offset+i].handle = INVALID_GRANT_HANDLE; 384 + if (use_ptemod) { 385 + if (map->kunmap_ops[offset+i].status) 386 + err = -EINVAL; 387 + pr_debug("kunmap handle=%u st=%d\n", 388 + map->kunmap_ops[offset+i].handle, 389 + map->kunmap_ops[offset+i].status); 390 + map->kunmap_ops[offset+i].handle = INVALID_GRANT_HANDLE; 391 + } 384 392 } 385 393 return err; 386 394 }
+4 -3
drivers/xen/swiotlb-xen.c
··· 230 230 /* 231 231 * Get IO TLB memory from any location. 232 232 */ 233 - start = memblock_alloc(PAGE_ALIGN(bytes), PAGE_SIZE); 233 + start = memblock_alloc(PAGE_ALIGN(bytes), 234 + IO_TLB_SEGSIZE << IO_TLB_SHIFT); 234 235 if (!start) 235 - panic("%s: Failed to allocate %lu bytes align=0x%lx\n", 236 - __func__, PAGE_ALIGN(bytes), PAGE_SIZE); 236 + panic("%s: Failed to allocate %lu bytes\n", 237 + __func__, PAGE_ALIGN(bytes)); 237 238 238 239 /* 239 240 * And replace that memory with pages under 4GB.
-12
include/xen/xen-ops.h
··· 46 46 int xen_create_contiguous_region(phys_addr_t pstart, unsigned int order, 47 47 unsigned int address_bits, 48 48 dma_addr_t *dma_handle); 49 - 50 49 void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order); 51 - #else 52 - static inline int xen_create_contiguous_region(phys_addr_t pstart, 53 - unsigned int order, 54 - unsigned int address_bits, 55 - dma_addr_t *dma_handle) 56 - { 57 - return 0; 58 - } 59 - 60 - static inline void xen_destroy_contiguous_region(phys_addr_t pstart, 61 - unsigned int order) { } 62 50 #endif 63 51 64 52 #if defined(CONFIG_XEN_PV)