Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163162559
D1008.id2130.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D1008.id2130.diff
View Options
Index: head/sys/x86/x86/identcpu.c
===================================================================
--- head/sys/x86/x86/identcpu.c
+++ head/sys/x86/x86/identcpu.c
@@ -76,6 +76,7 @@
static void print_AMD_info(void);
static void print_INTEL_info(void);
static void print_INTEL_TLB(u_int data);
+static void print_svm_info(void);
static void print_via_padlock_info(void);
static void print_vmx_info(void);
@@ -932,6 +933,9 @@
if (cpu_feature2 & CPUID2_VMX)
print_vmx_info();
+ if (amd_feature2 & AMDID2_SVM)
+ print_svm_info();
+
if ((cpu_feature & CPUID_HTT) &&
cpu_vendor_id == CPU_VENDOR_AMD)
cpu_feature &= ~CPUID_HTT;
@@ -1735,6 +1739,67 @@
}
}
+static void
+print_svm_info(void)
+{
+ u_int features, regs[4];
+ uint64_t msr;
+ int comma;
+
+ printf("\n SVM: ");
+ do_cpuid(0x8000000A, regs);
+ features = regs[3];
+
+ msr = rdmsr(MSR_VM_CR);
+ if ((msr & VM_CR_SVMDIS) == VM_CR_SVMDIS)
+ printf("(disabled in BIOS) ");
+
+ if (!bootverbose) {
+ comma = 0;
+ if (features & (1 << 0)) {
+ printf("%sNP", comma ? "," : "");
+ comma = 1;
+ }
+ if (features & (1 << 3)) {
+ printf("%sNRIP", comma ? "," : "");
+ comma = 1;
+ }
+ if (features & (1 << 5)) {
+ printf("%sVClean", comma ? "," : "");
+ comma = 1;
+ }
+ if (features & (1 << 6)) {
+ printf("%sAFlush", comma ? "," : "");
+ comma = 1;
+ }
+ if (features & (1 << 7)) {
+ printf("%sDAssist", comma ? "," : "");
+ comma = 1;
+ }
+ printf("%sNAsids=%d", comma ? "," : "", regs[1]);
+ return;
+ }
+
+ printf("Features=0x%b", features,
+ "\020"
+ "\001NP" /* Nested paging */
+ "\002LbrVirt" /* LBR virtualization */
+ "\003SVML" /* SVM lock */
+ "\004NRIPS" /* NRIP save */
+ "\005TscRateMsr" /* MSR based TSC rate control */
+ "\006VmcbClean" /* VMCB clean bits */
+ "\007FlushByAsid" /* Flush by ASID */
+ "\010DecodeAssist" /* Decode assist */
+ "\011<b8>"
+ "\012<b9>"
+ "\013PauseFilter" /* PAUSE intercept filter */
+ "\014<b11>"
+ "\015PauseFilterThreshold" /* PAUSE filter threshold */
+ "\016AVIC" /* virtual interrupt controller */
+ );
+ printf("\nRevision=%d, ASIDs=%d", regs[0] & 0xff, regs[1]);
+}
+
#ifdef __i386__
static void
print_transmeta_info(void)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jul 21, 4:02 PM (49 m, 10 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35323856
Default Alt Text
D1008.id2130.diff (2 KB)
Attached To
Mode
D1008: Add AMD SVM features to dmesg.
Attached
Detach File
Event Timeline
Log In to Comment