[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 3/3] intel_iommu: allow UNMAP notifiers
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [PATCH v4 3/3] intel_iommu: allow UNMAP notifiers |
Date: |
Wed, 14 Sep 2016 15:56:45 +1000 |
User-agent: |
Mutt/1.7.0 (2016-08-17) |
On Fri, Sep 09, 2016 at 10:57:44AM +0800, Peter Xu wrote:
> Intel vIOMMU is still lacking of a complete IOMMU notifier mechanism.
> Before that is achieved, let's open a door for vhost DMAR support, which
> only requires cache invalidations (UNMAP operations).
>
> Meanwhile, converting hw_error() to error_report() and exit(1), to make
> the error messages clean and obvious (so no CPU registers will be
> dumped).
Ah, you can scratch the comment I made about this in the previous
patch, I hadn't realised this just threw an error at present.
>
> Signed-off-by: Peter Xu <address@hidden>
Reviewed-by: David Gibson <address@hidden>
> ---
> hw/i386/intel_iommu.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
> index 9d49be7..e4c3681 100644
> --- a/hw/i386/intel_iommu.c
> +++ b/hw/i386/intel_iommu.c
> @@ -1980,10 +1980,14 @@ static void
> vtd_iommu_notify_flag_changed(MemoryRegion *iommu,
> {
> VTDAddressSpace *vtd_as = container_of(iommu, VTDAddressSpace, iommu);
>
> - hw_error("Device at bus %s addr %02x.%d requires iommu notifier which "
> - "is currently not supported by intel-iommu emulation",
> - vtd_as->bus->qbus.name, PCI_SLOT(vtd_as->devfn),
> - PCI_FUNC(vtd_as->devfn));
> + if (new & IOMMU_NOTIFIER_MAP) {
> + error_report("Device at bus %s addr %02x.%d requires iommu "
> + "notifier which is currently not supported by "
> + "intel-iommu emulation",
> + vtd_as->bus->qbus.name, PCI_SLOT(vtd_as->devfn),
> + PCI_FUNC(vtd_as->devfn));
> + exit(1);
> + }
> }
>
> static const VMStateDescription vtd_vmstate = {
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- Re: [Qemu-devel] [PATCH v4 1/3] memory: introduce IOMMUNotifier and its caps, (continued)
[Qemu-devel] [PATCH v4 2/3] memory: introduce IOMMUOps.notify_flag_changed, Peter Xu, 2016/09/08
- Re: [Qemu-devel] [PATCH v4 2/3] memory: introduce IOMMUOps.notify_flag_changed, David Gibson, 2016/09/14
- Re: [Qemu-devel] [PATCH v4 2/3] memory: introduce IOMMUOps.notify_flag_changed, Peter Xu, 2016/09/14
- Re: [Qemu-devel] [PATCH v4 2/3] memory: introduce IOMMUOps.notify_flag_changed, David Gibson, 2016/09/14
- Re: [Qemu-devel] [PATCH v4 2/3] memory: introduce IOMMUOps.notify_flag_changed, Peter Xu, 2016/09/14
- Re: [Qemu-devel] [PATCH v4 2/3] memory: introduce IOMMUOps.notify_flag_changed, David Gibson, 2016/09/14
- Re: [Qemu-devel] [PATCH v4 2/3] memory: introduce IOMMUOps.notify_flag_changed, Peter Xu, 2016/09/14
[Qemu-devel] [PATCH v4 3/3] intel_iommu: allow UNMAP notifiers, Peter Xu, 2016/09/08
- Re: [Qemu-devel] [PATCH v4 3/3] intel_iommu: allow UNMAP notifiers,
David Gibson <=
Re: [Qemu-devel] [PATCH v4 0/3] Introduce IOMMUNotifier struct, no-reply, 2016/09/09