Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp3186419lqp; Tue, 26 Mar 2024 01:59:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVpul44lUsROPjIXm7EaAsEHSOmWxPHwW1ILn5Q5w38K+cCdZdGOPZ+57I3Bd8SxXVAxy63KTBU+XOaj5VwaqNtGQa+6qLdhSAC/aSapg== X-Google-Smtp-Source: AGHT+IHwyuzRSSsREoiwAEHUCTiZ6ngPgp7dFyvJjnKF2Cyz1Qc33VvGvGqWGcuR6+PTxyhgWp+G X-Received: by 2002:a17:907:868a:b0:a4d:f773:19f9 with SMTP id qa10-20020a170907868a00b00a4df77319f9mr463885ejc.60.1711443564509; Tue, 26 Mar 2024 01:59:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711443564; cv=pass; d=google.com; s=arc-20160816; b=n2VK9LpRZSe2foa2iLvRDWwNmoMAmiu+B7mqR50I9UN1ooxi5d3OucMLXuNn8pguuB DUwRWIPJ9iPPKmVVIonpplFh5sZCJ6uTORjLyZtxTRlgDeXpykFLv44zfRWNp1HSYRej DUCevDxAih6TvV51ya1tkoUzN2ocVRLTfCdh13MTEcQVl4E2+kVc7SmTerQk1BpRfMfC MmsO3SYS6bHoGR7xwRUOE/KstHPcD1GHJgDh6mPg9Fi1ibq8w7qq4+dDWySDXGv6VmW5 bOgOh+U51dYOD7rdsZs4Uy2hcyOE9S3nqk1MAQINipZi2dLVr345bjOny0YkS0E5NGu3 6+5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=EdYDbe4GXEBpvTtYxayl+Lm3NjPZYHtZveXK1nIC/kg=; fh=h2FHbGVsdraWPmiCAYMF1H/fX4QuNmDfSnEz468knRs=; b=xn4Cz8e0YBtKtmZ0wyu1f+yFQsJZWUgSeRNAZJxyIjZ3NnRvpLH3+cDomcg7bkpe9X BcOAaSRtQEku2SxYCxtEf5gxy3gN9WyDwLi1/0j/3OfWF7JA9kFIi2V/3cncmy+8Ui6/ kpwcGnT1ZTGYf2jZGiHkHR6Uns7CYVkNCFpJ2U5PuL7sJBrPPHbfafu3UNRwu4uGOado i0gCxmmHGzuRi7vasBe7B1vloJPdBZY8eWXmHaO3JHM2J16s4tMCZjgSwP4C691gZGez 4xQKecDR+Pqpr5RiMOaPA7C0gApeUPN+poZxlVNBFUxDBN193hHJ/yPG+p8M5YATpRxf uEwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fefla831; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-118592-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118592-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ec8-20020a170906b6c800b00a474e6a5726si2447241ejb.574.2024.03.26.01.59.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 01:59:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-118592-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Fefla831; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-118592-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118592-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2D01A1F3BC30 for ; Tue, 26 Mar 2024 08:59:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 11D7618E1F; Tue, 26 Mar 2024 08:59:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Fefla831" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35C3F1C2BE for ; Tue, 26 Mar 2024 08:59:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711443557; cv=none; b=Vai/lBU8cB+JBmsWwkaxRcNcagBX0JR0r/UkFWu0pU5J4Yy8ukFimIusXiIOW+xeRfiDgNxrb9fnh6NfSIsHmmm1W4AIzzH/i4rvBdhwQUrkFHBynAXCdw72kCBTJuJCbZz+IduBxJDi6VvhdG7LIQxUYj07XljR240jgvKBtu0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711443557; c=relaxed/simple; bh=JQUcYa55YWe6URT24FF22nspI3258qVvV/c52rDJNis=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=pyX4cgF37Z9mkfEGWcR2An5mo5nMaC2eMNufPGoPwUPnE3KutsWovwsM1XqA0yG25Co6ZQ2NkfhwrrcUzZG2FoRIzr4gOr/8YlWuFrZTLdseMtnPOnp8tSe9fEWBXuNV8iGgI784s2sIQ0ARWoT4AlFd7Ltd7khfWHUD0DRqw2M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Fefla831; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE27DC43390 for ; Tue, 26 Mar 2024 08:59:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711443556; bh=JQUcYa55YWe6URT24FF22nspI3258qVvV/c52rDJNis=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Fefla831+rH2LP7Fj8sBTWvyx0vjtgi7ZwYGDZL6vf7YoqJpKocOZ+6SkddpRF1kP yLldb0mNEfpytdW/bFV8IO3PN/JzNxw3gjB5xXNJj9FzT9e2XuZBhIlb0NgLEDvJGY 92JiBh0bJ1oEBK/WTpvIXO5QdCQ0oAYB59nlW5e/8B4sCm0dKPKzv7HxnndVa2dbEi nvEjSPJMwBGYFUUv2pTnRkyW+9DakDKMVNx0J+5folVtlik9byo/UQwncyOkvLDzqy c95cdNiKp4n8evmoc8PYubJgbfZCNL5z/H6k2LQMfzfIbska6MsFMEkPgFz0lEcSwY WlxPosPBgGnsg== Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-2d6ee6c9945so1079421fa.3 for ; Tue, 26 Mar 2024 01:59:16 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCV52S+jy292qcjcMS+DPZgJJJk6vwkf5viAd65qcNSzmsA68zu31+hND5Z8NTKuPVGPOq8jr1WFNSanvPESkUUKJ4HRIE5ziLmp9coB X-Gm-Message-State: AOJu0YybCHAuY2+PQ0WrN9S15ef9ItMzqvCcqg5DAdk0Pm4wjL55NrUr /lXhCCRYsFybvdGeO8aPszHrevCQruUtZXa1N0uLc0kkNWjMBaJYc/rz+LRYdaEmXb0YLSKfEzk 2EsnW+bVj0u2hE1X4hoGe2V0ib34= X-Received: by 2002:a2e:998b:0:b0:2d4:973e:247f with SMTP id w11-20020a2e998b000000b002d4973e247fmr428618lji.23.1711443555065; Tue, 26 Mar 2024 01:59:15 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <202403221630.2692c998-oliver.sang@intel.com> <20240324142532.GAZgA33M_u1lW_E_1n@fat_crate.local> In-Reply-To: From: Ard Biesheuvel Date: Tue, 26 Mar 2024 10:59:04 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [linus:master] [x86/sme] 48204aba80: BUG:kernel_failed_in_early-boot_stage,last_printk:Booting_the_kernel(entry_offset:#) To: Oliver Sang Cc: Borislav Petkov , oe-lkp@lists.linux.dev, lkp@intel.com, linux-kernel@vger.kernel.org, Tom Lendacky Content-Type: text/plain; charset="UTF-8" On Tue, 26 Mar 2024 at 10:31, Oliver Sang wrote: > > hi, Ard Biesheuvel, > > On Mon, Mar 25, 2024 at 04:39:26PM +0200, Ard Biesheuvel wrote: > > On Sun, 24 Mar 2024 at 16:26, Borislav Petkov wrote: > > > > > > On Fri, Mar 22, 2024 at 05:03:18PM +0800, kernel test robot wrote: > > > > > > > > > > > > Hello, > > > > > > > > kernel test robot noticed "BUG:kernel_failed_in_early-boot_stage,last_printk:Booting_the_kernel(entry_offset:#)" on: > > > > > > > > commit: 48204aba801f1b512b3abed10b8e1a63e03f3dd1 ("x86/sme: Move early SME kernel encryption handling into .head.text") > > > > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master > > > > > > > > [test failed on linus/master 741e9d668aa50c91e4f681511ce0e408d55dd7ce] > > > > [test failed on linux-next/master a1e7655b77e3391b58ac28256789ea45b1685abb] > > > > > > > > in testcase: boot > > > > > > > > compiler: gcc-12 > > > > test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G > > > > > > My guest boots with your .config and SNB as CPU model: > > > > > > ... > > > [ 0.373770][ T1] smpboot: CPU0: Intel Xeon E312xx (Sandy Bridge) (family: 0x6, model: 0x2a, stepping: 0x1) > > > > > > Artefacts like: > > > > > > -initrd initrd-vm-meta-180.cgz > > > > > > or > > > > > > RESULT_ROOT=/result/boot/1/vm-snb/quantal-x86_64-core-20190426.cgz/x86_64-rhel-8.3-bpf/gcc-12/48204aba801f1b512b3abed10b8e1a63e03f3dd1/3 > > > > > > I don't have and don't know how to generate here so I can't run your > > > exact reproducer. > > > > > > > I ran the reproducer using the instructions, and things seem to work fine. > > > > https://paste.debian.net/1311951/ > > > > Could you provide any information regarding the QEMU version and its > > BIOS implementation? > > for QEMU version: > > $ qemu-system-x86_64 --version > QEMU emulator version 7.2.9 (Debian 1:7.2+dfsg-7+deb12u5) > Copyright (c) 2003-2022 Fabrice Bellard and the QEMU Project developers > I tested the exact same version. Does it reproduce with -cpu host instead of -cpu SandyBridge? When running under KVM, I suspect emulating the actual host uarch rather than setting a different one is a more reliable strategy. What CPU type does the host have? > > for BIOS: > > We don't specify bios option for qemu, my understanding is we just run with > default bios for qemu (the seabios). Extra info of seabios > Today, legacy BIOS boot is only used by a minority of x86 systems in the field, so for better coverage, it would make sense to at least start testing UEFI as well. On debian, just install the ovmf package, and pass -bios /usr/share/ovmf/OVMF.fd on the QEMU command line. And given that you are doing virt based boot testing, another very important use case is TDX boot (as well as SEV-SNP, but that may be more difficult for you to organize). But please explore internally at Intel whether TDX can be added to your test matrix as well.