All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: xen-devel@lists.xensource.com
Cc: Dexuan Cui <dexuan.cui@intel.com>
Subject: [patch] xend: pass-through Use pci_dict_to_bdf_str() in hvm_pci_device_create()
Date: Wed, 29 Jul 2009 12:09:33 +1000	[thread overview]
Message-ID: <20090729020933.GA17956@verge.net.au> (raw)

* Use pci_dict_to_bdf_str() in hvm_pci_device_create()
* Use pci_name instead of pci_str in error message, pci_str does not exist

Cc: Dexuan Cui <dexuan.cui@intel.com>
Signed-off-by: Simon Horman <horms@verge.net.au>

--- 

This is an enhancement to the following changeset in xen-unstable.hg:

changeset:   19995:7faf35a248c0
user:        Keir Fraser <keir.fraser@citrix.com>
date:        Tue Jul 28 16:42:12 2009 +0100
summary:     xend: pass-through: fix "xm pci-list-assignable-devices' for pv_guest

Index: xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py
===================================================================
--- xen-unstable.hg.orig/tools/python/xen/xend/XendDomainInfo.py	2009-07-29 10:41:52.000000000 +1000
+++ xen-unstable.hg/tools/python/xen/xend/XendDomainInfo.py	2009-07-29 12:04:42.000000000 +1000
@@ -679,14 +679,10 @@ class XendDomainInfo:
                     raise VmError("device is already inserted")
 
         # Test whether the devices can be assigned with VT-d
-        pci_name = '%04x:%02x:%02x.%x' % \
-          (parse_hex(new_dev['domain']),\
-           parse_hex(new_dev['bus']),\
-           parse_hex(new_dev['slot']),\
-           parse_hex(new_dev['func']))
+        pci_name = pci_dict_to_bdf_str(new_dev)
         if pci_name in get_all_assigned_pci_devices():
             raise VmError("failed to assign device %s that has"
-                          " already been assigned to other domain." % pci_str)
+                          " already been assigned to other domain." % pci_name)
 
         # Here, we duplicate some checkings (in some cases, we mustn't allow
         # a device to be hot-plugged into an HVM guest) that are also done in

             reply	other threads:[~2009-07-29  2:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-29  2:09 Simon Horman [this message]
2009-07-29  2:27 ` [patch] xend: pass-through Use pci_dict_to_bdf_str() in hvm_pci_device_create() Cui, Dexuan

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=20090729020933.GA17956@verge.net.au \
    --to=horms@verge.net.au \
    --cc=dexuan.cui@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.