diff --git a/tests/test-progs/gpu-hello/src/gpu-hello.cpp b/tests/test-progs/gpu-hello/src/gpu-hello.cpp index b054558f5..bdff074a8 100755 --- 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,