Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7b75cd5

Browse files
Alexandru EliseiMarc Zyngier
Alexandru Elisei
authored and
Marc Zyngier
committed
KVM: arm64: Update page shift if stage 2 block mapping not supported
Commit196f878 (" KVM: arm/arm64: Signal SIGBUS when stage2 discovershwpoison memory") modifies user_mem_abort() to send a SIGBUS signal whenthe fault IPA maps to a hwpoisoned page. Commit1559b75 ("KVM:arm/arm64: Re-check VMA on detecting a poisoned page") changedkvm_send_hwpoison_signal() to use the page shift instead of the VMA becauseat that point the code had already released the mmap lock, which meansuserspace could have modified the VMA.If userspace uses hugetlbfs for the VM memory, user_mem_abort() tries tomap the guest fault IPA using block mappings in stage 2. That is not alwayspossible, if, for example, userspace uses dirty page logging for the VM.Update the page shift appropriately in those cases when we downgrade thestage 2 entry from a block mapping to a page.Fixes:1559b75 ("KVM: arm/arm64: Re-check VMA on detecting a poisoned page")Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>Signed-off-by: Marc Zyngier <maz@kernel.org>Reviewed-by: Gavin Shan <gshan@redhat.com>Link:https://lore.kernel.org/r/20200901133357.52640-2-alexandru.elisei@arm.com
1 parent376426b commit7b75cd5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎arch/arm64/kvm/mmu.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,6 +1871,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
18711871
!fault_supports_stage2_huge_mapping(memslot,hva,vma_pagesize)) {
18721872
force_pte= true;
18731873
vma_pagesize=PAGE_SIZE;
1874+
vma_shift=PAGE_SHIFT;
18741875
}
18751876

18761877
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp