Re: [Qemu-devel] [PATCH v3] intel_iommu: check misordered init when realize

2017-03-09 Thread Peter Xu
On Wed, Mar 08, 2017 at 10:25:41AM +0100, Gerd Hoffmann wrote: > > Current QEMU should have no restriction on parameter ordering, right? > > Or do we have any existing case that: > > > > "$QEMU -parameter1 -parameter2" > > > > will work, while... > > > > "$QEMU -parameter2 -parameter1" > >

Re: [Qemu-devel] [PATCH v3] intel_iommu: check misordered init when realize

2017-03-08 Thread Marcel Apfelbaum
On 03/08/2017 12:08 PM, Jason Wang wrote: On 2017年03月08日 16:35, Paolo Bonzini wrote: - Original Message - From: "Marcel Apfelbaum" To: "Michael S. Tsirkin" , "Peter Xu" Cc: qemu-devel@nongnu.org, "Paolo Bonzini" , "yi l liu" , "Jintack Lim" , "Jason Wang" , "Alex Williamson" Sen

Re: [Qemu-devel] [PATCH v3] intel_iommu: check misordered init when realize

2017-03-08 Thread Jason Wang
On 2017年03月08日 16:35, Paolo Bonzini wrote: - Original Message - From: "Marcel Apfelbaum" To: "Michael S. Tsirkin" , "Peter Xu" Cc: qemu-devel@nongnu.org, "Paolo Bonzini" , "yi l liu" , "Jintack Lim" , "Jason Wang" , "Alex Williamson" Sent: Thursday, March 2, 2017 7:24:44 AM Subje

Re: [Qemu-devel] [PATCH v3] intel_iommu: check misordered init when realize

2017-03-08 Thread Gerd Hoffmann
> Current QEMU should have no restriction on parameter ordering, right? > Or do we have any existing case that: > > "$QEMU -parameter1 -parameter2" > > will work, while... > > "$QEMU -parameter2 -parameter1" > > won't work? Well, we have. If you, for example, add a scsi disk, you have to

Re: [Qemu-devel] [PATCH v3] intel_iommu: check misordered init when realize

2017-03-08 Thread Peter Xu
On Wed, Mar 08, 2017 at 03:35:50AM -0500, Paolo Bonzini wrote: [...] > The ordering should be explicit in the command line. Since we do not have > cycles, it should be possible. Current QEMU should have no restriction on parameter ordering, right? Or do we have any existing case that: "$QEMU

Re: [Qemu-devel] [PATCH v3] intel_iommu: check misordered init when realize

2017-03-08 Thread Paolo Bonzini
- Original Message - > From: "Marcel Apfelbaum" > To: "Michael S. Tsirkin" , "Peter Xu" > Cc: qemu-devel@nongnu.org, "Paolo Bonzini" , "yi l liu" > , "Jintack Lim" > , "Jason Wang" , "Alex > Williamson" > Sent: Thursday, March 2, 2017 7:24:44 AM > Subject: Re: [PATCH v3] intel_iommu:

Re: [Qemu-devel] [PATCH v3] intel_iommu: check misordered init when realize

2017-03-01 Thread Marcel Apfelbaum
On 03/02/2017 07:13 AM, Michael S. Tsirkin wrote: On Thu, Mar 02, 2017 at 11:32:18AM +0800, Peter Xu wrote: Intel vIOMMU devices are created with "-device" parameter, while here actually we need to make sure the dmar device be created before other PCI devices (like vfio-pci, virtio-pci ones) so

Re: [Qemu-devel] [PATCH v3] intel_iommu: check misordered init when realize

2017-03-01 Thread Michael S. Tsirkin
On Thu, Mar 02, 2017 at 01:20:53PM +0800, Peter Xu wrote: > On Thu, Mar 02, 2017 at 07:13:08AM +0200, Michael S. Tsirkin wrote: > > On Thu, Mar 02, 2017 at 11:32:18AM +0800, Peter Xu wrote: > > > Intel vIOMMU devices are created with "-device" parameter, while here > > > actually we need to make su

Re: [Qemu-devel] [PATCH v3] intel_iommu: check misordered init when realize

2017-03-01 Thread Peter Xu
On Thu, Mar 02, 2017 at 07:13:08AM +0200, Michael S. Tsirkin wrote: > On Thu, Mar 02, 2017 at 11:32:18AM +0800, Peter Xu wrote: > > Intel vIOMMU devices are created with "-device" parameter, while here > > actually we need to make sure the dmar device be created before other > > PCI devices (like v

Re: [Qemu-devel] [PATCH v3] intel_iommu: check misordered init when realize

2017-03-01 Thread Michael S. Tsirkin
On Thu, Mar 02, 2017 at 11:32:18AM +0800, Peter Xu wrote: > Intel vIOMMU devices are created with "-device" parameter, while here > actually we need to make sure the dmar device be created before other > PCI devices (like vfio-pci, virtio-pci ones) so that we know iommu_fn > will be setup correctly

[Qemu-devel] [PATCH v3] intel_iommu: check misordered init when realize

2017-03-01 Thread Peter Xu
Intel vIOMMU devices are created with "-device" parameter, while here actually we need to make sure the dmar device be created before other PCI devices (like vfio-pci, virtio-pci ones) so that we know iommu_fn will be setup correctly before realizations of those PCI devices (it is legal that PCI de