From 1124a9a26f05439a3aa31eaea227285e50dc94c0 Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Fri, 26 Jan 2018 15:29:10 +0000 Subject: [PATCH] xen/pvshim: fix GNTTABOP_query_size hypercall forwarding with SMAP MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Disable SMAP in the shim before bouncing the hypercall, or else L0 will fail to get the hypercall buffer. Reported-by: Fatih Acar Signed-off-by: Roger Pau Monné Reviewed-by: Andrew Cooper Reviewed-by: Wei Liu --- xen/arch/x86/pv/shim.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/x86/pv/shim.c b/xen/arch/x86/pv/shim.c index 6e4220886d..534965c92a 100644 --- a/xen/arch/x86/pv/shim.c +++ b/xen/arch/x86/pv/shim.c @@ -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: -- 2.30.2