From: Will Deacon <will@kernel.org> To: kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>, Suzuki K Poulose <suzuki.poulose@arm.com>, James Morse <james.morse@arm.com>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, Paul Mackerras <paulus@ozlabs.org>, Paolo Bonzini <pbonzini@redhat.com>, Sean Christopherson <sean.j.christopherson@intel.com> Subject: [PATCH 0/2] KVM: arm64: Fix sleeping while atomic BUG() on OOM Date: Tue, 11 Aug 2020 11:27:23 +0100 [thread overview] Message-ID: <20200811102725.7121-1-will@kernel.org> (raw) Hi all, While stress-testing my arm64 stage-2 page-table rewrite [1], I ran into a sleeping while atomic BUG() during OOM that I can reproduce with mainline. The problem is that the arm64 page-table code periodically calls cond_resched_lock() when unmapping the stage-2 page-tables, but in the case of OOM, this occurs in atomic context. These couple of patches (based on 5.8) propagate the flags from the MMU notifier range structure, which in turn indicate whether or not blocking is permitted. Cheers, Will [1] https://android-kvm.googlesource.com/linux/+/refs/heads/topic/pgtable Cc: Marc Zyngier <maz@kernel.org> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> Cc: James Morse <james.morse@arm.com> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: Paul Mackerras <paulus@ozlabs.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Sean Christopherson <sean.j.christopherson@intel.com> --->8 Will Deacon (2): KVM: Pass MMU notifier range flags to kvm_unmap_hva_range() KVM: arm64: Only reschedule if MMU_NOTIFIER_RANGE_BLOCKABLE is not set arch/arm64/include/asm/kvm_host.h | 2 +- arch/arm64/kvm/mmu.c | 19 ++++++++++++++----- arch/mips/include/asm/kvm_host.h | 2 +- arch/mips/kvm/mmu.c | 3 ++- arch/powerpc/include/asm/kvm_host.h | 3 ++- arch/powerpc/kvm/book3s.c | 3 ++- arch/powerpc/kvm/e500_mmu_host.c | 3 ++- arch/x86/include/asm/kvm_host.h | 3 ++- arch/x86/kvm/mmu/mmu.c | 3 ++- virt/kvm/kvm_main.c | 3 ++- 10 files changed, 30 insertions(+), 14 deletions(-) -- 2.28.0.236.gb10cc79966-goog
WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will@kernel.org> To: kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>, Marc Zyngier <maz@kernel.org>, Sean Christopherson <sean.j.christopherson@intel.com>, Paul Mackerras <paulus@ozlabs.org>, Paolo Bonzini <pbonzini@redhat.com>, Will Deacon <will@kernel.org> Subject: [PATCH 0/2] KVM: arm64: Fix sleeping while atomic BUG() on OOM Date: Tue, 11 Aug 2020 11:27:23 +0100 [thread overview] Message-ID: <20200811102725.7121-1-will@kernel.org> (raw) Hi all, While stress-testing my arm64 stage-2 page-table rewrite [1], I ran into a sleeping while atomic BUG() during OOM that I can reproduce with mainline. The problem is that the arm64 page-table code periodically calls cond_resched_lock() when unmapping the stage-2 page-tables, but in the case of OOM, this occurs in atomic context. These couple of patches (based on 5.8) propagate the flags from the MMU notifier range structure, which in turn indicate whether or not blocking is permitted. Cheers, Will [1] https://android-kvm.googlesource.com/linux/+/refs/heads/topic/pgtable Cc: Marc Zyngier <maz@kernel.org> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> Cc: James Morse <james.morse@arm.com> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: Paul Mackerras <paulus@ozlabs.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Sean Christopherson <sean.j.christopherson@intel.com> --->8 Will Deacon (2): KVM: Pass MMU notifier range flags to kvm_unmap_hva_range() KVM: arm64: Only reschedule if MMU_NOTIFIER_RANGE_BLOCKABLE is not set arch/arm64/include/asm/kvm_host.h | 2 +- arch/arm64/kvm/mmu.c | 19 ++++++++++++++----- arch/mips/include/asm/kvm_host.h | 2 +- arch/mips/kvm/mmu.c | 3 ++- arch/powerpc/include/asm/kvm_host.h | 3 ++- arch/powerpc/kvm/book3s.c | 3 ++- arch/powerpc/kvm/e500_mmu_host.c | 3 ++- arch/x86/include/asm/kvm_host.h | 3 ++- arch/x86/kvm/mmu/mmu.c | 3 ++- virt/kvm/kvm_main.c | 3 ++- 10 files changed, 30 insertions(+), 14 deletions(-) -- 2.28.0.236.gb10cc79966-goog _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
next reply other threads:[~2020-08-11 10:27 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-11 10:27 Will Deacon [this message] 2020-08-11 10:27 ` [PATCH 0/2] KVM: arm64: Fix sleeping while atomic BUG() on OOM Will Deacon 2020-08-11 10:27 ` [PATCH 1/2] KVM: Pass MMU notifier range flags to kvm_unmap_hva_range() Will Deacon 2020-08-11 10:27 ` Will Deacon 2020-08-19 23:57 ` Sasha Levin 2020-08-19 23:57 ` Sasha Levin 2020-08-26 13:54 ` Sasha Levin 2020-08-26 13:54 ` Sasha Levin 2020-08-11 10:27 ` [PATCH 2/2] KVM: arm64: Only reschedule if MMU_NOTIFIER_RANGE_BLOCKABLE is not set Will Deacon 2020-08-11 10:27 ` Will Deacon 2020-08-11 10:52 ` Suzuki K Poulose 2020-08-11 10:52 ` Suzuki K Poulose 2020-08-18 6:31 ` [PATCH 0/2] KVM: arm64: Fix sleeping while atomic BUG() on OOM Paolo Bonzini 2020-08-18 6:31 ` Paolo Bonzini 2020-08-18 10:16 ` Will Deacon 2020-08-18 10:16 ` Will Deacon 2020-08-18 10:30 ` Marc Zyngier 2020-08-18 10:30 ` Marc Zyngier 2020-08-20 7:26 ` Paolo Bonzini 2020-08-20 7:26 ` Paolo Bonzini 2020-08-18 10:34 ` Marc Zyngier 2020-08-18 10:34 ` Marc Zyngier
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200811102725.7121-1-will@kernel.org \ --to=will@kernel.org \ --cc=james.morse@arm.com \ --cc=kvm@vger.kernel.org \ --cc=kvmarm@lists.cs.columbia.edu \ --cc=linux-kernel@vger.kernel.org \ --cc=maz@kernel.org \ --cc=paulus@ozlabs.org \ --cc=pbonzini@redhat.com \ --cc=sean.j.christopherson@intel.com \ --cc=suzuki.poulose@arm.com \ --cc=tsbogend@alpha.franken.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.