From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: KVM: add doc note about PIO/MMIO completion API Date: Sat, 13 Feb 2010 16:10:26 -0200 Message-ID: <20100213181025.GA4254@amt.cnet> References: <20100128190411.495771070@redhat.com> <4B6B1D1F.1080701@redhat.com> <20100204213643.GC2766@amt.cnet> <4B6B4031.80008@redhat.com> <20100208224119.GA6516@amt.cnet> <4B710300.7090903@redhat.com> <20100209205805.GA25144@amt.cnet> <4B7259E8.70904@redhat.com> <20100210162523.GD23089@amt.cnet> <4B72E16B.7080704@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, quintela@redhat.com, Gleb Natapov , Alexander Graf To: Avi Kivity Return-path: Received: from mx1.redhat.com ([209.132.183.28]:36554 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751272Ab0BMSKl (ORCPT ); Sat, 13 Feb 2010 13:10:41 -0500 Content-Disposition: inline In-Reply-To: <4B72E16B.7080704@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: How's that? Feel free to upgrade it. ------ Document that partially emulated instructions leave the guest state unconsistent, and that the kernel must complete operations before checking for pending signals. Signed-off-by: Marcelo Tosatti diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt index c6416a3..ec0e72b 100644 --- a/Documentation/kvm/api.txt +++ b/Documentation/kvm/api.txt @@ -820,6 +820,11 @@ 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 must first finish +uncomplete operations and then check for pending signals. + /* KVM_EXIT_HYPERCALL */ struct { __u64 nr;