From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759945AbcKCSVa (ORCPT ); Thu, 3 Nov 2016 14:21:30 -0400 Received: from aibo.runbox.com ([91.220.196.211]:56524 "EHLO aibo.runbox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757088AbcKCSV3 (ORCPT ); Thu, 3 Nov 2016 14:21:29 -0400 Subject: Re: [PREEMPT-RT] Oops in rapl_cpu_prepare() To: Sebastian Andrzej Siewior References: <20161028080324.b6nnwaljmzxiyykx@linutronix.de> <26425897-5229-d2c5-1e1b-a08442441f68@runbox.com> <20161102172327.qam4ylpewmwnnmlx@linutronix.de> Cc: "linux-kernel@vger.kernel.org" , "Charles (Chas) Williams" From: "M. Vefa Bicakci" Message-ID: Date: Thu, 3 Nov 2016 21:21:15 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161102172327.qam4ylpewmwnnmlx@linutronix.de> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/02/2016 08:23 PM, Sebastian Andrzej Siewior wrote: > On 2016-11-01 13:15:53 [+0300], M. Vefa Bicakci wrote: >> Hello Sebastian, > > Hi, > >> The patch fixes the kernel oops for me. >> >> I am using a custom 4.8.5-based kernel on Qubes OS R3.2, which is based >> on Xen 4.6.3. Apparently, Xen also has a similar bug/flaw/quirk regarding >> the allocation of package identifiers for the virtual CPUs. >> >> Prior to your patch, my Xen-based virtual machines would intermittently >> crash most of the time at boot-up with the backtrace reported by Charles. >> Due to this, I was under the impression that this is a subtle race >> condition. > > how hard is it to get such a xen setup up and running? Hello Sebastian, Sorry about my late reply! The set-up I use is a bit involved/complicated. To replicate it, you would need to install Qubes OS R3.2 (assuming that you have compatible hardware with a lot of RAM) and then build a custom 4.8.y-based kernel with a set of cherry-picked commits. After installing this kernel in dom0 with dnf or rpm, you would need to run: # Generate a domU initrd and copy the kernel image and the generated # initrd to Qubes OS's domU kernel directory (/var/lib/qubes/...) $ sudo /usr/sbin/qubes-prepare-vm-kernel # From now on, use kernel_version when starting domU instances. $ qubes-prefs -s default-kernel Afterwards, starting a domU (i.e., AppVM in Qubes OS terminology) should exhibit the issue in question related to RAPL: $ sudo truncate -s0 /var/log/xen/console/guest-.log $ qvm-start --debug $ cat /var/log/xen/console/guest-.log As you may appreciate, the set-up is a bit involved. Nevertheless, in case you would like to replicate my set-up, I can try to publish my linux-4.8.y-based git branch so that you can build a similar kernel as the one I use. Vefa