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

Re: [Xen-devel] [PATCH] x86/mm: Rearrange guest_get_eff_{, kern_}l1e() not be void



>>> On 30.08.17 at 15:29, <wei.liu2@xxxxxxxxxx> wrote:
> On Wed, Aug 30, 2017 at 02:22:05PM +0100, Andrew Cooper wrote:
>> Coverity complains that gl1e.l1 may be used while uninitialised in
>> map_ldt_shadow_page().  This isn't actually accurate as guest_get_eff_l1e()
>> will always write to its parameter.
>> 
>> However, having a void function which returns a 64bit value via pointer is
>> rather silly.  Rearrange the functions to return l1_pgentry_t.
>> 
>> No functional change, but hopefully should help Coverity not to come to the
>> wrong conclusion.
>> 
>> Bloat-o-meter also reports a modest improvement:
>>   add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-71 (-71)
>>   function                                     old     new   delta
>>   guest_get_eff_l1e                             82      75      -7
>>   mmio_ro_do_page_fault                        530     514     -16
>>   map_ldt_shadow_page                          501     485     -16
>>   ptwr_do_page_fault                           615     583     -32
>> 
>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> 
> Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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