> host_map_page (?) uses a MAP_NR, which returns a Bit32u (?) (where is this
> defined, anyway?). It appears that MAP_NR has been replaced by virt_to_page
> in 2.4. However, it (apparently) returns a mem_map_t*, as I gather from
> linux/include/asm-i386/page.h:
> 
> #define virt_to_page(kaddr)      (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
> 
> And mem_map is defined in linux/include/linux/mm.h to be a mem_map_t*
> (which is a *struct). It appears that either some semantics have changed, or
> the original MAP_NR code was flawed, or (most likely) I am missing something
> big here. It appears that host_map_page is supposed to give the host memory
> map for a given guest page, but on that account I am uncertain.

Well, yes, this part of memory management has changed quite a bit in 2.4.
Fortunately, we can ignore the whole issue by just doing everything ourselves.
Try replacing host_map_page with something like this:

  Bit32u
host_map_page(void *ptr)
{
    Bit32u page = 0;
    if (!ptr) return 0;

    retrieve_phy_pages(&page, 1, ptr, 4096);
    return page;
}

(I've been working on a patch to simplify these issues, but due to lack of
time I haven't finished this yet ...)


> This is the main point at which plex86 does not work for 2.4. With 2.4 coming
> out soon, this had better get fixed. So would somebody more enlighened in
> kernel hacking spread some of that enlightenment around?

Well, I'll try to get it running on 2.4 once I find some time ...



Bye,
Ulrich

P.S.  I'll be at Linux Kongress on Thursday and Friday ...


-- 
  Dr. Ulrich Weigand
  [EMAIL PROTECTED]

Reply via email to