From: Masaki Kanno Subject: [PATCH] Fix xm pci-list for inactive managed domains Date: Thu, 14 May 2009 11:41:11 +0900 Message-ID: <53C9D43D715C02kanno.masaki@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-13wJ8zGW7uj7rWDjQF594" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: horms@verge.net.au List-Id: xen-devel@lists.xenproject.org --Boundary-13wJ8zGW7uj7rWDjQF594 Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit Content-Description: Mail message body Hi, I found a problem of xm pci-list. In inactive managed domains, I cannot confirm virtual slot numbers of PCI devices by using xm pci-list as follows. In fact, I can confirm virtual slot numbers of PCI devices by using xm pci-list if active domains. # cat /etc/xen/vm1 | grep pci pci = [ '01:00.0@6','01:00.1@7' ] # xm new vm1 Using config file "./vm1". # xm pci-list vm1 domain bus slot func 0x0 0x01 0x00 0x0 0x0 0x01 0x00 0x1 # xm list --long vm1 (domain <> (device (pci (uuid 7887cf50-8919-0dee-9811-992cf259daf6) (dev (slot 0x00) (requested_vslot 0x6) (domain 0x0) (uuid 85352de7-53c7-8a94-96d2-68852825674c) (bus 0x01) (func 0x0) ) (dev (slot 0x00) (requested_vslot 0x7) (domain 0x0) (uuid 62e52cb4-e47d-12ce-42ba-860ee44026c8) (bus 0x01) (func 0x1) ) ) ) ) # xm start vm1 # xm pci-list vm1 VSlt domain bus slot func 0x06 0x0 0x01 0x00 0x0 0x07 0x0 0x01 0x00 0x1 # xm list --long vm1 (domain <> (device (pci (dev (slot 0x00) (domain 0x0000) (uuid 85352de7-53c7-8a94-96d2-68852825674c) (vslot 0x06) (bus 0x01) (func 0x0) ) (dev (slot 0x00) (domain 0x0000) (uuid 62e52cb4-e47d-12ce-42ba-860ee44026c8) (vslot 0x07) (bus 0x01) (func 0x1) ) (uuid 7887cf50-8919-0dee-9811-992cf259daf6) (backend 0) ) ) ) Virtual slot numbers of PCI devices in inactive managed domains are shown by this patch. # xm new vm1 Using config file "/etc/xen/vm1". # xm pci-list vm1 VSlt domain bus slot func 0x6 0x0 0x01 0x00 0x0 0x7 0x0 0x01 0x00 0x1 Cc: Simon Horman Signed-off-by: Masaki Kanno Best regards, Kan --Boundary-13wJ8zGW7uj7rWDjQF594 Content-Type: application/octet-stream; name="xm_pci_list.patch" Content-Disposition: attachment; filename="xm_pci_list.patch" Content-Transfer-Encoding: base64 ZGlmZiAtciAyNTIyY2M5NWVmZDIgdG9vbHMvcHl0aG9uL3hlbi94bS9tYWluLnB5Ci0tLSBh L3Rvb2xzL3B5dGhvbi94ZW4veG0vbWFpbi5weQlNb24gTWF5IDExIDEzOjUyOjA0IDIwMDkg KzAxMDAKKysrIGIvdG9vbHMvcHl0aG9uL3hlbi94bS9tYWluLnB5CVRodSBNYXkgMTQgMTA6 NTU6NDkgMjAwOSArMDkwMApAQCAtMjE2Niw5ICsyMTY2LDEzIEBAIGRlZiB4bV9wY2lfbGlz dChhcmdzKToKICAgICAgICAgcmV0dXJuCiAKICAgICBoYXNfdnNsb3QgPSBkZXZzWzBdLmhh c19rZXkoJ3ZzbG90JykKKyAgICBoYXNfcmVxX3ZzbG90ID0gZGV2c1swXS5oYXNfa2V5KCdy ZXF1ZXN0ZWRfdnNsb3QnKQogICAgIGlmIGhhc192c2xvdDoKICAgICAgICAgaGRyX3N0ciA9 ICdWU2x0IGRvbWFpbiAgIGJ1cyAgIHNsb3QgICBmdW5jJwogICAgICAgICBmbXRfc3RyID0g ICIlKHZzbG90KS0zcyAgICAlKGRvbWFpbiktM3MgICUoYnVzKS0zcyAgICUoc2xvdCktM3Mg ICAgJShmdW5jKS0zcyAgICAiCisgICAgZWxpZiBoYXNfcmVxX3ZzbG90OgorICAgICAgICBo ZHJfc3RyID0gJ1ZTbHQgZG9tYWluICAgYnVzICAgc2xvdCAgIGZ1bmMnCisgICAgICAgIGZt dF9zdHIgPSAgIiUocmVxdWVzdGVkX3ZzbG90KS0zcyAgICAlKGRvbWFpbiktM3MgICUoYnVz KS0zcyAgICUoc2xvdCktM3MgICAgJShmdW5jKS0zcyAgICAiCiAgICAgZWxzZToKICAgICAg ICAgaGRyX3N0ciA9ICdkb21haW4gICBidXMgICBzbG90ICAgZnVuYycKICAgICAgICAgZm10 X3N0ciA9ICAiJShkb21haW4pLTNzICAlKGJ1cyktM3MgICAlKHNsb3QpLTNzICAgICUoZnVu YyktM3MgICAgIgo= --Boundary-13wJ8zGW7uj7rWDjQF594 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-13wJ8zGW7uj7rWDjQF594--