[libvirt] [PATCH 00/10] conf: Clean up virDomain*Def creation

Peter Krempa pkrempa at redhat.com
Fri Jun 30 09:24:56 UTC 2017


On Fri, Jun 30, 2017 at 10:58:42 +0200, Peter Krempa wrote:
> On Fri, Jun 30, 2017 at 10:48:36 +0200, Andrea Bolognani wrote:
> > On Thu, 2017-06-29 at 20:03 +0200, Andrea Bolognani wrote:
> 
> [...]
> 
> > > That's worked out just fine so far, because zero was a
> > > sensible default value for all existing fields; however,
> > > when implementing isolation groups, we add a new
> > > virDomainDeviceInfo::isolationGroup field which we need
> > > to be initialized to -1 instead so that it doesn't overlap
> > > with IOMMU group 0 mentioned above.
> > 
> > Or we could just, you know, do the sensible thing and
> > store (IOMMU group + 1) instead of (IOMMU group) in
> 
> How is that sensible? That looks as a source of bugs in the long run.

Btw, isn't there any external detail which would indicate that the IOMMU
group is valid? In that case you could use that and read the value only
if it's supposed to be meaningful.

Or add a boolean which says that it's meaningfull if you are on the lazy
side, but storing the group with any offset is weird.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170630/1f4da4b7/attachment-0001.sig>


More information about the libvir-list mailing list