[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180315151917.pgheszruqnnjbqb4@8bytes.org>
Date: Thu, 15 Mar 2018 16:19:17 +0100
From: Joerg Roedel <joro@...tes.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
tglx@...utronix.de
Subject: Re: [PATCH 05/10] iommu/amd: remove the special case from
get_irq_table()
On Thu, Mar 15, 2018 at 03:15:41PM +0100, Sebastian Andrzej Siewior wrote:
> ->set_allocated() operates only on 0…31 and other could be used at the
> same time. However 0…31 should be accessed by other user before they are
> ready.
>
> irq_remapping_alloc() is that ->alloc() callback invoked via
> irq_domain_alloc_irqs_hierarchy() and each caller has to hold the
> &irq_domain_mutex mutex. So we should not have those in parallel.
>
> Is it possible to have those entries accessed before the setup is
> complete? My understanding is that this setup is performed once during
> boot (especially that ioapic part) and not again.
>
> From looking at that hunk, it should not hurt to add that lock, just
> wanted to check it is really needed.
Okay, if the irq-layer does the needed locking, then we don't need
another lock here. There is the modify_irte_ga() path for the
virtualized irq routing into KVM guests, but there should be no KVM
guests running when setup the ioapic routing entries.
Joerg
Powered by blists - more mailing lists