From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755453AbcIGVkh (ORCPT ); Wed, 7 Sep 2016 17:40:37 -0400 Received: from mail-qk0-f179.google.com ([209.85.220.179]:36038 "EHLO mail-qk0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756967AbcIGVja (ORCPT ); Wed, 7 Sep 2016 17:39:30 -0400 Subject: Re: Ping: [PATCH v15 00/13] support "task_isolation" mode 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@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org References: <1471382376-5443-1-git-send-email-cmetcalf@mellanox.com> <057a958c-4491-b449-ae59-7d331afc872d@gmail.com> From: Francis Giraldeau Message-ID: <2ded889b-d2a5-5178-d57d-6f8b4cf2994c@gmail.com> Date: Wed, 7 Sep 2016 17:39:26 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <057a958c-4491-b449-ae59-7d331afc872d@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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