lkml.org 
[lkml]   [2021]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH V3 3/5] hyperv/IOMMU: Enable swiotlb bounce buffer for Isolation VM
From


On 12/4/2021 3:17 AM, Michael Kelley (LINUX) wrote:
>> +static void __init hyperv_iommu_swiotlb_init(void)
>> +{
>> + unsigned long hyperv_io_tlb_size;
>> + void *hyperv_io_tlb_start;
>> +
>> + /*
>> + * Allocate Hyper-V swiotlb bounce buffer at early place
>> + * to reserve large contiguous memory.
>> + */
>> + hyperv_io_tlb_size = swiotlb_size_or_default();
>> + hyperv_io_tlb_start = memblock_alloc(hyperv_io_tlb_size, PAGE_SIZE);
>> +
>> + if (!hyperv_io_tlb_start)
>> + pr_warn("Fail to allocate Hyper-V swiotlb buffer.\n");
> In the error case, won't swiotlb_init_with_tlb() end up panic'ing when
> it tries to zero out the memory? The only real choice here is to
> return immediately after printing the message, and not call
> swiotlb_init_with_tlb().
>

Yes, agree. Will update.

\
 
 \ /
  Last update: 2021-12-04 08:27    [W:0.060 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site