On 20/01/16 14:41, Jan Beulich wrote: >>>> On 20.01.16 at 15:23, <andrew.coop...@citrix.com> wrote: >> 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. > How that? Without the change there's no address validation at > all when !paging_mode_enabled(d).
Oh - there is an inversion in there. Sorry for the noise. Entire patch Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel