From: Paolo Bonzini <pbonzini@redhat.com>
To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: [PATCH 01/19] KVM: x86/hyperv: remove unnecessary mmu_is_nested() check
Date: Wed, 24 Jun 2026 17:30:44 -0400 [thread overview]
Message-ID: <20260624213102.71082-2-pbonzini@redhat.com> (raw)
In-Reply-To: <20260624213102.71082-1-pbonzini@redhat.com>
Just always go through kvm_translate_gpa(), which will either invoke
the vendor check or just return hc->ingpa back.
This is a better way to fix the issue of commit 464af6fc2b1d ("KVM:
x86: check for nEPT/nNPT in slow flush hypercalls", 2026-05-03).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
arch/x86/kvm/hyperv.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index fd4eb1e561f7..0b5050cccab4 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@ -2045,10 +2045,9 @@ static u64 kvm_hv_flush_tlb(struct kvm_vcpu *vcpu, struct kvm_hv_hcall *hc)
* flush). Translate the address here so the memory can be uniformly
* read with kvm_read_guest().
*/
- if (!hc->fast && mmu_is_nested(vcpu)) {
- hc->ingpa = kvm_x86_ops.nested_ops->translate_nested_gpa(
- vcpu, hc->ingpa,
- PFERR_GUEST_FINAL_MASK, NULL, 0);
+ if (!hc->fast) {
+ hc->ingpa = kvm_translate_gpa(vcpu, vcpu->arch.walk_mmu, hc->ingpa,
+ PFERR_GUEST_FINAL_MASK, NULL, 0);
if (unlikely(hc->ingpa == INVALID_GPA))
return HV_STATUS_INVALID_HYPERCALL_INPUT;
}
--
2.52.0
next prev parent reply other threads:[~2026-06-24 21:31 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 21:30 [PATCH v2 00/19] KVM: apply chainsaw to struct kvm_mmu Paolo Bonzini
2026-06-24 21:30 ` Paolo Bonzini [this message]
2026-06-24 21:30 ` [PATCH 02/19] KVM: x86/mmu: introduce struct kvm_pagewalk Paolo Bonzini
2026-06-24 21:30 ` [PATCH 03/19] KVM: x86/mmu: move get_guest_pgd to " Paolo Bonzini
2026-06-24 21:30 ` [PATCH 04/19] KVM: x86/mmu: move gva_to_gpa " Paolo Bonzini
2026-06-24 21:30 ` [PATCH 05/19] KVM: x86/mmu: move get_pdptr " Paolo Bonzini
2026-06-24 21:30 ` [PATCH 06/19] KVM: x86/mmu: move inject_page_fault " Paolo Bonzini
2026-06-24 21:30 ` [PATCH 07/19] KVM: x86/mmu: move CPU-related fields " Paolo Bonzini
2026-06-24 21:30 ` [PATCH 08/19] KVM: x86/mmu: change CPU-role accessor fields to take " Paolo Bonzini
2026-06-24 21:30 ` [PATCH 09/19] KVM: x86/mmu: move remaining permission fields to " Paolo Bonzini
2026-06-24 21:30 ` [PATCH 10/19] KVM: x86/mmu: pass struct kvm_pagewalk to kvm_mmu_invalidate_addr Paolo Bonzini
2026-06-24 21:30 ` [PATCH 11/19] KVM: x86/mmu: change walk_mmu to struct kvm_pagewalk Paolo Bonzini
2026-06-24 21:30 ` [PATCH 12/19] KVM: x86/mmu: change nested_mmu.w to ngva_walk Paolo Bonzini
2026-06-24 21:30 ` [PATCH 13/19] KVM: x86/mmu: pull struct kvm_pagewalk out of struct kvm_mmu Paolo Bonzini
2026-06-24 21:30 ` [PATCH 14/19] KVM: x86/mmu: unify root_gva_walk and ngva_walk Paolo Bonzini
2026-06-24 21:30 ` [PATCH 15/19] KVM: x86/mmu: cleanup functions that initialize shadow MMU Paolo Bonzini
2026-06-24 21:30 ` [PATCH 16/19] KVM: x86/mmu: pull page format to a new struct Paolo Bonzini
2026-06-24 21:31 ` [PATCH 17/19] KVM: x86/mmu: merge struct rsvd_bits_validate into struct kvm_page_format Paolo Bonzini
2026-06-24 21:31 ` [PATCH 18/19] KVM: x86/mmu: parameterize update_permission_bitmask() Paolo Bonzini
2026-06-24 21:31 ` [PATCH 19/19] KVM: x86/mmu: use kvm_page_format to test SPTEs Paolo Bonzini
2026-07-15 14:43 ` [PATCH v2 00/19] KVM: apply chainsaw to struct kvm_mmu Paolo Bonzini
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=20260624213102.71082-2-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox