qemu-devel
[Top][All Lists]
Advanced

[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


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]