From: Marcel Apfelbaum <marcel@redhat.com>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, ehabkost@redhat.com, pbonzini@redhat.com,
mst@redhat.com, davidkiarie4@gmail.com, bd.aviv@gmail.com
Subject: Re: [Qemu-devel] [PATCH RFC 0/2] enable iommu with -device
Date: Mon, 30 May 2016 17:14:15 +0300 [thread overview]
Message-ID: <574C4AB7.5090203@redhat.com> (raw)
In-Reply-To: <20160530134309.GB20746@pxdev.xzpeter.org>
On 05/30/2016 04:43 PM, Peter Xu wrote:
> On Mon, May 23, 2016 at 05:01:28PM +0300, Marcel Apfelbaum wrote:
>> This is a proposal on how to create the iommu with
>> '-device intel-iommu' instead of '-machine,iommu=on'.
>>
>> The device is part of the machine properties because we wanted
>> to ensure it is created before any other PCI device.
>>
>> The alternative is to skip the bus_master_enable_region at
>> the time the device is created. We can create this region
>> at machine_done phase. (patch 1)
>>
>> Then we can enable sysbus devices for PC machines and make all the
>> init steps inside the iommu realize function. (patch 2)
>>
>> The series is working, but a lot of issues are not resolved:
>> - minimum testing was done
>> - the iommu addr should be passed (maybe) in command line rather than hard-coded
>> - enabling sysbus devices for PC machines is risky, I am not aware yet
>> of the side effects of this modification.
>> - I am not sure moving the bus_master_enable_region to machine_done
>> is with no undesired effects.
>
> I gave it a shot on the patches and it works nicely (of course no
> complex configurations, like hot plug).
>
> Could you help introduce what will bring us if we use "-device" rather
> than "-M" options? Benefits I can see is that, we can specify
> parameters with specific device, rather than messing them up in
> "machine" options. Do we have any other benefits that I may have
> missed?
Hi Peter,
Thanks for trying it!
Mainly is about not hard-coding device options (e.g. PCI address for AMD IOMMU),
but also to avoid having devices added as a side-effect of some machine option.
This will bring as closer to a cleaner model of a modular machine.
I plan to post a non-rfc version soon.
Thanks,
Marcel
>
> Thanks!
>
> -- peterx
>
next prev parent reply other threads:[~2016-05-30 14:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-23 14:01 [Qemu-devel] [PATCH RFC 0/2] enable iommu with -device Marcel Apfelbaum
2016-05-23 14:01 ` [Qemu-devel] [PATCH RFC 1/2] hw/pci: delay bus_master_enable_region initialization Marcel Apfelbaum
2016-05-23 14:08 ` Paolo Bonzini
2016-05-23 14:22 ` Marcel Apfelbaum
2016-05-23 14:33 ` Paolo Bonzini
2016-05-23 14:01 ` [Qemu-devel] [PATCH RFC 2/2] hw/iommu: enable iommu with -device Marcel Apfelbaum
2016-05-30 13:43 ` [Qemu-devel] [PATCH RFC 0/2] " Peter Xu
2016-05-30 14:14 ` Marcel Apfelbaum [this message]
2016-05-31 1:44 ` Peter Xu
2016-06-02 20:30 ` Marcel Apfelbaum
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=574C4AB7.5090203@redhat.com \
--to=marcel@redhat.com \
--cc=bd.aviv@gmail.com \
--cc=davidkiarie4@gmail.com \
--cc=ehabkost@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@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).