From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxHHX-0007c4-53 for qemu-devel@nongnu.org; Tue, 26 May 2015 12:00:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxHHT-0008D4-5k for qemu-devel@nongnu.org; Tue, 26 May 2015 12:00:43 -0400 Received: from mail-qk0-x235.google.com ([2607:f8b0:400d:c09::235]:32893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxHHT-0008Cy-1P for qemu-devel@nongnu.org; Tue, 26 May 2015 12:00:39 -0400 Received: by qkhg32 with SMTP id g32so8855906qkh.0 for ; Tue, 26 May 2015 09:00:38 -0700 (PDT) Sender: Richard Henderson Message-ID: <556498A2.3050601@twiddle.net> Date: Tue, 26 May 2015 09:00:34 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1432511251-22515-1-git-send-email-aurelien@aurel32.net> <1432511251-22515-9-git-send-email-aurelien@aurel32.net> <5563AB72.3070601@twiddle.net> <20150526060313.GC29207@aurel32.net> In-Reply-To: <20150526060313.GC29207@aurel32.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 08/10] target-s390x: implement STFLE instruction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Alexander Graf On 05/25/2015 11:03 PM, Aurelien Jarno wrote: > On 2015-05-25 16:08, Richard Henderson wrote: >> On 05/24/2015 04:47 PM, Aurelien Jarno wrote: >>> Cc: Alexander Graf >>> Cc: Richard Henderson >>> Signed-off-by: Aurelien Jarno >> >> Sadly, implementing this breaks current kernels. >> I did this about two years ago and havn't figured >> out what to do about it. >> >> The silly code in head.S doesn't check for just the >> facilities that it needs, it checks for all facilities >> that specific processors provide. >> >> If we don't e.g. pretend that we have HFP, despite the >> fact that no one uses it, the kernel won't boot. > > How does it breaks? This patch only enable bits corresponding to > facility that we fully implement (that's a reason why the patchset > doesn't enable LD facility for example). So it should not be a problem, > at least I have been able to boot kernels successfully. > Unless the facilities provided are a strict superset of those required by the kernel, it aborts the boot. Extremely early in the process. As Alex said, it's possible to compile a kernel without this, but none of the vendor-built kernels do so. Which raises the bar to what a user needs to do to install. See linux/arch/s390/kernel/head.S, # List of facilities that are required. If not all facilities are present # the kernel will crash. Format is number of facility words with bits set, # followed by the facility words. #if defined(CONFIG_MARCH_Z13) .long 3, 0xc100eff2, 0xf46ce800, 0x00400000 #elif defined(CONFIG_MARCH_ZEC12) .long 3, 0xc100eff2, 0xf46ce800, 0x00400000 #elif defined(CONFIG_MARCH_Z196) .long 2, 0xc100eff2, 0xf46c0000 #elif defined(CONFIG_MARCH_Z10) .long 2, 0xc100eff2, 0xf0680000 #elif defined(CONFIG_MARCH_Z9_109) .long 1, 0xc100efc2 #elif defined(CONFIG_MARCH_Z990) .long 1, 0xc0002000 #elif defined(CONFIG_MARCH_Z900) .long 1, 0xc0000000 #endif r~