1. 28 9月, 2020 14 次提交
    • P
      KVM: x86: rename KVM_REQ_GET_VMCS12_PAGES · 729c15c2
      Paolo Bonzini 提交于
      We are going to use it for SVM too, so use a more generic name.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      729c15c2
    • A
      KVM: x86: Introduce MSR filtering · 1a155254
      Alexander Graf 提交于
      It's not desireable to have all MSRs always handled by KVM kernel space. Some
      MSRs would be useful to handle in user space to either emulate behavior (like
      uCode updates) or differentiate whether they are valid based on the CPU model.
      
      To allow user space to specify which MSRs it wants to see handled by KVM,
      this patch introduces a new ioctl to push filter rules with bitmaps into
      KVM. Based on these bitmaps, KVM can then decide whether to reject MSR access.
      With the addition of KVM_CAP_X86_USER_SPACE_MSR it can also deflect the
      denied MSR events to user space to operate on.
      
      If no filter is populated, MSR handling stays identical to before.
      Signed-off-by: NAlexander Graf <graf@amazon.com>
      
      Message-Id: <20200925143422.21718-8-graf@amazon.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      1a155254
    • A
      KVM: x86: Add infrastructure for MSR filtering · 51de8151
      Alexander Graf 提交于
      In the following commits we will add pieces of MSR filtering.
      To ensure that code compiles even with the feature half-merged, let's add
      a few stubs and struct definitions before the real patches start.
      Signed-off-by: NAlexander Graf <graf@amazon.com>
      
      Message-Id: <20200925143422.21718-4-graf@amazon.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      51de8151
    • A
      KVM: x86: Allow deflecting unknown MSR accesses to user space · 1ae09954
      Alexander Graf 提交于
      MSRs are weird. Some of them are normal control registers, such as EFER.
      Some however are registers that really are model specific, not very
      interesting to virtualization workloads, and not performance critical.
      Others again are really just windows into package configuration.
      
      Out of these MSRs, only the first category is necessary to implement in
      kernel space. Rarely accessed MSRs, MSRs that should be fine tunes against
      certain CPU models and MSRs that contain information on the package level
      are much better suited for user space to process. However, over time we have
      accumulated a lot of MSRs that are not the first category, but still handled
      by in-kernel KVM code.
      
      This patch adds a generic interface to handle WRMSR and RDMSR from user
      space. With this, any future MSR that is part of the latter categories can
      be handled in user space.
      
      Furthermore, it allows us to replace the existing "ignore_msrs" logic with
      something that applies per-VM rather than on the full system. That way you
      can run productive VMs in parallel to experimental ones where you don't care
      about proper MSR handling.
      Signed-off-by: NAlexander Graf <graf@amazon.com>
      Reviewed-by: NJim Mattson <jmattson@google.com>
      
      Message-Id: <20200925143422.21718-3-graf@amazon.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      1ae09954
    • S
      KVM: x86: Rename "shared_msrs" to "user_return_msrs" · 7e34fbd0
      Sean Christopherson 提交于
      Rename the "shared_msrs" mechanism, which is used to defer restoring
      MSRs that are only consumed when running in userspace, to a more banal
      but less likely to be confusing "user_return_msrs".
      
      The "shared" nomenclature is confusing as it's not obvious who is
      sharing what, e.g. reasonable interpretations are that the guest value
      is shared by vCPUs in a VM, or that the MSR value is shared/common to
      guest and host, both of which are wrong.
      
      "shared" is also misleading as the MSR value (in hardware) is not
      guaranteed to be shared/reused between VMs (if that's indeed the correct
      interpretation of the name), as the ability to share values between VMs
      is simply a side effect (albiet a very nice side effect) of deferring
      restoration of the host value until returning from userspace.
      
      "user_return" avoids the above confusion by describing the mechanism
      itself instead of its effects.
      Signed-off-by: NSean Christopherson <sean.j.christopherson@intel.com>
      Message-Id: <20200923180409.32255-2-sean.j.christopherson@intel.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7e34fbd0
    • S
      KVM: x86: Add intr/vectoring info and error code to kvm_exit tracepoint · 235ba74f
      Sean Christopherson 提交于
      Extend the kvm_exit tracepoint to align it with kvm_nested_vmexit in
      terms of what information is captured.  On SVM, add interrupt info and
      error code, while on VMX it add IDT vectoring and error code.  This
      sets the stage for macrofying the kvm_exit tracepoint definition so that
      it can be reused for kvm_nested_vmexit without loss of information.
      
      Opportunistically stuff a zero for VM_EXIT_INTR_INFO if the VM-Enter
      failed, as the field is guaranteed to be invalid.  Note, it'd be
      possible to further filter the interrupt/exception fields based on the
      VM-Exit reason, but the helper is intended only for tracepoints, i.e.
      an extra VMREAD or two is a non-issue, the failed VM-Enter case is just
      low hanging fruit.
      Signed-off-by: NSean Christopherson <sean.j.christopherson@intel.com>
      Message-Id: <20200923201349.16097-5-sean.j.christopherson@intel.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      235ba74f
    • S
      KVM: VMX: Rename RDTSCP secondary exec control name to insert "ENABLE" · 7f3603b6
      Sean Christopherson 提交于
      Rename SECONDARY_EXEC_RDTSCP to SECONDARY_EXEC_ENABLE_RDTSCP in
      preparation for consolidating the logic for adjusting secondary exec
      controls based on the guest CPUID model.
      
      No functional change intended.
      Signed-off-by: NSean Christopherson <sean.j.christopherson@intel.com>
      Message-Id: <20200923165048.20486-4-sean.j.christopherson@intel.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      7f3603b6
    • S
      KVM: x86: Add kvm_x86_ops hook to short circuit emulation · 09e3e2a1
      Sean Christopherson 提交于
      Replace the existing kvm_x86_ops.need_emulation_on_page_fault() with a
      more generic is_emulatable(), and unconditionally call the new function
      in x86_emulate_instruction().
      
      KVM will use the generic hook to support multiple security related
      technologies that prevent emulation in one way or another.  Similar to
      the existing AMD #NPF case where emulation of the current instruction is
      not possible due to lack of information, AMD's SEV-ES and Intel's SGX
      and TDX will introduce scenarios where emulation is impossible due to
      the guest's register state being inaccessible.  And again similar to the
      existing #NPF case, emulation can be initiated by kvm_mmu_page_fault(),
      i.e. outside of the control of vendor-specific code.
      
      While the cause and architecturally visible behavior of the various
      cases are different, e.g. SGX will inject a #UD, AMD #NPF is a clean
      resume or complete shutdown, and SEV-ES and TDX "return" an error, the
      impact on the common emulation code is identical: KVM must stop
      emulation immediately and resume the guest.
      
      Query is_emulatable() in handle_ud() as well so that the
      force_emulation_prefix code doesn't incorrectly modify RIP before
      calling emulate_instruction() in the absurdly unlikely scenario that
      KVM encounters forced emulation in conjunction with "do not emulate".
      
      Cc: Tom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: NSean Christopherson <sean.j.christopherson@intel.com>
      Message-Id: <20200915232702.15945-1-sean.j.christopherson@intel.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      09e3e2a1
    • B
      KVM: SVM: Add new intercept word in vmcb_control_area · 4c44e8d6
      Babu Moger 提交于
      The new intercept bits have been added in vmcb control area to support
      few more interceptions. Here are the some of them.
       - INTERCEPT_INVLPGB,
       - INTERCEPT_INVLPGB_ILLEGAL,
       - INTERCEPT_INVPCID,
       - INTERCEPT_MCOMMIT,
       - INTERCEPT_TLBSYNC,
      
      Add a new intercept word in vmcb_control_area to support these instructions.
      Also update kvm_nested_vmrun trace function to support the new addition.
      
      AMD documentation for these instructions is available at "AMD64
      Architecture Programmer’s Manual Volume 2: System Programming, Pub. 24593
      Rev. 3.34(or later)"
      
      The documentation can be obtained at the links below:
      Link: https://www.amd.com/system/files/TechDocs/24593.pdf
      Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537Signed-off-by: NBabu Moger <babu.moger@amd.com>
      Reviewed-by: NJim Mattson <jmattson@google.com>
      Message-Id: <159985251547.11252.16994139329949066945.stgit@bmoger-ubuntu>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      4c44e8d6
    • B
      KVM: SVM: Modify 64 bit intercept field to two 32 bit vectors · c62e2e94
      Babu Moger 提交于
      Convert all the intercepts to one array of 32 bit vectors in
      vmcb_control_area. This makes it easy for future intercept vector
      additions. Also update trace functions.
      Signed-off-by: NBabu Moger <babu.moger@amd.com>
      Reviewed-by: NJim Mattson <jmattson@google.com>
      Message-Id: <159985250813.11252.5736581193881040525.stgit@bmoger-ubuntu>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      c62e2e94
    • B
      KVM: SVM: Modify intercept_exceptions to generic intercepts · 9780d51d
      Babu Moger 提交于
      Modify intercept_exceptions to generic intercepts in vmcb_control_area. Use
      the generic vmcb_set_intercept, vmcb_clr_intercept and vmcb_is_intercept to
      set/clear/test the intercept_exceptions bits.
      Signed-off-by: NBabu Moger <babu.moger@amd.com>
      Reviewed-by: NJim Mattson <jmattson@google.com>
      Message-Id: <159985250037.11252.1361972528657052410.stgit@bmoger-ubuntu>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      9780d51d
    • B
      KVM: SVM: Change intercept_dr to generic intercepts · 30abaa88
      Babu Moger 提交于
      Modify intercept_dr to generic intercepts in vmcb_control_area. Use
      the generic vmcb_set_intercept, vmcb_clr_intercept and vmcb_is_intercept
      to set/clear/test the intercept_dr bits.
      Signed-off-by: NBabu Moger <babu.moger@amd.com>
      Reviewed-by: NJim Mattson <jmattson@google.com>
      Message-Id: <159985249255.11252.10000868032136333355.stgit@bmoger-ubuntu>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      30abaa88
    • B
      KVM: SVM: Change intercept_cr to generic intercepts · 03bfeeb9
      Babu Moger 提交于
      Change intercept_cr to generic intercepts in vmcb_control_area.
      Use the new vmcb_set_intercept, vmcb_clr_intercept and vmcb_is_intercept
      where applicable.
      Signed-off-by: NBabu Moger <babu.moger@amd.com>
      Reviewed-by: NJim Mattson <jmattson@google.com>
      Message-Id: <159985248506.11252.9081085950784508671.stgit@bmoger-ubuntu>
      [Change constant names. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      03bfeeb9
    • B
      KVM: SVM: Introduce vmcb_(set_intercept/clr_intercept/_is_intercept) · c45ad722
      Babu Moger 提交于
      This is in preparation for the future intercept vector additions.
      
      Add new functions vmcb_set_intercept, vmcb_clr_intercept and vmcb_is_intercept
      using kernel APIs __set_bit, __clear_bit and test_bit espectively.
      Signed-off-by: NBabu Moger <babu.moger@amd.com>
      Reviewed-by: NJim Mattson <jmattson@google.com>
      Message-Id: <159985247876.11252.16039238014239824460.stgit@bmoger-ubuntu>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      c45ad722
  2. 08 9月, 2020 3 次提交
  3. 04 9月, 2020 2 次提交
  4. 30 8月, 2020 1 次提交
  5. 26 8月, 2020 1 次提交
  6. 22 8月, 2020 1 次提交
    • W
      KVM: Pass MMU notifier range flags to kvm_unmap_hva_range() · fdfe7cbd
      Will Deacon 提交于
      The 'flags' field of 'struct mmu_notifier_range' is used to indicate
      whether invalidate_range_{start,end}() are permitted to block. In the
      case of kvm_mmu_notifier_invalidate_range_start(), this field is not
      forwarded on to the architecture-specific implementation of
      kvm_unmap_hva_range() and therefore the backend cannot sensibly decide
      whether or not to block.
      
      Add an extra 'flags' parameter to kvm_unmap_hva_range() so that
      architectures are aware as to whether or not they are permitted to block.
      
      Cc: <stable@vger.kernel.org>
      Cc: Marc Zyngier <maz@kernel.org>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Cc: James Morse <james.morse@arm.com>
      Signed-off-by: NWill Deacon <will@kernel.org>
      Message-Id: <20200811102725.7121-2-will@kernel.org>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      fdfe7cbd
  7. 20 8月, 2020 1 次提交
  8. 19 8月, 2020 1 次提交
  9. 18 8月, 2020 1 次提交
  10. 17 8月, 2020 1 次提交
  11. 13 8月, 2020 1 次提交
  12. 11 8月, 2020 2 次提交
  13. 08 8月, 2020 4 次提交
    • M
      asm-generic: pgalloc: provide generic pgd_free() · f9cb654c
      Mike Rapoport 提交于
      Most architectures define pgd_free() as a wrapper for free_page().
      
      Provide a generic version in asm-generic/pgalloc.h and enable its use for
      most architectures.
      Signed-off-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: NPekka Enberg <penberg@kernel.org>
      Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>	[m68k]
      Cc: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Matthew Wilcox <willy@infradead.org>
      Link: http://lkml.kernel.org/r/20200627143453.31835-7-rppt@kernel.orgSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f9cb654c
    • M
      asm-generic: pgalloc: provide generic pud_alloc_one() and pud_free_one() · d9e8b929
      Mike Rapoport 提交于
      Several architectures define pud_alloc_one() as a wrapper for
      __get_free_page() and pud_free() as a wrapper for free_page().
      
      Provide a generic implementation in asm-generic/pgalloc.h and use it where
      appropriate.
      Signed-off-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: NPekka Enberg <penberg@kernel.org>
      Cc: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Matthew Wilcox <willy@infradead.org>
      Link: http://lkml.kernel.org/r/20200627143453.31835-6-rppt@kernel.orgSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d9e8b929
    • M
      asm-generic: pgalloc: provide generic pmd_alloc_one() and pmd_free_one() · 1355c31e
      Mike Rapoport 提交于
      For most architectures that support >2 levels of page tables,
      pmd_alloc_one() is a wrapper for __get_free_pages(), sometimes with
      __GFP_ZERO and sometimes followed by memset(0) instead.
      
      More elaborate versions on arm64 and x86 account memory for the user page
      tables and call to pgtable_pmd_page_ctor() as the part of PMD page
      initialization.
      
      Move the arm64 version to include/asm-generic/pgalloc.h and use the
      generic version on several architectures.
      
      The pgtable_pmd_page_ctor() is a NOP when ARCH_ENABLE_SPLIT_PMD_PTLOCK is
      not enabled, so there is no functional change for most architectures
      except of the addition of __GFP_ACCOUNT for allocation of user page
      tables.
      
      The pmd_free() is a wrapper for free_page() in all the cases, so no
      functional change here.
      Signed-off-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: NPekka Enberg <penberg@kernel.org>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Link: http://lkml.kernel.org/r/20200627143453.31835-5-rppt@kernel.orgSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1355c31e
    • M
      mm: remove unneeded includes of <asm/pgalloc.h> · ca15ca40
      Mike Rapoport 提交于
      Patch series "mm: cleanup usage of <asm/pgalloc.h>"
      
      Most architectures have very similar versions of pXd_alloc_one() and
      pXd_free_one() for intermediate levels of page table.  These patches add
      generic versions of these functions in <asm-generic/pgalloc.h> and enable
      use of the generic functions where appropriate.
      
      In addition, functions declared and defined in <asm/pgalloc.h> headers are
      used mostly by core mm and early mm initialization in arch and there is no
      actual reason to have the <asm/pgalloc.h> included all over the place.
      The first patch in this series removes unneeded includes of
      <asm/pgalloc.h>
      
      In the end it didn't work out as neatly as I hoped and moving
      pXd_alloc_track() definitions to <asm-generic/pgalloc.h> would require
      unnecessary changes to arches that have custom page table allocations, so
      I've decided to move lib/ioremap.c to mm/ and make pgalloc-track.h local
      to mm/.
      
      This patch (of 8):
      
      In most cases <asm/pgalloc.h> header is required only for allocations of
      page table memory.  Most of the .c files that include that header do not
      use symbols declared in <asm/pgalloc.h> and do not require that header.
      
      As for the other header files that used to include <asm/pgalloc.h>, it is
      possible to move that include into the .c file that actually uses symbols
      from <asm/pgalloc.h> and drop the include from the header file.
      
      The process was somewhat automated using
      
      	sed -i -E '/[<"]asm\/pgalloc\.h/d' \
                      $(grep -L -w -f /tmp/xx \
                              $(git grep -E -l '[<"]asm/pgalloc\.h'))
      
      where /tmp/xx contains all the symbols defined in
      arch/*/include/asm/pgalloc.h.
      
      [rppt@linux.ibm.com: fix powerpc warning]
      Signed-off-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Reviewed-by: NPekka Enberg <penberg@kernel.org>
      Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>	[m68k]
      Cc: Abdul Haleem <abdhalee@linux.vnet.ibm.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Max Filippov <jcmvbkbc@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
      Cc: Stafford Horne <shorne@gmail.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Matthew Wilcox <willy@infradead.org>
      Link: http://lkml.kernel.org/r/20200627143453.31835-1-rppt@kernel.org
      Link: http://lkml.kernel.org/r/20200627143453.31835-2-rppt@kernel.orgSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ca15ca40
  14. 07 8月, 2020 1 次提交
    • L
      Revert "x86/mm/64: Do not sync vmalloc/ioremap mappings" · 7b4ea945
      Linus Torvalds 提交于
      This reverts commit 8bb9bf24.
      
      It seems the vmalloc page tables aren't always preallocated in all
      situations, because Jason Donenfeld reports an oops with this commit:
      
        BUG: unable to handle page fault for address: ffffe8ffffd00608
        #PF: supervisor read access in kernel mode
        #PF: error_code(0x0000) - not-present page
        PGD 0 P4D 0
        Oops: 0000 [#1] PREEMPT SMP
        CPU: 2 PID: 22 Comm: kworker/2:0 Not tainted 5.8.0+ #154
        RIP: process_one_work+0x2c/0x2d0
        Code: 41 56 41 55 41 54 55 48 89 f5 53 48 89 fb 48 83 ec 08 48 8b 06 4c 8b 67 40 49 89 c6 45 30 f6 a8 04 b8 00 00 00 00 4c 0f 44 f0 <49> 8b 46 08 44 8b a8 00 01 05
        Call Trace:
         worker_thread+0x4b/0x3b0
         ? rescuer_thread+0x360/0x360
         kthread+0x116/0x140
         ? __kthread_create_worker+0x110/0x110
         ret_from_fork+0x1f/0x30
        CR2: ffffe8ffffd00608
      
      and that page fault address is right in that vmalloc space, and we
      clearly don't have a PGD/P4D entry for it.
      
      Looking at the "Code:" line, the actual fault seems to come from the
      'pwq->wq' dereference at the top of the process_one_work() function:
      
              struct pool_workqueue *pwq = get_work_pwq(work);
              struct worker_pool *pool = worker->pool;
              bool cpu_intensive = pwq->wq->flags & WQ_CPU_INTENSIVE;
      
      so 'struct pool_workqueue *pwq' is the allocation that hasn't been
      synchronized across CPUs.
      
      Just revert for now, while Joerg figures out the cause.
      Reported-and-bisected-by: NJason A. Donenfeld <Jason@zx2c4.com>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Acked-by: NJoerg Roedel <jroedel@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7b4ea945
  15. 06 8月, 2020 3 次提交
    • P
      locking/seqlock, headers: Untangle the spaghetti monster · 0cd39f46
      Peter Zijlstra 提交于
      By using lockdep_assert_*() from seqlock.h, the spaghetti monster
      attacked.
      
      Attack back by reducing seqlock.h dependencies from two key high level headers:
      
       - <linux/seqlock.h>:               -Remove <linux/ww_mutex.h>
       - <linux/time.h>:                  -Remove <linux/seqlock.h>
       - <linux/sched.h>:                 +Add    <linux/seqlock.h>
      
      The price was to add it to sched.h ...
      
      Core header fallout, we add direct header dependencies instead of gaining them
      parasitically from higher level headers:
      
       - <linux/dynamic_queue_limits.h>:  +Add <asm/bug.h>
       - <linux/hrtimer.h>:               +Add <linux/seqlock.h>
       - <linux/ktime.h>:                 +Add <asm/bug.h>
       - <linux/lockdep.h>:               +Add <linux/smp.h>
       - <linux/sched.h>:                 +Add <linux/seqlock.h>
       - <linux/videodev2.h>:             +Add <linux/kernel.h>
      
      Arch headers fallout:
      
       - PARISC: <asm/timex.h>:           +Add <asm/special_insns.h>
       - SH:     <asm/io.h>:              +Add <asm/page.h>
       - SPARC:  <asm/timer_64.h>:        +Add <uapi/asm/asi.h>
       - SPARC:  <asm/vvar.h>:            +Add <asm/processor.h>, <asm/barrier.h>
                                          -Remove <linux/seqlock.h>
       - X86:    <asm/fixmap.h>:          +Add <asm/pgtable_types.h>
                                          -Remove <asm/acpi.h>
      
      There's also a bunch of parasitic header dependency fallout in .c files, not listed
      separately.
      
      [ mingo: Extended the changelog, split up & fixed the original patch. ]
      Co-developed-by: NIngo Molnar <mingo@kernel.org>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      Link: https://lore.kernel.org/r/20200804133438.GK2674@hirez.programming.kicks-ass.net
      0cd39f46
    • I
      x86/headers: Remove APIC headers from <asm/smp.h> · 13c01139
      Ingo Molnar 提交于
      The APIC headers are relatively complex and bring in additional
      header dependencies - while smp.h is a relatively simple header
      included from high level headers.
      
      Remove the dependency and add in the missing #include's in .c
      files where they gained it indirectly before.
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      13c01139
    • T
      vdso/treewide: Add vdso_data pointer argument to __arch_get_hw_counter() · 4c5a116a
      Thomas Gleixner 提交于
      MIPS already uses and S390 will need the vdso data pointer in
      __arch_get_hw_counter().
      
      This works nicely as long as the architecture does not support time
      namespaces in the VDSO. With time namespaces enabled the regular
      accessor to the vdso data pointer __arch_get_vdso_data() will return the
      namespace specific VDSO data page for tasks which are part of a
      non-root time namespace. This would cause the architectures which need
      the vdso data pointer in __arch_get_hw_counter() to access the wrong
      vdso data page.
      
      Add a vdso_data pointer argument to __arch_get_hw_counter() and hand it in
      from the call sites in the core code. For architectures which do not need
      the data pointer in their counter accessor function the compiler will just
      optimize it out.
      
      Fix up all existing architecture implementations and make MIPS utilize the
      pointer instead of invoking the accessor function.
      
      No functional change and no change in the resulting object code (except
      MIPS).
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Link: https://lkml.kernel.org/r/draft-87wo2ekuzn.fsf@nanos.tec.linutronix.de
      4c5a116a
  16. 03 8月, 2020 1 次提交
  17. 31 7月, 2020 2 次提交