From: Sean Christopherson <seanjc@google.com>
To: "Nikunj A. Dadhania" <nikunj@amd.com>
Cc: pbonzini@redhat.com, bp@alien8.de, joao.m.martins@oracle.com,
kai.huang@intel.com, kvm@vger.kernel.org,
thomas.lendacky@amd.com, yosry@kernel.org
Subject: Re: [PATCH v7.1] KVM: SVM: Add Page modification logging support
Date: Wed, 12 Aug 2026 16:25:26 -0700 [thread overview]
Message-ID: <an0A5lql-rinvm-n@google.com> (raw)
In-Reply-To: <b5f2e0a4-09c1-43d7-b700-c8760d70b195@amd.com>
On Mon, Jul 13, 2026, Nikunj A. Dadhania wrote:
>
>
> On 5/29/2026 12:08 PM, Nikunj A Dadhania wrote:
> > Currently, dirty logging relies on write protecting guest memory and
> > marking dirty GFNs during subsequent write faults. This method works but
> > incurs overhead due to additional write faults for each dirty GFN.
> >
> > Implement support for the Page Modification Logging (PML) feature, a
> > hardware-assisted method for efficient dirty logging. PML automatically
> > logs dirty GPA[51:12] to a 4K buffer when the CPU sets NPT D-bits. Two new
> > VMCB fields are utilized: PML_ADDR and PML_INDEX. The PML_INDEX is
> > initialized to 511 (8 bytes per GPA entry), and the CPU decreases the
> > PML_INDEX after logging each GPA. When the PML buffer is full, a
> > VMEXIT(PML_FULL) with exit code 0x407 is generated.
> >
> > Since PML_INDEX in the VMCB control area remains valid after an intercepted
> > SHUTDOWN, only initialize it on reset and leave it unchanged on INIT to
> > avoid discarding already-logged entries that haven't been flushed.
> >
> > PML operates on guest physical addresses at the NPT level, tracking D-bit
> > updates in page tables rather than memory content. This allows it to work
> > identically for normal and confidential computing guests
> > (SEV/SEV-ES/SEV-SNP), enabling cpu_dirty_log_size to be set uniformly for
> > all AMD VMs without special-casing encrypted guests.
> >
> > Use vmcb01 directly when updating PML controls to ensure L1's state
> > remains correct, as svm->vmcb points to vmcb02 when L2 is active.
> >
> > PML is not enabled in hardware for nested guests; treat PML_FULL as
> > unexpected exits.
> >
> > Add a new module parameter to enable/disable PML, and enable it by default
> > when supported.
> >
> > Acked-by: Kai Huang <kai.huang@intel.com>
> > Signed-off-by: Nikunj A Dadhania <nikunj@amd.com>
> > ---
> >
> > Sending updated 7/7 patch here, rather than reposting the full series.
> >
> > Sean, any remaining comments? Happy to send v8 if needed.
>
> A gentle reminder
Sorry, I had moved this out of the TODO queue when I saw the "will fix in the
next version", and didn't pay attention to the updated patch or to this mail.
I.e. was waiting for v8.
Hold off on v8 for now, in case there's more to address (I'll move this back to
my queue).
next prev parent reply other threads:[~2026-08-12 23:25 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 4:59 [PATCH v7 0/7] KVM: SVM: Add Page Modification Logging (PML) support Nikunj A Dadhania
2026-05-18 4:59 ` [PATCH v7 1/7] KVM: VMX: Pass @vcpu, not @vmx to init_vmcs() Nikunj A Dadhania
2026-05-18 11:35 ` Huang, Kai
2026-05-18 4:59 ` [PATCH v7 2/7] KVM: x86: Move PML page to common vcpu arch structure Nikunj A Dadhania
2026-05-18 4:59 ` [PATCH v7 3/7] KVM: x86: Carve out PML flush routine Nikunj A Dadhania
2026-05-18 4:59 ` [PATCH v7 4/7] KVM: VMX: Use cpu_dirty_log_size instead of enable_pml for PML checks Nikunj A Dadhania
2026-05-18 4:59 ` [PATCH v7 5/7] x86/cpufeatures: Add Page modification logging Nikunj A Dadhania
2026-05-18 4:59 ` [PATCH v7 6/7] KVM: SVM: Use BIT_ULL for 64-bit misc_ctl bit definitions Nikunj A Dadhania
2026-05-18 4:59 ` [PATCH v7 7/7] KVM: SVM: Add Page modification logging support Nikunj A Dadhania
2026-05-18 17:12 ` Yosry Ahmed
2026-05-18 18:55 ` Sean Christopherson
2026-05-18 19:14 ` Yosry Ahmed
2026-05-18 19:25 ` Yosry Ahmed
2026-05-19 14:46 ` Nikunj A. Dadhania
2026-05-29 6:38 ` [PATCH v7.1] " Nikunj A Dadhania
2026-07-13 6:12 ` Nikunj A. Dadhania
2026-08-12 23:25 ` Sean Christopherson [this message]
2026-08-13 8:24 ` Nikunj A. Dadhania
2026-09-02 0:09 ` Sean Christopherson
2026-09-02 8:52 ` Nikunj A. Dadhania
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=an0A5lql-rinvm-n@google.com \
--to=seanjc@google.com \
--cc=bp@alien8.de \
--cc=joao.m.martins@oracle.com \
--cc=kai.huang@intel.com \
--cc=kvm@vger.kernel.org \
--cc=nikunj@amd.com \
--cc=pbonzini@redhat.com \
--cc=thomas.lendacky@amd.com \
--cc=yosry@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.