Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp1513194lqg; Sun, 3 Mar 2024 13:57:10 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVaG0lUC5nJprLW2jpmE6G/tZX80k6ps7YMVMYdNLHfXQKSaXyo7R7DLtq3DT2hGqzTxGcRil3FCWknMRKnw1d3Y4LYEp0JBa1wdAfYeg== X-Google-Smtp-Source: AGHT+IGXlk4Sp5ADBCoY0WNqMEfJ0ELM9Bmq+gVX5USVl4uvQJcqc24QvIXx0Q8JZflhu8Nuve32 X-Received: by 2002:a17:906:3798:b0:a3e:7cf7:2fb7 with SMTP id n24-20020a170906379800b00a3e7cf72fb7mr5450850ejc.33.1709503030054; Sun, 03 Mar 2024 13:57:10 -0800 (PST) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ne6-20020a1709077b8600b00a449e7e5017si2303941ejc.834.2024.03.03.13.57.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 13:57:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89922-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=UxFc5SjK; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-89922-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89922-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 C6C6C1F211D4 for ; Sun, 3 Mar 2024 21:57:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 542837A70E; Sun, 3 Mar 2024 21:57:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UxFc5SjK" 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 6054879DB6 for ; Sun, 3 Mar 2024 21:57:03 +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=1709503023; cv=none; b=cS5F53+gZEsbaL7bDuot3+zPyBt4YNxaqB0A+yCbTzCsRBHwLRA7w/PuQEg/BDZJMIvrNVoXbbyMPRTsIgXiVrs4xckOlJSkcNGQzlODTw7/BqV5IYVvYk26luOQn91tBXbV6yoGfVa6h0Hxy+HJQRdMUuWKF9OaqJTQ8QCrIGE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709503023; c=relaxed/simple; bh=yBugoWgQAYcskdBuGMNWHxzysZg3JCbfaz8uiiWHdko=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=PQpGaGB3en1aINUeSlQaJRpLOkruYp7mNVLj8h2c0Lm/ObWhUwgOhOC43fRH0vsNbMij0/wWa5RLnjn7lRkPP7+cfSOFyDBLZPRXEwkvVckEnjcfg/16tHKyyB9mtojH263c+mKTXuCFwsctoyERQFpXkvzkCeXzDzPqgeeODT4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UxFc5SjK; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7329C433F1 for ; Sun, 3 Mar 2024 21:57:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709503022; bh=yBugoWgQAYcskdBuGMNWHxzysZg3JCbfaz8uiiWHdko=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=UxFc5SjKMJZWPj6dHiRT3fLLQ0I0GCpW5WQw2OWCG10VGkBHbX7//DzwQ6cFHpYqV +0oxTmJ31hDzKgyznx3ysUnjFuYcSguvgi1CrjV2MAtJJHKrtFZjb6pv0L0DaI9ZsI 6SiVWP2nkWGLLOudIX1xZqiEwMspWWz5LGtLblVcbB0txmUYJ/EfYyndqCv0+cKCel lBcuwIsEkrhbDUgh0SX2tgjp3lVKs7RKAmWi3ba5qwzjotx7i51wf3l0hHMZODLmL6 VtIo9ovvdG7UiV5N6rhJS24h2eoLvYqtuSmFMBWGAzWAeRouPmHId4T4DI8Z2LL97V 9r+2CwCuhnDTg== Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-2d311081954so42235111fa.2 for ; Sun, 03 Mar 2024 13:57:02 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCUy6cVrz+G1Q1WkedmW06GWlg4lw5oEtEPEMNVM4wu8YYbznWn210rIHjFzUjPcOnEQxZU8ZgQ9hEHMC2+QuKmhahug6bNQE7j8o1O5 X-Gm-Message-State: AOJu0Yzeh1RH1k3PSdbo1JQucyuaqyRn8uT0+IAFsEiE3/4uV8zrLwvd mdCA88T+niBFqS20lvZB73J0slOFApmZSE+q5OIAu0GCviTX7oWv+fJ4zbXNDssU8lY0I0fr4wT KPIyfZSKDRlVlPRJV1B4c0GXri8E= X-Received: by 2002:a05:6512:3d1c:b0:513:3310:4062 with SMTP id d28-20020a0565123d1c00b0051333104062mr5718558lfv.64.1709503021033; Sun, 03 Mar 2024 13:57:01 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240227151907.387873-11-ardb+git@google.com> <20240227151907.387873-13-ardb+git@google.com> <20240228205540.GIZd-dzFYIBbtfIAo3@fat_crate.local> <20240301160921.GBZeH9sZhp73xX40ze@fat_crate.local> <20240301173323.GDZeIRY_BVBqpudkEo@fat_crate.local> <20240303192654.GAZeTO_nxJ4bE2A2zD@fat_crate.local> In-Reply-To: <20240303192654.GAZeTO_nxJ4bE2A2zD@fat_crate.local> From: Ard Biesheuvel Date: Sun, 3 Mar 2024 22:56:49 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v7 2/9] x86/startup_64: Defer assignment of 5-level paging global variables To: Borislav Petkov Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Kevin Loughlin , Tom Lendacky , Dionna Glaze , Thomas Gleixner , Ingo Molnar , Dave Hansen , Andy Lutomirski , Brian Gerst Content-Type: text/plain; charset="UTF-8" On Sun, 3 Mar 2024 at 20:27, Borislav Petkov wrote: > .. > > Btw, on a semi-related note, do you have an idea whether a normal guest > kernel using OVMF istead of seabios would be even able to boot a kernel > supplied with -kernel like above but without an -initrd? > How are you passing the root device to the kernel? Via root= on the command line? > I have everything builtin and the same kernel boots fine in a guest with > a > [ 0.000000] SMBIOS 3.0.0 present. > [ 0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 > OK, so this is SeaBIOS > but if I try to boot the respective guest installed with the OVMF BIOS > from the debian package: > > [ 0.000000] efi: EFI v2.7 by Debian distribution of EDK II > [ 0.000000] efi: SMBIOS=0x7f788000 SMBIOS 3.0=0x7f786000 ACPI=0x7f97e000 ACPI 2.0=0x7f97e014 MEMATTR=0x7ddfe018 > and this is OVMF. I have tried both of these, with i440fx as well as q35, and they all work happily with my Debian guest image passed via -hda to QEMU, and with root=/dev/sda2 on the kernel command line. > it fails looking up the /dev/root device major/minor deep in the bowels > of the vfs: > > [ 2.565651] do_new_mount: > [ 2.566380] vfs_get_tree: fc->root: 0000000000000000 > [ 2.567298] kern_path: filename: ffff88800d666000 of name: /dev/root > [ 2.568418] kern_path: ret: 0 > [ 2.569009] lookup_bdev: kern_path(/dev/root, , path: ffff88800e537380), error: 0 > [ 2.571645] lookup_bdev: inode->i_rdev: 0x0 > [ 2.572417] get_tree_bdev: lookup_bdev(/dev/root, dev: 0x0), error: 0 > ^^^^^^^^^ > > That dev_t should be 0x800002 - the major and minor of /dev/sda2 but it > looks like something else is missing in this case... > How did you get this output? Are these debug printk()s you added yourself?