lkml.org 
[lkml]   [2017]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH resend v2 2/3] virt: Add vboxguest VMMDEV communication code
From
Date
Hi,

On 27-11-17 20:46, Larry Finger wrote:
> On 11/26/2017 09:12 AM, Hans de Goede wrote:
>> This commits adds a header describing the hardware interface for the
>> Virtual Box Guest PCI device used in Virtual Box virtual machines and
>> utility functions for talking to the Virtual Box hypervisor over this
>> interface.
>>
>> These utility functions will used both by the vboxguest driver for the
>> PCI device which offers the /dev/vboxguest ioctl API and by the vboxfs
>> driver which offers folder sharing support.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
> Reviewed-by: Larry Finger <Larry.Finger.net>
>
> This patch has only minor defects. Please see the inline comments.
>
>> ---
>> Changes in v2:
>> -Change all uapi headers to kernel coding style: Drop struct and enum typedefs
>>   make type and struct-member names all lowercase, enum values all uppercase.
>> -Remove unused struct type declarations from some headers (shaving of another
>>   1000 lines)
>> -Remove or fixup doxygen style comments
>> -Get rid of CHECK macros, use a function taking in_ and out_size args instead
>> -Some other small codyingstyle fixes
>> -Split into multiple patches

<snip>

>> +
>> +/**
>> + * Translates linear address types to page list direction flags.
>> + *
>> + * Return: page list flags.
>> + * @type:  The type.
>> + */
>> +static u32 hgcm_call_linear_addr_type_to_pagelist_flags(
>> +    enum vmmdev_hgcm_function_parameter_type type)
>> +{
>> +    switch (type) {
>> +    default:
>> +        WARN_ON(1);
>
> Do you intend a fall through here? If so, please add a comment to that effect.

Yes, comment added for v3.

>> +    case VMMDEV_HGCM_PARM_TYPE_LINADDR:
>> +    case VMMDEV_HGCM_PARM_TYPE_LINADDR_KERNEL:
>> +        return VMMDEV_HGCM_F_PARM_DIRECTION_BOTH;
>> +
>> +    case VMMDEV_HGCM_PARM_TYPE_LINADDR_IN:
>> +    case VMMDEV_HGCM_PARM_TYPE_LINADDR_KERNEL_IN:
>> +        return VMMDEV_HGCM_F_PARM_DIRECTION_TO_HOST;
>> +
>> +    case VMMDEV_HGCM_PARM_TYPE_LINADDR_OUT:
>> +    case VMMDEV_HGCM_PARM_TYPE_LINADDR_KERNEL_OUT:
>> +        return VMMDEV_HGCM_F_PARM_DIRECTION_FROM_HOST;
>> +    }
>> +}

Regards,

Hans

\
 
 \ /
  Last update: 2017-11-29 14:18    [W:0.063 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site