[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 03/16] x86/tsc: Add helper to register CPU and TSC freq calibration routines
- To: Borislav Petkov <bp@xxxxxxxxx>, Sean Christopherson <seanjc@xxxxxxxxxx>
- From: Tom Lendacky <thomas.lendacky@xxxxxxx>
- Date: Wed, 12 Feb 2025 10:49:52 -0600
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qxXSYxMHQQEL/UkEHf2xJX5B7OrgUFtjDNKz+QOQq6M=; b=Z7275/dBv7VfRHpboJ1fmHoBdazcXw4CsXuKWhu8yFlMGKOHsXTg6evSoxe0u/BnGn/c5vD7qke2ICx3WB4xENWZnze4CFKOcSyPnGe6jyV9IucHpdoJquSUTy8EsKA93nulDNKntIG9clH3HyNpgrXQ1ea7GAM0ndOgysM6rb/7s/c8EJ3x+JHTCGsd9pAYAICiH7hYF2zt8Li2arjZLzLiXauh8iC2RwJBiryw/yonTQ4yKtOH13eO5B5lpY0s0dVd2ZBLZ9IbVNWYy2TQoO6S0EBbxszv3CmF00oen8uZ33tRYebvrPvwNOXiI1lZqrWFvPVO1WUxhd3tTeoeQA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=x3c0l23xfZiQFZ788oheJaiCr6Uv/cMRSIZaYkIc3JhkuTolC3loQ+rYAlsh6whlZrlJtUsPD6fodeu84PMOIamlna4KAocYgiVZgBqHDCHR+jzsqrdL2iAfH5szCRBBnVbCmTrK6qvtgeflV3Ndv60pA63oEuzcvAS/fyvY6/OWVpztpe1R9Depc+AlR91D0Cg9ocStplrvPUfqAACLXIhGMNR9tHr1v7GlyObsJNhpXddPldpInU1xryQ13jbaU2NOk1Z/arPBkMV7yWbr/UPZbToc1i7V/pg+g95jmhxyDAfT17hlV5NbgyzG9jQjPUnWchHKYQXYYdIRHGKYRQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, x86@xxxxxxxxxx, "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>, Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>, Wei Liu <wei.liu@xxxxxxxxxx>, Dexuan Cui <decui@xxxxxxxxxxxxx>, Ajay Kaher <ajay.kaher@xxxxxxxxxxxx>, Jan Kiszka <jan.kiszka@xxxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-coco@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, Nikunj A Dadhania <nikunj@xxxxxxx>
- Delivery-date: Wed, 12 Feb 2025 16:50:06 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2/11/25 14:32, Borislav Petkov wrote:
> On Tue, Feb 11, 2025 at 09:43:23AM -0800, Sean Christopherson wrote:
>> 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.
>
> Well, that might've grown in the meantime... when we started it, it was all
> small so it didn't really matter and we kept it simple. That's why I never
> thought about it. And actually, we've been thinking of even ripping out SME
> in favor of TSME which is transparent and doesn't need any SME glue. But there
> was some reason why we didn't want to do it yet, Tom would know.
I think it was because TSME is a BIOS setting and you don't trust BIOS
to always expose the setting :)
I do have a patch series to remove SME. I haven't updated it in a couple
of releases, so would just need to dust it off and rebase it.
Thanks,
Tom
>
> As to carving it out now, meh, dunno how much savings that would be. Got
> a student to put on that task? :-P
>
>> 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.
>
> Right.
>
|