All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: xen-devel <xen-devel@lists.xenproject.org>
Cc: Kevin Tian <kevin.tian@intel.com>
Subject: [PATCH] VT-d: posted interrupts require interrupt remapping
Date: Fri, 05 Apr 2019 01:01:49 -0600	[thread overview]
Message-ID: <5CA6FD5D0200007800224C46@prv1-mh.provo.novell.com> (raw)

Initially I had just noticed the unnecessary indirection in the call
from pi_update_irte(). The generic wrapper having an iommu_intremap
conditional made me look at the setup code though. So first of all
enforce the necessary dependency.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/passthrough/vtd/intremap.c
+++ b/xen/drivers/passthrough/vtd/intremap.c
@@ -993,7 +993,8 @@ int pi_update_irte(const struct pi_desc
     spin_unlock_irq(&desc->lock);
 
     ASSERT(pcidevs_locked());
-    return iommu_update_ire_from_msi(msi_desc, &msi_desc->msg);
+
+    return msi_msg_write_remap_rte(msi_desc, &msi_desc->msg);
 
  unlock_out:
     spin_unlock_irq(&desc->lock);
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -2342,7 +2342,7 @@ static int __init vtd_setup(void)
          * not supported, since we count on this feature to
          * atomically update 16-byte IRTE in posted format.
          */
-        if ( !cap_intr_post(iommu->cap) || !cpu_has_cx16 )
+        if ( !cap_intr_post(iommu->cap) || !iommu_intremap || !cpu_has_cx16 )
             iommu_intpost = 0;
 
         if ( !vtd_ept_page_compatible(iommu) )




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

WARNING: multiple messages have this Message-ID (diff)
From: "Jan Beulich" <JBeulich@suse.com>
To: "xen-devel" <xen-devel@lists.xenproject.org>
Cc: Kevin Tian <kevin.tian@intel.com>
Subject: [Xen-devel] [PATCH] VT-d: posted interrupts require interrupt remapping
Date: Fri, 05 Apr 2019 01:01:49 -0600	[thread overview]
Message-ID: <5CA6FD5D0200007800224C46@prv1-mh.provo.novell.com> (raw)
Message-ID: <20190405070149.W4dr6LWdC3tsaLD55D_yynhBRfZijU1kLnot_9-6lQ0@z> (raw)

Initially I had just noticed the unnecessary indirection in the call
from pi_update_irte(). The generic wrapper having an iommu_intremap
conditional made me look at the setup code though. So first of all
enforce the necessary dependency.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/passthrough/vtd/intremap.c
+++ b/xen/drivers/passthrough/vtd/intremap.c
@@ -993,7 +993,8 @@ int pi_update_irte(const struct pi_desc
     spin_unlock_irq(&desc->lock);
 
     ASSERT(pcidevs_locked());
-    return iommu_update_ire_from_msi(msi_desc, &msi_desc->msg);
+
+    return msi_msg_write_remap_rte(msi_desc, &msi_desc->msg);
 
  unlock_out:
     spin_unlock_irq(&desc->lock);
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -2342,7 +2342,7 @@ static int __init vtd_setup(void)
          * not supported, since we count on this feature to
          * atomically update 16-byte IRTE in posted format.
          */
-        if ( !cap_intr_post(iommu->cap) || !cpu_has_cx16 )
+        if ( !cap_intr_post(iommu->cap) || !iommu_intremap || !cpu_has_cx16 )
             iommu_intpost = 0;
 
         if ( !vtd_ept_page_compatible(iommu) )




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

             reply	other threads:[~2019-04-05  7:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05  7:01 Jan Beulich [this message]
2019-04-05  7:01 ` [Xen-devel] [PATCH] VT-d: posted interrupts require interrupt remapping Jan Beulich
2019-04-09  3:09 ` Tian, Kevin
2019-04-09  3:09   ` [Xen-devel] " Tian, Kevin
2019-04-09  9:10 ` Andrew Cooper
2019-04-09  9:10   ` [Xen-devel] " Andrew Cooper

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=5CA6FD5D0200007800224C46@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=kevin.tian@intel.com \
    --cc=xen-devel@lists.xenproject.org \
    /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.