[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC v3 01/14] IOMMU: add option to enable VTD_CA
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH RFC v3 01/14] IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest |
Date: |
Fri, 20 Jan 2017 17:11:43 +0800 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Fri, Jan 20, 2017 at 08:59:01AM +0000, Tian, Kevin wrote:
[...]
> > > Also for hot-add
> > > device path, some check of caching mode is required. If not set,
> > > should we fail hot-add operation? I don't think we have such physical
> > > platform with some devices behind IOMMU while others not.
> >
> > Could you explain in what case will we fail a hot plug?
> >
>
> user enables intel-iommu, but don't set caching mode.
>
> Then later user hot-add a PCI device to the VM. Guest will assume
> newly assigned device also behind the default vIOMMU, and thus
> needs to setup IOVA mappings, which is then broken...
Is the newly added device a vfio-pci device? If so, we should hit
this and VM will stops to work:
if (!s->cache_mode_enabled && new & IOMMU_NOTIFIER_MAP) {
error_report("We need to set cache_mode=1 for intel-iommu to enable "
"device assignment with IOMMU protection.");
exit(1);
}
I admit this is not user-friendly, and a better way may be that we
disallow the hot-plug in that case, telling the user about the error,
rather than crashing the VM. But, I think that can be a patch outside
this series, considering (again) that this only affects advanced
users.
Thanks,
-- peterx
- [Qemu-devel] [PATCH RFC v3 00/14] VT-d: vfio enablement and misc enhances, Peter Xu, 2017/01/12
- [Qemu-devel] [PATCH RFC v3 01/14] IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest, Peter Xu, 2017/01/12
- Re: [Qemu-devel] [PATCH RFC v3 01/14] IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest, Tian, Kevin, 2017/01/20
- Re: [Qemu-devel] [PATCH RFC v3 01/14] IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest, Peter Xu, 2017/01/20
- Re: [Qemu-devel] [PATCH RFC v3 01/14] IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest, Tian, Kevin, 2017/01/20
- Re: [Qemu-devel] [PATCH RFC v3 01/14] IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest,
Peter Xu <=
- Re: [Qemu-devel] [PATCH RFC v3 01/14] IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest, Tian, Kevin, 2017/01/20
- Re: [Qemu-devel] [PATCH RFC v3 01/14] IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest, Peter Xu, 2017/01/20
Re: [Qemu-devel] [PATCH RFC v3 01/14] IOMMU: add option to enable VTD_CAP_CM to vIOMMU capility exposoed to guest, Eric Blake, 2017/01/20
[Qemu-devel] [PATCH RFC v3 02/14] intel_iommu: simplify irq region translation, Peter Xu, 2017/01/12
- Re: [Qemu-devel] [PATCH RFC v3 02/14] intel_iommu: simplify irq region translation, Tian, Kevin, 2017/01/20
- Re: [Qemu-devel] [PATCH RFC v3 02/14] intel_iommu: simplify irq region translation, Peter Xu, 2017/01/20
- Re: [Qemu-devel] [PATCH RFC v3 02/14] intel_iommu: simplify irq region translation, Tian, Kevin, 2017/01/20
- Re: [Qemu-devel] [PATCH RFC v3 02/14] intel_iommu: simplify irq region translation, Peter Xu, 2017/01/20
- Re: [Qemu-devel] [PATCH RFC v3 02/14] intel_iommu: simplify irq region translation, Tian, Kevin, 2017/01/20