I agree this method.
I could make a further change and allow the driver to request the remapped memory segment from the pcc layer, and couple to the memory-remap to the client/channel. It seems like that code, too, should be in the common layer. However most drivers would not know to use this function yet, so the mechanism would have to be optional, and only clean up if called this way.
Don't remap twice for one shared memory.
This remaping is reasonable in PCC layer. We can let PCC client to decide if PCC layer does remap and then they use it directly.
For new driver like the driver you are uploading, driver can give PCC one flag to tell PCC layer remap when request channel.
For old PCC client driver, do not send this flag, PPC layer do not remap. So no any impact on them.