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

Pull xen fixes from Juergen Gross:

- minor cleanup avoiding a warning when building with new gcc

- a patch to add a new sysfs node for Xen frontend/backend drivers to
make it easier to obtain the state of a pv device

- two fixes for 32-bit pv-guests to avoid intermediate L1TF vulnerable
PTEs

* tag 'for-linus-4.19b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
x86/xen: remove redundant variable save_pud
xen: export device state to sysfs
x86/pae: use 64 bit atomic xchg function in native_ptep_get_and_clear
x86/xen: don't write ptes directly in 32-bit PV guests

+24 -10
+9
Documentation/ABI/stable/sysfs-bus-xen-backend
··· 73 73 Contact: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> 74 74 Description: 75 75 Number of sectors written by the frontend. 76 + 77 + What: /sys/bus/xen-backend/devices/*/state 78 + Date: August 2018 79 + KernelVersion: 4.19 80 + Contact: Joe Jin <joe.jin@oracle.com> 81 + Description: 82 + The state of the device. One of: 'Unknown', 83 + 'Initialising', 'Initialised', 'Connected', 'Closing', 84 + 'Closed', 'Reconfiguring', 'Reconfigured'.
+3 -4
arch/x86/include/asm/pgtable-3level.h
··· 2 2 #ifndef _ASM_X86_PGTABLE_3LEVEL_H 3 3 #define _ASM_X86_PGTABLE_3LEVEL_H 4 4 5 + #include <asm/atomic64_32.h> 6 + 5 7 /* 6 8 * Intel Physical Address Extension (PAE) Mode - three-level page 7 9 * tables on PPro+ CPUs. ··· 152 150 { 153 151 pte_t res; 154 152 155 - /* xchg acts as a barrier before the setting of the high bits */ 156 - res.pte_low = xchg(&ptep->pte_low, 0); 157 - res.pte_high = ptep->pte_high; 158 - ptep->pte_high = 0; 153 + res.pte = (pteval_t)arch_atomic64_xchg((atomic64_t *)ptep, 0); 159 154 160 155 return res; 161 156 }
+3 -6
arch/x86/xen/mmu_pv.c
··· 435 435 static void xen_set_pte_atomic(pte_t *ptep, pte_t pte) 436 436 { 437 437 trace_xen_mmu_set_pte_atomic(ptep, pte); 438 - set_64bit((u64 *)ptep, native_pte_val(pte)); 438 + __xen_set_pte(ptep, pte); 439 439 } 440 440 441 441 static void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) 442 442 { 443 443 trace_xen_mmu_pte_clear(mm, addr, ptep); 444 - if (!xen_batched_set_pte(ptep, native_make_pte(0))) 445 - native_pte_clear(mm, addr, ptep); 444 + __xen_set_pte(ptep, native_make_pte(0)); 446 445 } 447 446 448 447 static void xen_pmd_clear(pmd_t *pmdp) ··· 1569 1570 pte = __pte_ma(((pte_val_ma(*ptep) & _PAGE_RW) | ~_PAGE_RW) & 1570 1571 pte_val_ma(pte)); 1571 1572 #endif 1572 - native_set_pte(ptep, pte); 1573 + __xen_set_pte(ptep, pte); 1573 1574 } 1574 1575 1575 1576 /* Early in boot, while setting up the initial pagetable, assume ··· 2060 2061 pud_t *pud; 2061 2062 pgd_t *pgd; 2062 2063 unsigned long *new_p2m; 2063 - int save_pud; 2064 2064 2065 2065 size = PAGE_ALIGN(xen_start_info->nr_pages * sizeof(unsigned long)); 2066 2066 n_pte = roundup(size, PAGE_SIZE) >> PAGE_SHIFT; ··· 2089 2091 2090 2092 pgd = __va(read_cr3_pa()); 2091 2093 new_p2m = (unsigned long *)(2 * PGDIR_SIZE); 2092 - save_pud = n_pud; 2093 2094 for (idx_pud = 0; idx_pud < n_pud; idx_pud++) { 2094 2095 pud = early_memremap(pud_phys, PAGE_SIZE); 2095 2096 clear_page(pud);
+9
drivers/xen/xenbus/xenbus_probe.c
··· 402 402 } 403 403 static DEVICE_ATTR_RO(modalias); 404 404 405 + static ssize_t state_show(struct device *dev, 406 + struct device_attribute *attr, char *buf) 407 + { 408 + return sprintf(buf, "%s\n", 409 + xenbus_strstate(to_xenbus_device(dev)->state)); 410 + } 411 + static DEVICE_ATTR_RO(state); 412 + 405 413 static struct attribute *xenbus_dev_attrs[] = { 406 414 &dev_attr_nodename.attr, 407 415 &dev_attr_devtype.attr, 408 416 &dev_attr_modalias.attr, 417 + &dev_attr_state.attr, 409 418 NULL, 410 419 }; 411 420