>>> On 25.02.19 at 11:02, <[email protected]> wrote:
>> From: Andrew Cooper [mailto:[email protected]]
>> Sent: 22 February 2019 19:13
>> 
>> --- a/xen/drivers/passthrough/vtd/qinval.c
>> +++ b/xen/drivers/passthrough/vtd/qinval.c
>> @@ -84,7 +84,7 @@ static int __must_check 
>> queue_invalidate_context_sync(struct vtd_iommu *iommu,
>> 
>>      spin_lock_irqsave(&iommu->register_lock, flags);
>>      index = qinval_next_index(iommu);
>> -    entry_base = iommu_qi_ctrl(iommu)->qinval_maddr +
>> +    entry_base = iommu->qinval_maddr +
>>                   ((index >> QINVAL_ENTRY_ORDER) << PAGE_SHIFT);
> 
> ^ This calculation looks worthy of a macro or an inline. It is repeated a 
> lot.

And indeed the other day I was surprised that there is
GET_IREMAP_ENTRY(), but no qinval equivalent.

Jan



_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to