Re: [PATCH v5 2/9] KVM: SEV: Disable SEV on platform init failure

2025-01-24 Thread Pratik Rajesh Sampat
Hi Nikunj, On 1/24/25 3:56 AM, Nikunj A. Dadhania wrote: > > > On 1/24/2025 3:30 AM, Pratik R. Sampat wrote: >> diff --git a/include/linux/psp-sev.h b/include/linux/psp-sev.h >> index e841a8fbbb15..3a40b79fb37f 100644 >> --- a/include/linux/psp-sev.h >> +++ b/include/linux/psp-sev.h >> @@ -946,6

Re: [PATCH v5 3/9] KVM: selftests: SEV-SNP test for KVM_SEV_INIT2

2025-01-28 Thread Pratik Rajesh Sampat
Hi Nikunj On 1/28/25 6:13 AM, Nikunj A Dadhania wrote: > "Pratik R. Sampat" writes: > >> Add the X86_FEATURE_SNP CPU feature to the architectural definition for >> the SEV-SNP VM type to exercise the KVM_SEV_INIT2 call. Ensure that the >> SNP test is skipped in scenarios where CPUID supports it

Re: [PATCH v6 9/9] KVM: selftests: Add a basic SEV-SNP smoke test

2025-02-14 Thread Pratik Rajesh Sampat
On 2/11/25 8:31 PM, Sean Christopherson wrote: > On Mon, Feb 03, 2025, Pratik R. Sampat wrote: >> @@ -217,5 +244,20 @@ int main(int argc, char *argv[]) >> } >> } >> >> +if (kvm_cpu_has(X86_FEATURE_SEV_SNP)) { >> +uint64_t snp_policy = snp_default_policy(); >>

Re: [PATCH v6 1/9] KVM: SEV: Disable SEV-SNP on FW validation failure

2025-02-14 Thread Pratik Rajesh Sampat
Hello Sean, On 2/11/25 7:54 PM, Sean Christopherson wrote: > On Mon, Feb 03, 2025, Pratik R. Sampat wrote: >> diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c >> index 0f04f365885c..b709c2f0945c 100644 >> --- a/arch/x86/kvm/svm/sev.c >> +++ b/arch/x86/kvm/svm/sev.c >> @@ -3040,7 +3040,

Re: [PATCH v6 2/9] KVM: SEV: Disable SEV on platform init failure

2025-02-14 Thread Pratik Rajesh Sampat
On 2/11/25 7:58 PM, Sean Christopherson wrote: > On Mon, Feb 03, 2025, Pratik R. Sampat wrote: >> If the platform initialization sev_platform_init() fails, SEV cannot be >> set up and a secure VM cannot be spawned. Therefore, in this case, >> ensure that KVM does not set up, nor advertise support f

Re: [PATCH v6 4/9] KVM: selftests: Add VMGEXIT helper

2025-02-14 Thread Pratik Rajesh Sampat
On 2/11/25 7:59 PM, Sean Christopherson wrote: > On Mon, Feb 03, 2025, Pratik R. Sampat wrote: >> Abstract rep vmmcall coded into the VMGEXIT helper for the sev >> library. >> >> No functional change intended. >> >> Reviewed-by: Pankaj Gupta >> Tested-by: Srikanth Aithal >> Signed-off-by: Pratik

Re: [PATCH v6 6/9] KVM: selftests: Add library support for interacting with SNP

2025-02-14 Thread Pratik Rajesh Sampat
On 2/11/25 8:12 PM, Sean Christopherson wrote: > On Mon, Feb 03, 2025, Pratik R. Sampat wrote: >> Extend the SEV library to include support for SNP ioctl() wrappers, >> which aid in launching and interacting with a SEV-SNP guest. >> >> Tested-by: Srikanth Aithal >> Signed-off-by: Pratik R. Sampat

Re: [PATCH v6 6/9] KVM: selftests: Add library support for interacting with SNP

2025-02-20 Thread Pratik Rajesh Sampat
On 2/19/25 10:55 AM, Sean Christopherson wrote: > On Fri, Feb 14, 2025, Pratik Rajesh Sampat wrote: >> On 2/11/25 8:12 PM, Sean Christopherson wrote: >>> On Mon, Feb 03, 2025, Pratik R. Sampat wrote: >>>> Extend the SEV library to include support for SNP ioctl

Re: [PATCH v6 9/9] KVM: selftests: Add a basic SEV-SNP smoke test

2025-02-19 Thread Pratik Rajesh Sampat
On 2/18/25 6:54 PM, Sean Christopherson wrote: > On Fri, Feb 14, 2025, Pratik Rajesh Sampat wrote: >> >> >> On 2/11/25 8:31 PM, Sean Christopherson wrote: >>> On Mon, Feb 03, 2025, Pratik R. Sampat wrote: >>>> @@ -217,