On 20/01/16 14:05, Jan Beulich wrote:
> Addresses passed by PV guests should be subjected to __addr_ok(),
> avoiding undue TLB flushes; .
>
> Signed-off-by: Jan Beulich <jbeul...@suse.com>
>
> --- a/xen/arch/x86/mm.c
> +++ b/xen/arch/x86/mm.c
> @@ -3268,8 +3268,9 @@ long do_mmuext_op(
>          case MMUEXT_INVLPG_LOCAL:
>              if ( unlikely(d != pg_owner) )
>                  rc = -EPERM;
> -            else if ( !paging_mode_enabled(d) ||
> -                      paging_invlpg(curr, op.arg1.linear_addr) != 0 )
> +            else if ( !paging_mode_enabled(d)
> +                      ? __addr_ok(op.arg1.linear_addr)
> +                      : paging_invlpg(curr, op.arg1.linear_addr) )

paging_mode_enabled() changes depending on whether the guest has
logdirty currently enabled.

As you have also patched paging_invlpg() to DTRT with __addr_ok(), I
think this hunk can be dropped.

Everything else, Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com>

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

Reply via email to