lkml.org 
[lkml]   [2023]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v8 12/28] gunyah: vm_mgr: Introduce basic VM Manager
From


On 1/9/2023 1:05 AM, Srivatsa Vaddagiri wrote:
> * Elliot Berman <quic_eberman@quicinc.com> [2022-12-19 14:58:33]:
>
>> +config GUNYAH_VM_MANAGER
>
> Any reason why this needs to be a separate config? IOW CONFIG_GUNYAH should
> enable VM management functionality also.
>
>> @@ -550,14 +580,29 @@ static int gh_rm_drv_probe(struct platform_device *pdev)
>> rsc_mgr->msgq_client.rx_callback = gh_rm_msgq_rx_data;
>> rsc_mgr->msgq_client.tx_done = gh_rm_msgq_tx_done;
>>
>> - return gh_msgq_init(&pdev->dev, &rsc_mgr->msgq, &rsc_mgr->msgq_client,
>> + ret = gh_msgq_init(&pdev->dev, &rsc_mgr->msgq, &rsc_mgr->msgq_client,
>> &rsc_mgr->tx_ghrsc, &rsc_mgr->rx_ghrsc);
>
> Bail on error here.
>
> [snip]
>
>> +static __must_check struct gunyah_vm *gunyah_vm_alloc(struct gh_rm_rpc *rm)
>> +{
>> + struct gunyah_vm *ghvm;
>> + int vmid;
>> +
>> + vmid = gh_rm_alloc_vmid(rm, 0);
>> + if (vmid < 0)
>> + return ERR_PTR(vmid);
>> +
>> + ghvm = kzalloc(sizeof(*ghvm), GFP_KERNEL);
>> + if (!ghvm)
>
> dealloc_vmid here (as well as few other error paths)?
>
>> + return ghvm;
>> +
>> + get_gh_rm(rm);

Applied all of these.

Thanks,
Elliot

\
 
 \ /
  Last update: 2023-03-26 23:33    [W:0.115 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site