FreeBSD/sys/amd64/vmm/amd/svm.c
/*
 * Return 1 if SVM is enabled on this processor and 0 otherwise.
 */
Return 1 if SVM is enabled on this processor and 0 otherwise.
Return 1 if SVM is enabled on this processor and 0 otherwise .
static int
svm_available(void)
{
	uint64_t msr;
	if ((amd_feature2 & AMDID2_SVM) == 0) {
		printf("SVM: not available.\n");
		return (0);
	}
	msr = rdmsr(MSR_VM_CR);
	if ((msr & VM_CR_SVMDIS) != 0) {
		printf("SVM: disabled by BIOS.\n");
		return (0);
	}
	return (1);
}
static int svm_available ( void ) { uint64_t msr ; if ( ( amd_feature2 & AMDID2_SVM ) == 0 ) { printf ( " \n " ) ; return ( 0 ) ; } msr = rdmsr ( MSR_VM_CR ) ; if ( ( msr & VM_CR_SVMDIS ) != 0 ) { printf ( " \n " ) ; return ( 0 ) ; } return ( 1 ) ; }
Return 1 if SVM is enabled on this processor and 0 otherwise.
Return 1 if SVM is enabled on this processor and 0 otherwise .
/* Section 15.4 Enabling SVM from APM2. */