Fix xm pci-list for inactive managed domains
PATCH v2 1/1 Fix xm pci-list for inactive managed domains
Hi,
Virtual slot numbers are shown as follows by this patch.
# cat /etc/xen/vm1 | grep pci pci = [ '01:00.0','01:00.1' ] # xm new vm1 Using config file "/etc/xen/vm1". # xm pci-list vm1 domain bus slot func 0x0 0x01 0x00 0x0 0x0 0x01 0x00 0x1
# cat /etc/xen/vm1 | grep pci pci = [ '01:00.0@a','01:00.1' ] # xm new vm1 Using config file "/etc/xen/vm1". # xm pci-list vm1 VSlt domain bus slot func 0xa 0x0 0x01 0x00 0x0 - 0x0 0x01 0x00 0x1
# cat /etc/xen/vm1 | grep pci pci = [ '01:00.0','01:00.1@1a' ] # xm new vm1 Using config file "/etc/xen/vm1". # xm pci-list vm1 VSlt domain bus slot func - 0x0 0x01 0x00 0x0 0x1a 0x0 0x01 0x00 0x1
# cat /etc/xen/vm1 | grep pci pci = [ '01:00.0@a','01:00.1@1a' ] # xm new vm1 Using config file "/etc/xen/vm1". # xm pci-list vm1 VSlt domain bus slot func 0xa 0x0 0x01 0x00 0x0 0x1a 0x0 0x01 0x00 0x1
Best regards,
Kan
tools/python/xen/xm/main.py +14 -3
@@ -2165,13 +2165,24 @@ def xm_pci_list(args): if len(devs) == 0: return - has_vslot = devs[0].has_key('vslot') + has_vslot = False + for x in devs: + if x.has_key('vslot'): + has_vslot = True + elif not x.has_key('requested_vslot'): + x['vslot'] = '-' + elif x['requested_vslot'] == "0x%s" % AUTO_PHP_SLOT_STR: + x['vslot'] = '-' + else: + has_vslot = True + x['vslot'] = x['requested_vslot'] + if has_vslot: hdr_str = 'VSlt domain bus slot func' - fmt_str = "%(vslot)-3s %(domain)-3s %(bus)-3s %(slot)-3s %(func)-3s " + fmt_str = "%(vslot)-4s %(domain)-3s %(bus)-4s %(slot)-4s %(func)-3s " else: hdr_str = 'domain bus slot func' - fmt_str = "%(domain)-3s %(bus)-3s %(slot)-3s %(func)-3s " + fmt_str = "%(domain)-3s %(bus)-4s %(slot)-4s %(func)-3s " hdr = 0 for x in devs:
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 44 lines · Masaki Kanno
Hi,
Virtual slot numbers are shown as follows by this patch.
# cat /etc/xen/vm1 | grep pci pci = [ '01:00.0','01:00.1' ] # xm new vm1 Using config file "/etc/xen/vm1". # xm pci-list vm1 domain bus slot func 0x0 0x01 0x00 0x0 0x0 0x01 0x00 0x1# cat /etc/xen/vm1 | grep pci pci = [ '01:00.0@a','01:00.1' ] # xm new vm1 Using config file "/etc/xen/vm1". # xm pci-list vm1 VSlt domain bus slot func 0xa 0x0 0x01 0x00 0x0 - 0x0 0x01 0x00 0x1# cat /etc/xen/vm1 | grep pci pci = [ '01:00.0','01:00.1@1a' ] # xm new vm1 Using config file "/etc/xen/vm1". # xm pci-list vm1 VSlt domain bus slot func - 0x0 0x01 0x00 0x0 0x1a 0x0 0x01 0x00 0x1# cat /etc/xen/vm1 | grep pci pci = [ '01:00.0@a','01:00.1@1a' ] # xm new vm1 Using config file "/etc/xen/vm1". # xm pci-list vm1 VSlt domain bus slot func 0xa 0x0 0x01 0x00 0x0 0x1a 0x0 0x01 0x00 0x1
Quoted 2 lines
Cc Simon Horman <[email protected]>Signed-off-by Masaki Kanno <[email protected]>
Hi Kanno-san,
this looks good to me.
Re: Re: [PATCH V2] Fix xm pci-list for inactive manageddomains
Hi Simon,
Thanks for your review.
Kan
Quoted 60 lines · Simon Horman
Quoted 44 lines · Masaki Kanno
Hi,
Virtual slot numbers are shown as follows by this patch.
# cat /etc/xen/vm1 | grep pci pci = [ '01:00.0','01:00.1' ] # xm new vm1 Using config file "/etc/xen/vm1". # xm pci-list vm1 domain bus slot func 0x0 0x01 0x00 0x0 0x0 0x01 0x00 0x1# cat /etc/xen/vm1 | grep pci pci = [ '01:00.0@a','01:00.1' ] # xm new vm1 Using config file "/etc/xen/vm1". # xm pci-list vm1 VSlt domain bus slot func 0xa 0x0 0x01 0x00 0x0 - 0x0 0x01 0x00 0x1# cat /etc/xen/vm1 | grep pci pci = [ '01:00.0','01:00.1@1a' ] # xm new vm1 Using config file "/etc/xen/vm1". # xm pci-list vm1 VSlt domain bus slot func - 0x0 0x01 0x00 0x0 0x1a 0x0 0x01 0x00 0x1# cat /etc/xen/vm1 | grep pci pci = [ '01:00.0@a','01:00.1@1a' ] # xm new vm1 Using config file "/etc/xen/vm1". # xm pci-list vm1 VSlt domain bus slot func 0xa 0x0 0x01 0x00 0x0 0x1a 0x0 0x01 0x00 0x1Quoted 2 lines
Cc Simon Horman <[email protected]>Signed-off-by Masaki Kanno <[email protected]>Hi Kanno-san,
this looks good to me.
Acked-by Simon Horman <[email protected]>_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Hi,
Sorry, please ignore the patch.
I'm going to send a correct patch tomorrow.
Best
Quoted 56 lines · Masaki Kanno
Hi,
Virtual slot numbers are shown as follows by this patch.
# cat /etc/xen/vm1 | grep pci pci = [ '01:00.0','01:00.1' ] # xm new vm1 Using config file "/etc/xen/vm1". # xm pci-list vm1 domain bus slot func 0x0 0x01 0x00 0x0 0x0 0x01 0x00 0x1# cat /etc/xen/vm1 | grep pci pci = [ '01:00.0@a','01:00.1' ] # xm new vm1 Using config file "/etc/xen/vm1". # xm pci-list vm1 VSlt domain bus slot func 0xa 0x0 0x01 0x00 0x0 - 0x0 0x01 0x00 0x1# cat /etc/xen/vm1 | grep pci pci = [ '01:00.0','01:00.1@1a' ] # xm new vm1 Using config file "/etc/xen/vm1". # xm pci-list vm1 VSlt domain bus slot func - 0x0 0x01 0x00 0x0 0x1a 0x0 0x01 0x00 0x1# cat /etc/xen/vm1 | grep pci pci = [ '01:00.0@a','01:00.1@1a' ] # xm new vm1 Using config file "/etc/xen/vm1". # xm pci-list vm1 VSlt domain bus slot func 0xa 0x0 0x01 0x00 0x0 0x1a 0x0 0x01 0x00 0x1Cc Simon Horman <[email protected]>Signed-off-by Masaki Kanno <[email protected]>Best regards,
Kan-------------------------------text/plain-------------------------------
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel