...

> > +    if (vmr) {
> > +        if (*dpa_offset < int128_get64(vmr->size)) {
> > +            *as = &ct3d->hostvmem_as;
> > +        } else {
> > +            *as = &ct3d->hostpmem_as;
> > +            *dpa_offset -= vmr->size;  
> 
> You can't do math on vmr->size, it's Int128.
> And generally please do not poke at mr->size use APIs.
> 
> Which one will depend ...

Good spot. In this case they are all sub 64 bit so
simple memory_region_size() is appropriate I think.

I'll add a precursor patch converting existing 
int128_get64(mr->size) users in this file over to that.

Thanks,

Jonathan

Reply via email to