Re: [PATCH v9 2/2] KVM: SVM: Enable Secure TSC for SNP guests

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

 



> @@ -2196,6 +2207,16 @@ static int snp_launch_start(struct kvm *kvm, struct kvm_sev_cmd *argp)
>  
>  	start.gctx_paddr = __psp_pa(sev->snp_context);
>  	start.policy = params.policy;
> +
> +	if (snp_secure_tsc_enabled(kvm)) {
> +		if (WARN_ON(!kvm->arch.default_tsc_khz)) {
> +			rc = -EINVAL;
> +			goto e_free_context;
> +		}
> +
> +		start.desired_tsc_khz = kvm->arch.default_tsc_khz;
> +	}
> +

I thought you were going to remove the error handling but just only
WARN_ON() and proceed.  Anyway, no problem to me.

Reviewed-by: Kai Huang <kai.huang@xxxxxxxxx>




[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