From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 905881CA84 for ; Tue, 11 Feb 2025 17:43:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739295807; cv=none; b=VXRv9FCchBUTzJidXFNQW2FtFH95LDxc36fZ0iKGElrdHkk4Xr0rUVB0Enud4Lo+8Qs3FtbQ2zBm+JOIR0eWCh9u+0nr4stqTdN3ZONWjvoF6IiF742FHVoUhDDm9sloXJlx06ejA4DkW4gryI8rKXQy5zAJB1IjgxfEl83A9n0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739295807; c=relaxed/simple; bh=7JLxDrT3W6Nr5nwag7NkXl8otRQTU+qirxdskHYS1cQ=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=H4udFNz1AhXbKuR3prgAjPNgFx2BFRQ0lk0Ru6yUA00k2oTqh3B4BeOVzZ6rghQOaYytVHUfoq39BVf/hDuO1LxsRHrS1R+JGzog8s4XpvSpFVut2b/RcEEj/yEnzRryPl3pHbA/NnRd7S7dLx+EXiHXuMZ9llHGc1sfy2PTBYI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=fjWFmJml; arc=none smtp.client-ip=209.85.214.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="fjWFmJml" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-21f5067e443so72906305ad.0 for ; Tue, 11 Feb 2025 09:43:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1739295805; x=1739900605; darn=lists.linux.dev; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=K4mrriPfgsPPxXSFmU/JBzChLIiRw5rZPULaSxSIiLc=; b=fjWFmJmlbKcnLoolETobxuADDWexZc9XdFTrJ+BTDgPT7hAl1L0+DeSEMYcOIbovIc COnb/nvdyQKXwokwFUJfIGkHiKeZ0QXANqTOGgXSdRNmYTHWT+Lz/E/20e979xhrHRUD O82+P9pgxjb7pIC1gc/1BXI5MQeZ2wfRGzabwI1fGsrxlZ6O/4l81bhsl6B1ZSsiBsyG eR+JWUF9A89MLbVsVOPzknRnpWU/+R6HPx4ZJKhl/D/IOei5zIxqx2jc8CT/XPKOKdJj eKH1f21gMHRTBhtEL5b0kL1wsPiin/xKn4/JDqlTf/AG6D/N54zYOUZqZtXyY3GwLFOK fZ0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739295805; x=1739900605; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=K4mrriPfgsPPxXSFmU/JBzChLIiRw5rZPULaSxSIiLc=; b=ugF244s+f3AqrFb1+/LJ4W7etaMv7pJu7Iqnagcbutqvbnf5HlZbR5D7b7zTctKRZG GyjPiD1M/FhDMJQqvSVJ9cj/IY+5sjvmfhQi1JlzUgMNio+yZ4JA0ihCq3bnWvXRkBI1 yQgOLwISlP+Ss1c6w3co7NSG8JlrSlpzdxGynwAC9NE3GWDq9yYvida/LW/zIKkkQ+Y4 TZQ1eVBJzmigGPKC9IlXSTWXSxwf4AfNWjxrQCgAQXpVdjPxDgYNY4C27yCGfgZVU4P9 FnUqeqFaYOpOWfPcT1ObA5z72xUeybBiFp1WHjz7HyCvAP/jpC7vkvk32po3/GnBq996 0n5A== X-Forwarded-Encrypted: i=1; AJvYcCXCHeCT0Vb87azEiI60QBX040xhq2XJOp1v7GpoGQgSREyWn7UpD7CUofkjvbqAv02hLY6XyZzT6Aes@lists.linux.dev X-Gm-Message-State: AOJu0YyQ7c5w3gZdfsQtzfOcvIh3oGdpqdwdU/2iiGko89cSATYsUbWt gujvW7VnNrE9NYdDnjmRMKUysaTLCVk0LLyqG1/bp7UAoWyVwaOQ0xuOkJwTIrCzG0UgtjBHPuZ bhQ== X-Google-Smtp-Source: AGHT+IFvsE6NJWsYg5eZawythPvtd1Ryiyh5QdfSD0iYprnIkMmal30fbTQ5swLortjkJ0haAujEqXDb7dE= X-Received: from pfbbj9.prod.google.com ([2002:a05:6a00:3189:b0:730:8ca0:1f9b]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a21:998f:b0:1e1:becc:1c9c with SMTP id adf61e73a8af0-1ee5c7db2d5mr167479637.28.1739295804800; Tue, 11 Feb 2025 09:43:24 -0800 (PST) Date: Tue, 11 Feb 2025 09:43:23 -0800 In-Reply-To: <20250211173238.GDZ6uJtkVBi8_X7kia@fat_crate.local> Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20250201021718.699411-1-seanjc@google.com> <20250201021718.699411-4-seanjc@google.com> <20250211173238.GDZ6uJtkVBi8_X7kia@fat_crate.local> Message-ID: Subject: Re: [PATCH 03/16] x86/tsc: Add helper to register CPU and TSC freq calibration routines From: Sean Christopherson To: Borislav Petkov Cc: Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "Kirill A. Shutemov" , Juergen Gross , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Ajay Kaher , Jan Kiszka , Paolo Bonzini , Andy Lutomirski , Peter Zijlstra , linux-kernel@vger.kernel.org, linux-coco@lists.linux.dev, virtualization@lists.linux.dev, linux-hyperv@vger.kernel.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org, Nikunj A Dadhania , Tom Lendacky Content-Type: text/plain; charset="us-ascii" On Tue, Feb 11, 2025, Borislav Petkov wrote: > On Fri, Jan 31, 2025 at 06:17:05PM -0800, Sean Christopherson wrote: > > > Add a TODO to call out that AMD_MEM_ENCRYPT is a mess and doesn't depend on > > HYPERVISOR_GUEST because it gates both guest and host code. > > Why is it a mess? > > I don't see it, frankly. It conflates two very different things: host/bare metal support for memory encryption, and SEV guest support. For kernels that will never run in a VM, pulling in all the SEV guest code just to enable host-side support for SME (and SEV) is very undesirable. And in this case, because AMD_MEM_ENCRYPT gates both host and guest code, it can't depend on HYPERVISOR_GUEST like it should, because taking a dependency on HYPERVISOR_GUEST to enable SME is obviously wrong.