qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel]  [PATCH RFC 0/2] enable iommu with -device
@ 2016-05-23 14:01 Marcel Apfelbaum
  2016-05-23 14:01 ` [Qemu-devel] [PATCH RFC 1/2] hw/pci: delay bus_master_enable_region initialization Marcel Apfelbaum
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Marcel Apfelbaum @ 2016-05-23 14:01 UTC (permalink / raw)
  To: qemu-devel; +Cc: ehabkost, marcel, pbonzini, mst, davidkiarie4, peterx, bd.aviv

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. 

Thanks,
Marcel

Marcel Apfelbaum (2):
  hw/pci: delay bus_master_enable_region initialization
  hw/iommu: enable iommu with -device

 hw/core/machine.c     | 20 --------------------
 hw/i386/intel_iommu.c | 17 +++++++++++++++++
 hw/i386/pc.c          | 17 +++++++++++++++++
 hw/i386/pc_q35.c      |  1 +
 hw/pci-host/q35.c     | 28 ----------------------------
 hw/pci/pci.c          | 22 ++++++++++++----------
 include/hw/pci/pci.h  |  2 ++
 7 files changed, 49 insertions(+), 58 deletions(-)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-06-02 20:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2016-05-31  1:44     ` Peter Xu
2016-06-02 20:30       ` Marcel Apfelbaum

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).