Discussion:
how to load page in vm_fault
(too old to reply)
kmting
2011-07-19 23:28:21 UTC
Permalink
I can't load page in vm_fault although I followed what load_segment
does. I know we should not use userspace virtual addresses, but what
should we use?
if we use kernel space than how can we copy back to the physical page
that i just get?

Thank you
cs350
2011-07-20 03:05:15 UTC
Permalink
You don't absolutely have to use kernel virtual addresses.

If you do, you don't have to copyout anything, because you are simply
referring to the same physical memory using two types of virtual
addresses. You should look at the macro PADDR_TO_KVADDR and how it works.

-Alex
I can't load page in vm_fault although I followed what load_segment does. I
know we should not use userspace virtual addresses, but what should we use?
if we use kernel space than how can we copy back to the physical page that i
just get?
Thank you
Loading...