Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1631061rdb; Wed, 31 Jan 2024 04:48:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHQwbwwAhyvFRwM2qofqAH8uqQcTHzKxoKiO6IHnvDO9DaO77EdIZAAZ/PkJKOnancBjzr X-Received: by 2002:a05:620a:1342:b0:783:d550:4b6f with SMTP id c2-20020a05620a134200b00783d5504b6fmr1478362qkl.26.1706705284929; Wed, 31 Jan 2024 04:48:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706705284; cv=pass; d=google.com; s=arc-20160816; b=ZqJ+xTLP0QEjXETIiDzQXkQDyJn2EGicxgsCn46TcZh5hqNm4mhyjgrFmryeHYTruP PU8yn86EzpdteABJO/cneAZNQ5F5woMJux+2oG9R3KyNk0Ht4b9uR0y1o16W+6IHPZ4m HrHQ4NfEPRArY1O8xMPXuAD6+m88U36LWyANHOCGTq6XeUnsA0n92Xjt63lKb36+8SSr bSpHfxol+sr95V+HnGWfbwbiGMEH8gnhizj9II4tJLrRIh1C2P0kfxxrserXjWJacSJN NZKZavulEeknWhC29aSYTmMe7gtXhEGnkceutjae7mnI5ax4WcAIDt09asymiOhZU5B/ rqkA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=sZgQ3em8+hL4vf1kxriNyHbGVBBe93HygSX6eu/F3dE=; fh=LxpA0Ckx5YmwpDSSrBgEkUK6jLr2lzQzPbwhdxmIy3I=; b=vh9kv5oqa2H+wEOyrgGsf/ZfmYsL4XhiXUy+kdlF14U9tGuKiMfCQ44HRsQ8u+vSyQ WUsdaWBxwsVJYRBoi+Wh3Mp7MXYd526HplPSAaMZGf4uWOHNobZYmPmlWafnn05pWHBu IfUs9sv7UxNflfOtE70rzw8kHXq3HbOK9o8UmTAR3GAiedy/ysKSN79Z+hd5Ptd1902V 3UGQ7Hd+JAZW3NCM0VYR3zkcmREqkDdhlfjgNBC2FWVEiIaJAiBPbuKbgaNXvH1tDzGW RnxHj1SLB50uMlMF42sAPWOS2almWGFvVP2lvUgC40wiU0NKUVjXyflHmP940rO9XFrd wQOQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LlrLs+8h; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-46436-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46436-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCXqD+93fwjndFXqXOv5aHJCrmnvdXyJ4t+9/rq8wiuhZb2hw90oPvPcereE/piS5EVt9H3K0C4jU+qZ5LA5sST3Dy4W0+dKeD1pYLU6dQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id az19-20020a05620a171300b00783fd8be42dsi7201973qkb.562.2024.01.31.04.48.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 04:48:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46436-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LlrLs+8h; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-46436-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46436-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id AD5961C25DA4 for ; Wed, 31 Jan 2024 12:48:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C25B17AE43; Wed, 31 Jan 2024 12:48:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="LlrLs+8h" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 666FE7690E for ; Wed, 31 Jan 2024 12:47:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706705281; cv=none; b=hoeggOgRX26zWDOHnjHnkQwwOBxpcQGA4wFhC5n7qAzQfOAR5edmigpfBmz6qSagiV9OMy2YSQ8zJf1U71AnR35k0iE4wRzwP3mFQe5seXkOselQsOiL7WZzmx531JxKmldjJXOWEZwdQ1jFlm05+YxLPS7lTkogiR5FSHP3QJ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706705281; c=relaxed/simple; bh=4wQ7TAIOJQ5m6kdVg1wSzsPCQ4PkDeWkFwCc0m1BgrE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=t8lQxK+PLxHUc1oYBIcArbm8IYvyT6PZQ8ErBDwiKIwcnU3zsFPAbNn5KQ4xazWj9R/JQoBp5sDsJiDrUR97643o5l4WxFMOB1wa1rvHCCWU+n5ZzFlXzq9MXj4WGl2UgMGKHifpt4P7ugm0ZeaZIArSZcGM00GTWuBKTpG0nV4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=LlrLs+8h; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1706705278; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sZgQ3em8+hL4vf1kxriNyHbGVBBe93HygSX6eu/F3dE=; b=LlrLs+8hJoDguBb3Xj1IR6spHgt8v7pgwNPv6z9rmG/Y8fWIumOsU5f6dZvyK868BWaJN/ zd86Yy0YxwykWggDTYI0hSjJAwwEk6BA3YUi5tSKirfuFofn//L1SEHydK4yG8y1gXCNo1 dR+3Ph6gDyvjgiAnr5iEoLyLhIkXo1Y= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-495-VJTCrdEtObC81bpv7NZDpQ-1; Wed, 31 Jan 2024 07:47:49 -0500 X-MC-Unique: VJTCrdEtObC81bpv7NZDpQ-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (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 BA1EA800074; Wed, 31 Jan 2024 12:47:48 +0000 (UTC) Received: from localhost (unknown [10.72.116.15]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CAA01492BC6; Wed, 31 Jan 2024 12:47:47 +0000 (UTC) Date: Wed, 31 Jan 2024 20:47:40 +0800 From: Baoquan He To: Nikolay Borisov Cc: Paolo Bonzini , "Kirill A. Shutemov" , 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: [PATCHv6 00/16] x86/tdx: Add kexec support Message-ID: References: <20240124125557.493675-1-kirill.shutemov@linux.intel.com> <3f44458f-2b4a-4464-a3df-cb791298dafc@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 On 01/31/24 at 09:31am, Nikolay Borisov wrote: > > > On 30.01.24 г. 15:43 ч., Paolo Bonzini wrote: > > On 1/24/24 13:55, Kirill A. Shutemov wrote: > > > The patchset adds bits and pieces to get kexec (and crashkernel) work on > > > TDX guest. > > > > > > The last patch implements CPU offlining according to the approved ACPI > > > spec change poposal[1]. It unlocks kexec with all CPUs visible in > > > the target > > > kernel. It requires BIOS-side enabling. If it missing we fallback to > > > booting > > > 2nd kernel with single CPU. > > > > > > Please review. I would be glad for any feedback. > > > > Hi Kirill, > > > > I have a very basic question: is there a reason why this series does not > > revert commit cb8eb06d50fc, "x86/virt/tdx: Disable TDX host support when > > kexec is enabled"? > > While on the topic, Paolo do you think it's better to have a runtime > disable of kexec rather than at compile time: > > [RFC PATCH] x86/virt/tdx: Disable KEXEC in the presence of TDX > > 20240118160118.1899299-1-nik.borisov@suse.com Runtime disabling kexec looks better than at cmpile time, esp for distros. While from above patch, making using of kexec_load_disabled to achive the runtime disabling may not be so good. Because we have a front door to enable it through: /proc/sys/kernel/kexec_load_disabled If there's a flag or status to check if TDX host is enabled, and does the checking in kexec_load_permitted(), that could be better. Anyway, I saw Huang, Kai has posted the tdx host support patchset. > > I'm trying to get traction for this patch. > > > > > > Thanks, > > > > Paolo > > > > >