On Sat, Apr 27, 2024, Kele Huang wrote: > Although, it is a bit not straightforward to me because it needs to call > designed functions to do the guest memory read and write even though people > assume the cache is initialized, or need to do the ghc->memslot checking > manually before using the fast path. Oh, don't get me wrong, I completely agree that the code isn't straightforward. But I don't think this is a problem that can be reasonably solved in the caching code, at least not easily, as a lot of the oddities stem from KVM's memslots, and KVM's contracts with userspace and the guest.