[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070511074050.GB25727@infradead.org>
Date: Fri, 11 May 2007 08:40:50 +0100
From: Christoph Hellwig <hch@...radead.org>
To: Rusty Russell <rusty@...tcorp.com.au>
Cc: Christoph Hellwig <hch@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
lkml - Kernel Mailing List <linux-kernel@...r.kernel.org>,
virtualization <virtualization@...ts.linux-foundation.org>,
Jeff Garzik <jeff@...zik.org>
Subject: Re: [PATCH 2/5] lguest guest feedback tidyups
On Fri, May 11, 2007 at 05:31:06PM +1000, Rusty Russell wrote:
> Well, without ioremap, the memory wouldn't normally be mapped. Is
> there something better to use?
Either use accessors or use your own lguest-specific remapping function that
doesn't return __iomem function
> > So instead of sprinkling cast
> > around add lguest_read*/lguest_write* accessors that do the __force cast
> > once and make sure the ioremap return value is always accessed using those.
>
> And that's nothing to do with iremap. They're required because guest
> "physical" == host virtual, and casting a long to a "__user void *"
> seems to require a __force.
Well, it's the same problem really. You want to treat it as host virtual
in some places and and guest physical in others, but you need to keep
the abstraction clean. To keep that absraction clean you introduce
accessors that contain the __force cast. Now that you have these accessors
instead of random casts you need to think a bit where the host virtual
abstraction makes more sense and were the the guest virtual abstraction
makes more sense and use it consistantly there with as few as possible
uses of the accessors in between.
Now to something different than the technical content of this mail:
> Hi Christoph!
> I enjoy a good Hellwigging as much as anyone, but your aim is off.
Please stop this crap. I know who I am, so there's no need to waste
mail estate with saying Hi. Also please stop being a total fuckass
and abusing my lastname just because you didn't get what was in the
mail.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists