Why not? If version doesn't match apf will not be used.Yes. Once a kernel is released you can't realistically change the version.
I have both! Do you want me to drop version?
apf has to pass two things into a guest kernel:Maybe we can squeeze it into the page-fault error code?Some documentation for this?I wanted it to be generic, but I am fine with making it apf specific.
Also, the name should reflect the pv pagefault use. For other uses
we can register other areas.
It will allow to make it smaller too.
- event type (page not present/wake up)
- unique token
Error code has 32 bits and at least 1 of them should indicate that this
is apf another one should indicate event type so this leaves us 30 bits
for a token. 12 bits of a token is used to store vcpu id this leaves 18
bits for unique per vcpu id. Yes this may be enough. I don't think it is
realistic to have more then 200000 outstanding apfs per vcpu. Alternately
we can use CR2 to pass a token.
Performance. Currently it is accessed on each page fault and to accessSince you don't prevent the page fault handler or code from beingwould solve this. I prefer using put_user() though than a permanentI want to prevent it from been swapped out.
get_user_pages().
swapped out, you don't get anything out of it.
it gup+kmap should be done each and every time.