All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Eric Auger <eric.auger@linaro.org>
Cc: Joerg Roedel <joro@8bytes.org>, Avi Kivity <avi.kivity@gmail.com>,
	"Wu, Feng" <feng.wu@intel.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"mtosatti@redhat.com" <mtosatti@redhat.com>
Subject: Re: [v4 08/16] KVM: kvm-vfio: User API for IRQ forwarding
Date: Wed, 24 Jun 2015 13:49:27 -0600	[thread overview]
Message-ID: <1435175367.3700.316.camel@redhat.com> (raw)
In-Reply-To: <558AD9E6.1030902@linaro.org>

On Wed, 2015-06-24 at 18:25 +0200, Eric Auger wrote:
> Hi Joerg,
> 
> On 06/24/2015 05:50 PM, Joerg Roedel wrote:
> > On Mon, Jun 15, 2015 at 06:17:03PM +0200, Eric Auger wrote:
> >> I guess this discussion also is relevant wrt "[RFC v6 00/16] KVM-VFIO
> >> IRQ forward control" series? Or is that "central registry maintained by
> >> a posted interrupts manager" something more specific to x86?
> > 
> > From what I understood so far, the feature you implemented for ARM is a
> > bit different from the ones that get introduced to x86.
> > 
> > Can you please share some details on how the ARM version works? I am
> > interested in how the GICv2 is configured for IRQ forwarding. The
> > question is whether the forwarding information needs to be updated from
> > KVM and what information about the IRQ KVM needs for this.
> 
> The principle is that when you inject a virtual IRQ to a guest, you
> program a register in the GIC, known as a list register. There you put
> both the virtual IRQ you want to inject but also the physical IRQ it is
> linked with (HWbit mode set = forwarding set). When the guest completes
> the virtual IRQ the GIC HW automatically deactivates the physical IRQ
> found in the list register. In that mode the physical IRQ deactivation
> is under the ownership of the guest (actually automatically done by the HW).
> 
> If HWbit mode is *not* set (forwarding not set), you do not specify the
> HW IRQ in the list register. The host deactivates the physical IRQ &
> masks it before triggering the virtual IRQ. Only the virtual IRQ ID is
> programmed in the list register. When the guest completes the virtual
> IRQ, a physical maintenance IRQ is triggered. The hyp mode is entered
> and eventually the host unmasks the IRQ.
> 
> Some illustrations can be found in
> http://www.linux-kvm.org/images/a/a8/01x04-ARMdevice.pdf


I think an important aspect for our design is that in the case of Posted
Interrupts, they're only used for edge triggered interrupts so VFIO is
only an information provider for KVM to configure it.  VFIO will
hopefully just see fewer interrupts as they magically appear directly in
the guest.  IRQ Forwarding however affects the de-assertion of level
triggered interrupts.  VFIO needs to switch to something more like an
edge handler when IRQ Forwarding is enabled.  So in that model, VFIO
needs to provide information as well as consume it to change behavior.
Thanks,

Alex


  reply	other threads:[~2015-06-24 19:49 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11 10:51 [v4 00/16] Add VT-d Posted-Interrupts support Feng Wu
2015-06-11 10:51 ` [v4 01/16] KVM: Extend struct pi_desc for VT-d Posted-Interrupts Feng Wu
2015-06-23 15:49   ` Paolo Bonzini
2015-06-24  5:42     ` Wu, Feng
2015-06-24  8:46       ` Paolo Bonzini
2015-06-11 10:51 ` [v4 02/16] KVM: Add some helper functions for Posted-Interrupts Feng Wu
2015-06-11 10:51 ` [v4 03/16] KVM: Define a new interface kvm_intr_is_single_vcpu() Feng Wu
2015-06-11 10:51 ` [v4 04/16] KVM: Get Posted-Interrupts descriptor address from struct kvm_vcpu Feng Wu
2015-06-11 10:51 ` [v4 05/16] KVM: Add interfaces to control PI outside vmx Feng Wu
2015-06-11 10:51 ` [v4 06/16] KVM: Make struct kvm_irq_routing_table accessible Feng Wu
2015-06-11 10:51 ` [v4 07/16] KVM: make kvm_set_msi_irq() public Feng Wu
2015-06-11 10:51 ` [v4 08/16] KVM: kvm-vfio: User API for IRQ forwarding Feng Wu
2015-06-11 13:37   ` Eric Auger
2015-06-12  0:20     ` Wu, Feng
2015-06-11 19:59   ` Avi Kivity
2015-06-12  0:23     ` Wu, Feng
2015-06-12 15:41       ` Alex Williamson
2015-06-12 18:48         ` Avi Kivity
2015-06-12 19:03           ` Alex Williamson
2015-06-15  6:42             ` Wu, Feng
2015-06-15  6:42               ` Wu, Feng
2015-06-15 16:17             ` Eric Auger
2015-06-15 16:45               ` Alex Williamson
2015-06-18  9:16                 ` Wu, Feng
2015-06-18  9:16                   ` Wu, Feng
2015-06-18 20:04                   ` Alex Williamson
2015-06-24 15:46                     ` Joerg Roedel
2015-06-25  1:54                       ` Wu, Feng
2015-06-25  9:37                       ` Wu, Feng
2015-06-25 15:11                         ` Alex Williamson
2015-06-29  9:06                           ` Joerg Roedel
2015-06-29  9:14                             ` Wu, Feng
2015-06-29  9:22                               ` Joerg Roedel
2015-06-29 13:01                                 ` Wu, Feng
2015-06-29 13:27                     ` Wu, Feng
2015-06-29 13:27                       ` Wu, Feng
2015-06-29 15:18                       ` Alex Williamson
2015-06-24 15:50               ` Joerg Roedel
2015-06-24 16:25                 ` Eric Auger
2015-06-24 19:49                   ` Alex Williamson [this message]
2015-06-25  1:57                     ` Wu, Feng
2015-06-25  1:57                       ` Wu, Feng
2015-06-11 10:51 ` [v4 09/16] VFIO: external user API for interaction Feng Wu
2015-06-11 10:51 ` [v4 10/16] KVM: kvm-vfio: wrappers to VFIO external API device helpers Feng Wu
2015-06-11 10:51 ` [v4 11/16] KVM: kvm-vfio: User API for VT-d Posted-Interrupts Feng Wu
2015-06-11 10:51 ` [v4 12/16] KVM: kvm-vfio: implement the VFIO skeleton " Feng Wu
2015-06-11 17:15   ` Alex Williamson
2015-06-12  4:54     ` Wu, Feng
2015-06-12  4:54       ` Wu, Feng
2015-06-12 14:51       ` Alex Williamson
2015-06-23 16:00         ` Paolo Bonzini
2015-06-11 10:51 ` [v4 13/16] KVM: x86: kvm-vfio: VT-d posted-interrupts setup Feng Wu
2015-06-11 17:16   ` Alex Williamson
2015-06-12  4:58     ` Wu, Feng
2015-06-12  4:58       ` Wu, Feng
2015-06-11 10:51 ` [v4 14/16] KVM: Update Posted-Interrupts Descriptor when vCPU is preempted Feng Wu
2015-06-11 10:51 ` [v4 15/16] KVM: Update Posted-Interrupts Descriptor when vCPU is blocked Feng Wu
2015-06-23 16:05   ` Paolo Bonzini
2015-06-11 10:51 ` [v4 16/16] KVM: Warn if 'SN' is set during posting interrupts by software Feng Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1435175367.3700.316.camel@redhat.com \
    --to=alex.williamson@redhat.com \
    --cc=avi.kivity@gmail.com \
    --cc=eric.auger@linaro.org \
    --cc=feng.wu@intel.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.