From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH v4] KVM: Introduce direct MSI message injection for in-kernel irqchips Date: Tue, 24 Apr 2012 14:07:37 +0200 Message-ID: <4F969789.30802@siemens.com> References: <4F734EB3.20500@siemens.com> <4F748AAD.2040103@siemens.com> <4F74B484.30607@siemens.com> <4F969513.9020706@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm , "Michael S. Tsirkin" , Eric Northup To: Avi Kivity Return-path: Received: from david.siemens.de ([192.35.17.14]:34557 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752370Ab2DXMHm (ORCPT ); Tue, 24 Apr 2012 08:07:42 -0400 In-Reply-To: <4F969513.9020706@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 2012-04-24 13:57, Avi Kivity wrote: > On 03/29/2012 09:14 PM, Jan Kiszka wrote: >> Currently, MSI messages can only be injected to in-kernel irqchips by >> defining a corresponding IRQ route for each message. This is not only >> unhandy if the MSI messages are generated "on the fly" by user space, >> IRQ routes are a limited resource that user space has to manage >> carefully. >> >> By providing a direct injection path, we can both avoid using up limited >> resources and simplify the necessary steps for user land. >> >> > > Applied to queue (for 3.5). > > Thanks for your patience. Oops, that was now unexpectedly fast. Extending and slightly reformatting the API docs I noticed some inconsistency. Will send fixes soon. Can you fold this into my patch, or just apply it on top? Thanks, Jan --------8<-------- KVM: Reorder KVM_SIGNAL_MSI API documentation 4.61 is not free as two earlier sections share the same number. Signed-off-by: Jan Kiszka --- Documentation/virtual/kvm/api.txt | 42 ++++++++++++++++++------------------ 1 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index ed27d1b..a155221 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt @@ -1482,27 +1482,6 @@ See KVM_ASSIGN_DEV_IRQ for the data structure. The target device is specified by assigned_dev_id. In the flags field, only KVM_DEV_ASSIGN_MASK_INTX is evaluated. -4.61 KVM_SIGNAL_MSI - -Capability: KVM_CAP_SIGNAL_MSI -Architectures: x86 -Type: vm ioctl -Parameters: struct kvm_msi (in) -Returns: >0 on delivery, 0 if guest blocked the MSI, and -1 on error - -Directly inject a MSI message. Only valid with in-kernel irqchip that handles -MSI messages. - -struct kvm_msi { - __u32 address_lo; - __u32 address_hi; - __u32 data; - __u32 flags; - __u8 pad[16]; -}; - -No flags are defined so far. The corresponding field must be 0. - 4.62 KVM_CREATE_SPAPR_TCE Capability: KVM_CAP_SPAPR_TCE @@ -1710,6 +1689,27 @@ where the guest will clear the flag: when the soft lockup watchdog timer resets itself or when a soft lockup is detected. This ioctl can be called any time after pausing the vcpu, but before it is resumed. +4.71 KVM_SIGNAL_MSI + +Capability: KVM_CAP_SIGNAL_MSI +Architectures: x86 +Type: vm ioctl +Parameters: struct kvm_msi (in) +Returns: >0 on delivery, 0 if guest blocked the MSI, and -1 on error + +Directly inject a MSI message. Only valid with in-kernel irqchip that handles +MSI messages. + +struct kvm_msi { + __u32 address_lo; + __u32 address_hi; + __u32 data; + __u32 flags; + __u8 pad[16]; +}; + +No flags are defined so far. The corresponding field must be 0. + 5. The kvm_run structure Application code obtains a pointer to the kvm_run structure by -- 1.7.3.4