On Thu, Sep 25, 2008 at 04:51:24PM -0500, Anthony Liguori wrote:
> Muli Ben-Yehuda wrote:
>> On Thu, Sep 25, 2008 at 05:45:30PM +0300, Avi Kivity wrote:
>>   
>>> Han, Weidong wrote:
>>>     
>>>> Is it possible DMA into an mmio page?       
>>> I don't see why not.
>>>     
>>
>> Two reasons. First it makes no sense. MMIO pages don't have RAM
>> backing them, they have another device's register window. So the
>> effect of DMA'ing into an MMIO page would be for one device to DMA
>> into the register window of another device, which sounds to me insane.
>>   
>
> MMIO isn't just a register window.  It may be an on-device buffer.

Unlikely, but ok.

> For instance, all packets are stored in a buffer on the ne2k that's
> mapped via mmio.  It would seem entirely reasonable to me to program
> an IDE driver to DMA directly into the devices packet buffer.

It would be insane to me. Have you tried this on real hardware and
seen it work?

>> Second, and more importantly, I've seen systems where doing the
>> above caused a nice, immediate, reboot. So I think that unless
>> someone comes with a valid scenario where we need to support it or
>> something breaks, we'd better err on the side of caution and not
>> map pages that should not be DMA targets.
>>   
>
> Xen maps the MMIO pages into the VT-d table.  The system you were using 
> could have just been busted.  I think the burden is to prove that this is 
> illegal (via the architecture specification).

I strongly disagree. You are advocating something that is potentially
unsafe---for the sake of code simplicity?! I am advocating caution in
what we let an *untrusted* guest do.

Cheers,
Muli
-- 
The First Workshop on I/O Virtualization (WIOV '08)
Dec 2008, San Diego, CA, http://www.usenix.org/wiov08/
                      xxx
SYSTOR 2009---The Israeli Experimental Systems Conference
http://www.haifa.il.ibm.com/conferences/systor2009/
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to