From: Sean Christopherson <seanjc@google.com>
To: Sean Christopherson <seanjc@google.com>,
Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] KVM: SVM: Rename "fault_address" to "gpa" in npf_interception()
Date: Thu, 13 Nov 2025 14:16:41 -0800 [thread overview]
Message-ID: <20251113221642.1673023-2-seanjc@google.com> (raw)
In-Reply-To: <20251113221642.1673023-1-seanjc@google.com>
Rename "fault_address" to "gpa" in KVM's #NPF handler and track it as a
gpa_t to more precisely document what type of address is being captured,
and because "gpa" is much more succinct.
No functional change intended.
Signed-off-by: Sean Christopherson <seanjc@google.com>
---
arch/x86/kvm/svm/svm.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index fc42bcdbb520..1fd097e8240e 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -1857,8 +1857,8 @@ static int npf_interception(struct kvm_vcpu *vcpu)
struct vcpu_svm *svm = to_svm(vcpu);
int rc;
- u64 fault_address = svm->vmcb->control.exit_info_2;
u64 error_code = svm->vmcb->control.exit_info_1;
+ gpa_t gpa = svm->vmcb->control.exit_info_2;
/*
* WARN if hardware generates a fault with an error code that collides
@@ -1872,14 +1872,14 @@ static int npf_interception(struct kvm_vcpu *vcpu)
if (sev_snp_guest(vcpu->kvm) && (error_code & PFERR_GUEST_ENC_MASK))
error_code |= PFERR_PRIVATE_ACCESS;
- trace_kvm_page_fault(vcpu, fault_address, error_code);
- rc = kvm_mmu_page_fault(vcpu, fault_address, error_code,
+ trace_kvm_page_fault(vcpu, gpa, error_code);
+ rc = kvm_mmu_page_fault(vcpu, gpa, error_code,
static_cpu_has(X86_FEATURE_DECODEASSISTS) ?
svm->vmcb->control.insn_bytes : NULL,
svm->vmcb->control.insn_len);
if (rc > 0 && error_code & PFERR_GUEST_RMP_MASK)
- sev_handle_rmp_fault(vcpu, fault_address, error_code);
+ sev_handle_rmp_fault(vcpu, gpa, error_code);
return rc;
}
--
2.52.0.rc1.455.g30608eb744-goog
next prev parent reply other threads:[~2025-11-13 22:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 22:16 [PATCH 0/2] KVM: SVM: Add fast MMIO bus writes Sean Christopherson
2025-11-13 22:16 ` Sean Christopherson [this message]
2025-11-13 22:16 ` [PATCH 2/2] KVM: SVM: Add support for expedited writes to the fast MMIO bus Sean Christopherson
2026-01-12 17:38 ` [PATCH 0/2] KVM: SVM: Add fast MMIO bus writes Sean Christopherson
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=20251113221642.1673023-2-seanjc@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
/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
all inboxes | Powered by JetHome®