Re: [PATCH v11 06/20] x86/sev: Handle failures from snp_init()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/28/2024 3:19 PM, Borislav Petkov wrote:
> On Wed, Aug 28, 2024 at 10:17:57AM +0530, Nikunj A. Dadhania wrote:
>> +	if ((snp && !snp_enabled) ||
>> +	    (!snp && snp_enabled))
>>  		snp_abort();
> 
> And which boolean function is that?

Ah.. missed that.

>  	/*
> -	 * The SEV-SNP CC blob should be present and parsing CC blob should
> -	 * succeed when SEV-SNP is enabled.
> +	 * Any discrepancies between the presence of a CC blob and SNP
> +	 * enablement abort the guest.
>  	 */
> -	if (!snp && (msr & MSR_AMD64_SEV_SNP_ENABLED))
> +	if (snp_en ^ (msr & MSR_AMD64_SEV_SNP_ENABLED))
>  		snp_abort();
>  
>  	/* Check if memory encryption is enabled */
> 

Do you want me to send the patch again with above change?

Regards
Nikunj




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux