[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL v5 26/57] x86-iommu: introduce IEC notifiers
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] [PULL v5 26/57] x86-iommu: introduce IEC notifiers |
Date: |
Sat, 30 Jul 2016 09:52:48 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
Sorry, only noticed this now in a discussion with David over the AMD IOMMU:
On 2016-07-21 19:53, Michael S. Tsirkin wrote:
> From: Peter Xu <address@hidden>
>
> This patch introduces x86 IOMMU IEC (Interrupt Entry Cache)
> invalidation notifier list. When vIOMMU receives IEC invalidate
> request, all the registered units will be notified with specific
> invalidation requests.
>
> Intel IOMMU is the first provider that generates such a event.
>
> Signed-off-by: Peter Xu <address@hidden>
> Reviewed-by: Michael S. Tsirkin <address@hidden>
> Signed-off-by: Michael S. Tsirkin <address@hidden>
> ---
> hw/i386/intel_iommu_internal.h | 24 ++++++++++++++++++++----
> include/hw/i386/x86-iommu.h | 40 ++++++++++++++++++++++++++++++++++++++++
> hw/i386/intel_iommu.c | 36 +++++++++++++++++++++++++++++-------
> hw/i386/x86-iommu.c | 29 +++++++++++++++++++++++++++++
> hw/i386/trace-events | 3 +++
> 5 files changed, 121 insertions(+), 11 deletions(-)
>
...
> @@ -57,4 +76,25 @@ struct X86IOMMUState {
> */
> X86IOMMUState *x86_iommu_get_default(void);
>
> +/**
> + * x86_iommu_iec_register_notifier - register IEC (Interrupt Entry
> + * Cache) notifiers
> + * @iommu: IOMMU device to register
> + * @fn: IEC notifier hook function
> + * @data: notifier private data
> + */
> +void x86_iommu_iec_register_notifier(X86IOMMUState *iommu,
> + iec_notify_fn fn, void *data);
> +
> +/**
> + * x86_iommu_iec_notify_all - Notify IEC invalidations
> + * @iommu: IOMMU device that sends the notification
> + * @global: whether this is a global invalidation. If true, @index
> + * and @mask are undefined.
> + * @index: starting index of interrupt entry to invalidate
> + * @mask: index mask for the invalidation
This is Intel'ish: index and mask refer to the single Intel IR table.
AMD has per-device tables.
But even for Intel: Would the index make any sense to the callbacks? KVM
uses (virtual and real) GSIs to address its routing entries, no?
I suspect we will have to redesign this once we want to make use of
non-global invalidation.
Jan
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PULL v5 17/57] intel_iommu: define interrupt remap table addr register, (continued)
- [Qemu-devel] [PULL v5 17/57] intel_iommu: define interrupt remap table addr register, Michael S. Tsirkin, 2016/07/21
- [Qemu-devel] [PULL v5 18/57] intel_iommu: handle interrupt remap enable, Michael S. Tsirkin, 2016/07/21
- [Qemu-devel] [PULL v5 19/57] intel_iommu: define several structs for IOMMU IR, Michael S. Tsirkin, 2016/07/21
- [Qemu-devel] [PULL v5 20/57] intel_iommu: add IR translation faults defines, Michael S. Tsirkin, 2016/07/21
- [Qemu-devel] [PULL v5 21/57] intel_iommu: Add support for PCI MSI remap, Michael S. Tsirkin, 2016/07/21
- [Qemu-devel] [PULL v5 22/57] intel_iommu: get rid of {0} initializers, Michael S. Tsirkin, 2016/07/21
- [Qemu-devel] [PULL v5 23/57] q35: ioapic: add support for emulated IOAPIC IR, Michael S. Tsirkin, 2016/07/21
- [Qemu-devel] [PULL v5 24/57] ioapic: introduce ioapic_entry_parse() helper, Michael S. Tsirkin, 2016/07/21
- [Qemu-devel] [PULL v5 25/57] intel_iommu: add support for split irqchip, Michael S. Tsirkin, 2016/07/21
- [Qemu-devel] [PULL v5 26/57] x86-iommu: introduce IEC notifiers, Michael S. Tsirkin, 2016/07/21
- Re: [Qemu-devel] [PULL v5 26/57] x86-iommu: introduce IEC notifiers,
Jan Kiszka <=
[Qemu-devel] [PULL v5 27/57] ioapic: register IOMMU IEC notifier for ioapic, Michael S. Tsirkin, 2016/07/21
[Qemu-devel] [PULL v5 28/57] intel_iommu: Add support for Extended Interrupt Mode, Michael S. Tsirkin, 2016/07/21
[Qemu-devel] [PULL v5 29/57] intel_iommu: add SID validation for IR, Michael S. Tsirkin, 2016/07/21
[Qemu-devel] [PULL v5 30/57] kvm-irqchip: simplify kvm_irqchip_add_msi_route, Michael S. Tsirkin, 2016/07/21
[Qemu-devel] [PULL v5 32/57] kvm-irqchip: x86: add msi route notify fn, Michael S. Tsirkin, 2016/07/21
[Qemu-devel] [PULL v5 31/57] kvm-irqchip: i386: add hook for add/remove virq, Michael S. Tsirkin, 2016/07/21
[Qemu-devel] [PULL v5 33/57] kvm-irqchip: do explicit commit when update irq, Michael S. Tsirkin, 2016/07/21