public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@qumranet.com>
To: benami@il.ibm.com
Cc: kvm-devel@lists.sourceforge.net, andrea@qumranet.com,
	allen.m.kay@intel.com
Subject: Re: direct mmio for passthrough - kernel part
Date: Fri, 18 Apr 2008 19:02:14 +0300	[thread overview]
Message-ID: <4808C606.9040402@qumranet.com> (raw)
In-Reply-To: <1208352331-27201-1-git-send-email-benami@il.ibm.com>

benami@il.ibm.com wrote:
> This patch for PCI passthrough devices enables a guest to access a device's
> memory mapped I/O regions directly, without requiring the host to trap and
> emulate every MMIO access. 
>
> Updated from last version: we create a memory slot for each MMIO region of the
> guest's devices, and then use the /sys/bus/pci/.../resource# mapping to find the
> hfn for that MMIO region. The kernel part and the userspace part of this
> patchset apply to Amit's pv-dma tree.  Tested on a Lenovo M57p with an e1000 NIC
> assigned directly to an FC8 guest.
>
> Comments are appreciated. 
>   

I see no support for cache attributes in the page attributes table or 
mtrr.  I guess for most devices this will work (as they will be set as 
uncachable by the mtrrs), but for display cards we'd need to set the 
vram as write-combining to get reasonable performance.  This requires 
mtrr and pat emulation in kvm so we detect the guest's intentions.

-- 
Any sufficiently difficult bug is indistinguishable from a feature.


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone

      parent reply	other threads:[~2008-04-18 16:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-16 13:25 direct mmio for passthrough - kernel part benami
2008-04-16 13:25 ` [PATCH 1/1] Enble a guest to access a device's memory mapped I/O regions directly benami
2008-04-16 13:25   ` benami
2008-04-18 15:50   ` Avi Kivity
2008-04-19 14:35     ` Muli Ben-Yehuda
2008-04-20 10:29       ` Avi Kivity
2008-04-18 16:02 ` Avi Kivity [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4808C606.9040402@qumranet.com \
    --to=avi@qumranet.com \
    --cc=allen.m.kay@intel.com \
    --cc=andrea@qumranet.com \
    --cc=benami@il.ibm.com \
    --cc=kvm-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox