From: Qing He <qing.he@intel.com>
To: xen-devel@lists.xensource.com
Cc: Qing He <qing.he@intel.com>
Subject: [PATCH 6/6] passthough: MSI-INTx translation documentation
Date: Thu, 8 Jan 2009 17:06:49 +0800 [thread overview]
Message-ID: <1231405609-23138-7-git-send-email-qing.he@intel.com> (raw)
In-Reply-To: <1231405609-23138-1-git-send-email-qing.he@intel.com>
passthough: MSI-INTx translation documentation
Signed-off-by: Qing He <qing.he@intel.com>
---
diff -r c4ef5731a992 -r 80fcb0b96801 docs/misc/vtd.txt
--- a/docs/misc/vtd.txt Wed Jan 07 07:39:55 2009 +0800
+++ b/docs/misc/vtd.txt Wed Jan 07 20:35:11 2009 +0800
@@ -38,6 +38,30 @@
Add "msi=1" option in kernel line of host grub.
+MSI-INTx translation for passthrough devices in HVM
+---------------------------------------------------
+
+If the assigned device uses a physical IRQ that is shared by more than
+one device among multiple domains, there may be significant impact on
+device performance. Unfortunately, this is quite a common case if the
+IO-APIC (INTx) IRQ is used. MSI can avoid this issue, but was only
+available if the guest enables it.
+
+With MSI-INTx translation turned on, Xen enables device MSI if it's
+available, regardless of whether the guest uses INTx or MSI. If the
+guest uses INTx IRQ, Xen will inject a translated INTx IRQ to guest's
+virtual ioapic whenever an MSI message is received. This reduces the
+interrupt sharing of the system. If the guest OS enables MSI or MSI-X,
+the translation is automatically turned off.
+
+To enable or disable MSI-INTx translation globally, add "pci_msitranslate"
+in the config file:
+ pci_msitranslate = 1 (default is 1)
+
+To override for a specific device:
+ pci = [ '01:00.0,msitranslate=0', '03:00.0' ]
+
+
Caveat on Conventional PCI Device Passthrough
---------------------------------------------
@@ -79,6 +103,11 @@
3. Attach a PCI device to the guest by the physical BDF and desired virtual slot(optional). Following command would insert the physical device into guest's virtual slot 7
[root@vt-vtd ~]# xm pci-attach HVMDomainVtd 0:2:0.0 7
+
+ To specify options for the device, use -o or --options=. Following command would disable MSI-INTx translation for the device
+
+ [root@vt-vtd ~]# xm pci-attach -o msitranslate=0 0:2:0.0 7
+
VTd hotplug usage model:
------------------------
diff -r c4ef5731a992 -r 80fcb0b96801 tools/examples/xmexample.hvm
--- a/tools/examples/xmexample.hvm Wed Jan 07 07:39:55 2009 +0800
+++ b/tools/examples/xmexample.hvm Wed Jan 07 20:35:11 2009 +0800
@@ -288,6 +288,39 @@
# 'x' -> we don't care (do not check)
# 's' -> the bit must be the same as on the host that started this VM
+#-----------------------------------------------------------------------------
+# Configure passthrough PCI{,-X,e} devices:
+#
+# pci=[ '[SSSS:]BB:DD.F[,option1[,option2[...]]]', ... ]
+#
+# [SSSS]:BB:DD.F "bus segment:bus:device.function"(1) of the device to
+# be assigned, bus segment is optional. All fields are
+# in hexadecimal and no field should be longer than that
+# as shown in the pattern. Successful assignment may need
+# certain hardware support and additional configurations
+# (e.g. VT-d, see docs/misc/vtd.txt for more details).
+#
+# (1) bus segment is sometimes also referred to as the PCI "domain",
+# not to be confused with Xen domain.
+#
+#
+# optionN per-device options in "key=val" format. Current
+# available options are:
+# - msitranslate=0|1
+# per-device overriden of pci_msitranslate, see below
+#
+#pci=[ '07:00.0', '07:00.1' ]
+
+# MSI-INTx translation for MSI capable devices:
+#
+# If it's set, Xen will enable MSI for the device that supports it even
+# if the guest don't use MSI. In the case, an IO-APIC type interrupt will
+# be injected to the guest every time a corresponding MSI message is
+# received.
+# If the guest enables MSI or MSI-X, the translation is automatically
+# turned off.
+#
+#pci_msitranslate=1
#-----------------------------------------------------------------------------
# Configure PVSCSI devices:
next prev parent reply other threads:[~2009-01-08 9:06 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-08 9:06 [PATCH 0/6] MSI-INTx interrupt translation for HVM Qing He
2009-01-08 9:06 ` [PATCH 1/6] passthrough: MSI-INTx " Qing He
2009-01-08 9:06 ` [PATCH 2/6] ioemu:passthrough: MSI-INTx interrupt translation support Qing He
2009-01-08 9:06 ` [PATCH 3/6] pci: add pci option support for XML-RPC server Qing He
2009-01-08 9:06 ` [PATCH 4/6] pci: add pci option support for XenAPI server Qing He
2009-01-08 9:06 ` [PATCH 5/6] pci: add config options for MSI-INTx translation in HVM Qing He
2009-01-08 9:06 ` Qing He [this message]
2009-01-08 10:44 ` [PATCH 0/6] MSI-INTx interrupt translation for HVM Shohei Fujiwara
2009-01-08 14:52 ` Qing He
2009-01-09 4:26 ` Shohei Fujiwara
2009-01-09 6:57 ` Qing He
2009-01-13 9:05 ` Shohei Fujiwara
2009-01-13 9:28 ` Qing He
2009-01-14 6:39 ` Shohei Fujiwara
2009-01-14 7:38 ` Qing He
2009-01-14 8:26 ` Shohei Fujiwara
2009-01-14 9:17 ` Qing He
2009-01-15 2:35 ` Shohei Fujiwara
2009-01-15 6:25 ` Qing He
2009-01-16 4:34 ` Shohei Fujiwara
2009-02-27 2:41 ` Shohei Fujiwara
2009-03-01 14:55 ` Keir Fraser
2009-03-02 7:19 ` Shohei Fujiwara
2009-03-02 8:47 ` Keir Fraser
2009-03-02 9:24 ` Qing He
2009-03-02 9:40 ` Keir Fraser
2009-03-02 10:27 ` Shohei Fujiwara
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=1231405609-23138-7-git-send-email-qing.he@intel.com \
--to=qing.he@intel.com \
--cc=xen-devel@lists.xensource.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.