]> www.infradead.org Git - nvme.git/commit
KVM: Document KVM_PRE_FAULT_MEMORY ioctl
authorIsaku Yamahata <isaku.yamahata@intel.com>
Wed, 10 Apr 2024 22:07:27 +0000 (15:07 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 12 Jul 2024 15:17:35 +0000 (11:17 -0400)
commit9aed7a6c0b591801177c90137df43f244e2af9bb
treee2bbe4bebaee0cd80f3f570f3e401bc47670974b
parent02b0d3b9d4dd1ef76b3e8c63175f1ae9ff392313
KVM: Document KVM_PRE_FAULT_MEMORY ioctl

Adds documentation of KVM_PRE_FAULT_MEMORY ioctl. [1]

It populates guest memory.  It doesn't do extra operations on the
underlying technology-specific initialization [2].  For example,
CoCo-related operations won't be performed.  Concretely for TDX, this API
won't invoke TDH.MEM.PAGE.ADD() or TDH.MR.EXTEND().  Vendor-specific APIs
are required for such operations.

The key point is to adapt of vcpu ioctl instead of VM ioctl.  First,
populating guest memory requires vcpu.  If it is VM ioctl, we need to pick
one vcpu somehow.  Secondly, vcpu ioctl allows each vcpu to invoke this
ioctl in parallel.  It helps to scale regarding guest memory size, e.g.,
hundreds of GB.

[1] https://lore.kernel.org/kvm/Zbrj5WKVgMsUFDtb@google.com/
[2] https://lore.kernel.org/kvm/Ze-TJh0BBOWm9spT@google.com/

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Message-ID: <9a060293c9ad9a78f1d8994cfe1311e818e99257.1712785629.git.isaku.yamahata@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Documentation/virt/kvm/api.rst