From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 3/3] KVM: Add documents for MSI-X MMIO API Date: Mon, 17 Jan 2011 14:21:45 +0200 Message-ID: <4D343459.2050802@redhat.com> References: <1294309185-21417-1-git-send-email-sheng@linux.intel.com> <1294309185-21417-4-git-send-email-sheng@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , "Michael S. Tsirkin" , kvm@vger.kernel.org To: Sheng Yang Return-path: Received: from mx1.redhat.com ([209.132.183.28]:18745 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752029Ab1AQMVt (ORCPT ); Mon, 17 Jan 2011 07:21:49 -0500 In-Reply-To: <1294309185-21417-4-git-send-email-sheng@linux.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: On 01/06/2011 12:19 PM, Sheng Yang wrote: > Signed-off-by: Sheng Yang > --- > Documentation/kvm/api.txt | 41 +++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 41 insertions(+), 0 deletions(-) > > diff --git a/Documentation/kvm/api.txt b/Documentation/kvm/api.txt > index e1a9297..4978b94 100644 > --- a/Documentation/kvm/api.txt > +++ b/Documentation/kvm/api.txt > @@ -1263,6 +1263,47 @@ struct kvm_assigned_msix_entry { > __u16 padding[3]; > }; > > +4.54 KVM_REGISTER_MSIX_MMIO > + > +Capability: KVM_CAP_MSIX_MMIO > +Architectures: x86 > +Type: vm ioctl > +Parameters: struct kvm_msix_mmio_user (in) > +Returns: 0 on success, -1 on error > + > +This API indicates an MSI-X MMIO address of a guest device. Then all MMIO > +operation would be handled by kernel. When necessary(e.g. MSI data/address > +changed), KVM would exit to userspace using KVM_EXIT_MSIX_ROUTING_UPDATE to > +indicate the MMIO modification and require userspace to update IRQ routing > +table. > + > +struct kvm_msix_mmio_user { > + __u32 dev_id; > + __u16 type; /* Device type and MMIO address type */ > + __u16 max_entries_nr; /* Maximum entries supported */ > + __u64 base_addr; /* Guest physical address of MMIO */ > + __u64 base_va; /* Host virtual address of MMIO mapping */ > + __u64 flags; /* Reserved for now */ > + __u64 reserved[4]; > +}; > + > +Current device type can be: > +#define KVM_MSIX_MMIO_TYPE_ASSIGNED_DEV (1<< 0) > + > +Current MMIO type can be: > +#define KVM_MSIX_MMIO_TYPE_BASE_TABLE (1<< 8) > + How does userspace know which entry of which table changed? Need a field in struct kvm_run for that. -- error compiling committee.c: too many arguments to function