All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
To: "Zhai, Edwin" <edwin.zhai@intel.com>
Cc: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>, xen-devel@lists.xensource.com
Subject: Re: [PATCH] PV Passthrough PCI Device Hotplug Support (Tools Part)
Date: Mon, 10 Mar 2008 20:22:54 +0900	[thread overview]
Message-ID: <47D51A0E.3090108@ab.jp.nec.com> (raw)
In-Reply-To: <20080310071700.GM15578@edwin-srv.sh.intel.com>

Zhai, Edwin wrote:
> Yosuke,
> 
> Thanks for you work.
> I have tested your patch works on HVM VT-d side.

I'm relieved to hear that. Thank you.

> 
> One suggestion is error handling for user input. e.g. following input error 
> should be caught by xm:
> 
> [root@vt-gang32 ~]# xm pci-attach EdwinHVMDomainVtd2 0:2.0.0    (should be 
> 0:2:0.0)
> 
> Error: pci: failed to locate device and parse it's resources - [Errno 2] No such 
> file or directory: '/sys/bus/pci/devices/0000:00:02.0/driver'
> Usage: xm pci-attach <Domain> <domain:bus:slot.func> [virtual slot]

Okay.
The small patch below should fix the issue.
(applied after the previous patch)

Thanks,
   Yosuke Iwamatsu

---------

xm: Fix parsing pci device name.

Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>

diff -r 9233270dfe6a tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py	Mon Mar 10 17:58:25 2008 +0900
+++ b/tools/python/xen/xm/main.py	Mon Mar 10 20:26:49 2008 +0900
@@ -2240,7 +2240,7 @@ def parse_pci_configuration(args, state)
      pci_match = re.match(r"((?P<domain>[0-9a-fA-F]{1,4})[:,])?" + \
              r"(?P<bus>[0-9a-fA-F]{1,2})[:,]" + \
              r"(?P<slot>[0-9a-fA-F]{1,2})[.,]" + \
-            r"(?P<func>[0-9a-fA-F])", pci_dev_str)
+            r"(?P<func>[0-7])$", pci_dev_str)
      if pci_match == None:
          raise OptionError("Invalid argument: %s %s" % (pci_dev_str,vslt))
      pci_dev_info = pci_match.groupdict('0')

      reply	other threads:[~2008-03-10 11:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-21 11:01 [PATCH 1/3][RFC] PV Passthrough PCI Device Hotplug Support (Tools Part) Yosuke Iwamatsu
2008-02-22 10:04 ` Keir Fraser
2008-02-22 10:19   ` Yosuke Iwamatsu
2008-03-10  1:19     ` [PATCH] " Yosuke Iwamatsu
2008-03-10  2:04       ` [PATCH] PV Passthrough PCI Device Hotplug Support(Tools Part) Masaki Kanno
2008-03-10  2:26         ` Yosuke Iwamatsu
2008-03-10  7:17       ` [PATCH] PV Passthrough PCI Device Hotplug Support (Tools Part) Zhai, Edwin
2008-03-10 11:22         ` Yosuke Iwamatsu [this message]

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=47D51A0E.3090108@ab.jp.nec.com \
    --to=y-iwamatsu@ab.jp.nec.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=edwin.zhai@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.