From patchwork Thu Dec 24 01:04:16 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fengguang Wu X-Patchwork-Id: 69661 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBO1Lj0s022008 for ; Thu, 24 Dec 2009 01:21:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757460AbZLXBVX (ORCPT ); Wed, 23 Dec 2009 20:21:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751613AbZLXBVK (ORCPT ); Wed, 23 Dec 2009 20:21:10 -0500 Received: from mga14.intel.com ([143.182.124.37]:18398 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751341AbZLXBVJ (ORCPT ); Wed, 23 Dec 2009 20:21:09 -0500 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga102.ch.intel.com with ESMTP; 23 Dec 2009 17:21:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.47,316,1257148800"; d="scan'208";a="226233557" Received: from wfg-t61.sh.intel.com (HELO localhost.localdomain) ([10.239.21.192]) by azsmga001.ch.intel.com with ESMTP; 23 Dec 2009 17:21:04 -0800 Received: from wfg by localhost.localdomain with local (Exim 4.69) (envelope-from ) id 1NNc7k-00021D-Tm; Thu, 24 Dec 2009 09:04:16 +0800 Date: Thu, 24 Dec 2009 09:04:16 +0800 From: Wu Fengguang To: Avi Kivity , Marcelo Tosatti Cc: kvm@vger.kernel.org Subject: [PATCH] KVM: trivial document fixes Message-ID: <20091224010416.GA7722@localhost> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org --- linux.orig/Documentation/kvm/api.txt 2009-12-12 09:54:19.000000000 +0800 +++ linux/Documentation/kvm/api.txt 2009-12-12 10:48:02.000000000 +0800 @@ -23,12 +23,12 @@ of a virtual machine. The ioctls belong Only run vcpu ioctls from the same thread that was used to create the vcpu. -2. File descritpors +2. File descriptors The kvm API is centered around file descriptors. An initial open("/dev/kvm") obtains a handle to the kvm subsystem; this handle can be used to issue system ioctls. A KVM_CREATE_VM ioctl on this -handle will create a VM file descripror which can be used to issue VM +handle will create a VM file descriptor which can be used to issue VM ioctls. A KVM_CREATE_VCPU ioctl on a VM fd will create a virtual cpu and return a file descriptor pointing to it. Finally, ioctls on a vcpu fd can be used to control the vcpu, including the important task of @@ -643,7 +643,7 @@ Type: vm ioctl Parameters: struct kvm_clock_data (in) Returns: 0 on success, -1 on error -Sets the current timestamp of kvmclock to the valued specific in its parameter. +Sets the current timestamp of kvmclock to the value specified in its parameter. In conjunction with KVM_GET_CLOCK, it is used to ensure monotonicity on scenarios such as migration. @@ -787,11 +787,11 @@ Unused. __u64 data_offset; /* relative to kvm_run start */ } io; -If exit_reason is KVM_EXIT_IO_IN or KVM_EXIT_IO_OUT, then the vcpu has +If exit_reason is KVM_EXIT_IO, then the vcpu has executed a port I/O instruction which could not be satisfied by kvm. data_offset describes where the data is located (KVM_EXIT_IO_OUT) or where kvm expects application code to place the data for the next -KVM_RUN invocation (KVM_EXIT_IO_IN). Data format is a patcked array. +KVM_RUN invocation (KVM_EXIT_IO_IN). Data format is a packed array. struct { struct kvm_debug_exit_arch arch; @@ -807,7 +807,7 @@ Unused. __u8 is_write; } mmio; -If exit_reason is KVM_EXIT_MMIO or KVM_EXIT_IO_OUT, then the vcpu has +If exit_reason is KVM_EXIT_MMIO, then the vcpu has 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.