# Node ID c469dc7eb44eecd5bbbb8cd2fc57e8ba12b8aa4f # Parent 7375e1f533fa0d08daa65e764651509f8f2b7603 diff --git a/tests/test-progs/gpu-hello/src/gpu-hello.cpp b/tests/test-progs/gpu-hello/src/gpu-hello.cpp --- a/tests/test-progs/gpu-hello/src/gpu-hello.cpp +++ b/tests/test-progs/gpu-hello/src/gpu-hello.cpp @@ -41,6 +41,12 @@ #include #include +#ifdef KVM_SWITCH +#include "m5op.h" + +void *m5_mem = (void*)0xffffc90000000000; +#endif + #define SUCCESS 0 #define FAILURE 1 @@ -247,6 +253,10 @@ runCLKernel(cl_kernel kernel) return FAILURE; } +#ifdef KVM_SWITCH + m5_switchcpu(); +#endif + // 2. Launch kernel status = clEnqueueNDRangeKernel(commandQueue, kernel, 1, NULL, globalThreads, localThreads, 0, NULL,