From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4FAD0C54FB9 for ; Thu, 16 Nov 2023 14:45:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5Q2+Wk1SE0AKexS+04IGlIwVhcubzLUww5Ae/G5lnqg=; b=VjWZUWn4+yjwZ6 2R4Av8XQlWtMcQ4hWJ3yUmzryJs9IpwAVhHMwZTaTdyIUx7SwVfaR/+CDowLEMQoptTLXBAY+MhRb hGYa+kyYB0/j/kpFovhL/qPZHEIpGB+Lk+j4Cw+CBVqLBIdlwO7lmuXGqk7sL0rd/4b5XonIjkjAh KpuK99FajkteUu+kbsLAqqwxRkhoZYROyNn3H/8YjdE6r4kFsE19Tz9fTpFNhK734P3iiTGaKxjIl dkLlh0+glniIVa907OnWZnv+4APoKuJXA1IWyW3rDebeIY8cVjb3ZiFVfzXFJgUnoZWIwpeMNdU7l p5iJBtjRRvr8YLwPjCYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3dcf-003jOL-35; Thu, 16 Nov 2023 14:45:37 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r3dca-003jNK-0Y for kexec@lists.infradead.org; Thu, 16 Nov 2023 14:45:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700145930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SvB9iGs9vD1rRk7cd40qT87db5HVxelOOnL3if3kxBw=; b=fr68zLI4VsKAlyGwRyLHkj5eBFbCwuEbNoBdNuGB0fLxTzpkD78VnGVlBaNcrsBdxsewkS qQlFif2We4DawQpQyJFgcB0nQN2lCBC7EySyEqQfYTgrxIayR8hB/sLNQzxGgrND2+tFjV VrdEpYEWOFm3M1c876IwElYRdl1ZzBo= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-509-r9EpGFd-MUK_I6xzkaYdeA-1; Thu, 16 Nov 2023 09:45:28 -0500 X-MC-Unique: r9EpGFd-MUK_I6xzkaYdeA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1F7213806100; Thu, 16 Nov 2023 14:45:27 +0000 (UTC) Received: from localhost (unknown [10.72.112.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6A18F1C060AE; Thu, 16 Nov 2023 14:45:26 +0000 (UTC) Date: Thu, 16 Nov 2023 22:45:23 +0800 From: Baoquan He To: "Kirill A. Shutemov" Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "Rafael J. Wysocki" , Peter Zijlstra , Adrian Hunter , Kuppuswamy Sathyanarayanan , Elena Reshetova , Jun Nakajima , Rick Edgecombe , Tom Lendacky , "Kalra, Ashish" , Sean Christopherson , "Huang, Kai" , kexec@lists.infradead.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCHv3 00/14] x86/tdx: Add kexec support Message-ID: References: <20231115120044.8034-1-kirill.shutemov@linux.intel.com> <20231116125612.daxettqcapled7ac@box.shutemov.name> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231116_064532_586775_6910034A X-CRM114-Status: GOOD ( 21.80 ) X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+kexec=archiver.kernel.org@lists.infradead.org On 11/16/23 at 10:17pm, Baoquan He wrote: > On 11/16/23 at 03:56pm, Kirill A. Shutemov wrote: > > On Thu, Nov 16, 2023 at 08:10:47PM +0800, Baoquan He wrote: > > > On 11/15/23 at 03:00pm, Kirill A. Shutemov wrote: > > > > The patchset adds bits and pieces to get kexec (and crashkernel) work on > > > > TDX guest. > > > > > > I finally got a machine of intel-eaglestream-spr as host and built a > > > tdx guest to give it a shot, the kexec reboot is working very well, > > > while kdump kernel always failed to boot up. I only built kernel and > > > installed it on tdx guest. > > > ------------------------------------------ > > > [ 1.422500] Run /init as init process > > > [ 1.423073] Failed to execute /init (error -2) > > > [ 1.423759] Run /sbin/init as init process > > > [ 1.424370] Run /etc/init as init process > > > [ 1.424969] Run /bin/init as init process > > > [ 1.425588] Run /bin/sh as init process > > > [ 1.426150] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. > > > [ 1.428122] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.7.0-rc1-00014-gbdba31ba3cec #3 > > > [ 1.429232] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS unknown 2/2/2022 > > > [ 1.430328] Call Trace: > > > [ 1.430717] > > > [ 1.431041] dump_stack_lvl+0x33/0x50 > > > [ 1.431581] panic+0x324/0x340 > > > [ 1.432037] ? __pfx_kernel_init+0x10/0x10 > > > [ 1.432629] kernel_init+0x174/0x1c0 > > > [ 1.433149] ret_from_fork+0x2d/0x50 > > > [ 1.433690] ? __pfx_kernel_init+0x10/0x10 > > > [ 1.434277] ret_from_fork_asm+0x1b/0x30 > > > [ 1.434850] > > > [ 1.435345] Kernel Offset: disabled > > > [ 1.439216] Rebooting in 10 seconds.. > > > qemu-kvm: cpus are not resettable, terminating > > > > Could you shared your kernel config and details about your setup (qemu > > command, kernel command line, ...)? > > We followed tdx-tools README to setup the environment and built host and > guest kernel, qemu command is as below. I copied the > tdx-tools/build/rhel-9/intel-mvp-tdx-kernel/tdx-base.config to the > latest upstream linxu kernel then execute 'make olddefconfig'. Because > your patchset can't be applied to the stable kernel with the 731 > patches. > > cd /home/root/tdx-tools > ./start-qemu.sh -i /home/root/guest_tdx.qcow2 -b grub This is the qemu command when execute above line of command, just for your reference if you happen to not take this way. [root@intel-eaglestream-spr-03 tdx-tools]# ./start-qemu.sh -i /home/root/guest_tdx.qcow2 -b grub WARN: Using HVC console for grub, could not accept key input in grub menu ========================================= Guest Image : /home/root/guest_tdx.qcow2 Kernel binary : OVMF : /usr/share/qemu/OVMF.fd VM Type : td CPUS : 1 Boot type : grub Monitor port : 9001 Enable vsock : false Enable debug : false Console : HVC ========================================= Remapping CTRL-C to CTRL-] Launch VM: /usr/libexec/qemu-kvm -accel kvm -name process=tdxvm,debug-threads=on -m 2G -vga none -monitor pty -no-hpet -nodefaults -drive file=/home/root/guest_tdx.qcow2,if=virtio,format=qcow2 -monitor telnet:127.0.0.1:9001,server,nowait -bios /usr/share/qemu/OVMF.fd -object tdx-guest,sept-ve-disable=on,id=tdx -object memory-backend-memfd-private,id=ram1,size=2G -cpu host,-kvm-steal-time,pmu=off -machine q35,kernel_irqchip=split,confidential-guest-support=tdx,memory-backend=ram1 -device virtio-net-pci,netdev=mynet0 -netdev user,id=mynet0,net=10.0.2.0/24,dhcpstart=10.0.2.15,hostfwd=tcp::10026-:22 -smp 1 -chardev stdio,id=mux,mux=on,logfile=/home/root/tdx-tools/vm_log_2023-11-16T0658.log -device virtio-serial,romfile= -device virtconsole,chardev=mux -monitor chardev:mux -serial chardev:mux -nographic char device redirected to /dev/pts/1 (label compat_monitor0) _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec