KVM: add doc note about PIO/MMIO completion API
authorMarcelo Tosatti <mtosatti@redhat.com>
Sat, 13 Feb 2010 18:10:26 +0000 (16:10 -0200)
committerAvi Kivity <avi@redhat.com>
Sun, 25 Apr 2010 09:26:32 +0000 (12:26 +0300)
Document that partially emulated instructions leave the guest state
inconsistent, and that the kernel will complete operations before
checking for pending signals.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Documentation/kvm/api.txt

index c6416a398163155bc64341754b99039aba529502..beb444a9501306a9f0e7f181284806c5c815d2e2 100644 (file)
@@ -820,6 +820,13 @@ executed a memory-mapped I/O instruction which could not be satisfied
 by kvm.  The 'data' member contains the written data if 'is_write' is
 true, and should be filled by application code otherwise.
 
+NOTE: For KVM_EXIT_IO and KVM_EXIT_MMIO, the corresponding operations
+are complete (and guest state is consistent) only after userspace has
+re-entered the kernel with KVM_RUN.  The kernel side will first finish
+incomplete operations and then check for pending signals.  Userspace
+can re-enter the guest with an unmasked signal pending to complete
+pending operations.
+
                /* KVM_EXIT_HYPERCALL */
                struct {
                        __u64 nr;