[RFC,V4,05/17] clocksource/drivers/hyper-v: decrypt hyperv tsc page in sev-snp enlightened guest
Message ID | 20230403174406.4180472-6-ltykernel@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2476219vqo; Mon, 3 Apr 2023 10:46:14 -0700 (PDT) X-Google-Smtp-Source: AKy350bqugnF5eq+GZNCfRYaguRolUH73j2y7diyOR82yRHAJTd1qqSkTfZWI2YxECbQ2llWfTKZ X-Received: by 2002:a17:906:aad3:b0:933:be1:8f4f with SMTP id kt19-20020a170906aad300b009330be18f4fmr36794477ejb.9.1680543974022; Mon, 03 Apr 2023 10:46:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680543974; cv=none; d=google.com; s=arc-20160816; b=wGcAqSJDKsOiEJ0V5bttrEDXE0Te7YvilwJmgOJ+KOf+di3o33L2AgQDruzhg50Tbt +hzuw1RFATiAW5+792rX6I0unOgoD0AqqEu+Ocg9Dt2yV882l9wkhqr2SgBbNoAZPtJR ZFuIuATHwRtqQCO5eQS2/JXEUvKaLg1hvAE65eoFsH7XlQrsDpSX2eAiSKQQBU/9dnRo sFm2CskL6DK7xO8sZqCa+R5hRr1xfY+9mTzpoZdz5wSO+9a/dCozdaJTmuO9pBYdMCPw TVToN5J8kSnI71XTUTzD2A0Tblhd10jxHGQBhET7ydnU0WEXjDPHOwTCujx/tx1GUCax mO/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=d3G8RfDk2f7ftR+C1v/a0axqypneBk1zP9Qtg1LVHyA=; b=Du1k7zwohbM1v5KXQt3OWHlqzWRzwHB3JXg2Mz2QgV+/Qd35DH3YUABxkjqGaN1XMr v1c9DMZECOTZkRjLp188YTTTE/U8eT/u8UyNwmsEgmYrOylfYQi8nl9sERO36MiAE4fZ QBXifzadRqg6rsjTchl3doe2l2EYbxUPyxpRyKJkajQwoO0Uko6oKRnxfQV1nfhUPFCj eLwp/lHGwmY+lMqYyNXygucjGAecGC22DT2fQNecKYd71o0uNN/3qa6x4ZxU+AR31b4i KyetM74ffcc76+FQI18+e8GxYiLBr23N9AKs8VmjiY9XSWOFsuA0zT96+XCmZ28JwcF5 0gxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SisYW1Wm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 20-20020a170906309400b00922177e6cf7si8594459ejv.364.2023.04.03.10.45.49; Mon, 03 Apr 2023 10:46:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=SisYW1Wm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232405AbjDCRoe (ORCPT <rfc822;zwp10758@gmail.com> + 99 others); Mon, 3 Apr 2023 13:44:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232054AbjDCRoS (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 3 Apr 2023 13:44:18 -0400 Received: from mail-pj1-x102b.google.com (mail-pj1-x102b.google.com [IPv6:2607:f8b0:4864:20::102b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 471212724; Mon, 3 Apr 2023 10:44:17 -0700 (PDT) Received: by mail-pj1-x102b.google.com with SMTP id q102so27956633pjq.3; Mon, 03 Apr 2023 10:44:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680543857; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=d3G8RfDk2f7ftR+C1v/a0axqypneBk1zP9Qtg1LVHyA=; b=SisYW1Wmi4AST8NFhRKGsWMC2QoBuJyIC6l0wgsxsWGUzBwalQyzNsNoNyrf+WpDQ3 ggZLvMbvLgyuFj+SndN/CoKaBgJPjep6f5wHqIvP7c3K2UmrixL4u85HRFQeAD+M7Uct TcdRxdDlVJ8I1D9DJCnUe1SvQN+eMf9JUthe1j4dXLBNE/KyIixu6DninY+hKb80p/GK HTndq1yh4aVsXmWk1pMhT2Ht2DT45loXXhAM47JXJqy5V/GE8TYcGdg8RwM9Q4wPfmQt djx1k1hPi6YhzK6lCCJfj62KPsp1agf2ZWjRLxFS1cefgv59aGxGN6SRjw9gtw5DXt+b 6dqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680543857; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d3G8RfDk2f7ftR+C1v/a0axqypneBk1zP9Qtg1LVHyA=; b=3LUvJQNdaIcNvYAxuJwuy0mD/NUD8Yhi1wL8r91s42il6W+QINTzJc68ByCB7bpjzW psCtiOfDnQp98PN6xH2qETTyhe/nABR0ti+OVmEy9zvJyLJIPEVg4rsp8STeR0HjCe56 HtE6wjG4dfHzlHiLNhs1m8qeRZNCn/S4/KDjKAZ9IpE933kg6c7zmgr+SC7dFVKlyG5Y 8czEyZwwc5mbzoRZL981tQgLU/S3f5m1VP3HgNqV3LCYcexgtTBN6KkWaeWwwPCp+P2z Gz7UzTSkN/FCjV66+n9Zq7w5Nra9b88TaKfp5S/6Jpn7MfCyHjoVFPWhWSaTtndFiSkj Pwig== X-Gm-Message-State: AAQBX9fQauoHqNKcaAkPzcdrjmA89l1o4JCBZuoYek4K0vMWiJYbVSQ7 TGzQ4YVYGOq7nOZfQSsVVL8= X-Received: by 2002:a17:902:cecb:b0:1a1:c82d:dcf3 with SMTP id d11-20020a170902cecb00b001a1c82ddcf3mr21052092plg.12.1680543856749; Mon, 03 Apr 2023 10:44:16 -0700 (PDT) Received: from ubuntu-Virtual-Machine.corp.microsoft.com ([2001:4898:80e8:2:8635:6e96:35c1:c560]) by smtp.gmail.com with ESMTPSA id jj21-20020a170903049500b001a19196af48sm6883803plb.64.2023.04.03.10.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Apr 2023 10:44:16 -0700 (PDT) From: Tianyu Lan <ltykernel@gmail.com> To: luto@kernel.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, seanjc@google.com, pbonzini@redhat.com, jgross@suse.com, tiala@microsoft.com, kirill@shutemov.name, jiangshan.ljs@antgroup.com, peterz@infradead.org, ashish.kalra@amd.com, srutherford@google.com, akpm@linux-foundation.org, anshuman.khandual@arm.com, pawan.kumar.gupta@linux.intel.com, adrian.hunter@intel.com, daniel.sneddon@linux.intel.com, alexander.shishkin@linux.intel.com, sandipan.das@amd.com, ray.huang@amd.com, brijesh.singh@amd.com, michael.roth@amd.com, thomas.lendacky@amd.com, venu.busireddy@oracle.com, sterritt@google.com, tony.luck@intel.com, samitolvanen@google.com, fenghua.yu@intel.com Cc: pangupta@amd.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-arch@vger.kernel.org Subject: [RFC PATCH V4 05/17] clocksource/drivers/hyper-v: decrypt hyperv tsc page in sev-snp enlightened guest Date: Mon, 3 Apr 2023 13:43:53 -0400 Message-Id: <20230403174406.4180472-6-ltykernel@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230403174406.4180472-1-ltykernel@gmail.com> References: <20230403174406.4180472-1-ltykernel@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762178078038669216?= X-GMAIL-MSGID: =?utf-8?q?1762178078038669216?= |
Series |
x86/hyperv/sev: Add AMD sev-snp enlightened guest support on hyperv
|
|
Commit Message
Tianyu Lan
April 3, 2023, 5:43 p.m. UTC
From: Tianyu Lan <tiala@microsoft.com> Hyper-V tsc page is shared with hypervisor and it should be decrypted in sev-snp enlightened guest when it's used. Signed-off-by: Tianyu Lan <tiala@microsoft.com> --- Change since RFC V2: * Change the Subject line prefix --- drivers/clocksource/hyperv_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/hyperv_timer.c b/drivers/clocksource/hyperv_timer.c index c0cef92b12b8..44da16ca203c 100644 --- a/drivers/clocksource/hyperv_timer.c +++ b/drivers/clocksource/hyperv_timer.c @@ -365,7 +365,7 @@ EXPORT_SYMBOL_GPL(hv_stimer_global_cleanup); static union { struct ms_hyperv_tsc_page page; u8 reserved[PAGE_SIZE]; -} tsc_pg __aligned(PAGE_SIZE); +} tsc_pg __bss_decrypted __aligned(PAGE_SIZE); static struct ms_hyperv_tsc_page *tsc_page = &tsc_pg.page; static unsigned long tsc_pfn;