Port-xen archive

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

Re: Alloc userspace process to access mapped grant memory regions



On Wed, Nov 28, 2012 at 11:25:13AM +0100, Roger Pau Monné wrote:
> On 28/11/12 11:13, Manuel Bouyer wrote:
> > On Mon, Nov 26, 2012 at 05:51:31PM +0100, Roger Pau Monné wrote:
> >> I think it will be easier if there was someway to know the va where the
> >> user-space process is going to map the returned pa, but I can't see a
> >> way to get this from the mmap handler.
> > 
> > no, there's not. 
> > It may be possible using a /kern node instead of a device node, but I've
> > not investigated this.
> 
> I've been able to work around this by allocating a memory region in
> userspace first (using an anon mmap mapping), and then passing this VA
> inside the ioctl, this way I have the VA of the userspace process. I
> will try to post a first version later today.

Yes, this is what IOCTL_PRIVCMD_MMAP does too.

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index