Port-xen archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Qemu-upstream with Xen
Ok, I've found the problem. I'm quite new to all this kernel stuff, so
bear with me if my description is not very accurate.
The main problem was that Qemu allocates a set of pfns in the p2m
table, using xc_map_foreign_bulk, those are allocated correctly,
because the p2m page is marked as p2m_ram_rw, and the correct handlers
for page faults are set in NetBSD kernel.
Then Qemu changes the pfns on our back, with the
xc_domain_add_to_physmap, and moves the region from 0x3f800 to 0xf0000
(yes, really nasty). So, when Qemu tries to write to this page, and
the pagefault handler is called, it is unable to map this region,
because the pfns are no longer correct (it should try to map 0xf0000,
but we have no way of knowing that).
Linux didn't hit this because the Linux kernel maps the page straight
away instead of setting a pagefault handler. I've done a little patch
to map the memory region directly in IOCTL_PRIVCMD_MMAPBATCH instead
of using a pagefault handler, and it seems to work correctly, I will
submit the patch shortly, so it can made it to the 6.0 release and we
can have Qemu upstream working.
Thanks for the help, Roger.
Home |
Main Index |
Thread Index |
Old Index