From: Qing He <qing.he@intel.com>
To: xen-devel@lists.xensource.com
Cc: Qing He <qing.he@intel.com>
Subject: [PATCH 5/6] pci: add config options for MSI-INTx translation in HVM
Date: Thu, 8 Jan 2009 17:06:48 +0800 [thread overview]
Message-ID: <1231405609-23138-6-git-send-email-qing.he@intel.com> (raw)
In-Reply-To: <1231405609-23138-1-git-send-email-qing.he@intel.com>
pci: add config options for MSI-INTx translation in HVM
Add a config file option 'pci_msitranslate' to enable MSI-INTx translation
in HVM, and also a per-device option 'msitranslate' to allow device based
overriden
Signed-off-by: Qing He <qing.he@intel.com>
---
diff -r 82b05ac013fc -r b0a4862c9018 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py Thu Jan 08 02:09:19 2009 +0800
+++ b/tools/python/xen/xend/XendConfig.py Thu Jan 08 02:13:31 2009 +0800
@@ -166,6 +166,7 @@
'guest_os_type': str,
'hap': int,
'xen_extended_power_mgmt': int,
+ 'pci_msitranslate': int,
}
# Xen API console 'other_config' keys.
diff -r 82b05ac013fc -r b0a4862c9018 tools/python/xen/xend/server/pciif.py
--- a/tools/python/xen/xend/server/pciif.py Thu Jan 08 02:09:19 2009 +0800
+++ b/tools/python/xen/xend/server/pciif.py Thu Jan 08 02:13:31 2009 +0800
@@ -95,6 +95,9 @@
back['num_devs']=str(pcidevid)
back['uuid'] = config.get('uuid','')
+ if 'pci_msitranslate' in self.vm.info['platform']:
+ back['msitranslate']=str(self.vm.info['platform']['pci_msitranslate'])
+
return (0, back, {})
diff -r 82b05ac013fc -r b0a4862c9018 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py Thu Jan 08 02:09:19 2009 +0800
+++ b/tools/python/xen/xm/create.py Thu Jan 08 02:13:31 2009 +0800
@@ -318,11 +318,14 @@
backend driver domain to use for the disk.
The option may be repeated to add more than one disk.""")
-gopts.var('pci', val='BUS:DEV.FUNC',
+gopts.var('pci', val='BUS:DEV.FUNC[,msitranslate=0|1]',
fn=append_value, default=[],
use="""Add a PCI device to a domain, using given params (in hex).
- For example 'pci=c0:02.1'.
- The option may be repeated to add more than one pci device.""")
+ For example 'pci=c0:02.1'.
+ If msitranslate is set, MSI-INTx translation is enabled if possible.
+ Guest that doesn't support MSI will get IO-APIC type IRQs
+ translated from physical MSI, HVM only. Default is 1.
+ The option may be repeated to add more than one pci device.""")
gopts.var('vscsi', val='PDEV,VDEV[,DOM]',
fn=append_value, default=[],
@@ -588,6 +591,11 @@
fn=set_bool, default=None,
use="""Do not inject spurious page faults into this guest""")
+gopts.var('pci_msitranslate', val='TRANSLATE',
+ fn=set_int, default=1,
+ use="""Global PCI MSI-INTx translation flag (0=disable;
+ 1=enable.""")
+
def err(msg):
"""Print an error to stderr and exit.
"""
@@ -672,6 +680,9 @@
d = comma_sep_kv_to_dict(opts)
def f(k):
+ if k not in ['msitranslate']:
+ err('Invalid pci option: ' + k)
+
config_pci_opts.append([k, d[k]])
config_pci_bdf = ['dev', ['domain', domain], ['bus', bus], \
@@ -878,7 +889,7 @@
'sdl', 'display', 'xauthority', 'rtc_timeoffset', 'monitor',
'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci', 'hpet',
'guest_os_type', 'hap', 'opengl', 'cpuid', 'cpuid_check',
- 'viridian', 'xen_extended_power_mgmt' ]
+ 'viridian', 'xen_extended_power_mgmt', 'pci_msitranslate' ]
for a in args:
if a in vals.__dict__ and vals.__dict__[a] is not None:
diff -r 82b05ac013fc -r b0a4862c9018 tools/python/xen/xm/xenapi_create.py
--- a/tools/python/xen/xm/xenapi_create.py Thu Jan 08 02:09:19 2009 +0800
+++ b/tools/python/xen/xm/xenapi_create.py Thu Jan 08 02:13:31 2009 +0800
@@ -1041,6 +1041,7 @@
'vhpt',
'guest_os_type',
'hap',
+ 'pci_msitranslate',
]
platform_configs = []
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 ` Qing He [this message]
2009-01-08 9:06 ` [PATCH 6/6] passthough: MSI-INTx translation documentation Qing He
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-6-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.