Skip to content

Commit 9943450

Browse files
Peng Haobonzini
authored andcommitted
kvm/x86 : add document for coalesced mmio
Signed-off-by: Peng Hao <peng.hao2@zte.com.cn> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 39337ad commit 9943450

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Documentation/virtual/kvm/api.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3681,6 +3681,30 @@ Returns: 0 on success, -1 on error
36813681
This copies the vcpu's kvm_nested_state struct from userspace to the kernel. For
36823682
the definition of struct kvm_nested_state, see KVM_GET_NESTED_STATE.
36833683

3684+
4.116 KVM_(UN)REGISTER_COALESCED_MMIO
3685+
3686+
Capability: KVM_CAP_COALESCED_MMIO
3687+
Architectures: all
3688+
Type: vm ioctl
3689+
Parameters: struct kvm_coalesced_mmio_zone
3690+
Returns: 0 on success, < 0 on error
3691+
3692+
Coalesced mmio is a performance optimization that defers hardware
3693+
register write emulation so that userspace exits are avoided. It is
3694+
typically used to reduce the overhead of emulating frequently accessed
3695+
hardware registers.
3696+
3697+
When a hardware register is configured for coalesced mmio, write accesses
3698+
do not exit to userspace and their value is recorded in a ring buffer
3699+
that is shared between kernel and userspace.
3700+
3701+
Coalesced mmio is used if one or more write accesses to a hardware
3702+
register can be deferred until a read or a write to another hardware
3703+
register on the same device. This last access will cause a vmexit and
3704+
userspace will process accesses from the ring buffer before emulating
3705+
it. That will avoid exiting to userspace on repeated writes to the
3706+
first register.
3707+
36843708
5. The kvm_run structure
36853709
------------------------
36863710

0 commit comments

Comments
 (0)