On Thu, Jul 26, 2018 at 07:17:03PM +0800, Yi Min Zhao wrote:
在 2018/7/26 下午7:00, Andrea Bolognani 写道:
> > > > > > > How does the pci-bridge controller show up in the
guest, if at all?
> > > > Qemu hides pci-bridge devices and just exposes pci devices to the
guest.
> > > > In above example, indeed, qemu will generate a pci-bridge device and
it will
> > > > be existing in pci topology. But the guest can't see it. This is
very
> > > > special.
> > > Yeah, that's kinda problematic as it violates the principle of least
> > > surprise... If s390 guests can only see a flat PCI topology, then we
> > > should find a way to reject bridges altogether instead of allowing
> > > the user to create them (or even create them automatically) only for
> > > them not to show up in the guest.
> > If we reject bridges, there would be only one pci bus that maximum
> > 32 pci devices could be plugged to. This kind of limitation is more
> > problematic IMO.
> I see how that would be pretty limiting.
>
> >From the test cases I see a zpci devices, with its own uid and fid,
> is created for the pci-bridge as well... Is that intentional?
>
Firstly pci bridge can be auto-generated if a pci device is to be plugged to
non-existing pci bus.
IIUC, pci-bridge is treated as a controller device in libvirt. So I think,
it's pretty readable not only
in libvirt xml but also in qtree, if we assign zpci device for it. Otherwise
address type of pci-bridge
is pci type but has no uid and fid. Isn't it odd?
From the libvirt side we must avoid any scenario where QEMU auto-adds
devices behind our back. If adding a device requires adding a controller
libvirt must do this explicitly and record it in the XML.
Regards,
Daniel
--
|:
https://berrange.com -o-
https://www.flickr.com/photos/dberrange :|
|:
https://libvirt.org -o-
https://fstop138.berrange.com :|
|:
https://entangle-photo.org -o-
https://www.instagram.com/dberrange :|