07 Oct, 2012

1 commit

  • Pull ADM Xen support from Konrad Rzeszutek Wilk:

    Features:
    * Allow a Linux guest to boot as initial domain and as normal guests
    on Xen on ARM (specifically ARMv7 with virtualized extensions). PV
    console, block and network frontend/backends are working.
    Bug-fixes:
    * Fix compile linux-next fallout.
    * Fix PVHVM bootup crashing.

    The Xen-unstable hypervisor (so will be 4.3 in a ~6 months), supports
    ARMv7 platforms.

    The goal in implementing this architecture is to exploit the hardware
    as much as possible. That means use as little as possible of PV
    operations (so no PV MMU) - and use existing PV drivers for I/Os
    (network, block, console, etc). This is similar to how PVHVM guests
    operate in X86 platform nowadays - except that on ARM there is no need
    for QEMU. The end result is that we share a lot of the generic Xen
    drivers and infrastructure.

    Details on how to compile/boot/etc are available at this Wiki:

    http://wiki.xen.org/wiki/Xen_ARMv7_with_Virtualization_Extensions

    and this blog has links to a technical discussion/presentations on the
    overall architecture:

    http://blog.xen.org/index.php/2012/09/21/xensummit-sessions-new-pvh-virtualisation-mode-for-arm-cortex-a15arm-servers-and-x86/

    * tag 'stable/for-linus-3.7-arm-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (21 commits)
    xen/xen_initial_domain: check that xen_start_info is initialized
    xen: mark xen_init_IRQ __init
    xen/Makefile: fix dom-y build
    arm: introduce a DTS for Xen unprivileged virtual machines
    MAINTAINERS: add myself as Xen ARM maintainer
    xen/arm: compile netback
    xen/arm: compile blkfront and blkback
    xen/arm: implement alloc/free_xenballooned_pages with alloc_pages/kfree
    xen/arm: receive Xen events on ARM
    xen/arm: initialize grant_table on ARM
    xen/arm: get privilege status
    xen/arm: introduce CONFIG_XEN on ARM
    xen: do not compile manage, balloon, pci, acpi, pcpu and cpu_hotplug on ARM
    xen/arm: Introduce xen_ulong_t for unsigned long
    xen/arm: Xen detection and shared_info page mapping
    docs: Xen ARM DT bindings
    xen/arm: empty implementation of grant_table arch specific functions
    xen/arm: sync_bitops
    xen/arm: page.h definitions
    xen/arm: hypercalls
    ...

    Linus Torvalds
     

06 Oct, 2012

2 commits

  • This is a preparatory patch for the introduction of NT_SIGINFO elf note.

    Make the location of compat_siginfo_t uniform across eight architectures
    which have it. Now it can be pulled in by including asm/compat.h or
    linux/compat.h.

    Most of the copies are verbatim. compat_uid[32]_t had to be replaced by
    __compat_uid[32]_t. compat_uptr_t had to be moved up before
    compat_siginfo_t in asm/compat.h on a several architectures (tile already
    had it moved up). compat_sigval_t had to be relocated from linux/compat.h
    to asm/compat.h.

    Signed-off-by: Denys Vlasenko
    Cc: Oleg Nesterov
    Cc: Amerigo Wang
    Cc: "Jonathan M. Foote"
    Cc: Roland McGrath
    Cc: Pedro Alves
    Cc: Fengguang Wu
    Cc: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Denys Vlasenko
     
  • Signed-off-by: Andi Kleen
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     

05 Oct, 2012

1 commit

  • Pull KVM updates from Avi Kivity:
    "Highlights of the changes for this release include support for vfio
    level triggered interrupts, improved big real mode support on older
    Intels, a streamlines guest page table walker, guest APIC speedups,
    PIO optimizations, better overcommit handling, and read-only memory."

    * tag 'kvm-3.7-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (138 commits)
    KVM: s390: Fix vcpu_load handling in interrupt code
    KVM: x86: Fix guest debug across vcpu INIT reset
    KVM: Add resampling irqfds for level triggered interrupts
    KVM: optimize apic interrupt delivery
    KVM: MMU: Eliminate pointless temporary 'ac'
    KVM: MMU: Avoid access/dirty update loop if all is well
    KVM: MMU: Eliminate eperm temporary
    KVM: MMU: Optimize is_last_gpte()
    KVM: MMU: Simplify walk_addr_generic() loop
    KVM: MMU: Optimize pte permission checks
    KVM: MMU: Update accessed and dirty bits after guest pagetable walk
    KVM: MMU: Move gpte_access() out of paging_tmpl.h
    KVM: MMU: Optimize gpte_access() slightly
    KVM: MMU: Push clean gpte write protection out of gpte_access()
    KVM: clarify kvmclock documentation
    KVM: make processes waiting on vcpu mutex killable
    KVM: SVM: Make use of asm.h
    KVM: VMX: Make use of asm.h
    KVM: VMX: Make lto-friendly
    KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()
    ...

    Conflicts:
    arch/s390/include/asm/processor.h
    arch/x86/kvm/i8259.c

    Linus Torvalds
     

04 Oct, 2012

1 commit

  • Pull preparatory patches for user API disintegration from David Howells:
    "The patches herein prepare for the extraction of the Userspace API
    bits from the various header files named in the Kbuild files.

    New subdirectories are created under either include/uapi/ or
    arch/x/include/uapi/ that correspond to the subdirectory containing
    that file under include/ or arch/x/include/.

    The new subdirs under the uapi/ directory are populated with Kbuild
    files that mostly do nothing at this time. Further patches will
    disintegrate the headers in each original directory and fill in the
    Kbuild files as they do it.

    These patches also:

    (1) fix up #inclusions of "foo.h" rather than .

    (2) Remove some redundant #includes from the DRM code.

    (3) Make the kernel build infrastructure handle Kbuild files both in
    the old places and the new UAPI place that both specify headers
    to be exported.

    (4) Fix some kernel tools that #include kernel headers during their
    build.

    I have compile tested this with allyesconfig against x86_64,
    allmodconfig against i386 and a scattering of additional defconfigs of
    other arches. Prepared for main script

    Signed-off-by: David Howells
    Acked-by: Arnd Bergmann
    Acked-by: Thomas Gleixner
    Acked-by: Michael Kerrisk
    Acked-by: Paul E. McKenney
    Acked-by: Dave Jones
    Acked-by: H. Peter Anvin "

    * tag 'uapi-prep-20121002' of git://git.infradead.org/users/dhowells/linux-headers:
    UAPI: Plumb the UAPI Kbuilds into the user header installation and checking
    UAPI: x86: Differentiate the generated UAPI and internal headers
    UAPI: Remove the objhdr-y export list
    UAPI: Move linux/version.h
    UAPI: Set up uapi/asm/Kbuild.asm
    UAPI: x86: Fix insn_sanity build failure after UAPI split
    UAPI: x86: Fix the test_get_len tool
    UAPI: (Scripted) Set up UAPI Kbuild files
    UAPI: Partition the header include path sets and add uapi/ header directories
    UAPI: (Scripted) Convert #include "..." to #include in kernel system headers
    UAPI: (Scripted) Convert #include "..." to #include in drivers/gpu/
    UAPI: (Scripted) Remove redundant DRM UAPI header #inclusions from drivers/gpu/.
    UAPI: Refer to the DRM UAPI headers with and from certain headers only

    Linus Torvalds
     

03 Oct, 2012

6 commits

  • Pull Xen update from Konrad Rzeszutek Wilk:
    "Features:
    - When hotplugging PCI devices in a PV guest we can allocate
    Xen-SWIOTLB later.
    - Cleanup Xen SWIOTLB.
    - Support pages out grants from HVM domains in the backends.
    - Support wild cards in xen-pciback.hide=(BDF) arguments.
    - Update grant status updates with upstream hypervisor.
    - Boot PV guests with more than 128GB.
    - Cleanup Xen MMU code/add comments.
    - Obtain XENVERS using a preferred method.
    - Lay out generic changes to support Xen ARM.
    - Allow privcmd ioctl for HVM (used to do only PV).
    - Do v2 of mmap_batch for privcmd ioctls.
    - If hypervisor saves the LED keyboard light - we will now instruct
    the kernel about its state.
    Fixes:
    - More fixes to Xen PCI backend for various calls/FLR/etc.
    - With more than 4GB in a 64-bit PV guest disable native SWIOTLB.
    - Fix up smatch warnings.
    - Fix up various return values in privmcmd and mm."

    * tag 'stable/for-linus-3.7-x86-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (48 commits)
    xen/pciback: Restore the PCI config space after an FLR.
    xen-pciback: properly clean up after calling pcistub_device_find()
    xen/vga: add the xen EFI video mode support
    xen/x86: retrieve keyboard shift status flags from hypervisor.
    xen/gndev: Xen backend support for paged out grant targets V4.
    xen-pciback: support wild cards in slot specifications
    xen/swiotlb: Fix compile warnings when using plain integer instead of NULL pointer.
    xen/swiotlb: Remove functions not needed anymore.
    xen/pcifront: Use Xen-SWIOTLB when initting if required.
    xen/swiotlb: For early initialization, return zero on success.
    xen/swiotlb: Use the swiotlb_late_init_with_tbl to init Xen-SWIOTLB late when PV PCI is used.
    xen/swiotlb: Move the error strings to its own function.
    xen/swiotlb: Move the nr_tbl determination in its own function.
    xen/arm: compile and run xenbus
    xen: resynchronise grant table status codes with upstream
    xen/privcmd: return -EFAULT on error
    xen/privcmd: Fix mmap batch ioctl error status copy back.
    xen/privcmd: add PRIVCMD_MMAPBATCH_V2 ioctl
    xen/mm: return more precise error from xen_remap_domain_range()
    xen/mmu: If the revector fails, don't attempt to revector anything else.
    ...

    Linus Torvalds
     
  • Pull power management updates from Rafael J Wysocki:

    - Improved system suspend/resume and runtime PM handling for the SH
    TMU, CMT and MTU2 clock event devices (also used by ARM/shmobile).

    - Generic PM domains framework extensions related to cpuidle support
    and domain objects lookup using names.

    - ARM/shmobile power management updates including improved support for
    the SH7372's A4S power domain containing the CPU core.

    - cpufreq changes related to AMD CPUs support from Matthew Garrett,
    Andre Przywara and Borislav Petkov.

    - cpu0 cpufreq driver from Shawn Guo.

    - cpufreq governor fixes related to the relaxing of limit from Michal
    Pecio.

    - OMAP cpufreq updates from Axel Lin and Richard Zhao.

    - cpuidle ladder governor fixes related to the disabling of states from
    Carsten Emde and me.

    - Runtime PM core updates related to the interactions with the system
    suspend core from Alan Stern and Kevin Hilman.

    - Wakeup sources modification allowing more helper functions to be
    called from interrupt context from John Stultz and additional
    diagnostic code from Todd Poynor.

    - System suspend error code path fix from Feng Hong.

    Fixed up conflicts in cpufreq/powernow-k8 that stemmed from the
    workqueue fixes conflicting fairly badly with the removal of support for
    hardware P-state chips. The changes were independent but somewhat
    intertwined.

    * tag 'pm-for-3.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (76 commits)
    Revert "PM QoS: Use spinlock in the per-device PM QoS constraints code"
    PM / Runtime: let rpm_resume() succeed if RPM_ACTIVE, even when disabled, v2
    cpuidle: rename function name "__cpuidle_register_driver", v2
    cpufreq: OMAP: Check IS_ERR() instead of NULL for omap_device_get_by_hwmod_name
    cpuidle: remove some empty lines
    PM: Prevent runtime suspend during system resume
    PM QoS: Use spinlock in the per-device PM QoS constraints code
    PM / Sleep: use resume event when call dpm_resume_early
    cpuidle / ACPI : move cpuidle_device field out of the acpi_processor_power structure
    ACPI / processor: remove pointless variable initialization
    ACPI / processor: remove unused function parameter
    cpufreq: OMAP: remove loops_per_jiffy recalculate for smp
    sections: fix section conflicts in drivers/cpufreq
    cpufreq: conservative: update frequency when limits are relaxed
    cpufreq / ondemand: update frequency when limits are relaxed
    properly __init-annotate pm_sysrq_init()
    cpufreq: Add a generic cpufreq-cpu0 driver
    PM / OPP: Initialize OPP table from device tree
    ARM: add cpufreq transiton notifier to adjust loops_per_jiffy for smp
    cpufreq: Remove support for hardware P-state chips from powernow-k8
    ...

    Linus Torvalds
     
  • Plumb the UAPI Kbuilds into the user header installation and checking system.
    As the headers are split the entries will be transferred across from the old
    Kbuild files to the UAPI Kbuild files.

    The changes made in this commit are:

    (1) Exported generated files (of which there are currently four) are moved to
    uapi/ directories under the appropriate generated/ directory, thus we
    get:

    include/generated/uapi/linux/version.h
    arch/x86/include/generated/uapi/asm/unistd_32.h
    arch/x86/include/generated/uapi/asm/unistd_64.h
    arch/x86/include/generated/uapi/asm/unistd_x32.h

    These paths were added to the build as -I flags in a previous patch.

    (2) scripts/Makefile.headersinst is now given the UAPI path to install from
    rather than the old path.

    It then determines the old path from that and includes that Kbuild also
    if it exists, thus permitting the headers to exist in either directory
    during the changeover.

    I also renamed the "install" variable to "installdir" as it refers to a
    directory not the install program.

    (3) scripts/headers_install.pl is altered to take a list of source file paths
    instead of just their names so that the makefile can tell it exactly
    where to find each file.

    For the moment, files can be obtained from one of four places for each
    output directory:

    .../include/uapi/foo/
    .../include/generated/uapi/foo/
    .../include/foo/
    .../include/generated/foo/

    The non-UAPI paths will be dropped later.

    Signed-off-by: David Howells
    Acked-by: Arnd Bergmann
    Acked-by: Thomas Gleixner
    Acked-by: Paul E. McKenney
    Acked-by: Dave Jones

    David Howells
     
  • Set up empty UAPI Kbuild files to be populated by the header splitter.

    Signed-off-by: David Howells
    Acked-by: Arnd Bergmann
    Acked-by: Thomas Gleixner
    Acked-by: Paul E. McKenney
    Acked-by: Dave Jones

    David Howells
     
  • Partition the header include path flags into two sets, one for kernelspace
    builds and one for userspace builds.

    Add the following directories to build after the ordinary include directories
    so that #include will pick up the UAPI header directly if the kernel header
    has been moved there.

    The userspace set (represented by the USERINCLUDE make variable) contains:

    -I $(srctree)/arch/$(hdr-arch)/include/uapi
    -I arch/$(hdr-arch)/include/generated/uapi
    -I $(srctree)/include/uapi
    -I include/generated/uapi
    -include $(srctree)/include/linux/kconfig.h

    and the kernelspace set (represented by the LINUXINCLUDE make variable)
    contains:

    -I $(srctree)/arch/$(hdr-arch)/include
    -I arch/$(hdr-arch)/include/generated
    -I $(srctree)/include
    -I include --- if not building in the source tree

    plus everything in the USERINCLUDE set.

    Then use USERINCLUDE in building the x86 boot code.

    Signed-off-by: David Howells
    Acked-by: Arnd Bergmann
    Acked-by: Thomas Gleixner
    Acked-by: Paul E. McKenney
    Acked-by: Dave Jones

    David Howells
     
  • Convert #include "..." to #include in kernel system headers.

    Signed-off-by: David Howells
    Acked-by: Arnd Bergmann
    Acked-by: Thomas Gleixner
    Acked-by: Paul E. McKenney
    Acked-by: Dave Jones

    David Howells
     

02 Oct, 2012

12 commits

  • Pull x86/smap support from Ingo Molnar:
    "This adds support for the SMAP (Supervisor Mode Access Prevention) CPU
    feature on Intel CPUs: a hardware feature that prevents unintended
    user-space data access from kernel privileged code.

    It's turned on automatically when possible.

    This, in combination with SMEP, makes it even harder to exploit kernel
    bugs such as NULL pointer dereferences."

    Fix up trivial conflict in arch/x86/kernel/entry_64.S due to newly added
    includes right next to each other.

    * 'x86-smap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, smep, smap: Make the switching functions one-way
    x86, suspend: On wakeup always initialize cr4 and EFER
    x86-32: Start out eflags and cr4 clean
    x86, smap: Do not abuse the [f][x]rstor_checking() functions for user space
    x86-32, smap: Add STAC/CLAC instructions to 32-bit kernel entry
    x86, smap: Reduce the SMAP overhead for signal handling
    x86, smap: A page fault due to SMAP is an oops
    x86, smap: Turn on Supervisor Mode Access Prevention
    x86, smap: Add STAC and CLAC instructions to control user space access
    x86, uaccess: Merge prototypes for clear_user/__clear_user
    x86, smap: Add a header file with macros for STAC/CLAC
    x86, alternative: Add header guards to
    x86, alternative: Use .pushsection/.popsection
    x86, smap: Add CR4 bit for SMAP
    x86-32, mm: The WP test should be done on a kernel page

    Linus Torvalds
     
  • Pull x86/microcode changes from Ingo Molnar:
    "The biggest changes are to AMD microcode patching: add code for
    caching all microcode patches which belong to the current family on
    which we're running, in the kernel.

    We look up the patch needed for each core from the cache at
    patch-application time instead of holding a single patch per-system"

    * 'x86-microcode-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, microcode, AMD: Fix use after free in free_cache()
    x86, microcode, AMD: Rewrite patch application procedure
    x86, microcode, AMD: Add a small, per-family patches cache
    x86, microcode, AMD: Add reverse equiv table search
    x86, microcode: Add a refresh firmware flag to ->request_microcode_fw
    x86, microcode, AMD: Read CPUID(1).EAX on the correct cpu
    x86, microcode, AMD: Check before applying a patch
    x86, microcode, AMD: Remove useless get_ucode_data wrapper
    x86, microcode: Straighten out Kconfig text
    x86, microcode: Cleanup cpu hotplug notifier callback
    x86, microcode: Drop uci->mc check on resume path
    x86, microcode: Save an indentation level in reload_for_cpu

    Linus Torvalds
     
  • Pull x86/platform changes from Ingo Molnar:
    "This cleans up some Xen-induced pagetable init code uglies, by
    generalizing new platform callbacks and state: x86_init.paging.*"

    * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86: Document x86_init.paging.pagetable_init()
    x86: xen: Cleanup and remove x86_init.paging.pagetable_setup_done()
    x86: Move paging_init() call to x86_init.paging.pagetable_init()
    x86: Rename pagetable_setup_start() to pagetable_init()
    x86: Remove base argument from x86_init.paging.pagetable_setup_start

    Linus Torvalds
     
  • Pull x86/mm changes from Ingo Molnar:
    "The biggest change is new TLB partial flushing code for AMD CPUs.
    (The v3.6 kernel had the Intel CPU side code, see commits
    e0ba94f14f74..effee4b9b3b.)

    There's also various other refinements around the TLB flush code"

    * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86: Distinguish TLB shootdown interrupts from other functions call interrupts
    x86/mm: Fix range check in tlbflush debugfs interface
    x86, cpu: Preset default tlb_flushall_shift on AMD
    x86, cpu: Add AMD TLB size detection
    x86, cpu: Push TLB detection CPUID check down
    x86, cpu: Fixup tlb_flushall_shift formatting

    Linus Torvalds
     
  • Pull x86/MCE update from Ingo Molnar:
    "Various MCE robustness enhancements.

    One of the changes adds CMCI (Corrected Machine Check Interrupt) poll
    mode on Intel Nehalem+ CPUs, which mode is automatically entered when
    the rate of messages is too high - and exited once the storm is over.

    An MCE events storm will roughly look like this:

    [ 5342.740616] mce: [Hardware Error]: Machine check events logged
    [ 5342.746501] mce: [Hardware Error]: Machine check events logged
    [ 5342.757971] CMCI storm detected: switching to poll mode
    [ 5372.674957] CMCI storm subsided: switching to interrupt mode

    This should make such events more survivable"

    * 'x86-mce-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/mce: Provide boot argument to honour bios-set CMCI threshold
    x86, MCE: Remove unused defines
    x86, mce: Enable MCA support by default
    x86/mce: Add CMCI poll mode
    x86/mce: Make cmci_discover() quiet
    x86: mce: Remove the frozen cases in the hotplug code
    x86: mce: Split timer init
    x86: mce: Serialize mce injection
    x86: mce: Disable preemption when calling raise_local()

    Linus Torvalds
     
  • Pull x86/fpu update from Ingo Molnar:
    "The biggest change is the addition of the non-lazy (eager) FPU saving
    support model and enabling it on CPUs with optimized xsaveopt/xrstor
    FPU state saving instructions.

    There are also various Sparse fixes"

    Fix up trivial add-add conflict in arch/x86/kernel/traps.c

    * 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, kvm: fix kvm's usage of kernel_fpu_begin/end()
    x86, fpu: remove cpu_has_xmm check in the fx_finit()
    x86, fpu: make eagerfpu= boot param tri-state
    x86, fpu: enable eagerfpu by default for xsaveopt
    x86, fpu: decouple non-lazy/eager fpu restore from xsave
    x86, fpu: use non-lazy fpu restore for processors supporting xsave
    lguest, x86: handle guest TS bit for lazy/non-lazy fpu host models
    x86, fpu: always use kernel_fpu_begin/end() for in-kernel FPU usage
    x86, kvm: use kernel_fpu_begin/end() in kvm_load/put_guest_fpu()
    x86, fpu: remove unnecessary user_fpu_end() in save_xstate_sig()
    x86, fpu: drop_fpu() before restoring new state from sigframe
    x86, fpu: Unify signal handling code paths for x86 and x86_64 kernels
    x86, fpu: Consolidate inline asm routines for saving/restoring fpu state
    x86, signal: Cleanup ifdefs and is_ia32, is_x32

    Linus Torvalds
     
  • Pull x86 debug update from Ingo Molnar:
    "Various small enhancements"

    * 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86/debug: Dump family, model, stepping of the boot CPU
    x86/iommu: Use NULL instead of plain 0 for __IOMMU_INIT
    x86/iommu: Drop duplicate const in __IOMMU_INIT
    x86/fpu/xsave: Keep __user annotation in casts
    x86/pci/probe_roms: Add missing __iomem annotation to pci_map_biosrom()
    x86/signals: ia32_signal.c: add __user casts to fix sparse warnings
    x86/vdso: Add __user annotation to VDSO32_SYMBOL
    x86: Fix __user annotations in asm/sys_ia32.h

    Linus Torvalds
     
  • …ernel.org/pub/scm/linux/kernel/git/tip/tip

    Pull x86/cpu and x86/cpufeature from Ingo Molnar:
    "One tiny cleanup, and prepare for SMAP (Supervisor Mode Access
    Prevention) support on x86"

    * 'x86-cpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86: Remove the useless branch in c_start()

    * 'x86-cpufeature-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86, cpufeature: Add feature bit for SMAP

    Linus Torvalds
     
  • Pull x86/asm changes from Ingo Molnar:
    "The one change that stands out is the alternatives patching change
    that prevents us from ever patching back instructions from SMP to UP:
    this simplifies things and speeds up CPU hotplug.

    Other than that it's smaller fixes, cleanups and improvements."

    * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    x86: Unspaghettize do_trap()
    x86_64: Work around old GAS bug
    x86: Use REP BSF unconditionally
    x86: Prefer TZCNT over BFS
    x86/64: Adjust types of temporaries used by ffs()/fls()/fls64()
    x86: Drop unnecessary kernel_eflags variable on 64-bit
    x86/smp: Don't ever patch back to UP if we unplug cpus

    Linus Torvalds
     
  • Pull perf update from Ingo Molnar:
    "Lots of changes in this cycle as well, with hundreds of commits from
    over 30 contributors. Most of the activity was on the tooling side.

    Higher level changes:

    - New 'perf kvm' analysis tool, from Xiao Guangrong.

    - New 'perf trace' system-wide tracing tool

    - uprobes fixes + cleanups from Oleg Nesterov.

    - Lots of patches to make perf build on Android out of box, from
    Irina Tirdea

    - Extend ftrace function tracing utility to be more dynamic for its
    users. It allows for data passing to the callback functions, as
    well as reading regs as if a breakpoint were to trigger at function
    entry.

    The main goal of this patch series was to allow kprobes to use
    ftrace as an optimized probe point when a probe is placed on an
    ftrace nop. With lots of help from Masami Hiramatsu, and going
    through lots of iterations, we finally came up with a good
    solution.

    - Add cpumask for uncore pmu, use it in 'stat', from Yan, Zheng.

    - Various tracing updates from Steve Rostedt

    - Clean up and improve 'perf sched' performance by elliminating lots
    of needless calls to libtraceevent.

    - Event group parsing support, from Jiri Olsa

    - UI/gtk refactorings and improvements from Namhyung Kim

    - Add support for non-tracepoint events in perf script python, from
    Feng Tang

    - Add --symbols to 'script', similar to the one in 'report', from
    Feng Tang.

    Infrastructure enhancements and fixes:

    - Convert the trace builtins to use the growing evsel/evlist
    tracepoint infrastructure, removing several open coded constructs
    like switch like series of strcmp to dispatch events, etc.
    Basically what had already been showcased in 'perf sched'.

    - Add evsel constructor for tracepoints, that uses libtraceevent just
    to parse the /format events file, use it in a new 'perf test' to
    make sure the libtraceevent format parsing regressions can be more
    readily caught.

    - Some strange errors were happening in some builds, but not on the
    next, reported by several people, problem was some parser related
    files, generated during the build, didn't had proper make deps, fix
    from Eric Sandeen.

    - Introduce struct and cache information about the environment where
    a perf.data file was captured, from Namhyung Kim.

    - Fix handling of unresolved samples when --symbols is used in
    'report', from Feng Tang.

    - Add union member access support to 'probe', from Hyeoncheol Lee.

    - Fixups to die() removal, from Namhyung Kim.

    - Render fixes for the TUI, from Namhyung Kim.

    - Don't enable annotation in non symbolic view, from Namhyung Kim.

    - Fix pipe mode in 'report', from Namhyung Kim.

    - Move related stats code from stat to util/, will be used by the
    'stat' kvm tool, from Xiao Guangrong.

    - Remove die()/exit() calls from several tools.

    - Resolve vdso callchains, from Jiri Olsa

    - Don't pass const char pointers to basename, so that we can
    unconditionally use libgen.h and thus avoid ifdef BIONIC lines,
    from David Ahern

    - Refactor hist formatting so that it can be reused with the GTK
    browser, From Namhyung Kim

    - Fix build for another rbtree.c change, from Adrian Hunter.

    - Make 'perf diff' command work with evsel hists, from Jiri Olsa.

    - Use the only field_sep var that is set up: symbol_conf.field_sep,
    fix from Jiri Olsa.

    - .gitignore compiled python binaries, from Namhyung Kim.

    - Get rid of die() in more libtraceevent places, from Namhyung Kim.

    - Rename libtraceevent 'private' struct member to 'priv' so that it
    works in C++, from Steven Rostedt

    - Remove lots of exit()/die() calls from tools so that the main perf
    exit routine can take place, from David Ahern

    - Fix x86 build on x86-64, from David Ahern.

    - {int,str,rb}list fixes from Suzuki K Poulose

    - perf.data header fixes from Namhyung Kim

    - Allow user to indicate objdump path, needed in cross environments,
    from Maciek Borzecki

    - Fix hardware cache event name generation, fix from Jiri Olsa

    - Add round trip test for sw, hw and cache event names, catching the
    problem Jiri fixed, after Jiri's patch, the test passes
    successfully.

    - Clean target should do clean for lib/traceevent too, fix from David
    Ahern

    - Check the right variable for allocation failure, fix from Namhyung
    Kim

    - Set up evsel->tp_format regardless of evsel->name being set
    already, fix from Namhyung Kim

    - Oprofile fixes from Robert Richter.

    - Remove perf_event_attr needless version inflation, from Jiri Olsa

    - Introduce libtraceevent strerror like error reporting facility,
    from Namhyung Kim

    - Add pmu mappings to perf.data header and use event names from cmd
    line, from Robert Richter

    - Fix include order for bison/flex-generated C files, from Ben
    Hutchings

    - Build fixes and documentation corrections from David Ahern

    - Assorted cleanups from Robert Richter

    - Let O= makes handle relative paths, from Steven Rostedt

    - perf script python fixes, from Feng Tang.

    - Initial bash completion support, from Frederic Weisbecker

    - Allow building without libelf, from Namhyung Kim.

    - Support DWARF CFI based unwind to have callchains when %bp based
    unwinding is not possible, from Jiri Olsa.

    - Symbol resolution fixes, while fixing support PPC64 files with an
    .opt ELF section was the end goal, several fixes for code that
    handles all architectures and cleanups are included, from Cody
    Schafer.

    - Assorted fixes for Documentation and build in 32 bit, from Robert
    Richter

    - Cache the libtraceevent event_format associated to each evsel
    early, so that we avoid relookups, i.e. calling pevent_find_event
    repeatedly when processing tracepoint events.

    [ This is to reduce the surface contact with libtraceevents and
    make clear what is that the perf tools needs from that lib: so
    far parsing the common and per event fields. ]

    - Don't stop the build if the audit libraries are not installed, fix
    from Namhyung Kim.

    - Fix bfd.h/libbfd detection with recent binutils, from Markus
    Trippelsdorf.

    - Improve warning message when libunwind devel packages not present,
    from Jiri Olsa"

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (282 commits)
    perf trace: Add aliases for some syscalls
    perf probe: Print an enum type variable in "enum variable-name" format when showing accessible variables
    perf tools: Check libaudit availability for perf-trace builtin
    perf hists: Add missing period_* fields when collapsing a hist entry
    perf trace: New tool
    perf evsel: Export the event_format constructor
    perf evsel: Introduce rawptr() method
    perf tools: Use perf_evsel__newtp in the event parser
    perf evsel: The tracepoint constructor should store sys:name
    perf evlist: Introduce set_filter() method
    perf evlist: Renane set_filters method to apply_filters
    perf test: Add test to check we correctly parse and match syscall open parms
    perf evsel: Handle endianity in intval method
    perf evsel: Know if byte swap is needed
    perf tools: Allow handling a NULL cpu_map as meaning "all cpus"
    perf evsel: Improve tracepoint constructor setup
    tools lib traceevent: Fix error path on pevent_parse_event
    perf test: Fix build failure
    trace: Move trace event enable from fs_initcall to core_initcall
    tracing: Add an option for disabling markers
    ...

    Linus Torvalds
     
  • Pull RCU changes from Ingo Molnar:

    0. 'idle RCU':

    Adds RCU APIs that allow non-idle tasks to enter RCU idle mode and
    provides x86 code to make use of them, allowing RCU to treat
    user-mode execution as an extended quiescent state when the new
    RCU_USER_QS kernel configuration parameter is specified. (Work is
    in progress to port this to a few other architectures, but is not
    part of this series.)

    1. A fix for a latent bug that has been in RCU ever since the addition
    of CPU stall warnings. This bug results in false-positive stall
    warnings, but thus far only on embedded systems with severely
    cut-down userspace configurations.

    2. Further reductions in latency spikes for huge systems, along with
    additional boot-time adaptation to the actual hardware.

    This is a large change, as it moves RCU grace-period initialization
    and cleanup, along with quiescent-state forcing, from softirq to a
    kthread. However, it appears to be in quite good shape (famous
    last words).

    3. Updates to documentation and rcutorture, the latter category
    including keeping statistics on CPU-hotplug latencies and fixing
    some initialization-time races.

    4. CPU-hotplug fixes and improvements.

    5. Idle-loop fixes that were omitted on an earlier submission.

    6. Miscellaneous fixes and improvements

    In certain RCU configurations new kernel threads will show up (rcu_bh,
    rcu_sched), showing RCU processing overhead.

    * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (90 commits)
    rcu: Apply micro-optimization and int/bool fixes to RCU's idle handling
    rcu: Userspace RCU extended QS selftest
    x86: Exit RCU extended QS on notify resume
    x86: Use the new schedule_user API on userspace preemption
    rcu: Exit RCU extended QS on user preemption
    rcu: Exit RCU extended QS on kernel preemption after irq/exception
    x86: Exception hooks for userspace RCU extended QS
    x86: Unspaghettize do_general_protection()
    x86: Syscall hooks for userspace RCU extended QS
    rcu: Switch task's syscall hooks on context switch
    rcu: Ignore userspace extended quiescent state by default
    rcu: Allow rcu_user_enter()/exit() to nest
    rcu: Settle config for userspace extended quiescent state
    rcu: Make RCU_FAST_NO_HZ handle adaptive ticks
    rcu: New rcu_user_enter_after_irq() and rcu_user_exit_after_irq() APIs
    rcu: New rcu_user_enter() and rcu_user_exit() APIs
    ia64: Add missing RCU idle APIs on idle loop
    xtensa: Add missing RCU idle APIs on idle loop
    score: Add missing RCU idle APIs on idle loop
    parisc: Add missing RCU idle APIs on idle loop
    ...

    Linus Torvalds
     
  • Pull the trivial tree from Jiri Kosina:
    "Tiny usual fixes all over the place"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
    doc: fix old config name of kprobetrace
    fs/fs-writeback.c: cleanup riteback_sb_inodes kerneldoc
    btrfs: fix the commment for the action flags in delayed-ref.h
    btrfs: fix trivial typo for the comment of BTRFS_FREE_INO_OBJECTID
    vfs: fix kerneldoc for generic_fh_to_parent()
    treewide: fix comment/printk/variable typos
    ipr: fix small coding style issues
    doc: fix broken utf8 encoding
    nfs: comment fix
    platform/x86: fix asus_laptop.wled_type module parameter
    mfd: printk/comment fixes
    doc: getdelays.c: remember to close() socket on error in create_nl_socket()
    doc: aliasing-test: close fd on write error
    mmc: fix comment typos
    dma: fix comments
    spi: fix comment/printk typos in spi
    Coccinelle: fix typo in memdup_user.cocci
    tmiofb: missing NULL pointer checks
    tools: perf: Fix typo in tools/perf
    tools/testing: fix comment / output typos
    ...

    Linus Torvalds
     

28 Sep, 2012

2 commits

  • As TLB shootdown requests to other CPU cores are now using function call
    interrupts, TLB shootdowns entry in /proc/interrupts is always shown as 0.

    This behavior change was introduced by commit 52aec3308db8 ("x86/tlb:
    replace INVALIDATE_TLB_VECTOR by CALL_FUNCTION_VECTOR").

    This patch reverts TLB shootdowns entry in /proc/interrupts to count TLB
    shootdowns separately from the other function call interrupts.

    Signed-off-by: Tomoki Sekiyama
    Link: http://lkml.kernel.org/r/20120926021128.22212.20440.stgit@hpxw
    Acked-by: Alex Shi
    Signed-off-by: H. Peter Anvin

    Tomoki Sekiyama
     
  • The ACPI spec doesn't provide for a way for the bios to pass down
    recommended thresholds to the OS on a _per-bank_ basis. This patch adds
    a new boot option, which if passed, tells Linux to use CMCI thresholds
    set by the bios.

    As fail-safe, we initialize threshold to 1 if some banks have not been
    initialized by the bios and warn the user.

    Signed-off-by: Naveen N. Rao
    Signed-off-by: Tony Luck

    Naveen N. Rao
     

27 Sep, 2012

1 commit

  • …x-pvhvm into stable/for-linus-3.7

    * 'xenarm-for-linus' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm:
    arm: introduce a DTS for Xen unprivileged virtual machines
    MAINTAINERS: add myself as Xen ARM maintainer
    xen/arm: compile netback
    xen/arm: compile blkfront and blkback
    xen/arm: implement alloc/free_xenballooned_pages with alloc_pages/kfree
    xen/arm: receive Xen events on ARM
    xen/arm: initialize grant_table on ARM
    xen/arm: get privilege status
    xen/arm: introduce CONFIG_XEN on ARM
    xen: do not compile manage, balloon, pci, acpi, pcpu and cpu_hotplug on ARM
    xen/arm: Introduce xen_ulong_t for unsigned long
    xen/arm: Xen detection and shared_info page mapping
    docs: Xen ARM DT bindings
    xen/arm: empty implementation of grant_table arch specific functions
    xen/arm: sync_bitops
    xen/arm: page.h definitions
    xen/arm: hypercalls
    arm: initial Xen support

    Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

    Konrad Rzeszutek Wilk
     

26 Sep, 2012

5 commits

  • This way we can exit the RCU extended quiescent state before
    we schedule a new task from irq/exception exit.

    Signed-off-by: Frederic Weisbecker
    Cc: Alessio Igor Bogani
    Cc: Andrew Morton
    Cc: Avi Kivity
    Cc: Chris Metcalf
    Cc: Christoph Lameter
    Cc: Geoff Levand
    Cc: Gilad Ben Yossef
    Cc: Hakan Akkan
    Cc: H. Peter Anvin
    Cc: Ingo Molnar
    Cc: Josh Triplett
    Cc: Kevin Hilman
    Cc: Max Krasnyansky
    Cc: Peter Zijlstra
    Cc: Stephen Hemminger
    Cc: Steven Rostedt
    Cc: Sven-Thorsten Dietrich
    Cc: Thomas Gleixner
    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett

    Frederic Weisbecker
     
  • Add necessary hooks to x86 exception for userspace
    RCU extended quiescent state support.

    This includes traps, page fault, debug exceptions, etc...

    Signed-off-by: Frederic Weisbecker
    Cc: Alessio Igor Bogani
    Cc: Andrew Morton
    Cc: Avi Kivity
    Cc: Chris Metcalf
    Cc: Christoph Lameter
    Cc: Geoff Levand
    Cc: Gilad Ben Yossef
    Cc: Hakan Akkan
    Cc: H. Peter Anvin
    Cc: Ingo Molnar
    Cc: Josh Triplett
    Cc: Kevin Hilman
    Cc: Max Krasnyansky
    Cc: Peter Zijlstra
    Cc: Stephen Hemminger
    Cc: Steven Rostedt
    Cc: Sven-Thorsten Dietrich
    Cc: Thomas Gleixner
    Signed-off-by: Paul E. McKenney

    Frederic Weisbecker
     
  • Add syscall slow path hooks to notify syscall entry
    and exit on CPUs that want to support userspace RCU
    extended quiescent state.

    Signed-off-by: Frederic Weisbecker
    Cc: Alessio Igor Bogani
    Cc: Andrew Morton
    Cc: Avi Kivity
    Cc: Chris Metcalf
    Cc: Christoph Lameter
    Cc: Geoff Levand
    Cc: Gilad Ben Yossef
    Cc: Hakan Akkan
    Cc: H. Peter Anvin
    Cc: Ingo Molnar
    Cc: Josh Triplett
    Cc: Kevin Hilman
    Cc: Max Krasnyansky
    Cc: Peter Zijlstra
    Cc: Stephen Hemminger
    Cc: Steven Rostedt
    Cc: Sven-Thorsten Dietrich
    Cc: Thomas Gleixner
    Signed-off-by: Paul E. McKenney
    Reviewed-by: Josh Triplett

    Frederic Weisbecker
     
  • GAS in binutils(2.16.91) could not parse parentheses within
    macro parameters unless fully parenthesized, and this is a
    workaround to make old gas work without generating below errors:

    arch/x86/kernel/entry_64.S: Assembler messages:
    arch/x86/kernel/entry_64.S:387: Error: too many positional arguments
    arch/x86/kernel/entry_64.S:389: Error: too many positional arguments
    [...]

    Signed-off-by: Tao Guo
    Reluctantly-Acked-by: Jan Beulich
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Link: http://lkml.kernel.org/r/1348648102-12653-1-git-send-email-glorioustao@gmail.com
    [ Jan argues that these old GAS versions are fragile - which is so, but lets give them a chance. ]
    Signed-off-by: Ingo Molnar

    Tao Guo
     
  • With SMAP, the [f][x]rstor_checking() functions are no longer usable
    for user-space pointers by applying a simple __force cast. Instead,
    create new [f][x]rstor_user() functions which do the proper SMAP
    magic.

    Signed-off-by: H. Peter Anvin
    Cc: Suresh Siddha
    Link: http://lkml.kernel.org/r/1343171129-2747-3-git-send-email-suresh.b.siddha@intel.com

    H. Peter Anvin
     

23 Sep, 2012

2 commits

  • If we reset a vcpu on INIT, we so far overwrote dr7 as provided by
    KVM_SET_GUEST_DEBUG, and we also cleared switch_db_regs unconditionally.

    Fix this by saving the dr7 used for guest debugging and calculating the
    effective register value as well as switch_db_regs on any potential
    change. This will change to focus of the set_guest_debug vendor op to
    update_dp_bp_intercept.

    Found while trying to stop on start_secondary.

    Signed-off-by: Jan Kiszka
    Signed-off-by: Avi Kivity

    Jan Kiszka
     
  • * stable/late-swiotlb.v3.3:
    xen/swiotlb: Fix compile warnings when using plain integer instead of NULL pointer.
    xen/swiotlb: Remove functions not needed anymore.
    xen/pcifront: Use Xen-SWIOTLB when initting if required.
    xen/swiotlb: For early initialization, return zero on success.
    xen/swiotlb: Use the swiotlb_late_init_with_tbl to init Xen-SWIOTLB late when PV PCI is used.
    xen/swiotlb: Move the error strings to its own function.
    xen/swiotlb: Move the nr_tbl determination in its own function.
    swiotlb: add the late swiotlb initialization function with iotlb memory
    xen/swiotlb: With more than 4GB on 64-bit, disable the native SWIOTLB.
    xen/swiotlb: Simplify the logic.

    Conflicts:
    arch/x86/xen/pci-swiotlb-xen.c

    Signed-off-by: Konrad Rzeszutek Wilk

    Konrad Rzeszutek Wilk
     

22 Sep, 2012

7 commits

  • Reason for merge:
    x86/fpu changed the structure of some of the code that x86/smap
    changes; mostly fpu-internal.h but also minor changes to the
    signal code.

    Signed-off-by: H. Peter Anvin

    Resolved Conflicts:
    arch/x86/ia32/ia32_signal.c
    arch/x86/include/asm/fpu-internal.h
    arch/x86/kernel/signal.c

    H. Peter Anvin
     
  • Preemption is disabled between kernel_fpu_begin/end() and as such
    it is not a good idea to use these routines in kvm_load/put_guest_fpu()
    which can be very far apart.

    kvm_load/put_guest_fpu() routines are already called with
    preemption disabled and KVM already uses the preempt notifier to save
    the guest fpu state using kvm_put_guest_fpu().

    So introduce __kernel_fpu_begin/end() routines which don't touch
    preemption and use them instead of kernel_fpu_begin/end()
    for KVM's use model of saving/restoring guest FPU state.

    Also with this change (and with eagerFPU model), fix the host cr0.TS vm-exit
    state in the case of VMX. For eagerFPU case, host cr0.TS is always clear.
    So no need to worry about it. For the traditional lazyFPU restore case,
    change the cr0.TS bit for the host state during vm-exit to be always clear
    and cr0.TS bit is set in the __vmx_load_host_state() when the FPU
    (guest FPU or the host task's FPU) state is not active. This ensures
    that the host/guest FPU state is properly saved, restored
    during context-switch and with interrupts (using irq_fpu_usable()) not
    stomping on the active FPU state.

    Signed-off-by: Suresh Siddha
    Link: http://lkml.kernel.org/r/1348164109.26695.338.camel@sbsiddha-desk.sc.intel.com
    Cc: Avi Kivity
    Signed-off-by: H. Peter Anvin

    Suresh Siddha
     
  • Signal handling contains a bunch of accesses to individual user space
    items, which causes an excessive number of STAC and CLAC
    instructions. Instead, let get/put_user_try ... get/put_user_catch()
    contain the STAC and CLAC instructions.

    This means that get/put_user_try no longer nests, and furthermore that
    it is no longer legal to use user space access functions other than
    __get/put_user_ex() inside those blocks. However, these macros are
    x86-specific anyway and are only used in the signal-handling paths; a
    simple reordering of moving the larger subroutine calls out of the
    try...catch blocks resolves that problem.

    Signed-off-by: H. Peter Anvin
    Link: http://lkml.kernel.org/r/1348256595-29119-12-git-send-email-hpa@linux.intel.com

    H. Peter Anvin
     
  • When Supervisor Mode Access Prevention (SMAP) is enabled, access to
    userspace from the kernel is controlled by the AC flag. To make the
    performance of manipulating that flag acceptable, there are two new
    instructions, STAC and CLAC, to set and clear it.

    This patch adds those instructions, via alternative(), when the SMAP
    feature is enabled. It also adds X86_EFLAGS_AC unconditionally to the
    SYSCALL entry mask; there is simply no reason to make that one
    conditional.

    Signed-off-by: H. Peter Anvin
    Link: http://lkml.kernel.org/r/1348256595-29119-9-git-send-email-hpa@linux.intel.com

    H. Peter Anvin
     
  • The prototypes for clear_user() and __clear_user() are identical in
    the 32- and 64-bit headers. No functionality change.

    Signed-off-by: H. Peter Anvin
    Link: http://lkml.kernel.org/r/1348256595-29119-8-git-send-email-hpa@linux.intel.com

    H. Peter Anvin
     
  • The STAC/CLAC instructions are only available with SMAP, but on the
    other hand they aren't needed if SMAP is not available, or before we
    start to run userspace, so construct them as alternatives which start
    out as noops and are enabled by the alternatives mechanism.

    Signed-off-by: H. Peter Anvin
    Link: http://lkml.kernel.org/r/1348256595-29119-7-git-send-email-hpa@linux.intel.com

    H. Peter Anvin
     
  • Add header guards to protect against multiple
    inclusion.

    Signed-off-by: H. Peter Anvin
    Link: http://lkml.kernel.org/r/1348256595-29119-6-git-send-email-hpa@linux.intel.com

    H. Peter Anvin