1. 05 2月, 2015 1 次提交
  2. 31 1月, 2015 1 次提交
  3. 30 1月, 2015 6 次提交
    • R
      KVM: x86: check LAPIC presence when building apic_map · df04d1d1
      Radim Krčmář 提交于
      We forgot to re-check LAPIC after splitting the loop in commit
      173beedc (KVM: x86: Software disabled APIC should still deliver
      NMIs, 2014-11-02).
      Signed-off-by: NRadim Krčmář <rkrcmar@redhat.com>
      Fixes: 173beedcSigned-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      df04d1d1
    • M
      arm/arm64: KVM: Use kernel mapping to perform invalidation on page fault · 0d3e4d4f
      Marc Zyngier 提交于
      When handling a fault in stage-2, we need to resync I$ and D$, just
      to be sure we don't leave any old cache line behind.
      
      That's very good, except that we do so using the *user* address.
      Under heavy load (swapping like crazy), we may end up in a situation
      where the page gets mapped in stage-2 while being unmapped from
      userspace by another CPU.
      
      At that point, the DC/IC instructions can generate a fault, which
      we handle with kvm->mmu_lock held. The box quickly deadlocks, user
      is unhappy.
      
      Instead, perform this invalidation through the kernel mapping,
      which is guaranteed to be present. The box is much happier, and so
      am I.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      0d3e4d4f
    • M
      arm/arm64: KVM: Invalidate data cache on unmap · 363ef89f
      Marc Zyngier 提交于
      Let's assume a guest has created an uncached mapping, and written
      to that page. Let's also assume that the host uses a cache-coherent
      IO subsystem. Let's finally assume that the host is under memory
      pressure and starts to swap things out.
      
      Before this "uncached" page is evicted, we need to make sure
      we invalidate potential speculated, clean cache lines that are
      sitting there, or the IO subsystem is going to swap out the
      cached view, loosing the data that has been written directly
      into memory.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      363ef89f
    • M
      arm/arm64: KVM: Use set/way op trapping to track the state of the caches · 3c1e7165
      Marc Zyngier 提交于
      Trying to emulate the behaviour of set/way cache ops is fairly
      pointless, as there are too many ways we can end-up missing stuff.
      Also, there is some system caches out there that simply ignore
      set/way operations.
      
      So instead of trying to implement them, let's convert it to VA ops,
      and use them as a way to re-enable the trapping of VM ops. That way,
      we can detect the point when the MMU/caches are turned off, and do
      a full VM flush (which is what the guest was trying to do anyway).
      
      This allows a 32bit zImage to boot on the APM thingy, and will
      probably help bootloaders in general.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      3c1e7165
    • L
      arm: dma-mapping: Set DMA IOMMU ops in arm_iommu_attach_device() · eab8d653
      Laurent Pinchart 提交于
      Commit 4bb25789 ("arm: dma-mapping: plumb our iommu mapping ops
      into arch_setup_dma_ops") moved the setting of the DMA operations from
      arm_iommu_attach_device() to arch_setup_dma_ops() where the DMA
      operations to be used are selected based on whether the device is
      connected to an IOMMU. However, the IOMMU detection scheme requires the
      IOMMU driver to be ported to the new IOMMU of_xlate API. As no driver
      has been ported yet, this effectively breaks all IOMMU ARM users that
      depend on the IOMMU being handled transparently by the DMA mapping API.
      
      Fix this by restoring the setting of DMA IOMMU ops in
      arm_iommu_attach_device() and splitting the rest of the function into a
      new internal __arm_iommu_attach_device() function, called by
      arch_setup_dma_ops().
      Signed-off-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Tested-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      eab8d653
    • L
      vm: add VM_FAULT_SIGSEGV handling support · 33692f27
      Linus Torvalds 提交于
      The core VM already knows about VM_FAULT_SIGBUS, but cannot return a
      "you should SIGSEGV" error, because the SIGSEGV case was generally
      handled by the caller - usually the architecture fault handler.
      
      That results in lots of duplication - all the architecture fault
      handlers end up doing very similar "look up vma, check permissions, do
      retries etc" - but it generally works.  However, there are cases where
      the VM actually wants to SIGSEGV, and applications _expect_ SIGSEGV.
      
      In particular, when accessing the stack guard page, libsigsegv expects a
      SIGSEGV.  And it usually got one, because the stack growth is handled by
      that duplicated architecture fault handler.
      
      However, when the generic VM layer started propagating the error return
      from the stack expansion in commit fee7e49d ("mm: propagate error
      from stack expansion even for guard page"), that now exposed the
      existing VM_FAULT_SIGBUS result to user space.  And user space really
      expected SIGSEGV, not SIGBUS.
      
      To fix that case, we need to add a VM_FAULT_SIGSEGV, and teach all those
      duplicate architecture fault handlers about it.  They all already have
      the code to handle SIGSEGV, so it's about just tying that new return
      value to the existing code, but it's all a bit annoying.
      
      This is the mindless minimal patch to do this.  A more extensive patch
      would be to try to gather up the mostly shared fault handling logic into
      one generic helper routine, and long-term we really should do that
      cleanup.
      
      Just from this patch, you can generally see that most architectures just
      copied (directly or indirectly) the old x86 way of doing things, but in
      the meantime that original x86 model has been improved to hold the VM
      semaphore for shorter times etc and to handle VM_FAULT_RETRY and other
      "newer" things, so it would be a good idea to bring all those
      improvements to the generic case and teach other architectures about
      them too.
      Reported-and-tested-by: NTakashi Iwai <tiwai@suse.de>
      Tested-by: NJan Engelhardt <jengelh@inai.de>
      Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> # "s390 still compiles and boots"
      Cc: linux-arch@vger.kernel.org
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      33692f27
  4. 29 1月, 2015 3 次提交
  5. 28 1月, 2015 3 次提交
  6. 27 1月, 2015 1 次提交
  7. 26 1月, 2015 2 次提交
    • L
      ACPICA: Resources: Provide common part for struct acpi_resource_address structures. · a45de93e
      Lv Zheng 提交于
      struct acpi_resource_address and struct acpi_resource_extended_address64 share substracts
      just at different offsets. To unify the parsing functions, OSPMs like Linux
      need a new ACPI_ADDRESS64_ATTRIBUTE as their substructs, so they can
      extract the shared data.
      
      This patch also synchronizes the structure changes to the Linux kernel.
      The usages are searched by matching the following keywords:
      1. acpi_resource_address
      2. acpi_resource_extended_address
      3. ACPI_RESOURCE_TYPE_ADDRESS
      4. ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS
      And we found and fixed the usages in the following files:
       arch/ia64/kernel/acpi-ext.c
       arch/ia64/pci/pci.c
       arch/x86/pci/acpi.c
       arch/x86/pci/mmconfig-shared.c
       drivers/xen/xen-acpi-memhotplug.c
       drivers/acpi/acpi_memhotplug.c
       drivers/acpi/pci_root.c
       drivers/acpi/resource.c
       drivers/char/hpet.c
       drivers/pnp/pnpacpi/rsparser.c
       drivers/hv/vmbus_drv.c
      
      Build tests are passed with defconfig/allnoconfig/allyesconfig and
      defconfig+CONFIG_ACPI=n.
      Original-by: NThomas Gleixner <tglx@linutronix.de>
      Original-by: NJiang Liu <jiang.liu@linux.intel.com>
      Signed-off-by: NLv Zheng <lv.zheng@intel.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      a45de93e
    • M
      ARM: sunxi: dt: Fix aliases · 117a2cc3
      Maxime Ripard 提交于
      Commit f77d55a3 ("serial: 8250_dw: get index of serial line from DT
      aliases") made the serial driver now use the serial aliases to get the tty
      number, pointing out that our aliases have been wrong all along.
      
      Remove them from the DTSI and add custom ones in the relevant boards.
      Signed-off-by: NMaxime Ripard <maxime.ripard@free-electrons.com>
      117a2cc3
  8. 25 1月, 2015 1 次提交
  9. 24 1月, 2015 1 次提交
  10. 23 1月, 2015 10 次提交
  11. 22 1月, 2015 2 次提交
    • L
      nios2: fix kuser trampoline address · d24c8163
      Ley Foon Tan 提交于
      __kuser_sigtramp address should be 0x1044 instead of 0x1040.
      Signed-off-by: NLey Foon Tan <lftan@altera.com>
      d24c8163
    • S
      powerpc/powernv: Restore LPCR with LPCR_PECE1 cleared · 0eb13208
      Shreyas B. Prabhu 提交于
      LPCR_PECE1 bit controls whether decrementer interrupts are allowed to
      cause exit from power-saving mode. While waking up from winkle, restoring
      LPCR with LPCR_PECE1 set (i.e Decrementer interrupts allowed) can cause
      issue in the following scenario:
      
      - All the threads in a core are offlined. The core enters deep winkle.
      - Spurious interrupt wakes up a thread in the core. Here LPCR is restored
        with LPCR_PECE1 bit set.
      - Since it was a spurious interrupt on a offline thread, the thread clears
        the interrupt and goes back to winkle.
      - Here before the thread executes winkle and puts the core into deep winkle,
        if a decrementer interrupt occurs on any of the sibling threads in the core
        that thread wakes up.
      - Since in offline loop we are flushing interrupt only in case of external
        interrupt, the decrementer interrupt does not get flushed. So at this stage
        the thread is stuck in this is loop of waking up at 0x100 due to decrementer
        interrupt, not flushing the interrupt as only external interrupts get flushed,
        entering winkle, waking up at 0x100 again.
      
      Fix this by programming PORE to restore LPCR with LPCR_PECE1 bit
      cleared when waking up from winkle.
      Signed-off-by: NShreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      0eb13208
  12. 21 1月, 2015 2 次提交
  13. 20 1月, 2015 7 次提交