Merge branch 'kvm-master' into kvm-next
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 7 Jan 2021 23:06:52 +0000 (18:06 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 7 Jan 2021 23:06:52 +0000 (18:06 -0500)
Fixes to get_mmio_spte, destined to 5.10 stable branch.

23 files changed:
1  2 
Documentation/admin-guide/kernel-parameters.txt
arch/arm64/Kconfig
arch/arm64/include/asm/kvm_emulate.h
arch/arm64/include/asm/ptrace.h
arch/arm64/include/asm/sysreg.h
arch/arm64/kernel/entry.S
arch/arm64/kernel/process.c
arch/arm64/kernel/sdei.c
arch/arm64/kvm/hyp/nvhe/hyp.lds.S
arch/arm64/kvm/mmu.c
arch/arm64/mm/fault.c
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/pv.c
arch/s390/mm/gmap.c
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/lapic.c
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/mmu/tdp_mmu.c
arch/x86/kvm/svm/sev.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/x86.c
drivers/irqchip/irq-gic-v3-its.c
tools/testing/selftests/kvm/set_memory_region_test.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -216,40 -223,13 +217,40 @@@ static __kprobes unsigned long _sdei_ha
        return vbar + 0x480;
  }
  
 +static void __kprobes notrace __sdei_pstate_entry(void)
 +{
 +      /*
 +       * The original SDEI spec (ARM DEN 0054A) can be read ambiguously as to
 +       * whether PSTATE bits are inherited unchanged or generated from
 +       * scratch, and the TF-A implementation always clears PAN and always
 +       * clears UAO. There are no other known implementations.
 +       *
 +       * Subsequent revisions (ARM DEN 0054B) follow the usual rules for how
 +       * PSTATE is modified upon architectural exceptions, and so PAN is
 +       * either inherited or set per SCTLR_ELx.SPAN, and UAO is always
 +       * cleared.
 +       *
 +       * We must explicitly reset PAN to the expected state, including
 +       * clearing it when the host isn't using it, in case a VM had it set.
 +       */
 +      if (system_uses_hw_pan())
 +              set_pstate_pan(1);
 +      else if (cpu_has_pan())
 +              set_pstate_pan(0);
 +}
  
- asmlinkage __kprobes notrace unsigned long
+ asmlinkage noinstr unsigned long
  __sdei_handler(struct pt_regs *regs, struct sdei_registered_event *arg)
  {
        unsigned long ret;
  
-       nmi_enter();
 +      /*
 +       * We didn't take an exception to get here, so the HW hasn't
 +       * set/cleared bits in PSTATE that we may rely on. Initialize PAN.
 +       */
 +      __sdei_pstate_entry();
 +
+       arm64_enter_nmi(regs);
  
        ret = _sdei_handler(regs, arg);
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -1347,8 -1309,10 +1347,10 @@@ static int svm_create_vcpu(struct kvm_v
                svm->avic_is_running = true;
  
        svm->msrpm = svm_vcpu_alloc_msrpm();
-       if (!svm->msrpm)
+       if (!svm->msrpm) {
+               err = -ENOMEM;
 -              goto error_free_vmcb_page;
 +              goto error_free_vmsa_page;
+       }
  
        svm_vcpu_init_msrpm(vcpu, svm->msrpm);
  
Simple merge
Simple merge