Masaki Kanno
2009-May-28 07:01 UTC
[Xen-devel] [PATCH] xend: Update info[''platform''][''pci'']
Hi, This patch updates info[''platform''][''pci''] for PCI devices assignment to domains. When a domain is started, xend confirms by using xc.test_assign_device whether PCI devices can be assigned to the domain. For the confirmation, info[''platform''][''pci''] must be an appropriate value. However, info[''platform''][''pci''] may be not appropriate. Because info[''platform''][''pci''] isn''t almost always updated even if the PCI device configuration of the domain was changed by using xm pci-attach/detach. This patch updates info[''platform''][''pci''] to the appropriate value when domains are started. 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-28 10:46 UTC
[Xen-devel] Re: [PATCH] xend: Update info[''platform''][''pci'']
On Thu, May 28, 2009 at 04:01:50PM +0900, Masaki Kanno wrote: Content-Description: Mail message body> Hi, > > This patch updates info[''platform''][''pci''] for PCI devices assignment > to domains. > > When a domain is started, xend confirms by using xc.test_assign_device > whether PCI devices can be assigned to the domain. > For the confirmation, info[''platform''][''pci''] must be an appropriate > value. However, info[''platform''][''pci''] may be not appropriate. > Because info[''platform''][''pci''] isn''t almost always updated even if > the PCI device configuration of the domain was changed by using > xm pci-attach/detach. > This patch updates info[''platform''][''pci''] to the appropriate value > when domains are started.Hi Kanno-san, I am curious to know how you exercise this code. Did you notice a bug under some conditions? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Masaki Kanno
2009-Jun-01 04:08 UTC
Re: [Xen-devel] Re: [PATCH] xend: Update info[''platform''][''pci'']
Thu, 28 May 2009 20:46:31 +1000, Simon Horman wrote:>On Thu, May 28, 2009 at 04:01:50PM +0900, Masaki Kanno wrote: >Content-Description: Mail message body >> Hi, >> >> This patch updates info[''platform''][''pci''] for PCI devices assignment >> to domains. >> >> When a domain is started, xend confirms by using xc.test_assign_device >> whether PCI devices can be assigned to the domain. >> For the confirmation, info[''platform''][''pci''] must be an appropriate >> value. However, info[''platform''][''pci''] may be not appropriate. >> Because info[''platform''][''pci''] isn''t almost always updated even if >> the PCI device configuration of the domain was changed by using >> xm pci-attach/detach. >> This patch updates info[''platform''][''pci''] to the appropriate value >> when domains are started. > >Hi Kanno-san, > >I am curious to know how you exercise this code. >Did you notice a bug under some conditions?Hi Simon, Sorry for late response. I noticed the bug when I tried the following operations. 1) xm new vm1 2) xm list --long vm1 (domain <<snip>> (image (hvm <<snip>> (pci ((0x0 0x01 0x00 0x0 0x6 ))) 3) xm pci-attach vm1 00:1a.0 7 4) xm list --long vm1 (domain <<snip>> (image (hvm <<snip>> (pci ((0x0 0x01 0x00 0x0 0x6 ))) The value of /domain/image/hvm/pci is a value of info[''platform''][''pci'']. The value wasn''t updated when I attached the PCI device to the domain by using xm pci-attach. The value is updated by my patch. Nonetheless, the value isn''t still updated when xm pci-attach/detach are executed. The value is updated when starting domains. Best regards, Kan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Simon Horman
2009-Jun-01 04:24 UTC
Re: [Xen-devel] Re: [PATCH] xend: Update info[''platform''][''pci'']
On Mon, Jun 01, 2009 at 01:08:09PM +0900, Masaki Kanno wrote:> Thu, 28 May 2009 20:46:31 +1000, Simon Horman wrote: > > >On Thu, May 28, 2009 at 04:01:50PM +0900, Masaki Kanno wrote: > >Content-Description: Mail message body > >> Hi, > >> > >> This patch updates info[''platform''][''pci''] for PCI devices assignment > >> to domains. > >> > >> When a domain is started, xend confirms by using xc.test_assign_device > >> whether PCI devices can be assigned to the domain. > >> For the confirmation, info[''platform''][''pci''] must be an appropriate > >> value. However, info[''platform''][''pci''] may be not appropriate. > >> Because info[''platform''][''pci''] isn''t almost always updated even if > >> the PCI device configuration of the domain was changed by using > >> xm pci-attach/detach. > >> This patch updates info[''platform''][''pci''] to the appropriate value > >> when domains are started. > > > >Hi Kanno-san, > > > >I am curious to know how you exercise this code. > >Did you notice a bug under some conditions? > > Hi Simon, > > Sorry for late response. > > I noticed the bug when I tried the following operations. > > 1) xm new vm1 > 2) xm list --long vm1 > (domain > <<snip>> > (image > (hvm > <<snip>> > (pci ((0x0 0x01 0x00 0x0 0x6 ))) > 3) xm pci-attach vm1 00:1a.0 7 > 4) xm list --long vm1 > (domain > <<snip>> > (image > (hvm > <<snip>> > (pci ((0x0 0x01 0x00 0x0 0x6 ))) > > The value of /domain/image/hvm/pci is a value of info[''platform''][''pci'']. > The value wasn''t updated when I attached the PCI device to the domain by > using xm pci-attach. > > The value is updated by my patch. Nonetheless, the value isn''t still > updated when xm pci-attach/detach are executed. The value is updated > when starting domains.Understood. Do you think that also needs to be fixed? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Masaki Kanno
2009-Jun-01 05:50 UTC
Re: [Xen-devel] Re: [PATCH] xend: Update info[''platform''][''pci'']
Mon, 1 Jun 2009 14:24:20 +1000, Simon Horman wrote:>On Mon, Jun 01, 2009 at 01:08:09PM +0900, Masaki Kanno wrote: >> Thu, 28 May 2009 20:46:31 +1000, Simon Horman wrote: >> >> >On Thu, May 28, 2009 at 04:01:50PM +0900, Masaki Kanno wrote: >> >Content-Description: Mail message body >> >> Hi, >> >> >> >> This patch updates info[''platform''][''pci''] for PCI devices assignment >> >> to domains. >> >> >> >> When a domain is started, xend confirms by using xc.test_assign_device >> >> whether PCI devices can be assigned to the domain. >> >> For the confirmation, info[''platform''][''pci''] must be an appropriate >> >> value. However, info[''platform''][''pci''] may be not appropriate. >> >> Because info[''platform''][''pci''] isn''t almost always updated even if >> >> the PCI device configuration of the domain was changed by using >> >> xm pci-attach/detach. >> >> This patch updates info[''platform''][''pci''] to the appropriate value >> >> when domains are started. >> > >> >Hi Kanno-san, >> > >> >I am curious to know how you exercise this code. >> >Did you notice a bug under some conditions? >> >> Hi Simon, >> >> Sorry for late response. >> >> I noticed the bug when I tried the following operations. >> >> 1) xm new vm1 >> 2) xm list --long vm1 >> (domain >> <<snip>> >> (image >> (hvm >> <<snip>> >> (pci ((0x0 0x01 0x00 0x0 0x6 ))) >> 3) xm pci-attach vm1 00:1a.0 7 >> 4) xm list --long vm1 >> (domain >> <<snip>> >> (image >> (hvm >> <<snip>> >> (pci ((0x0 0x01 0x00 0x0 0x6 ))) >> >> The value of /domain/image/hvm/pci is a value of info[''platform''][''pci'']. >> The value wasn''t updated when I attached the PCI device to the domain by >> using xm pci-attach. >> >> The value is updated by my patch. Nonetheless, the value isn''t still >> updated when xm pci-attach/detach are executed. The value is updated >> when starting domains. > >Understood. Do you think that also needs to be fixed?Hi Simon, For now, I think that doesn''t need to be fixed. Best regards, Kan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Zhai, Edwin
2009-Jun-01 06:01 UTC
Re: [Xen-devel] [PATCH] xend: Update info[''platform''][''pci'']
Masaki, How about removing the ''pci'' config from the info[''platform'']? We already have the info[''devices''] to kept the pci/vif/disk config, so duplicated info in [''platform''][''pci''] would cause synchronization troubles. There are only several places using info[''platform''][''pci''], so take place of them with _getDeviceInfo_pci(''0'') should be okay. Thanks, On Thu, May 28, 2009 at 03:01:50PM +0800, Masaki Kanno wrote:> Hi, > > This patch updates info[''platform''][''pci''] for PCI devices assignment > to domains. > > When a domain is started, xend confirms by using xc.test_assign_device > whether PCI devices can be assigned to the domain. > For the confirmation, info[''platform''][''pci''] must be an appropriate > value. However, info[''platform''][''pci''] may be not appropriate. > Because info[''platform''][''pci''] isn''t almost always updated even if > the PCI device configuration of the domain was changed by using > xm pci-attach/detach. > This patch updates info[''platform''][''pci''] to the appropriate value > when domains are started. > > Cc: Simon Horman <horms@verge.net.au> > Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com> > > Best regards, > Kan >Content-Description: ATT00001.txt> _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel-- best rgds, edwin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Masaki Kanno
2009-Jun-01 09:35 UTC
Re: [Xen-devel] [PATCH] xend: Update info[''platform''][''pci'']
Mon, 1 Jun 2009 14:01:58 +0800, "Zhai, Edwin" wrote:>Masaki, >How about removing the ''pci'' config from the info[''platform'']? We already >have >the info[''devices''] to kept the pci/vif/disk config, so duplicated info in >[''platform''][''pci''] would cause synchronization troubles. > > >There are only several places using info[''platform''][''pci''], so take place >of >them with _getDeviceInfo_pci(''0'') should be okay.Hi Edwin, As far as I know, info[''platform''][''pci''] is referred in the following places. - _constructDomain@XendDomainInfo.py - image_sxpr@XendConfig.py Are there any others than the above? If there are others, I will confirm them. Best regards, Kan>On Thu, May 28, 2009 at 03:01:50PM +0800, Masaki Kanno wrote: >> Hi, >> >> This patch updates info[''platform''][''pci''] for PCI devices assignment >> to domains. >> >> When a domain is started, xend confirms by using xc.test_assign_device >> whether PCI devices can be assigned to the domain. >> For the confirmation, info[''platform''][''pci''] must be an appropriate >> value. However, info[''platform''][''pci''] may be not appropriate. >> Because info[''platform''][''pci''] isn''t almost always updated even if >> the PCI device configuration of the domain was changed by using >> xm pci-attach/detach. >> This patch updates info[''platform''][''pci''] to the appropriate value >> when domains are started. >> >> Cc: Simon Horman <horms@verge.net.au> >> Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com> >> >> Best regards, >> Kan >> > > >Content-Description: ATT00001.txt >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel > > >-- >best rgds, >edwin > >_______________________________________________ >Xen-devel mailing list >Xen-devel@lists.xensource.com >http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Zhai, Edwin
2009-Jun-01 09:54 UTC
Re: [Xen-devel] [PATCH] xend: Update info[''platform''][''pci'']
Masaki, Attached is my patch to fix another bug caused by wrong synchronization of info[''platform''][''pci'']. Just FYI. I don''t know if it still can apply on unstable. We also need make sure old saved image can be restored with this fix. Thanks, Masaki Kanno wrote:> Mon, 1 Jun 2009 14:01:58 +0800, "Zhai, Edwin" wrote: > > >> Masaki, >> How about removing the ''pci'' config from the info[''platform'']? We already >> have >> the info[''devices''] to kept the pci/vif/disk config, so duplicated info in >> [''platform''][''pci''] would cause synchronization troubles. >> >> >> There are only several places using info[''platform''][''pci''], so take place >> of >> them with _getDeviceInfo_pci(''0'') should be okay. >> > > Hi Edwin, > > As far as I know, info[''platform''][''pci''] is referred in the following > places. > - _constructDomain@XendDomainInfo.py > - image_sxpr@XendConfig.py > > Are there any others than the above? If there are others, I will > confirm them. > > Best regards, > Kan > > >> On Thu, May 28, 2009 at 03:01:50PM +0800, Masaki Kanno wrote: >> >>> Hi, >>> >>> This patch updates info[''platform''][''pci''] for PCI devices assignment >>> to domains. >>> >>> When a domain is started, xend confirms by using xc.test_assign_device >>> whether PCI devices can be assigned to the domain. >>> For the confirmation, info[''platform''][''pci''] must be an appropriate >>> value. However, info[''platform''][''pci''] may be not appropriate. >>> Because info[''platform''][''pci''] isn''t almost always updated even if >>> the PCI device configuration of the domain was changed by using >>> xm pci-attach/detach. >>> This patch updates info[''platform''][''pci''] to the appropriate value >>> when domains are started. >>> >>> Cc: Simon Horman <horms@verge.net.au> >>> Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com> >>> >>> Best regards, >>> Kan >>> >>> >> Content-Description: ATT00001.txt >> >>> _______________________________________________ >>> Xen-devel mailing list >>> Xen-devel@lists.xensource.com >>> http://lists.xensource.com/xen-devel >>> >> -- >> best rgds, >> edwin >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel >> > >-- best rgds, edwin _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel