[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 3/6] x86/vtd: Drop struct qi_ctrl



>>> On 25.02.19 at 11:02, <Paul.Durrant@xxxxxxxxxx> wrote:
>> From: Andrew Cooper [mailto:andrew.cooper3@xxxxxxxxxx]
>> 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
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.