1. 12 10月, 2019 8 次提交
  2. 11 10月, 2019 4 次提交
  3. 10 10月, 2019 3 次提交
  4. 09 10月, 2019 5 次提交
    • T
      perf/x86/amd: Change/fix NMI latency mitigation to use a timestamp · df4d2973
      Tom Lendacky 提交于
      It turns out that the NMI latency workaround from commit:
      
        6d3edaae ("x86/perf/amd: Resolve NMI latency issues for active PMCs")
      
      ends up being too conservative and results in the perf NMI handler claiming
      NMIs too easily on AMD hardware when the NMI watchdog is active.
      
      This has an impact, for example, on the hpwdt (HPE watchdog timer) module.
      This module can produce an NMI that is used to reset the system. It
      registers an NMI handler for the NMI_UNKNOWN type and relies on the fact
      that nothing has claimed an NMI so that its handler will be invoked when
      the watchdog device produces an NMI. After the referenced commit, the
      hpwdt module is unable to process its generated NMI if the NMI watchdog is
      active, because the current NMI latency mitigation results in the NMI
      being claimed by the perf NMI handler.
      
      Update the AMD perf NMI latency mitigation workaround to, instead, use a
      window of time. Whenever a PMC is handled in the perf NMI handler, set a
      timestamp which will act as a perf NMI window. Any NMIs arriving within
      that window will be claimed by perf. Anything outside that window will
      not be claimed by perf. The value for the NMI window is set to 100 msecs.
      This is a conservative value that easily covers any NMI latency in the
      hardware. While this still results in a window in which the hpwdt module
      will not receive its NMI, the window is now much, much smaller.
      Signed-off-by: NTom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Jerry Hoemann <jerry.hoemann@hpe.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Fixes: 6d3edaae ("x86/perf/amd: Resolve NMI latency issues for active PMCs")
      Link: https://lkml.kernel.org/r/Message-ID:
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      df4d2973
    • J
      powerpc/kvm: Fix kvmppc_vcore->in_guest value in kvmhv_switch_to_host · 7fe4e117
      Jordan Niethe 提交于
      kvmhv_switch_to_host() in arch/powerpc/kvm/book3s_hv_rmhandlers.S
      needs to set kvmppc_vcore->in_guest to 0 to signal secondary CPUs to
      continue. This happens after resetting the PCR. Before commit
      13c7bb3c ("powerpc/64s: Set reserved PCR bits"), r0 would always
      be 0 before it was stored to kvmppc_vcore->in_guest. However because
      of this change in the commit:
      
                /* Reset PCR */
                ld      r0, VCORE_PCR(r5)
        -       cmpdi   r0, 0
        +       LOAD_REG_IMMEDIATE(r6, PCR_MASK)
        +       cmpld   r0, r6
                beq     18f
        -       li      r0, 0
        -       mtspr   SPRN_PCR, r0
        +       mtspr   SPRN_PCR, r6
         18:
                /* Signal secondary CPUs to continue */
                stb     r0,VCORE_IN_GUEST(r5)
      
      We are no longer comparing r0 against 0 and loading it with 0 if it
      contains something else. Hence when we store r0 to
      kvmppc_vcore->in_guest, it might not be 0. This means that secondary
      CPUs will not be signalled to continue. Those CPUs get stuck and
      errors like the following are logged:
      
          KVM: CPU 1 seems to be stuck
          KVM: CPU 2 seems to be stuck
          KVM: CPU 3 seems to be stuck
          KVM: CPU 4 seems to be stuck
          KVM: CPU 5 seems to be stuck
          KVM: CPU 6 seems to be stuck
          KVM: CPU 7 seems to be stuck
      
      This can be reproduced with:
          $ for i in `seq 1 7` ; do chcpu -d $i ; done ;
          $ taskset -c 0 qemu-system-ppc64 -smp 8,threads=8 \
             -M pseries,accel=kvm,kvm-type=HV -m 1G -nographic -vga none \
             -kernel vmlinux -initrd initrd.cpio.xz
      
      Fix by making sure r0 is 0 before storing it to
      kvmppc_vcore->in_guest.
      
      Fixes: 13c7bb3c ("powerpc/64s: Set reserved PCR bits")
      Reported-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NJordan Niethe <jniethe5@gmail.com>
      Reviewed-by: NAlistair Popple <alistair@popple.id.au>
      Tested-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20191004025317.19340-1-jniethe5@gmail.com
      7fe4e117
    • L
      powerpc/pseries: Remove confusing warning message. · 4ab8a485
      Laurent Dufour 提交于
      Since commit 1211ee61 ("powerpc/pseries: Read TLB Block Invalidate
      Characteristics"), a warning message is displayed when booting a guest
      on top of KVM:
      
        lpar: arch/powerpc/platforms/pseries/lpar.c pseries_lpar_read_hblkrm_characteristics Error calling get-system-parameter (0xfffffffd)
      
      This message is displayed because this hypervisor is not supporting
      the H_BLOCK_REMOVE hcall and thus is not exposing the corresponding
      feature.
      
      Reading the TLB Block Invalidate Characteristics should not be done if
      the feature is not exposed.
      
      Fixes: 1211ee61 ("powerpc/pseries: Read TLB Block Invalidate Characteristics")
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NLaurent Dufour <ldufour@linux.ibm.com>
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20191001132928.72555-1-ldufour@linux.ibm.com
      4ab8a485
    • S
      powerpc/64s/radix: Fix build failure with RADIX_MMU=n · 18217da3
      Stephen Rothwell 提交于
      After merging the powerpc tree, today's linux-next build (powerpc64
      allnoconfig) failed like this:
      
       arch/powerpc/mm/book3s64/pgtable.c:216:3:
       error: implicit declaration of function 'radix__flush_all_lpid_guest'
      
      radix__flush_all_lpid_guest() is only declared for
      CONFIG_PPC_RADIX_MMU which is not set for this build.
      
      Fix it by adding an empty version for the RADIX_MMU=n case, which
      should never be called.
      
      Fixes: 99161de3 ("powerpc/64s/radix: tidy up TLB flushing code")
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      [mpe: Munge change log]
      Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
      Link: https://lore.kernel.org/r/20190930101342.36c1afa0@canb.auug.org.au
      18217da3
    • K
      x86/cpu: Add Comet Lake to the Intel CPU models header · 8d7c6ac3
      Kan Liang 提交于
      Comet Lake is the new 10th Gen Intel processor. Add two new CPU model
      numbers to the Intel family list.
      
      The CPU model numbers are not published in the SDM yet but they come
      from an authoritative internal source.
      
       [ bp: Touch up commit message. ]
      Signed-off-by: NKan Liang <kan.liang@linux.intel.com>
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Reviewed-by: NTony Luck <tony.luck@intel.com>
      Cc: ak@linux.intel.com
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: x86-ml <x86@kernel.org>
      Link: https://lkml.kernel.org/r/1570549810-25049-2-git-send-email-kan.liang@linux.intel.com
      8d7c6ac3
  5. 08 10月, 2019 9 次提交
  6. 07 10月, 2019 11 次提交