From mboxrd@z Thu Jan 1 00:00:00 1970 From: Francis Giraldeau Subject: Re: Ping: [PATCH v15 00/13] support "task_isolation" mode Date: Wed, 7 Sep 2016 17:39:26 -0400 Message-ID: <2ded889b-d2a5-5178-d57d-6f8b4cf2994c@gmail.com> References: <1471382376-5443-1-git-send-email-cmetcalf@mellanox.com> <057a958c-4491-b449-ae59-7d331afc872d@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <057a958c-4491-b449-ae59-7d331afc872d-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Chris Metcalf , Gilad Ben Yossef , Steven Rostedt , Ingo Molnar , Peter Zijlstra , Andrew Morton , Rik van Riel , Tejun Heo , Frederic Weisbecker , Thomas Gleixner , "Paul E. McKenney" , Christoph Lameter , Viresh Kumar , Catalin Marinas , Will Deacon , Andy Lutomirski , Daniel Lezcano , linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-api@vger.kernel.org On 2016-09-07 05:11 PM, Francis Giraldeau wrote: > The syscall test fails on x86: > $ sudo ./isolation > [...] > test_syscall: FAIL (0x100) > test_syscall (SIGUSR1): FAIL (0x100) > > I wanted to debug this problem with gdb and a KVM virtual machine. However, the TSC clock source is detected as non reliable, even with the boot parameter tsc=reliable, and therefore prctl(PR_SET_TASK_ISOLATION, PR_TASK_ISOLATION_ENABLE) always returns EAGAIN. Is there a trick to run task isolation in a VM (at least for debugging purposes)? OK, got it. The guest kernel must be compiled with CONFIG_KVM_GUEST, and then with virsh edit, set the clock configuration of the VM (under ): Of course, the jitter is horrible, but at least it is possible to debug with GDB. Cheers, Francis