From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: KVM: add doc note about PIO/MMIO completion API Date: Sun, 14 Feb 2010 10:17:23 +0200 Message-ID: <4B77B193.10006@redhat.com> 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> <20100213181025.GA4254@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, quintela@redhat.com, Gleb Natapov , Alexander Graf To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:4576 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751780Ab0BNIR3 (ORCPT ); Sun, 14 Feb 2010 03:17:29 -0500 In-Reply-To: <20100213181025.GA4254@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On 02/13/2010 08:10 PM, Marcelo Tosatti wrote: > 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. > + > Well, s/must/will/, the document is written from userspace's point of view. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.