Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1724008
| From | "Sironi, Filippo" <sironi@amazon.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] intel-iommu: Don't be too aggressive when clearing one context entry |
| Date | 2017-08-31 10:50 +0200 |
| Message-ID | <uktkJ-3lv-7@gated-at.bofh.it> (permalink) |
| References | <ujt3s-6CP-9@gated-at.bofh.it> <ukbnP-rR-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Joerg,
> On 30. Aug 2017, at 15:31, Joerg Roedel <joro@8bytes.org> wrote:
>
> Hi Filippo,
>
> please change the subject to:
>
> iommu/vt-d: Don't be too aggressive when clearing one context entry
>
> to follow the convention used in the iommu-tree. Another comment below.
Will do.
> On Mon, Aug 28, 2017 at 04:16:29PM +0200, Filippo Sironi wrote:
>> static void domain_context_clear_one(struct intel_iommu *iommu, u8 bus, u8 devfn)
>> {
>> + unsigned long flags;
>> + struct context_entry *context;
>> + u16 did_old;
>> +
>> if (!iommu)
>> return;
>>
>> + spin_lock_irqsave(&iommu->lock, flags);
>> + context = iommu_context_addr(iommu, bus, devfn, 0);
>> + if (!context) {
>> + spin_unlock_irqrestore(&iommu->lock, flags);
>> + return;
>> + }
>> + did_old = context_domain_id(context);
>> + spin_unlock_irqrestore(&iommu->lock, flags);
>> clear_context_table(iommu, bus, devfn);
>
> This function is the only caller of clear_context_table(), which does
> similar things (like fetching the context-entry) as you are adding
> above.
>
> So you can either make clear_context_table() return the old domain-id
> so that you don't need to do it here, or you get rid of the function
> entirely and add the context_clear_entry() and __iommu_flush_cache()
> calls into this code-path.
>
> Regards,
>
> Joerg
I went for merging domain_context_clear_one() with context_clear_one().
Regards,
Filippo
Amazon Development Center Germany GmbH
Berlin - Dresden - Aachen
main office: Krausenstr. 38, 10117 Berlin
Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger
Ust-ID: DE289237879
Eingetragen am Amtsgericht Charlottenburg HRB 149173 B
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] intel-iommu: Don't be too aggressive when clearing one context entry Filippo Sironi <sironi@amazon.de> - 2017-08-28 16:20 +0200
Re: [PATCH] intel-iommu: Don't be too aggressive when clearing one context entry Joerg Roedel <joro@8bytes.org> - 2017-08-30 15:40 +0200
Re: [PATCH] intel-iommu: Don't be too aggressive when clearing one context entry "Sironi, Filippo" <sironi@amazon.de> - 2017-08-31 10:50 +0200
Re: [PATCH] intel-iommu: Don't be too aggressive when clearing one context entry Jacob Pan <jacob.jun.pan@linux.intel.com> - 2017-08-30 17:50 +0200
Re: [PATCH] intel-iommu: Don't be too aggressive when clearing one context entry "Sironi, Filippo" <sironi@amazon.de> - 2017-08-31 10:50 +0200
[PATCH v2] iommu/vt-d: Don't be too aggressive when clearing one context entry Filippo Sironi <sironi@amazon.de> - 2017-08-31 11:10 +0200
Re: [PATCH v2] iommu/vt-d: Don't be too aggressive when clearing one context entry Joerg Roedel <joro@8bytes.org> - 2017-09-01 11:40 +0200
csiph-web