On Tue, Jun 18, 2024 at 04:03:34PM -0400, Michael S. Tsirkin wrote: > On Mon, Jun 17, 2024 at 03:39:45PM -0700, Nicolin Chen wrote: > > - next_range.input_base = idmap->input_base + idmap->id_count; > > + next_range.input_base = idmap->input_base + idmap->id_count + > > 1; > > } > > > All this has to be written in the way that actually refers to the > spec. id_count is nowhere in the spec and one has to know that > in the end this is used by build_iort_id_mapping to figure out > where this comes from. Not good. > > I think the best way is to fix build_iort_id_mapping: > make it subtract 1 from id_count. > > Then change text from "Number of IDs" to "Number of IDs - The number of IDs > in the range minus one" > > You should also add the reference to IO Remapping Table document > near build_iort_id_mapping, it is currently unclear which table this > refers to. > > Of couse this means the only correct use has to be tweaked so the change > to build_iort_id_mapping does not break it: 0xFFFF -> 0x10000 - but > that's good for readability, anyway.
OK. I will send a v3 following that. Thanks Nicolin