All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: Prasad Singamsetty <prasad.singamsetty@oracle.com>,
	ehabkost@redhat.com,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	qemu-devel@nongnu.org,
	Alex Williamson <alex.williamson@redhat.com>,
	Sunit Jain <sunit.jain@oracle.com>,
	pbonzini@redhat.com, rth@twiddle.net
Subject: Re: [Qemu-devel] host physical address width issues/questions for x86_64
Date: Thu, 26 Oct 2017 18:04:45 +0300	[thread overview]
Message-ID: <20171026180427-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20171026083057.GB6526@pxdev.xzpeter.org>

On Thu, Oct 26, 2017 at 04:30:57PM +0800, Peter Xu wrote:
> On Mon, Oct 23, 2017 at 10:23:43AM -0700, Prasad Singamsetty wrote:
> 
> [...]
> 
> > >>Proposal:
> > >>
> > >>We can simply change the VTD_HOST_ADDRESS_WIDTH to 48 bits
> > >>with out any other changes to the code. The current set of
> > >>features in the intel iommu emulator code works for q35
> > >>machine type and it doesn't have any other side effect.
> > >>Since the remapping tables are allocated by the guest kernel
> > >>they are always within the phys-bits range and as long
> > >>as the same range supported by intel iommu code in QEMU
> > >>it works fine. For the current q35 machine type, all the
> > >>supported cpus have <= 48 bits as the physical address
> > >>width. For short term, just changing the VTD_HOST_ADDRESS_WIDTH
> > >>to 48 should work fine for q35. I tried this and it seems
> > >>to work fine.
> > >
> > >I'm fine to change that macro, but IMHO only changing that line may
> > >break backward compatibility of old guests (at least it'll change the
> > >max address width reported in ACPI).  So I am not sure that's good.
> > 
> > Could you refer to any specifics on compatibility issues with old
> > guests?  The guest linux kernel doesn't seem to report any problem
> > with address width in DMAR reported doesn't match with what is
> > supported in the host cpu. I would like to better understand the gaps
> > we have here.
> 
> I mean for example when an old vIOMMU-enabled QEMU migrates to this
> new QEMU.  When the guest first probes the DMAR device using the old
> QEMU it should have seen 39 bits GAW, but after the migration to your
> new QEMU instance it'll become 48 bits.  This can confuse the guest in
> some way.  I'm not sure whether that would be a real problem but I
> would rather just introduce the new property for 48 bits to avoid that
> problem.

Right.

> > 
> > What other machine types intel iommu is supported with the current
> > implementation? Is there any test suite that can test intel iommu
> > functionality on supported guest types?
> 
> I don't think there are lots of tests on VT-d emulation.  There are a
> few in kvm-unit-tests for the simplest DMAR and IR tests though, but I
> don't think they are checking against compatibility problems.
> 
> Thanks,
> 
> > 
> > >
> > >I would prefer still using the new property ("x-aw-bits", or change
> > >the name as you prefer) when people really want the 48 bits address
> > >width, or even bigger ones in the future.  It makes sure that 39 bits
> > >are still the default.
> > >
> > >CCing Michael who maintains VT-d emulation codes.
> > 
> > Thanks.
> > --Prasad
> > 
> > >
> > >>
> > >>For long term, the VTD_HOST_ADDRESS_WIDTH has to match with
> > >>host cpu address width. If necessary we may need to define
> > >>a new machine type to keep VTD_HOST_ADDRESS_WIDTH value to
> > >>match with the host cpu.
> > >>
> > >>Please let me know if you have any comments or suggestions
> > >>on this.
> > >
> > >Thanks,
> > >
> 
> -- 
> Peter Xu

  reply	other threads:[~2017-10-26 15:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13 16:17 [Qemu-devel] host physical address width issues/questions for x86_64 Prasad Singamsetty
2017-10-13 17:01 ` Dr. David Alan Gilbert
2017-10-13 17:14   ` Alex Williamson
2017-10-15  3:53     ` Peter Xu
2017-10-16 17:02       ` Prasad Singamsetty
2017-10-17  3:56         ` Peter Xu
2017-10-18  5:59           ` Fam Zheng
2017-10-18 17:19           ` Prasad Singamsetty
2017-10-19  3:33             ` Peter Xu
2017-10-20 22:54               ` Prasad Singamsetty
2017-10-23  6:37                 ` Peter Xu
2017-10-23 17:23                   ` Prasad Singamsetty
2017-10-26  8:30                     ` Peter Xu
2017-10-26 15:04                       ` Michael S. Tsirkin [this message]
2017-10-16 17:11     ` Prasad Singamsetty
2017-10-16 16:59   ` Prasad Singamsetty

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=20171026180427-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=prasad.singamsetty@oracle.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=sunit.jain@oracle.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.