Re: [PATCH 12/14] KVM: x86/mmu: Don't set dirty bits when disabling dirty logging w/ PML
From: Paolo Bonzini
Date: Thu Feb 18 2021 - 13:56:37 EST
On 13/02/21 01:50, Sean Christopherson wrote:
This means that spurious PML entries will be created for memslots with
dirty logging disabled if at least one other memslot has dirty logging
enabled, but for all known use cases, dirty logging is a global VMM
control.
This is not true. For example QEMU uses dirty logging to track changes
to the framebuffer.
However, what you're saying below is true: after a MR_CREATE there will
be no shadow pages, and when they are created with mmu_set_spte they
will not have the dirty bits set. So there's really no change here for
the case of only some memslots having dirty logging enabled. Queued 12
and 13 as well then!
Paolo
Furthermore, spurious PML entries are already possible since
dirty bits are set only when a dirty logging is turned off, i.e.
memslots that are never dirty logged will have dirty bits cleared.