Masaki Kanno
2009-May-14 02:41 UTC
[Xen-devel] [PATCH] Fix xm pci-list for inactive managed domains
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 <<snip>> (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 <<snip>> (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 <horms@verge.net.au> Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com> Best regards, Kan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Simon Horman
2009-May-14 03:40 UTC
[Xen-devel] Re: [PATCH] Fix xm pci-list for inactive managed domains
On Thu, May 14, 2009 at 11:41:11AM +0900, Masaki Kanno wrote: 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.Hi Kanno-san, I''m a bit dubious about using requested_vslot if vslot isn''t present, because as the name suggests, its just a request, that may fail. However, I do conceede that it is probably the best option available if you are not happy with the vslot not being reported in this case. Is there really a need for the slot to be reported in this case? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Masaki Kanno
2009-May-14 04:44 UTC
Re: [Xen-devel] Re: [PATCH] Fix xm pci-list for inactive managed domains
Thu, 14 May 2009 13:40:04 +1000, Simon Horman wrote:>On Thu, May 14, 2009 at 11:41:11AM +0900, Masaki Kanno wrote: >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. > >Hi Kanno-san, > >I''m a bit dubious about using requested_vslot if vslot isn''t >present, because as the name suggests, its just a request, >that may fail. However, I do conceede that it is probably the >best option available if you are not happy with the >vslot not being reported in this case. Is there really a need >for the slot to be reported in this case?Hi Simon, Yes, I think that the virtual slot is necessary in the case. When I add a definition of a PCI device to an inactive managed domain by using xm pci-attach, I''d like to know current PCI device configuration of the domain. (e.g. I''d like to know free virtual slot numbers or used virtual slot numbers.) Best regards, Kan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Simon Horman
2009-May-14 04:59 UTC
Re: [Xen-devel] Re: [PATCH] Fix xm pci-list for inactive managed domains
On Thu, May 14, 2009 at 01:44:06PM +0900, Masaki Kanno wrote:> Thu, 14 May 2009 13:40:04 +1000, Simon Horman wrote: > > >On Thu, May 14, 2009 at 11:41:11AM +0900, Masaki Kanno wrote: > >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. > > > >Hi Kanno-san, > > > >I''m a bit dubious about using requested_vslot if vslot isn''t > >present, because as the name suggests, its just a request, > >that may fail. However, I do conceede that it is probably the > >best option available if you are not happy with the > >vslot not being reported in this case. Is there really a need > >for the slot to be reported in this case? > > Hi Simon, > > Yes, I think that the virtual slot is necessary in the case. > When I add a definition of a PCI device to an inactive managed domain by > using xm pci-attach, I''d like to know current PCI device configuration > of the domain. (e.g. I''d like to know free virtual slot numbers or used > virtual slot numbers.)Hi Kanno-san, Ok, understood. Have you checked your patch against the case where the vslot is not specified? I wonder if you might need a little bit of extra logic for that case. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Masaki Kanno
2009-May-14 05:23 UTC
Re: [Xen-devel] Re: [PATCH] Fix xm pci-list for inactive manageddomains
Thu, 14 May 2009 14:59:30 +1000, Simon Horman wrote:>On Thu, May 14, 2009 at 01:44:06PM +0900, Masaki Kanno wrote: >> Thu, 14 May 2009 13:40:04 +1000, Simon Horman wrote: >> >> >On Thu, May 14, 2009 at 11:41:11AM +0900, Masaki Kanno wrote: >> >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. >> > >> >Hi Kanno-san, >> > >> >I''m a bit dubious about using requested_vslot if vslot isn''t >> >present, because as the name suggests, its just a request, >> >that may fail. However, I do conceede that it is probably the >> >best option available if you are not happy with the >> >vslot not being reported in this case. Is there really a need >> >for the slot to be reported in this case? >> >> Hi Simon, >> >> Yes, I think that the virtual slot is necessary in the case. >> When I add a definition of a PCI device to an inactive managed domain by >> using xm pci-attach, I''d like to know current PCI device configuration >> of the domain. (e.g. I''d like to know free virtual slot numbers or used >> virtual slot numbers.) > >Hi Kanno-san, > >Ok, understood. > >Have you checked your patch against the case where the vslot is not >specified? I wonder if you might need a little bit of extra logic for that >case.Hi Simon, I have tried it. The default virtual slot number (0x20) is shown. Should not virtual slot numbers be shown in the case? # 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 VSlt domain bus slot func 0x20 0x0 0x01 0x00 0x0 0x20 0x0 0x01 0x00 0x1 # xm list --long vm1 (domain <<snip>> (device (pci (uuid 03bebfe2-83aa-7105-08f4-f75fcf182f00) (dev (slot 0x00) (requested_vslot 0x20) (domain 0x0) (uuid 77bdb592-4856-4fdc-30d7-85d65f7f3647) (bus 0x01) (func 0x0) ) (dev (slot 0x00) (requested_vslot 0x20) (domain 0x0) (uuid 7cc2da5d-191d-281d-0d63-0e779308f4b6) (bus 0x01) (func 0x1) ) ) ) ) Best regards, Kan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Simon Horman
2009-May-14 05:42 UTC
Re: [Xen-devel] Re: [PATCH] Fix xm pci-list for inactive manageddomains
On Thu, May 14, 2009 at 02:23:20PM +0900, Masaki Kanno wrote:> Thu, 14 May 2009 14:59:30 +1000, Simon Horman wrote: > > > >Hi Kanno-san, > > > >Ok, understood. > > > >Have you checked your patch against the case where the vslot is not > >specified? I wonder if you might need a little bit of extra logic for that > >case. > > Hi Simon, > > I have tried it. The default virtual slot number (0x20) is shown. > Should not virtual slot numbers be shown in the case?Hi Kanno-san, I don''t think that it is good to expect that the user will know that 0x20 means unasigned. Furthermore, it might be nice to be able to change that magic value in the future. I suggest either: 1) Not showing the vSlot in this case or; 2) Showing something like the string "unassigned" _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Masaki Kanno
2009-May-14 08:30 UTC
Re: [Xen-devel] Re: [PATCH] Fix xm pci-list for inactivemanageddomains
Thu, 14 May 2009 15:42:14 +1000, Simon Horman wrote:>On Thu, May 14, 2009 at 02:23:20PM +0900, Masaki Kanno wrote: >> Thu, 14 May 2009 14:59:30 +1000, Simon Horman wrote: >> > >> >Hi Kanno-san, >> > >> >Ok, understood. >> > >> >Have you checked your patch against the case where the vslot is not >> >specified? I wonder if you might need a little bit of extra logic for >> >that >> >case. >> >> Hi Simon, >> >> I have tried it. The default virtual slot number (0x20) is shown. >> Should not virtual slot numbers be shown in the case? > >Hi Kanno-san, > >I don''t think that it is good to expect that the user will know >that 0x20 means unasigned. Furthermore, it might be nice to >be able to change that magic value in the future. I suggest either: > >1) Not showing the vSlot in this case or; >2) Showing something like the string "unassigned"Hi Simon, Thanks for your suggestion. I will choose 2) for the following case. e.g. pci = [ ''01:00.0@6'',''01:00.1'' ] Best regards, Kan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel