lkml.org 
[lkml]   [2023]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v9 14/27] gunyah: vm_mgr: Add ioctls to support basic non-proxy VM boot
From


On 1/30/2023 1:44 PM, Elliot Berman wrote:
>
>
> On 1/30/2023 12:53 AM, Srivatsa Vaddagiri wrote:
>> * Elliot Berman <quic_eberman@quicinc.com> [2023-01-20 14:46:13]:
>>
>>> +static int gh_vm_start(struct gunyah_vm *ghvm)
>>> +{
>>> +    struct gunyah_vm_memory_mapping *mapping;
>>> +    u64 dtb_offset;
>>> +    u32 mem_handle;
>>> +    int ret;
>>> +
>>> +    down_write(&ghvm->status_lock);
>>> +    if (ghvm->vm_status != GH_RM_VM_STATUS_NO_STATE) {
>>> +        up_write(&ghvm->status_lock);
>>> +        return 0;
>>
>> return -EINVAL in this case.
>>
>> Additionally check if its already GH_RM_VM_STATUS_READY and return 0
>> in that
>> case.
>>
>> [snip]
>>
>
> Caller can use gh_vm_ensure_started for this behavior. I'll move this to
> be used in the GH_VM_RUN ioctl as well.
*GH_VM_START
> >>
>>> +    mem_handle = mapping->parcel.mem_handle;
>>> +    dtb_offset = ghvm->dtb_config.gpa - mapping->guest_phys_addr;
>>> +
>>> +    ret = gh_rm_vm_configure(ghvm->rm, ghvm->vmid, ghvm->auth,
>>> mem_handle,
>>> +                0, 0, dtb_offset, ghvm->dtb_config.size);
>>
>> Default value of auth is 0 (GH_RM_VM_AUTH_NONE). Is that what you
>> wanted here?
>> Perhaps initialize default value of auth to be
>> GH_RM_VM_AUTH_QCOM_PIL_ELF?
>>
>
> Yes, default VM is GH_RM_VM_AUTH_NONE.

\
 
 \ /
  Last update: 2023-03-27 00:02    [W:0.082 / U:0.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site