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

Pull xen fixes from Juergen Gross:

- avoid a warning when compiling with clang

- consider read-only bits in xen-pciback when writing to a BAR

- fix a boot crash of pv-domains

* tag 'for-linus-4.14c-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
xen/mmu: Call xen_cleanhighmap() with 4MB aligned for page tables mapping
xen-pciback: relax BAR sizing write value check
x86/xen: clean up clang build warning

+16 -12
+2 -2
arch/x86/include/asm/xen/hypercall.h
··· 551 551 MULTI_update_descriptor(struct multicall_entry *mcl, u64 maddr, 552 552 struct desc_struct desc) 553 553 { 554 - u32 *p = (u32 *) &desc; 555 - 556 554 mcl->op = __HYPERVISOR_update_descriptor; 557 555 if (sizeof(maddr) == sizeof(long)) { 558 556 mcl->args[0] = maddr; 559 557 mcl->args[1] = *(unsigned long *)&desc; 560 558 } else { 559 + u32 *p = (u32 *)&desc; 560 + 561 561 mcl->args[0] = maddr; 562 562 mcl->args[1] = maddr >> 32; 563 563 mcl->args[2] = *p++;
+4 -9
arch/x86/xen/mmu_pv.c
··· 1238 1238 * from _brk_limit way up to the max_pfn_mapped (which is the end of 1239 1239 * the ramdisk). We continue on, erasing PMD entries that point to page 1240 1240 * tables - do note that they are accessible at this stage via __va. 1241 - * For good measure we also round up to the PMD - which means that if 1241 + * As Xen is aligning the memory end to a 4MB boundary, for good 1242 + * measure we also round up to PMD_SIZE * 2 - which means that if 1242 1243 * anybody is using __ka address to the initial boot-stack - and try 1243 1244 * to use it - they are going to crash. The xen_start_info has been 1244 1245 * taken care of already in xen_setup_kernel_pagetable. */ 1245 1246 addr = xen_start_info->pt_base; 1246 - size = roundup(xen_start_info->nr_pt_frames * PAGE_SIZE, PMD_SIZE); 1247 + size = xen_start_info->nr_pt_frames * PAGE_SIZE; 1247 1248 1248 - xen_cleanhighmap(addr, addr + size); 1249 + xen_cleanhighmap(addr, roundup(addr + size, PMD_SIZE * 2)); 1249 1250 xen_start_info->pt_base = (unsigned long)__va(__pa(xen_start_info->pt_base)); 1250 - #ifdef DEBUG 1251 - /* This is superfluous and is not necessary, but you know what 1252 - * lets do it. The MODULES_VADDR -> MODULES_END should be clear of 1253 - * anything at this stage. */ 1254 - xen_cleanhighmap(MODULES_VADDR, roundup(MODULES_VADDR, PUD_SIZE) - 1); 1255 - #endif 1256 1251 } 1257 1252 #endif 1258 1253
+10 -1
drivers/xen/xen-pciback/conf_space_header.c
··· 169 169 static int bar_write(struct pci_dev *dev, int offset, u32 value, void *data) 170 170 { 171 171 struct pci_bar_info *bar = data; 172 + unsigned int pos = (offset - PCI_BASE_ADDRESS_0) / 4; 173 + const struct resource *res = dev->resource; 174 + u32 mask; 172 175 173 176 if (unlikely(!bar)) { 174 177 pr_warn(DRV_NAME ": driver data not found for %s\n", ··· 182 179 /* A write to obtain the length must happen as a 32-bit write. 183 180 * This does not (yet) support writing individual bytes 184 181 */ 185 - if (value == ~0) 182 + if (res[pos].flags & IORESOURCE_IO) 183 + mask = ~PCI_BASE_ADDRESS_IO_MASK; 184 + else if (pos && (res[pos - 1].flags & IORESOURCE_MEM_64)) 185 + mask = 0; 186 + else 187 + mask = ~PCI_BASE_ADDRESS_MEM_MASK; 188 + if ((value | mask) == ~0U) 186 189 bar->which = 1; 187 190 else { 188 191 u32 tmpval;