]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
xen/pvshim: fix GNTTABOP_query_size hypercall forwarding with SMAP
authorRoger Pau Monne <roger.pau@citrix.com>
Fri, 26 Jan 2018 15:29:10 +0000 (15:29 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 26 Jan 2018 18:28:47 +0000 (18:28 +0000)
Disable SMAP in the shim before bouncing the hypercall, or else L0
will fail to get the hypercall buffer.

Reported-by: Fatih Acar <fatih.acar@gandi.net>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/pv/shim.c

index 6e4220886d073daffb0e5416ed2a90fa1d6ff5d0..534965c92a953da96446644e398a718f4980367d 100644 (file)
@@ -757,7 +757,10 @@ static long pv_shim_grant_table_op(unsigned int cmd,
     }
 
     case GNTTABOP_query_size:
+        /* Disable SMAP so L0 can access the buffer. */
+        stac();
         rc = xen_hypercall_grant_table_op(GNTTABOP_query_size, uop.p, count);
+        clac();
         break;
 
     default: