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

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

Pull xen updates from Juergen Gross:

- three patches adding missing prototypes

- a fix for finding the iBFT in a Xen dom0 for supporting diskless
iSCSI boot

* tag 'for-linus-6.5-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
x86: xen: add missing prototypes
x86/xen: add prototypes for paravirt mmu functions
iscsi_ibft: Fix finding the iBFT under Xen Dom 0
xen: xen_debug_interrupt prototype to global header

+77 -23
+1 -1
arch/x86/kernel/setup.c
··· 796 796 797 797 memblock_x86_reserve_range_setup_data(); 798 798 799 - reserve_ibft_region(); 800 799 reserve_bios_regions(); 801 800 trim_snb_memory(); 802 801 } ··· 1031 1032 if (efi_enabled(EFI_BOOT)) 1032 1033 efi_init(); 1033 1034 1035 + reserve_ibft_region(); 1034 1036 dmi_setup(); 1035 1037 1036 1038 /*
+2
arch/x86/xen/efi.c
··· 16 16 #include <asm/setup.h> 17 17 #include <asm/xen/hypercall.h> 18 18 19 + #include "xen-ops.h" 20 + 19 21 static efi_char16_t vendor[100] __initdata; 20 22 21 23 static efi_system_table_t efi_systab_xen __initdata = {
+16
arch/x86/xen/mmu_pv.c
··· 86 86 #include "mmu.h" 87 87 #include "debugfs.h" 88 88 89 + /* 90 + * Prototypes for functions called via PV_CALLEE_SAVE_REGS_THUNK() in order 91 + * to avoid warnings with "-Wmissing-prototypes". 92 + */ 93 + pteval_t xen_pte_val(pte_t pte); 94 + pgdval_t xen_pgd_val(pgd_t pgd); 95 + pmdval_t xen_pmd_val(pmd_t pmd); 96 + pudval_t xen_pud_val(pud_t pud); 97 + p4dval_t xen_p4d_val(p4d_t p4d); 98 + pte_t xen_make_pte(pteval_t pte); 99 + pgd_t xen_make_pgd(pgdval_t pgd); 100 + pmd_t xen_make_pmd(pmdval_t pmd); 101 + pud_t xen_make_pud(pudval_t pud); 102 + p4d_t xen_make_p4d(p4dval_t p4d); 103 + pte_t xen_make_pte_init(pteval_t pte); 104 + 89 105 #ifdef CONFIG_X86_VSYSCALL_EMULATION 90 106 /* l3 pud for userspace vsyscall mapping */ 91 107 static pud_t level3_user_vsyscall[PTRS_PER_PUD] __page_aligned_bss;
+19 -9
arch/x86/xen/setup.c
··· 6 6 */ 7 7 8 8 #include <linux/init.h> 9 + #include <linux/iscsi_ibft.h> 9 10 #include <linux/sched.h> 10 11 #include <linux/kstrtox.h> 11 12 #include <linux/mm.h> ··· 765 764 BUG_ON(memmap.nr_entries == 0); 766 765 xen_e820_table.nr_entries = memmap.nr_entries; 767 766 768 - /* 769 - * Xen won't allow a 1:1 mapping to be created to UNUSABLE 770 - * regions, so if we're using the machine memory map leave the 771 - * region as RAM as it is in the pseudo-physical map. 772 - * 773 - * UNUSABLE regions in domUs are not handled and will need 774 - * a patch in the future. 775 - */ 776 - if (xen_initial_domain()) 767 + if (xen_initial_domain()) { 768 + /* 769 + * Xen won't allow a 1:1 mapping to be created to UNUSABLE 770 + * regions, so if we're using the machine memory map leave the 771 + * region as RAM as it is in the pseudo-physical map. 772 + * 773 + * UNUSABLE regions in domUs are not handled and will need 774 + * a patch in the future. 775 + */ 777 776 xen_ignore_unusable(); 777 + 778 + #ifdef CONFIG_ISCSI_IBFT_FIND 779 + /* Reserve 0.5 MiB to 1 MiB region so iBFT can be found */ 780 + xen_e820_table.entries[xen_e820_table.nr_entries].addr = IBFT_START; 781 + xen_e820_table.entries[xen_e820_table.nr_entries].size = IBFT_END - IBFT_START; 782 + xen_e820_table.entries[xen_e820_table.nr_entries].type = E820_TYPE_RESERVED; 783 + xen_e820_table.nr_entries++; 784 + #endif 785 + } 778 786 779 787 /* Make sure the Xen-supplied memory map is well-ordered. */ 780 788 e820__update_table(&xen_e820_table);
+4
arch/x86/xen/smp.h
··· 2 2 #ifndef _XEN_SMP_H 3 3 4 4 #ifdef CONFIG_SMP 5 + 6 + void asm_cpu_bringup_and_idle(void); 7 + asmlinkage void cpu_bringup_and_idle(void); 8 + 5 9 extern void xen_send_IPI_mask(const struct cpumask *mask, 6 10 int vector); 7 11 extern void xen_send_IPI_mask_allbutself(const struct cpumask *mask,
-1
arch/x86/xen/smp_pv.c
··· 55 55 static DEFINE_PER_CPU(struct xen_common_irq, xen_pmu_irq) = { .irq = -1 }; 56 56 57 57 static irqreturn_t xen_irq_work_interrupt(int irq, void *dev_id); 58 - void asm_cpu_bringup_and_idle(void); 59 58 60 59 static void cpu_bringup(void) 61 60 {
+3 -2
arch/x86/xen/xen-ops.h
··· 72 72 void xen_init_time_ops(void); 73 73 void xen_hvm_init_time_ops(void); 74 74 75 - irqreturn_t xen_debug_interrupt(int irq, void *dev_id); 76 - 77 75 bool xen_vcpu_stolen(int vcpu); 78 76 79 77 void xen_vcpu_setup(int cpu); ··· 146 148 void xen_pin_vcpu(int cpu); 147 149 148 150 void xen_emergency_restart(void); 151 + void xen_force_evtchn_callback(void); 152 + 149 153 #ifdef CONFIG_XEN_PV 150 154 void xen_pv_pre_suspend(void); 151 155 void xen_pv_post_suspend(int suspend_cancelled); 156 + void xen_start_kernel(struct start_info *si); 152 157 #else 153 158 static inline void xen_pv_pre_suspend(void) {} 154 159 static inline void xen_pv_post_suspend(int suspend_cancelled) {}
+17 -9
drivers/firmware/iscsi_ibft_find.c
··· 42 42 }; 43 43 44 44 #define IBFT_SIGN_LEN 4 45 - #define IBFT_START 0x80000 /* 512kB */ 46 - #define IBFT_END 0x100000 /* 1MB */ 47 45 #define VGA_MEM 0xA0000 /* VGA buffer */ 48 46 #define VGA_SIZE 0x20000 /* 128kB */ 49 47 ··· 50 52 */ 51 53 void __init reserve_ibft_region(void) 52 54 { 53 - unsigned long pos; 55 + unsigned long pos, virt_pos = 0; 54 56 unsigned int len = 0; 55 - void *virt; 57 + void *virt = NULL; 56 58 int i; 57 59 58 60 ibft_phys_addr = 0; ··· 68 70 * so skip that area */ 69 71 if (pos == VGA_MEM) 70 72 pos += VGA_SIZE; 71 - virt = isa_bus_to_virt(pos); 73 + 74 + /* Map page by page */ 75 + if (offset_in_page(pos) == 0) { 76 + if (virt) 77 + early_memunmap(virt, PAGE_SIZE); 78 + virt = early_memremap_ro(pos, PAGE_SIZE); 79 + virt_pos = pos; 80 + } 72 81 73 82 for (i = 0; i < ARRAY_SIZE(ibft_signs); i++) { 74 - if (memcmp(virt, ibft_signs[i].sign, IBFT_SIGN_LEN) == 75 - 0) { 83 + if (memcmp(virt + (pos - virt_pos), ibft_signs[i].sign, 84 + IBFT_SIGN_LEN) == 0) { 76 85 unsigned long *addr = 77 - (unsigned long *)isa_bus_to_virt(pos + 4); 86 + (unsigned long *)(virt + pos - virt_pos + 4); 78 87 len = *addr; 79 88 /* if the length of the table extends past 1M, 80 89 * the table cannot be valid. */ ··· 89 84 ibft_phys_addr = pos; 90 85 memblock_reserve(ibft_phys_addr, PAGE_ALIGN(len)); 91 86 pr_info("iBFT found at %pa.\n", &ibft_phys_addr); 92 - return; 87 + goto out; 93 88 } 94 89 } 95 90 } 96 91 } 92 + 93 + out: 94 + early_memunmap(virt, PAGE_SIZE); 97 95 }
+9 -1
include/linux/iscsi_ibft.h
··· 21 21 */ 22 22 extern phys_addr_t ibft_phys_addr; 23 23 24 + #ifdef CONFIG_ISCSI_IBFT_FIND 25 + 24 26 /* 25 27 * Routine used to find and reserve the iSCSI Boot Format Table. The 26 28 * physical address is set in the ibft_phys_addr variable. 27 29 */ 28 - #ifdef CONFIG_ISCSI_IBFT_FIND 29 30 void reserve_ibft_region(void); 31 + 32 + /* 33 + * Physical bounds to search for the iSCSI Boot Format Table. 34 + */ 35 + #define IBFT_START 0x80000 /* 512kB */ 36 + #define IBFT_END 0x100000 /* 1MB */ 37 + 30 38 #else 31 39 static inline void reserve_ibft_region(void) {} 32 40 #endif
+3
include/xen/events.h
··· 138 138 139 139 /* initialize Xen IRQ subsystem */ 140 140 void xen_init_IRQ(void); 141 + 142 + irqreturn_t xen_debug_interrupt(int irq, void *dev_id); 143 + 141 144 #endif /* _XEN_EVENTS_H */
+3
include/xen/xen.h
··· 31 31 32 32 #include <xen/interface/hvm/start_info.h> 33 33 extern struct hvm_start_info pvh_start_info; 34 + void xen_prepare_pvh(void); 35 + struct pt_regs; 36 + void xen_pv_evtchn_do_upcall(struct pt_regs *regs); 34 37 35 38 #ifdef CONFIG_XEN_DOM0 36 39 #include <xen/interface/xen.h>