All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, tianyu.lan@intel.com,
	Paolo Bonzini <pbonzini@redhat.com>,
	kevin.tian@intel.com, yi.l.liu@intel.com,
	Marcel Apfelbaum <marcel@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-2.10 0/5] x86/vIOMMU: move init back to machine init phase
Date: Fri, 31 Mar 2017 19:17:34 +0300	[thread overview]
Message-ID: <20170331191601-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <1490945793-21276-1-git-send-email-peterx@redhat.com>

On Fri, Mar 31, 2017 at 03:36:28PM +0800, Peter Xu wrote:
> At the very beginning, the x86 vIOMMUs are created via "-M iommu=on".
> We moved one step further a year ago to have the vIOMMUs just like a
> general device, so that we can init them with far more specific
> parameters with "-device" interface.
> 
> However, gradually we found that problem starts to occur due to this.
> The main issue is that the DMA address space of any PCI device is
> postponed to be init after device realization, while some devices'
> realizations would depend on this address space. That looks like a
> dead lock. We have patches and solutions for different single problem,
> but, maybe it's time we can consider to solve the root cause this
> time, of course after 2.9 release.
> 
> This series tries to solve the root cause, and move vIOMMU inits back
> to machine init for x86 platforms. Then, we'll have solid DMA address
> space for each device even during realization.
> 
> Please kindly review. Thanks.

I think it's a clean way to do it at a high level.
However I would like to set a tag in the class
rather than listing specific devices.
Also, init order should be consistent for all machines
not just q35.



> Peter Xu (5):
>   QemuOpts: introduce qemu_opts_extract()
>   util: export device_init_func()
>   util: propagate error for device_func_init()
>   q35: init vIOMMU during machine init
>   pci: move dma_as init back to bus realize
> 
>  hw/pci-host/q35.c        | 45 +++++++++++++++++++++++++++++++++++++++++++++
>  hw/pci/pci.c             | 21 +--------------------
>  include/hw/pci/pci_bus.h |  2 --
>  include/qemu-common.h    |  1 +
>  include/qemu/option.h    |  2 ++
>  include/sysemu/sysemu.h  |  1 -
>  util/qemu-option.c       | 24 ++++++++++++++++++++++++
>  vl.c                     |  9 ++-------
>  8 files changed, 75 insertions(+), 30 deletions(-)
> 
> -- 
> 2.7.4

  parent reply	other threads:[~2017-03-31 16:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31  7:36 [Qemu-devel] [PATCH for-2.10 0/5] x86/vIOMMU: move init back to machine init phase Peter Xu
2017-03-31  7:36 ` [Qemu-devel] [PATCH for-2.10 1/5] QemuOpts: introduce qemu_opts_extract() Peter Xu
2017-03-31  7:36 ` [Qemu-devel] [PATCH for-2.10 2/5] util: export device_init_func() Peter Xu
2017-03-31  7:36 ` [Qemu-devel] [PATCH for-2.10 3/5] util: propagate error for device_func_init() Peter Xu
2017-03-31  7:36 ` [Qemu-devel] [PATCH for-2.10 4/5] q35: init vIOMMU during machine init Peter Xu
2017-03-31  7:36 ` [Qemu-devel] [PATCH for-2.10 5/5] pci: move dma_as init back to bus realize Peter Xu
2017-03-31 16:17 ` Michael S. Tsirkin [this message]
2017-04-01  1:29   ` [Qemu-devel] [PATCH for-2.10 0/5] x86/vIOMMU: move init back to machine init phase Peter Xu
2017-04-11  9:22     ` Markus Armbruster
2017-04-11 10:08       ` Peter Xu

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=20170331191601-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=armbru@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kevin.tian@intel.com \
    --cc=marcel@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tianyu.lan@intel.com \
    --cc=yi.l.liu@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 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.