qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] KQEMU Darwin port status?


From: Philip Boulain
Subject: Re: [Qemu-devel] KQEMU Darwin port status?
Date: Mon, 19 Mar 2007 18:54:35 +0000

On 19 Mar 2007, at 08:49, Mike Kronenberg wrote:
I have made a empty kext and a dummy client to do some tests on this topics. Boundary crossing is working well, so by now the kext part is ready.
http://www.kronenberg.org/files/kqemu_poc.zip

Neat, thanks.

Unfortunately, Apple decided to remove/hide some of the vm_* API (especially vm_map_(un)wire in Tiger. (It was available on Panther. vm_map_user_pageable was never part of Darwin). So any suggestions on how to lock user pages in Darwin would be very welcome.

Mmm, that's rather unhelpful. From my own reading, it looks like the Apple-approved way of doing this would be to use an IOMemoryDescriptor: initWithAddress() would initialise one which represents the appropriate lump of application-space memory (vm_address_t, length, direction [1] and task_t [2]); prepare() and complete() wire and unwire it respectively; and presumably getPhysicalSegment() covers the 'get physical address' part. Using this probably requires making the extension a I/O Kit Device Driver, but that's just a few extra methods to implement AFAICT.

I'll see if I can make a trivial test for this approach.

Phil
1. kIODirectionOutIn (or InOut) appears suitable here---the kernel- side IOKit headers show both as equivilent to VM_PROT_READ | VM_PROT_WRITE 2. Looking at the FreeBSD version, that's just "current process", so literally current_task()





reply via email to

[Prev in Thread] Current Thread [Next in Thread]