1. 23 Apr, 2020 7 commits
  2. 22 Apr, 2020 8 commits
  3. 21 Apr, 2020 23 commits
  4. 20 Apr, 2020 2 commits
    • Paul Mackerras's avatar
      KVM: PPC: Book3S HV: Handle non-present PTEs in page fault functions · ae49deda
      Paul Mackerras authored
      Since cd758a9b "KVM: PPC: Book3S HV: Use __gfn_to_pfn_memslot in HPT
      page fault handler", it's been possible in fairly rare circumstances to
      load a non-present PTE in kvmppc_book3s_hv_page_fault() when running a
      guest on a POWER8 host.
      
      Because that case wasn't checked for, we could misinterpret the non-present
      PTE as being a cache-inhibited PTE.  That could mismatch with the
      corresponding hash PTE, which would cause the function to fail with -EFAULT
      a little further down.  That would propagate up to the KVM_RUN ioctl()
      generally causing the KVM userspace (usually qemu) to fall over.
      
      This addresses the problem by catching that case and returning to the guest
      instead.
      
      For completeness, this fixes the radix page fault handler in the same
      way.  For radix this didn't cause any obvious misbehaviour, because we
      ended up putting the non-present PTE into the guest's partition-scoped
      page tables, leading immediately to another hypervisor data/instruction
      storage interrupt, which would go through the page fault path again
      and fix things up.
      
      Fixes: cd758a9b "KVM: PPC: Book3S HV: Use __gfn_to_pfn_memslot in HPT page fault handler"
      Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1820402Reported-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      Tested-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: default avatarPaul Mackerras <paulus@ozlabs.org>
      ae49deda
    • Josh Poimboeuf's avatar
      kvm: Disable objtool frame pointer checking for vmenter.S · 7f4b5cde
      Josh Poimboeuf authored
      Frame pointers are completely broken by vmenter.S because it clobbers
      RBP:
      
        arch/x86/kvm/svm/vmenter.o: warning: objtool: __svm_vcpu_run()+0xe4: BP used as a scratch register
      
      That's unavoidable, so just skip checking that file when frame pointers
      are configured in.
      
      On the other hand, ORC can handle that code just fine, so leave objtool
      enabled in the !FRAME_POINTER case.
      Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@redhat.com>
      Message-Id: <01fae42917bacad18be8d2cbc771353da6603473.1587398610.git.jpoimboe@redhat.com>
      Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
      Fixes: 199cd1d7 ("KVM: SVM: Split svm_vcpu_run inline assembly to separate file")
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      7f4b5cde