kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Sheng Yang <sheng@linux.intel.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 0/6] MTRR/PAT support for EPT (v3)
Date: Sun, 12 Oct 2008 11:47:05 +0200	[thread overview]
Message-ID: <48F1C799.2080308@redhat.com> (raw)
In-Reply-To: <200810101516.06057.sheng@linux.intel.com>

Sheng Yang wrote:
> Yes... But it's easy to do with assigned devices' mmio, but what if guest 
> specific some non-mmio memory's memory type? E.g. we have met one issue in 
> Xen, that a assigned-device's XP driver specific one memory region as buffer, 
> and modify the memory type then do DMA.
>
> Only map MMIO space can be first step, but I guess we can modify assigned 
> memory region memory type follow guest's? 
>   

With ept/npt, we can't, since the memory type is in the guest's 
pagetable entries, and these are not accessible.

Looks like a conflict between the requirements of a hypervisor 
supporting device assignment, and the memory type constraints of mapping 
everything with the same memory type.  As far as I can see, the only 
solution is not to map guest memory in the hypervisor, and do all 
accesses via dma.  This is easy for virtual disk, somewhat harder for 
virtual networking (need a dma engine or a multiqueue device).

Since qemu will only access memory on demand, we don't actually have to 
unmap guest memory, only to ensure that qemu doesn't touch it.  Things 
like live migration and page sharing won't work, but they aren't 
expected to with device assignment anyway.

-- 
error compiling committee.c: too many arguments to function


      reply	other threads:[~2008-10-12  9:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-09  8:01 [PATCH 0/6] MTRR/PAT support for EPT (v3) Sheng Yang
2008-10-09  8:01 ` [PATCH 1/6] x86: Rename mtrr_state struct and macro names Sheng Yang
2008-10-09  8:01 ` [PATCH 2/6] x86: Export some definition of MTRR Sheng Yang
2008-10-09  8:01 ` [PATCH 3/6] KVM: Improve MTRR structure Sheng Yang
2008-10-09  8:01 ` [PATCH 4/6] KVM: VMX: Add PAT support for EPT Sheng Yang
2008-10-09  8:01 ` [PATCH 5/6] Add local get_mtrr_type() to support MTRR Sheng Yang
2008-10-09  8:01 ` [PATCH 6/6] Enable MTRR for EPT Sheng Yang
2008-10-09  8:44   ` Avi Kivity
2008-10-09  8:49     ` Sheng Yang
2008-10-09  9:03 ` [PATCH 0/6] MTRR/PAT support for EPT (v3) Avi Kivity
2008-10-09  9:26   ` Sheng Yang
2008-10-09 10:12     ` Avi Kivity
2008-10-10  2:46       ` Sheng Yang
2008-10-10  6:49         ` Avi Kivity
2008-10-10  7:16           ` Sheng Yang
2008-10-12  9:47             ` 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=48F1C799.2080308@redhat.com \
    --to=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=sheng@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).