Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Nikunj A Dadhania <nikunj@amd.com>
To: seanjc@google.com, pbonzini@redhat.com, kvm@vger.kernel.org
Cc: thomas.lendacky@amd.com, santosh.shukla@amd.com, bp@alien8.de,
	isaku.yamahata@intel.com, vaishali.thakkar@suse.com
Subject: Re: [PATCH v6 0/4] Enable Secure TSC for SEV-SNP
Date: Mon, 14 Apr 2025 11:20:51 +0530	[thread overview]
Message-ID: <7dd702a3-e9c3-4213-b0b6-799976d4736a@amd.com> (raw)
In-Reply-To: <20250408093213.57962-1-nikunj@amd.com>

On 4/8/2025 3:02 PM, Nikunj A Dadhania wrote:
> The hypervisor controls TSC value calculations for the guest. A malicious
> hypervisor can prevent the guest from progressing. The Secure TSC feature for
> SEV-SNP allows guests to securely use the RDTSC and RDTSCP instructions. This
> ensures the guest has a consistent view of time and prevents a malicious
> hypervisor from manipulating time, such as making it appear to move backward or
> advance too quickly. For more details, refer to the "Secure Nested Paging
> (SEV-SNP)" section, subsection "Secure TSC" in APM Volume 2.
> 
> This patch set is also available at:
> 
>   https://github.com/AMDESE/linux-kvm/tree/sectsc-host-latest
> 
> and is based on kvm/master
> 
> Testing Secure TSC
> -----------------
> 
> Secure TSC guest patches are available as part of v6.14-rc1.
> 
> QEMU changes:
> https://github.com/nikunjad/qemu/tree/snp-securetsc-latest
> 
> QEMU command line SEV-SNP with Secure TSC:
> 
>   qemu-system-x86_64 -cpu EPYC-Milan-v2 -smp 4 \
>     -object memory-backend-memfd,id=ram1,size=1G,share=true,prealloc=false,reserve=false \
>     -object sev-snp-guest,id=sev0,cbitpos=51,reduced-phys-bits=1,secure-tsc=on,stsc-freq=2000000000 \
>     -machine q35,confidential-guest-support=sev0,memory-backend=ram1 \
>     ...
> 
> Changelog:
> ----------
> v6:
> * Rebased on top of kvm/master
> * Collected Reviewed-by/Tested-by
> * s/svm->vcpu/vcpu/ in snp_launch_update_vmsa() as vcpu pointer is already available (Tom)
> * Simplify assignment of guest_protected_tsc (Tom)

A gentle reminder, any other suggestions/improvement ?

Regards
Nikunj

  parent reply	other threads:[~2025-04-14  5:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-08  9:32 [PATCH v6 0/4] Enable Secure TSC for SEV-SNP Nikunj A Dadhania
2025-04-08  9:32 ` [PATCH v6 1/4] x86/cpufeatures: Add SNP Secure TSC Nikunj A Dadhania
2025-04-08  9:32 ` [PATCH v6 2/4] KVM: SVM: Add missing member in SNP_LAUNCH_START command structure Nikunj A Dadhania
2025-04-08  9:32 ` [PATCH v6 3/4] KVM: SVM: Add GUEST_TSC_FREQ MSR for Secure TSC enabled guests Nikunj A Dadhania
2025-06-25 14:13   ` Sean Christopherson
2025-06-26  6:07     ` Nikunj A. Dadhania
2025-04-08  9:32 ` [PATCH v6 4/4] KVM: SVM: Enable Secure TSC for SNP guests Nikunj A Dadhania
2025-06-25 14:27   ` Sean Christopherson
2025-06-26  8:53     ` Nikunj A. Dadhania
2025-04-14  5:50 ` Nikunj A Dadhania [this message]
2025-05-05  4:50   ` [PATCH v6 0/4] Enable Secure TSC for SEV-SNP Nikunj A. Dadhania
2025-06-09  8:51     ` Nikunj A. Dadhania
2025-06-25 22:25 ` Sean Christopherson
2025-06-26  6:10   ` Nikunj A. Dadhania

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7dd702a3-e9c3-4213-b0b6-799976d4736a@amd.com \
    --to=nikunj@amd.com \
    --cc=bp@alien8.de \
    --cc=isaku.yamahata@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=santosh.shukla@amd.com \
    --cc=seanjc@google.com \
    --cc=thomas.lendacky@amd.com \
    --cc=vaishali.thakkar@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox