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.
Description: Digital signature