On 17/08/18 07:42, Jan Beulich wrote:
> Restore symmetry between get_page_from_l<N>e(): pv_l1tf_check_l<N>e is
> uniformly invoked from outside of them.

I'm not sure what symmetry you are referring to.

>  They're no longer getting called
> for non-present PTEs. This way the slightly odd three-way return value
> meaning of the higher level ones can also be got rid of.
>
> Introduce local variables holding the page table entries processed, and
> use them throughout the loop bodies instead of re-reading them from the
> page table several times.
>
> Signed-off-by: Jan Beulich <jbeul...@suse.com>

With at least the above query resolved, Reviewed-by: Andrew Cooper
<andrew.coop...@citrix.com>, but a style recommendation.

> @@ -1396,8 +1369,7 @@ static int alloc_l1_table(struct page_in
>              if ( ret )
>                  goto out;
>          }
> -
> -        switch ( ret = get_page_from_l1e(pl1e[i], d, d) )
> +        else switch ( ret = get_page_from_l1e(pl1e[i], d, d) )

else switch isn't a usual construct (here and in ptwr_emulated_update). 
I was expecting the misleading indentation warning to trigger, but GCC
8.2 does appear to be happy.

Still, for code clarity, I'd suggest adding braces to the and indenting
the switch statement.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to