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

Commit620cf45

Browse files
author
Marc Zyngier
committed
KVM: arm64: Remove S1PTW check from kvm_vcpu_dabt_iswrite()
Now that kvm_vcpu_trap_is_write_fault() checks for S1PTW, thereis no need for kvm_vcpu_dabt_iswrite() to do the same thing, aswe already check for this condition on all existing paths.Drop the check and add a comment instead.Signed-off-by: Marc Zyngier <maz@kernel.org>Reviewed-by: Will Deacon <will@kernel.org>Link:https://lore.kernel.org/r/20200915104218.1284701-3-maz@kernel.org
1 parentc4ad98e commit620cf45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎arch/arm64/include/asm/kvm_emulate.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,10 @@ static __always_inline bool kvm_vcpu_abt_iss1tw(const struct kvm_vcpu *vcpu)
303303
return !!(kvm_vcpu_get_esr(vcpu)&ESR_ELx_S1PTW);
304304
}
305305

306+
/* Always check for S1PTW *before* using this. */
306307
static__always_inlineboolkvm_vcpu_dabt_iswrite(conststructkvm_vcpu*vcpu)
307308
{
308-
return !!(kvm_vcpu_get_esr(vcpu)&ESR_ELx_WNR)||
309-
kvm_vcpu_abt_iss1tw(vcpu);/* AF/DBM update */
309+
returnkvm_vcpu_get_esr(vcpu)&ESR_ELx_WNR;
310310
}
311311

312312
staticinlineboolkvm_vcpu_dabt_is_cm(conststructkvm_vcpu*vcpu)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp