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,
Fred Griffoul <fgriffo@amazon.co.uk>
Subject: [PATCH v3 5/5] KVM: nVMX: Mark APIC access page dirty when syncing vmcs12 pages
Date: Fri, 21 Nov 2025 14:34:44 -0800 [thread overview]
Message-ID: <20251121223444.355422-6-seanjc@google.com> (raw)
In-Reply-To: <20251121223444.355422-1-seanjc@google.com>
From: Fred Griffoul <fgriffo@amazon.co.uk>
For consistency with commit 7afe79f5734a ("KVM: nVMX: Mark vmcs12's APIC
access page dirty when unmapping"), which marks the page dirty during
unmap operations, also mark it dirty during vmcs12 page synchronization.
Signed-off-by: Fred Griffoul <fgriffo@amazon.co.uk>
[sean: use kvm_vcpu_map_mark_dirty()]
Signed-off-by: Sean Christopherson <seanjc@google.com>
---
arch/x86/kvm/vmx/vmx.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index cc38d08935e8..72ac42fdf3b1 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -6382,10 +6382,7 @@ static void nested_vmx_mark_all_vmcs12_pages_dirty(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
- /*
- * Don't need to mark the APIC access page dirty; it is never
- * written to by the CPU during APIC virtualization.
- */
+ kvm_vcpu_map_mark_dirty(vcpu, &vmx->nested.apic_access_page_map);
kvm_vcpu_map_mark_dirty(vcpu, &vmx->nested.virtual_apic_map);
kvm_vcpu_map_mark_dirty(vcpu, &vmx->nested.pi_desc_map);
}
--
2.52.0.rc2.455.g230fcf2819-goog
next prev parent reply other threads:[~2025-11-21 22:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-21 22:34 [PATCH v3 0/5] KVM: nVMX: Mark APIC page dirty on VM-Exit Sean Christopherson
2025-11-21 22:34 ` [PATCH v3 1/5] KVM: Use vCPU specific memslots in __kvm_vcpu_map() Sean Christopherson
2025-11-21 22:34 ` [PATCH v3 2/5] KVM: x86: Mark vmcs12 pages as dirty if and only if they're mapped Sean Christopherson
2025-11-21 22:34 ` [PATCH v3 3/5] KVM: nVMX: Precisely mark vAPIC and PID maps dirty when delivering nested PI Sean Christopherson
2025-11-21 22:34 ` [PATCH v3 4/5] KVM: VMX: Move nested_mark_vmcs12_pages_dirty() to vmx.c, and rename Sean Christopherson
2026-01-13 8:51 ` Binbin Wu
2025-11-21 22:34 ` Sean Christopherson [this message]
2026-01-12 17:38 ` [PATCH v3 0/5] KVM: nVMX: Mark APIC page dirty on VM-Exit 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=20251121223444.355422-6-seanjc@google.com \
--to=seanjc@google.com \
--cc=fgriffo@amazon.co.uk \
--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