From: Alex Williamson <alex.williamson@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
jasowang@redhat.com, famz@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-2.9 2/2] intel_iommu: extend supported guest aw to 48 bits
Date: Mon, 12 Dec 2016 12:35:44 -0700 [thread overview]
Message-ID: <20161212123544.2139b842@t450s.home> (raw)
In-Reply-To: <20161212015602.GJ28693@pxdev.xzpeter.org>
On Mon, 12 Dec 2016 10:01:15 +0800
Peter Xu <peterx@redhat.com> wrote:
> On Sun, Dec 11, 2016 at 05:13:45AM +0200, Michael S. Tsirkin wrote:
> > On Wed, Dec 07, 2016 at 01:52:45PM +0800, Peter Xu wrote:
> > > Previously vt-d codes only supports 39 bits iova address width. It won't
> > > be hard to extend it to 48 bits.
> > >
> > > After enabling this, we should be able to map larger iova addresses.
> > >
> > > To check whether 48 bits aw is enabled, we can grep in the guest dmesg
> > > with line: "dmar: Host address width 48" (previously it was 39).
> > >
> > > Signed-off-by: Peter Xu <peterx@redhat.com>
> >
> > I suspect we can't do this for old machine types.
> > Need to behave in compatible ways.
>
> Sure. I can do that.
>
> Btw, is vt-d iommu still in experimental stage? I am just thinking
> whether it'll be overkill we add lots of tunables before we have one
> stable and mature vt-d emulation.
>
> > Also, is 48 always enough? 5 level with 57 bits
> > is just around the corner.
>
> Please refer to the discussion with Jason - looks like vt-d spec
> currently supports only 39/48 bits address width? Please correct if I
> made a mistake.
>
> > And is it always supported? for things like vfio
> > to work, don't we need to check what does host support?
>
> Hmm, yes, we should do that. But until now, we still don't have a
> complete vfio support. IMHO we can postpone this issue until vfio is
> fully supported.
I'm not sure how the vIOMMU supporting 39 bits or 48 bits is directly
relevant to vfio, we're not sharing page tables. There is already a
case today, without vIOMMU that you can make a guest which has more
guest physical address space than the hardware IOMMU by overcommitting
system memory. Generally this quickly resolves itself when we start
pinning pages since the physical address width of the IOMMU is
typically the same as the physical address width of the host system
(ie. we exhaust the host memory). It is possible though that we could
create a sparse memory VM that makes use of gfns beyond the physical
IOMMU, with or without a vIOMMU. You'll get an error from the mapping
ioctl when this occurs and the VM will abort. It's not typically an
issue since the memory capacity of the host and the IOMMU physical
address width really better align fairly well. Thanks,
Alex
next prev parent reply other threads:[~2016-12-12 19:35 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 5:52 [Qemu-devel] [PATCH for-2.9 0/2] VT-d extend GAW to 48 bits Peter Xu
2016-12-07 5:52 ` [Qemu-devel] [PATCH for-2.9 1/2] intel_iommu: check validity for GAW bits in CE Peter Xu
2016-12-08 2:02 ` Jason Wang
2016-12-08 2:16 ` Peter Xu
2016-12-08 2:21 ` Jason Wang
2016-12-12 1:47 ` Peter Xu
2016-12-07 5:52 ` [Qemu-devel] [PATCH for-2.9 2/2] intel_iommu: extend supported guest aw to 48 bits Peter Xu
2016-12-08 2:00 ` Jason Wang
2016-12-11 3:13 ` Michael S. Tsirkin
2016-12-12 2:01 ` Peter Xu
2016-12-12 19:35 ` Alex Williamson [this message]
2016-12-13 3:33 ` Peter Xu
2016-12-13 3:51 ` Alex Williamson
2016-12-13 5:24 ` Peter Xu
2016-12-13 5:48 ` Alex Williamson
2016-12-13 6:12 ` Peter Xu
2016-12-13 13:17 ` Alex Williamson
2016-12-13 14:38 ` Michael S. Tsirkin
2016-12-13 5:00 ` Tian, Kevin
2016-12-13 5:31 ` Alex Williamson
2016-12-07 8:40 ` [Qemu-devel] [PATCH for-2.9 0/2] VT-d extend GAW " Fam Zheng
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=20161212123544.2139b842@t450s.home \
--to=alex.williamson@redhat.com \
--cc=famz@redhat.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).