WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] pci: add config options for MSI-INTx tran

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] pci: add config options for MSI-INTx translation in HVM
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Jan 2009 02:50:15 -0800
Delivery-date: Fri, 16 Jan 2009 02:50:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1231414018 0
# Node ID 3a92e1a446d9cfe7524f75d959b21ca7eb042ef6
# Parent  989bd3f2fd72b285310747543a97acd89654db8a
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 base to be overridden

Signed-off-by: Qing He <qing.he@xxxxxxxxx>
---
 tools/python/xen/xend/XendConfig.py   |    1 +
 tools/python/xen/xend/server/pciif.py |    3 +++
 tools/python/xen/xm/create.py         |   19 +++++++++++++++----
 tools/python/xen/xm/xenapi_create.py  |    1 +
 4 files changed, 20 insertions(+), 4 deletions(-)

diff -r 989bd3f2fd72 -r 3a92e1a446d9 tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Thu Jan 08 11:26:16 2009 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Thu Jan 08 11:26:58 2009 +0000
@@ -166,6 +166,7 @@ XENAPI_PLATFORM_CFG_TYPES = {
     'guest_os_type': str,
     'hap': int,
     'xen_extended_power_mgmt': int,
+    'pci_msitranslate': int,
 }
 
 # Xen API console 'other_config' keys.
diff -r 989bd3f2fd72 -r 3a92e1a446d9 tools/python/xen/xend/server/pciif.py
--- a/tools/python/xen/xend/server/pciif.py     Thu Jan 08 11:26:16 2009 +0000
+++ b/tools/python/xen/xend/server/pciif.py     Thu Jan 08 11:26:58 2009 +0000
@@ -95,6 +95,9 @@ class PciController(DevController):
 
         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 989bd3f2fd72 -r 3a92e1a446d9 tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Thu Jan 08 11:26:16 2009 +0000
+++ b/tools/python/xen/xm/create.py     Thu Jan 08 11:26:58 2009 +0000
@@ -318,11 +318,14 @@ gopts.var('disk', val='phy:DEV,VDEV,MODE
           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 @@ gopts.var('suppress_spurious_page_faults
           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 @@ def configure_pci(config_devs, vals):
         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 @@ def configure_hvm(config_image, vals):
              '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 989bd3f2fd72 -r 3a92e1a446d9 tools/python/xen/xm/xenapi_create.py
--- a/tools/python/xen/xm/xenapi_create.py      Thu Jan 08 11:26:16 2009 +0000
+++ b/tools/python/xen/xm/xenapi_create.py      Thu Jan 08 11:26:58 2009 +0000
@@ -1041,6 +1041,7 @@ class sxp2xml:
             'vhpt',
             'guest_os_type',
             'hap',
+            'pci_msitranslate',
         ]
 
         platform_configs = []

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] pci: add config options for MSI-INTx translation in HVM, Xen patchbot-unstable <=