[PATCH libvirt v1 3/6] conf: fix ZPCI address auto-generation on s390

Andrea Bolognani abologna at redhat.com
Tue Jun 16 11:41:36 UTC 2020


On Tue, 2020-06-16 at 12:43 +0200, Shalini Chellathurai Saroja wrote:
> On 6/3/20 12:58 PM, Andrea Bolognani wrote:
> > On Thu, 2020-04-09 at 12:31 +0200, Shalini Chellathurai Saroja wrote:
> > > +++ b/tests/qemuxml2xmloutdata/hostdev-vfio-zpci-multidomain-many.xml
> > > @@ -39,7 +39,7 @@
> > >           <address domain='0x0003' bus='0x00' slot='0x00' function='0x0'/>
> > >         </source>
> > >         <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'>
> > > -        <zpci uid='0x0001' fid='0x00000001'/>
> > > +        <zpci uid='0x0001' fid='0x00000000'/>
> > >         </address>
> > >       </hostdev>
> > >       <hostdev mode='subsystem' type='pci' managed='no'>
> > > @@ -48,7 +48,7 @@
> > >           <address domain='0x0004' bus='0x00' slot='0x00' function='0x0'/>
> > >         </source>
> > >         <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'>
> > > -        <zpci uid='0x0002' fid='0x00000002'/>
> > > +        <zpci uid='0x0002' fid='0x00000001'/>
> > >         </address>
> > >       </hostdev>
> > >       <hostdev mode='subsystem' type='pci' managed='no'>
> > > @@ -57,7 +57,7 @@
> > >           <address domain='0x0005' bus='0x00' slot='0x00' function='0x0'/>
> > >         </source>
> > >         <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'>
> > > -        <zpci uid='0x0053' fid='0x00000000'/>
> > > +        <zpci uid='0x0053' fid='0x00000002'/>
> > 
> > I'm not entirely clear on why these generated ZPCI addresses would
> > change. Can you explain that to me?
> 
> Sure:-). It changes in this version because at first the user specified 
> addresses are reserved and then the addresses which are not specified by 
> the user are assigned and reserved.
> 
> In the current master code, as uid and fid are correlated, both uid and 
> fid are reserved, when either one of them is specified by the user. So 
> for the pci device with uid =  '0x0053', the code assumes that user has 
> specified fid as 0 (which is not true) and reserves fid as 0.

Makes sense! Thanks for the explanation :)

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list