Alejandro Lucero Palau wrote: [..] > I have been trying to figure out how to preserve the decoders for Type2 > auto discover regions since, I think, this was demanded after v22 sent > upstream. This patch/change is what I was looking for, and although I > did implement it in another way requiring "consensus", this one seems > good enough and already discussed and approved, so all good. > > > However, I think it would be also interesting to give the Type2 driver > the option of resetting decoders as well, what I have been using for v22 > and successfully tested. But this change will preclude that other > possibility, so, what about an option for clearing CXL_REGION_F_AUTO by > Type2 drivers? If you want this only to be done by admin/root, I guess a > module param would do it.
The expecation is that as long as "Fixed Device Configuration" is not set then reconfiguration is possible. The best case is BIOS does not create the ambiguity and leaves accelerators alone. The hard part is that HPA space going back into a general CXL pool for other regions when it is really earmarked for a singular use case. So yes, a future helper for accelerator drivers to reclaim decoder ownership from the platform seems reasonable, but the first hope is to just have a BIOS switch / change to stop mapping accelerators and let the OS handle it.

